Commit Graph
48 Commits
Author SHA1 Message Date
hamedandClaude Opus 4.8 08f5829a22 fix(auth): complete login by reading userinfo from response envelope
oauth/userinfo returns { success, data: {...} }, so after the interceptor
unwraps once the user lives at res.data, not res. getInfo checked
res.uuid (undefined), so it never set the userInfo cookie or redirected —
the /login page just sat there after entering the OTP. Read res.data,
store the user object (with a username alias for mobile_number so the
appointment flow keeps working), redirect via location.href, and show a
toast instead of silently staying when userinfo fails.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 18:16:36 +03:30
hamedandClaude Opus 4.8 65b3f56530 fix(auth): surface real OTP error on verification step
The booking login step showed only a generic error when /api/auth/token
returned 400, so an invalid or expired OTP looked like a broken page.
The backend returns the reason (ERR_AUTH_002 invalid / ERR_AUTH_003
expired) in errors[].message, forwarded by the route; show it via toast.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 16:37:50 +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 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
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 04d3e38859 change fields component & handle edit, delete, add data and save & change functional page doctor 2025-07-02 01:58:44 +03:30
Ehsan eea8737778 Fix dashboard data requests, update dashboard data handling, change login field type, and redesign home button 2025-06-12 21:46:27 +03:30
Ehsan f52eb43326 last update 2025-06-08 10:13:06 +03:30
Ehsan 0a8874c4ab dashboard design and functionality and data and page doctor and clinic change data 2025-06-04 03:58:38 +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 e12e6c171c handle register & retry code & edit phone number & fix bug select city and state & add basic modal to all tabs in dashboard 2025-05-29 05:07:11 +03:30
Ehsan 38e243b4c7 change design dashboards all page and search clinics 2025-05-27 22:27:02 +03:30
Ehsan d95815d4aa install and handle casle & prevent page dashboard & handle register and code verfication & get data in clinics page 2025-05-27 03:40:06 +03:30
Ehsan 5fa740ad1b handle all pages dashboard & register api 2025-05-24 22:17:55 +03:30
Ehsan 7dfad1847a last update 2025-05-23 19:45:14 +03:30
Ehsan 660117f6e8 last update 2025-05-23 18:06:48 +03:30
Ehsan 6b1983fb0b handle api register & change design dashboard tabs and page disease 2025-05-23 00:04:13 +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 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 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 555bbddb53 show section send msg just for nobat724 domain 2025-05-12 21:24:48 +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
Ehsan 4b554fff07 set data ssr in page login && login-verify and panel page 2025-05-12 00:07:28 +03:30
Ehsan a89fc4a3f9 update modals & text & design 2025-05-09 22:04:56 +03:30
Ehsan 9e3e6c27ee change header z-index 2025-02-17 16:36:40 +03:30
Ehsan 50af28b22c change otp form 2024-10-30 11:50:27 +03:30
Ehsan 18b1c26699 change design modal & components & home and login page 2024-10-23 18:54:53 +03:30
Ehsan b9b8067184 change style tabs 2024-10-03 16:58:20 +03:30
Ehsan d1c8e0e00b responsive page login 2024-09-26 18:35:38 +03:30
Ehsan eda896e917 add prettier formatter to all file 2024-09-25 11:03:44 +03:30
Ehsan 13cc7796c3 check responsive & page dashboard user account & turns & transactions & comments 2024-09-03 03:04:55 +03:30
Ehsan bb154ac63f change design all page & component page booking and account & cleancode 2024-09-01 20:43:53 +03:30
Ehsan 680ef74034 fix responsive all page & add modal doctor id & page dashboard aside 2024-09-01 01:36:36 +03:30
Ehsan 7925493681 change date-picker & add page login-verify & account & new user & payment 2024-08-26 20:04:33 +03:30
Ehsan 9701547d1f fix responsive all pages & change style page list blog and blog item & add date picker 2024-08-23 18:57:28 +03:30
Ehsan c62fb78f8c responsive page about-us & contact-us & item clinic 2024-08-21 21:45:45 +03:30
Ehsan 4fbef73d00 page set code 2024-06-24 03:56:29 +03:30
Ehsan 2e561762fa page signin & signup 2024-06-24 03:41:03 +03:30
Ehsan a5b4179135 fix bug field text mui 2024-06-24 03:10:07 +03:30
Ehsan bc3fa02343 update home page bg & style 2024-06-19 01:46:10 +03:30
Ehsan 4d71481738 basic structure folder and style 2024-05-14 19:54:46 +03:30