Commit Graph
178 Commits
Author SHA1 Message Date
hamedandClaude Opus 4.8 ff54daf1ae fix(doctor): unwrap double-nested API response and guard empty sections
The GET /api/v1/doctor/{uuid} response is double-nested
({ success, data: { data: {...} } }), but the page only unwrapped one
level, leaving every field (name, specialties, expertise, address)
undefined — so خدمات / موقعیت مکانی / نظرات rendered empty or broken.

- Extract the doctor object with res.data?.data?.data in both
  generateMetadata and the page.
- Hide the خدمات block when expertise is empty (no fabricated data).
- Render the location map iframe and routing buttons only when the
  address has real latitude/longitude (was building q=null,null).
- Fix the comments list rendering a stray 0 on empty arrays.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 15:18:06 +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 8255283ec0 fix(ui): remove invalid MUI v5 Button loading prop project-wide
prop loading روی Button فقط در MUI v6+ پشتیبانی می‌شود؛ این پروژه v5 است
و هشدار "Received false for a non-boolean attribute loading" می‌داد.
- دکمه‌های login/verify: disabled + CircularProgress شرطی (بازخورد بصری حفظ شد)
- بقیه دکمه‌ها: loading → disabled (ادغام با disabled موجود در صورت وجود)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:30:55 +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
hamed 3c9013ff0c check lighthous 2026-06-05 21:05:07 +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 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 95e55776c3 refactor: enhance dark mode support across components and improve user role handling in DetailProfile 2025-11-19 12:22:14 +03:30
hamed 5c98b4de3e refactor: enhance handling of supplementary insurance in Form and AppointmentPage components 2025-11-18 10:35:35 +03:30
hamed 3268b3c51e refactor: enhance form validation and error handling in EditField, DefaultSelect, and Form components 2025-11-18 09:16:01 +03:30
hamed ebc6c246b9 refactor: add gender selection to Form component and update DefaultSelect for improved option handling 2025-11-18 08:32:41 +03:30
hamed b46a017773 refactor: enhance appointment flow by adding selected slot and date management across components 2025-11-17 15:33: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 5a58c13a4e refactor: implement login state management and navigation flow in appointment components 2025-11-17 15:00:40 +03:30
hamed 6c787fe5fa refactor: add location address handling in DateTime component and update Hours component to display address 2025-11-17 14:50:53 +03:30
hamed 1e510a84b1 refactor: enhance date selection logic in DatePicker and update appointment request parameters 2025-11-17 14:18:15 +03:30
hamed 63d968be1e refactor: update appointment components to fetch and handle doctor data and disabled dates 2025-11-12 21:28:15 +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 e6893846bd change design poster and text head && design modal filter & data for filter and doctors & handle functionality filter, set in url, read from url and change state 2025-10-06 01:13:55 +03:30
ehsan 0b90e1abc4 change api file and design poster 2025-10-04 20:36:50 +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 ae8c49bd07 change timstamp functional 2025-09-29 11:04:26 +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 0db121150d update field doctors, cities, states and specialties 2025-09-25 17:06:57 +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 e11f4ed3c5 add loading for redirect button from home to doctors page && change filter for field search in name or specialty and set in url && fix bug select city in home page 2025-09-21 23:12:47 +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 2f078eba3c add first open time for appo item and change component data, remove work time in location, add loading on links in page doctor list, fix bug search city and state in clinics page 2025-09-18 14:30:49 +03:30
Ehsan 41ba7aa709 add auto-selecotr to home page and handle set in data, search in specialties and send req for filter && add locations and change text 2025-09-15 19:45:39 +03:30
Ehsan 153cb5bc9f send city and state matched by domain in first request page /doctors, send data from field home page with key name, add link for name of doctor in /doctors page and active redirect linke to doctor item page 2025-09-14 05:05:08 +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 dbef29b9d9 change function of fliter sort, modal and locate set new data and change it and update 2025-09-12 09:39:48 +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 10d4c39a4d change key field to specialty, filter list doctors with name, remove loading state from doctors page, save state id in url 2025-09-07 10:22:53 +03:30
Ehsan dc40129034 handle change data in doctor model, set previous data when user close modal, update list doctor after update data and change key name in url 2025-09-05 23:05:02 +03:30
Ehsan ebfe47468c get data with filter location for first time, get comment of doctor and show in doctor page, handle new comment 2025-09-03 22:05:26 +03:30
Ehsan 6920e4078b redirect filter data to doctors page from home page just with one key && add picture url to doctors page && add conditional to appo page and change data in server 2025-09-02 00:32:04 +03:30
Ehsan 1e70d88a84 fix bug save and set data just with one key, remove page login from appo page, disable not avalaible data in calendar, change steps for pages in appo, get data user, edit and set in page user-info 2025-08-31 01:21:59 +03:30
Ehsan 09867bf84a show only the first item in appo list & update appo item text && change key in /doctors page URL && handle setting and updating data on first modal filter load 2025-08-26 22:35:05 +03:30
Ehsan 7e61867e3d change name office-info && change name img uploaded && change theme selector && set default tab in appo page && clean code 2025-07-25 00:02:46 +03:30
Ehsan 901bca6529 handle save some data and send server correct & change component form & clean code & fix bugs 2025-07-18 13:54:48 +03:30
Ehsan 278602372d change component folders && add multipleselector && send img of doctor page && send skills to create doctor item 2025-07-17 15:50:23 +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 88f25cdd2e in page add doctor change data state & component & save data & request to send data & change component folder 2025-07-14 04:30:50 +03:30