Commit Graph
459 Commits
Author SHA1 Message Date
hamedandClaude Opus 4.8 ecc212db86 fix(auth): use SSL-tolerant axios for oauth token/refresh routes
route های token و refresh از fetch بومی Node استفاده می‌کردند که گواهی
self-signed ddev محلی را رد می‌کرد و خطای 500 می‌داد. حالا از axiosInstance
استفاده می‌کنند و خطای واقعی backend را با status درست برمی‌گردانند.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:30:42 +03:30
hamedandClaude Opus 4.8 1d56972b65 fix: use SSL-tolerant axios instance for server-side API calls
صفحات سرور (doctors, doctor/[slug], appointment/[doctorId]) از axios خام
استفاده می‌کردند که گواهی self-signed ddev محلی را رد می‌کرد
(unable to verify the first certificate). حالا از axiosInstance/fetchReq
در lib/req استفاده می‌کنند که در development آن را می‌پذیرد.
افزودن clinic-pro.ddev.site (http/https) به remotePatterns تصاویر.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:21:34 +03:30
hamedandClaude Opus 4.8 f3192945c7 fix(doctors): resolve next/image http host and MUI v5 loading prop
- افزودن الگوی http برای api.clinic-pro.ir به next.config (عکس‌های بیمه
  با http برمی‌گردند و خطای 500 next/image می‌دادند)
- جایگزینی prop loading نامعتبر روی Button با disabled در SendReq/ButtonApply
  (loading فقط در MUI v6+ پشتیبانی می‌شود؛ این پروژه v5 است و lab نصب نیست)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:15:10 +03:30
hamedandClaude Opus 4.8 dc1c6d25be feat(dashboard): connect patient dashboard to real user profile
- buildPatientUser: ساخت آبجکت user از user-profile واقعی با کلیدهای
  مورد انتظار کامپوننت‌ها؛ comments/messages خالی و اعداد هدر صفر
  (بدون داده ساختگی، چون endpoint ندارند)
- app/dashboard/page.js پروفایل را server-side از user-profile/{uuid} می‌گیرد
- حذف import userData.json mock از Content داشبورد
- نوبت/تراکنش/تب اطلاعات از قبل به API واقعی وصل بودند (بدون تغییر)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:10:40 +03:30
hamedandClaude Opus 4.8 5067824f28 feat(panel): connect turns/user-account/add-doctor to real data
- انتقال adapterهای نماینده به lib/representationAdapters (server-safe،
  بدون وابستگی client مثل js-cookie/react-toastify)
- turns: لیست از daily[] داشبورد ماهانه (ستون نام/تخصص خالی، بدون داده ساختگی)
- user-account: حساب بانکی واقعی از bank_account نماینده (map به آرایه تک‌کارته)
- add-doctor: حذف import mock مرده (کامپوننت data مصرف نمی‌کرد)
- رفع dead import اشتباه از turns/page در clinic/doctors که build را می‌شکست

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:06:01 +03:30
hamedandClaude Opus 4.8 1599098b6d feat(panel): connect dashboard page to representation monthly stats
تبدیل صفحه dashboard پنل به Server Component که آمار ماهانه نماینده را
از API می‌گیرد (year/month میلادی جاری) و با adaptRepresentationDashboard
به propهای کامپوننت map می‌کند. حذف داده mock.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:00:16 +03:30
hamedandClaude Opus 4.8 bef36f86ca feat(panel): wire panel header/userDetail to real representation info
افزودن adaptRepresentationInfo که خروجی API نماینده را به propهای
کامپوننت‌های نمایشی map می‌کند و حذف import داده mock از Content پنل.
فیلدهای آماری بدون معادل API خالی می‌مانند (بدون داده ساختگی).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 23:57:48 +03:30
hamedandClaude Opus 4.8 d513d2dd30 feat(panel): add representation dashboard API helpers
افزودن getRepresentationDashboardMonthly و getRepresentationDashboardYearly
به لایه request برای مصرف endpointهای داشبورد نماینده.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 23:54:58 +03:30
hamed 52f6bf6d0f Refactor code structure for improved readability and maintainability 2026-06-14 23:37:53 +03:30
hamedandClaude Sonnet 4.6 59e0a0fe4f fix: resolve critical bugs and security issues across the project
Security:
- Disable SSL verification only in development (lib/req.js)
- Wrap all JSON.parse(cookie) calls in try-catch via safeJsonParse utility
- Sanitize dangerouslySetInnerHTML in blog/clinic with sanitizeHtml utility
- Fix open redirect in payment page — validate URL origin before redirect
- Fix cookie cleanup on 401 — use js-cookie with correct domain scope

Performance:
- Wrap ItemDoctor with React.memo to prevent unnecessary re-renders
- Replace <img> with Next.js <Image> in blog Caption component

Functionality:
- Fix memory leak in Recode.js — store intervals in refs, cleanup on unmount
- Add null guard on retryIcon.current before classList manipulation
- Fix getParsedUserInfo in helper to handle malformed cookie gracefully

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 09:19:20 +03:30
hamedandClaude Sonnet 4.6 1aa9f82d2a fix: resolve critical bugs and security issues across the project
- Fix GPS map links always sending literal "latitude"/"longitude" strings
  instead of actual coordinates in openLocation/Content.js
- Add api.clinic-pro.ir to next.config.js remotePatterns so production
  images load correctly
- Fix appointment page: await params and getStateInfo (Next.js 15 pattern)
- Enable 401 handling in api.js: clear cookies and redirect to /login
- Move OAuth client_secret to server-side API routes (/api/auth/token,
  /api/auth/refresh) so it is never bundled into client-side JavaScript
- Update SendReq, SubmitData, ButtonSendData to call API routes instead
  of directly sending client_secret from the browser
- Update docker-compose.yml to use server-only CLIENT_SECRET env var
- Remove debug console.log from clinic doctors list component

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 22:18:11 +03:30
hamedandClaude Sonnet 4.6 ec536bfc32 fix: resolve sitemap build error caused by invalid Date values
- Replace new Date(b.created) with toSafeDate() helper to guard against
  invalid date strings from blog API responses
- Use a single NOW constant instead of new Date() per entry to avoid
  serialization issues during static generation
- Remove unused imports (cityData, DOMAIN_CONFIG, etc.)
- Add CLAUDE.md with project architecture and development guidance

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 21:47:42 +03:30
hamed 35408b059a seo check 2026-06-05 21:28:12 +03:30
hamed 3c9013ff0c check lighthous 2026-06-05 21:05:07 +03:30
hamed cf703f131a fix: update environment variables in docker-compose.yml to use default values 2025-12-23 11:27:59 +03:30
hamed 5d8c7cef1d fix: update NEXT_PUBLIC_API_URL to use default value if not set 2025-12-23 10:09:57 +03:30
hamed 54ae8c3a68 chore: update package.json to add tailwindcss and postcss dependencies 2025-12-17 17:59:20 +03:30
hamed db2f9aef60 Replace jalaali-react-date-picker with custom MUI-based Jalali date picker - fixes all 10 security vulnerabilities 2025-12-17 10:09:37 +03:30
hamed e5e6f33ae4 Update packages: Next.js 15.5.9, Tailwind 3.4.19 2025-12-17 09:58:14 +03:30
hamed a844ac20e7 Remove pull_policy - not supported in build section 2025-12-10 15:24:53 +03:30
hamed defaae05fe refactor: simplify Dockerfile for Next.js 14 and optimize build stages 2025-12-10 15:19:06 +03:30
hamed 3daa4cf333 refactor: update Dockerfile and docker-compose.yml for Next.js 15 compatibility and improved production setup 2025-12-10 15:16:28 +03:30
hamed 5c52dcda76 refactor: update Dockerfile and docker-compose.yml for Next.js 15 compatibility and improved production setup 2025-12-10 14:50:41 +03:30
hamed 8e5e8e1e9d refactor: update Dockerfile and docker-compose.yml for Next.js 15 optimization and standalone output 2025-12-10 14:44:41 +03:30
hamed 6f0c29d700 chore: update dependencies and add .dockerignore file
- Updated MUI packages to version 5.x and x-charts/x-date-pickers to 7.x
- Downgraded React and React-DOM to version 18.3.1
- Added .dockerignore to exclude unnecessary files from Docker context
2025-12-10 14:06:19 +03:30
hamed a8d4d5c090 refactor: update Dockerfile for Next.js 16 compatibility and optimize build process 2025-12-10 11:00:57 +03:30
hamed 76e96f1724 refactor: update Dockerfile and docker-compose.yml for Next.js 16 optimization and improved build process 2025-12-10 11:00:38 +03:30
hamed a0b946c39b chore: update dependencies to latest versions
- upgraded @maptiler/sdk from 2.5.1 to 3.9.0
- upgraded @mui/styled-engine-sc from 6.4.9 to 7.3.6
- upgraded @mui/x-charts from 7.29.1 to 8.21.0
- upgraded @mui/x-date-pickers from 7.29.4 to 8.21.0
- upgraded date-fns from 3.6.0 to 4.1.0
- upgraded npm from 10.9.4 to 11.7.0
- upgraded react and react-dom from 18.3.1 to 19.2.1
- upgraded swiper from 11.2.10 to 12.0.3
- upgraded cross-env from 7.0.3 to 10.1.0
2025-12-10 10:04:04 +03:30
hamed f5530d8c73 refactor: update SearchBar to use async getStateInfo for improved state handling 2025-12-10 09:55:09 +03:30
hamed 23f20626a6 refactor: improve key assignment in FrequentSearches and update TextHeader to use async getStateInfo 2025-12-10 09:53:51 +03:30
hamed 1df39909ea chore: add .npmrc file to enable legacy peer dependencies 2025-12-04 05:29:47 +03:30
hamed 40df2db108 chore: update dependencies in package.json
- Bumped versions for several packages including:
  - @emotion/styled from ^11.14.0 to ^11.14.1
  - @maptiler/sdk from ^2.4.0 to ^2.5.1
  - @mui/icons-material from ^7.1.0 to ^7.3.6
  - @mui/material from ^7.1.0 to ^7.3.6
  - @mui/styled-engine-sc from ^6.0.0-alpha.18 to ^6.4.9
  - @mui/x-charts from ^7.16.0 to ^7.29.1
  - @mui/x-date-pickers from ^7.17.0 to ^7.29.4
  - @next/third-parties from ^15.1.0 to ^15.5.7
  - axios from ^1.7.7 to ^1.13.2
  - dayjs from ^1.11.13 to ^1.11.19
  - jspdf from ^3.0.1 to ^3.0.4
  - next from ^14.2.20 to ^15.5.7
  - next-themes from ^0.3.0 to ^0.4.6
  - npm from ^10.8.2 to ^10.9.4
  - react from ^18.0.0 to ^18.3.1
  - react-dom from ^18 to ^18.3.1
  - react-easy-crop from ^5.1.0 to ^5.5.6
  - react-toastify from ^10.0.6 to ^11.0.5
  - sharp from ^0.34.1 to ^0.34.5
  - styled-components from ^6.1.11 to ^6.1.19
  - stylis from ^4.3.4 to ^4.3.6
  - swiper from ^11.1.9 to ^11.2.10
  - postcss from ^8 to ^8.5.6
  - prettier from ^3.5.3 to ^3.7.4
  - tailwindcss from ^3.4.1 to ^3.4.18
2025-12-04 05:26:37 +03:30
hamed 3ca69dcd0f refactor: enhance representation info fetching and pass it to relevant components 2025-12-02 15:38:42 +03:30
hamed e6cb27a714 refactor: remove unused frontend_address from payment payload in Paying component 2025-12-02 15:03:27 +03:30
hamed 95e55776c3 refactor: enhance dark mode support across components and improve user role handling in DetailProfile 2025-11-19 12:22:14 +03:30
hamed 18b03ca781 refactor: enhance user role handling in List and ability definitions 2025-11-19 11:48:40 +03:30
hamed e26d342c90 refactor: enhance blog functionality with related blogs fetching, improved loading states, and tag filtering 2025-11-19 11:32:09 +03:30
hamed 235a64c378 refactor: implement blog fetching and pagination in BlogsPage component 2025-11-19 10:55:26 +03:30
hamed 4651ae534d refactor: implement PDF download functionality for appointment details in DetailLg and DetailSm components 2025-11-19 10:34:02 +03:30
hamed aef10e7764 refactor: update map button functionality to use latitude and longitude for Google Maps links 2025-11-19 10:24:07 +03:30
hamed e7cff90516 refactor: integrate IsTurnsDetails component for enhanced appointment display 2025-11-19 09:42:59 +03:30
hamed b2f968480c refactor: update appointment handling to improve data flow and display, including status management and detail views 2025-11-19 09:16:41 +03:30
hamed e7c8501680 refactor: enhance transaction and appointment handling with pagination, status filtering, and improved data display 2025-11-18 22:21:47 +03:30
hamed 430e0b3b11 refactor: enhance payment handling by adding frontend_address to payment payload and implement PaymentDetailsPage component 2025-11-18 21:37:05 +03:30
hamed df54983fa3 refactor: enhance appointment handling by adding appointmentId state and updating payment process 2025-11-18 17:09:37 +03:30
hamed 5a9f21e88d refactor: require authentication for appointment posting in response service 2025-11-18 16:57:42 +03:30
hamed 53ac0fea83 refactor: add doctor, selectedSlot, and selectedDate props to SubmitData component and enhance appointment handling 2025-11-18 16:36:08 +03:30
hamed 6d6d27bcc9 refactor: pass doctor, selectedSlot, and selectedDate props to SubmitData and Detail components 2025-11-18 16:03:46 +03:30
hamed 0d547b91bc refactor: update terminology from 'expertise' to 'specialties' in Head components and improve phone number display in Form component 2025-11-18 15:47:24 +03:30
hamed 2894da3c69 refactor: remove console logs for token refresh and user profile requests in SubmitData and AppointmentPage components 2025-11-18 15:39:45 +03:30