Commit Graph
16 Commits
Author SHA1 Message Date
hamedandClaude Opus 4.8 9912ae06ca feat(api): surface backend error messages globally via toast
Show the backend's Persian error (errors[0].message, e.g. rate-limit
'درخواست‌های زیاد') as a toast for any failed request.* call, from the
axios response interceptor — so failures are no longer silent. 401 still
logs out/redirects without a toast; callers can opt out with
config.skipErrorToast. Drop now-redundant per-caller alerts/toasts in
the booking submit, payment, and OTP userinfo paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 18:25:11 +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 b46a017773 refactor: enhance appointment flow by adding selected slot and date management across components 2025-11-17 15:33:47 +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 7d6a9e6e33 update design and request pages dashboards & doctors & doctor item & clinics & clinic item and layout 2025-06-07 04:22:52 +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 a9f98aea3b autoselector page clinic item and specialties & dashboard responsive & change components & change package universal-cookie to js-cookie 2025-05-25 23:14:30 +03:30
Ehsan 5fa740ad1b handle all pages dashboard & register api 2025-05-24 22:17:55 +03:30
Ehsan 660117f6e8 last update 2025-05-23 18:06:48 +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
ehsanahmadi456 13a9de2438 add validation and basic api && change design sidebar 2025-04-01 15:38:07 +03:30
Ehsan bc26faa77c add axios and basic folder 2024-10-26 01:03:50 +03:30