Commit Graph
60 Commits
Author SHA1 Message Date
hamed 4c8377f439 feat: add doctorTitle helper function and update references in metadata and FAQ 2026-07-19 15:40:24 +03:30
hamedandClaude Opus 4.8 f584f581e5 fix(auth): correct login detection + return to origin after login
- isUserLoggedIn() checked the access_token cookie, which is never set
  (access_token lives in memory / tokenStore; only userInfo + uuid are
  cookies). It therefore always returned false — the claim modal (and
  comment auth checks) kept showing the login prompt even when logged in.
  Now reads the userInfo cookie.
- Claim modal login link carries ?redirect=<current path>; after OTP login
  SendReq returns to that path (guarded to internal "/..." only, blocks
  protocol-relative //) instead of always going to "/".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 15:12:58 +03:30
hamed 9e5da8f19e feat: update QueryForDoctorsReq and buildDoctorParams to use *_id for specialty, city, and state 2026-07-02 11:13:18 +03:30
hamed c316d22160 feat: add testing setup with Vitest and Testing Library
- Updated package.json to include Vitest and Testing Library dependencies and scripts for testing.
- Created a test suite for the ProvinceProvider context to validate cityId and province detection based on subdomains.
- Implemented unit tests for utility functions in helper/index.js, including phone number formatting and validation.
- Added tests for state information retrieval in lib/getStateInfo.js, ensuring correct city and state matching based on subdomains.
- Developed tests for appointment slot adaptation and availability checks in lib/appointmentSlots.js.
- Created tests for token storage functionality in lib/tokenStore.js.
- Implemented sanitization and JSON parsing tests in lib/sanitize.js.
- Added CASL ability tests in lib/ability.js to verify user access rights.
- Created tests for cookie management in lib/refreshCookie.js.
- Developed tests for patient user representation in lib/representationAdapters.js.
- Implemented client-side state information retrieval tests in lib/getStateInfoClient.js.
- Created tests for canonical URL generation in lib/getCanonicalUrl.js.
- Developed tests for clinic API service functions in services/clinicApi.js.
- Added request wrapper tests in services/response.js to ensure correct API interaction.
- Set up Vitest configuration in vitest.config.mjs for JSX support and alias resolution.
- Created setup and utility files for testing environment in test/setup.js and test/utils.jsx.
2026-06-28 23:25:46 +03:30
hamed cb13ba3f45 fix(doctors): improve filter performance and resolve modal closing issues 2026-06-21 15:47:37 +03:30
hamed a19058d9a2 feat(userAccount): add validation for Iranian national code and update input handling 2026-06-19 11:23:01 +03:30
hamed e9136ea42b feat(blog): enhance blog data handling with normalization and improved image management 2026-06-19 00:35:11 +03:30
hamedandClaude Opus 4.8 e6570e06f6 fix(images): resolve relative backend image URLs to absolute
API مسیرهای تصویر را نسبی برمی‌گرداند (/uploads/...) که next/image روی
دامنه localhost می‌جست و 404 می‌داد. helper جدید imageUrl مسیرهای نسبی
uploads را با NEXT_PUBLIC_API_URL کامل می‌کند (absolute و asset محلی
دست‌نخورده). اعمال روی لیست/جزئیات پزشک، نوبت، گالری کلینیک، آواتارها.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:44:27 +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 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
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 2777db3b8c refactor: enhance phone number validation and input handling in Field and LogInPage components 2025-11-17 15:09:25 +03:30
hamed 1e510a84b1 refactor: enhance date selection logic in DatePicker and update appointment request parameters 2025-11-17 14:18:15 +03:30
Arezoo 34188ab366 error handeling on the pagination 2025-10-22 17:38:29 +03:30
Arezoo f22526bff3 paginations ,limit=50 2025-10-22 14:30:30 +03:30
Arezoo 2cbf96ec6f handel filter clinic and added changenumber function 2025-10-21 13:31:44 +03:30
ehsan 83e482507b responsive pagination && handle free_turn value && fix set value in small size appo list in page doctors && set data rate in doctor item && fix set token in cookie in page login on domain nobat724.com 2025-10-04 17:16:47 +03:30
ehsan e1510b142b handle download poster and qrcode, fix to show timestamp, add pagination to doctors page 2025-10-02 02:52:26 +03:30
ehsan 645da72002 add state of page in url, add location and working_days on list in clinics page, fix update list clinic with page and limit value, hide pagination when list of clinic is empty, round image of doctor and appo in doctor item 2025-09-30 15:58:31 +03:30
ehsan b10fa6259e fix bug modal search location in home && send request after click on continue for update list clinics && change style on hover text of specialties and service in clinics page && add loading for list of clinics && fix bug page doctor item && link footer to clinic-pro 2025-09-29 00:36:55 +03:30
ehsan 6f35ee3c10 round img of doctors && fix remove 'nobat724' value in city data for all pages && handle send req for filter clinics && filter list clinic for first time on load page && add component loading and handle it in page clinics 2025-09-27 21:06:32 +03:30
ehsan 74c6cf7b6b remove additional code && fix bug select city and state && alert success and error message for comment in doctors page && handle set data after user searched in field doctors page && set data appointment from doctor data && set value in field search after user reload in doctors page 2025-09-22 19:56:28 +03:30
ehsan dfc8492afa handle like comments data, req for update comments and add loading for like comment && search specialty with searchbar in doctors page && set category and specialty data 2025-09-20 17:04:36 +03:30
Ehsan f0e8a753c3 fix filter gender, req and set new data when delete all filters, show date time with timestamp in doctors list, fix send data in home page list specialty, change data of params for request to doctors in doctors page 2025-09-13 15:05:50 +03:30
Ehsan 6414293d1c handle request in modal filters, selector sort, search city with one function and field-search & handle change all data in doctors filter with one function & change modal search location in home page & set data with diffrent key in url of page doctors 2025-09-12 20:51:50 +03:30
Ehsan d04aa8568d send filter degree, gender and speciality with en name, handle set url in doctors page with searchbar home for key field or search, set value of province in url with id, change filter stars with ASC and DESC, bg-color of field in spcialties 2025-09-09 19:48:45 +03:30
Ehsan c88a371eda page add panel/doctor role agent && save data crop img && upload img && just roles agent can access panel && save data doctor && add field phone number && remove two tab 2025-07-16 08:13:29 +03:30
Ehsan 97802a9fdf change packages & change data in weekly day & add fields to modal add & remove validation from login page 2025-07-13 00:47:06 +03:30
Ehsan c6e2657e45 change design and data list in doctor-item & handle component appointment in doctor-item & handle functionality date-picker & fix bug appointment page & add req get appointment list 2025-07-09 03:05:48 +03:30
Ehsan f951128074 change date type for req & design and fields & add requests & fix bug appointment and dashboard 2025-07-04 23:44:29 +03:30
Ehsan 04d3e38859 change fields component & handle edit, delete, add data and save & change functional page doctor 2025-07-02 01:58:44 +03:30
Ehsan 43eb9c2b78 change functionality req from ssr to csr 2025-06-18 01:32:25 +03:30
Ehsan 7d6a9e6e33 update design and request pages dashboards & doctors & doctor item & clinics & clinic item and layout 2025-06-07 04:22:52 +03:30
Ehsan e292176a61 handle limit page dashboard & change header profile user & get data from api in page clinics & clinic item and doctor item 2025-06-01 01:08:25 +03:30
Ehsan 38e243b4c7 change design dashboards all page and search clinics 2025-05-27 22:27:02 +03:30
Ehsan c469f2ee3c handle register and poster and fix bugs 2025-05-21 23:35:55 +03:30
Ehsan 6c7709c342 change function and design page doctors & signin & signup & home & specialties & helper 2025-05-21 16:44:34 +03:30
Ehsan c8c217e286 fix type persian numbers && change design loading && fix warnings && handle icons size in device mobile 2025-05-19 02:41:31 +03:30
Ehsan 254d5d4ebd change format all file 2025-05-18 01:18:35 +03:30
Ehsan 4a57468e26 handle pagination in clinics page & change design login & fix bug filter state & change list most searched in home page & handle error page doctor item & change key url doctors and home page and get data from url & send data with url search to doctors page & show pagination only when list is long 2025-05-18 01:07:22 +03:30
Ehsan 80c7329916 get data from url and set in state & change default value & handle delete value of states & handle list and filter category and expertise in doctors page & handle search onchange & filter list clinics on change state 2025-05-17 01:46:25 +03:30
Ehsan a016d3319a save data modal & change list selectors & handle redirect in modal page doctors 2025-05-16 13:52:47 +03:30
Ehsan 60fe4c8040 modal search and default valud of province and city and handle search && show searched state in clinics page 2025-05-15 00:16:09 +03:30
Ehsan feba3c4a64 change list sort doctors page & change function search list specialties & remove pagination from page specialties & fix zoom page & change design all fields & change regex validation phone number for nobat724 and clinic-pro 2025-05-14 15:57:40 +03:30
Ehsan a8a320465d change name in register & add link to most-searched home page & change tag & change design and responsive & fix active link header & must include field num in register & send code msg 2025-05-13 22:07:03 +03:30
Ehsan de1f307574 handle active list header links 2025-05-12 23:04:52 +03:30
Ehsan 1fa42a3700 change function handle validation register 2025-05-12 19:37:02 +03:30
Ehsan d0497721f1 change style & add space & validation number in register page 2025-05-12 15:58:44 +03:30