- Every row now has a 'مشاهده' button regardless of handled status
- Opens a modal with: name, phone, email, category, date, status,
and full message text (no truncation)
- Modal includes 'علامتگذاری' button if request is still pending
- Message column in table kept short (truncated) as a preview only
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1. Beauty category icon: was pink (#C2185B), now uses site primary gold
(var(--gold) / var(--gold-pale)) to match brand color
2. Dashboard now shows health requests:
- Two new stat cards: total patients + pending requests (clickable)
- 'آخرین درخواستها' mini-table showing last 6 requests
- Sidebar badge updates from dashboard load too
- loadDashboard() now fetches /api/patients + /api/health-requests
3. Blog image edit fix:
- applyCrop() now captures inputId/previewId BEFORE closeCropper()
to prevent any potential race condition when replacing images
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Backend:
- Patient model: name, phone, email, age, weight, height, gender,
blood type, disease history, allergies, medications, notes, category
- PatientVisit model: title, content, prescription, visit type,
visit/next-visit dates, linked to patient (cascade delete)
- HealthRequest model: public form submissions for beauty/health care
- Runtime SQLite migrations for all 3 new tables
- Full CRUD API: /api/patients, /api/patients/{id}/visits,
/api/health-requests (public POST + admin GET/PUT/DELETE)
Admin panel:
- 'پرونده بیماران' page: list, search, filter by category (beauty/health)
- Patient profile page: personal info + medical history + visits timeline
- Add/edit patient modal with all medical fields
- Add visit modal: type, date, clinical notes, prescription, next visit
- 'درخواستها' page: manage public health requests, mark as handled
- Badge counter for unhandled requests in sidebar
Frontend (SEO):
- New #health-care section with Schema.org MedicalClinic markup
- Two category cards: زیبایی پوست and سلامت عمومی
- Feature lists with checkmarks per category
- Inline request form that submits to /api/health-request
- Mobile responsive (single column on small screens)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The .hidden class only covered .modal-overlay and .fm-overlay.
Without the rule, display:flex on .cropper-overlay overrode .hidden
and the modal showed immediately on every page load.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Admin: all upload buttons now open a crop-before-upload modal
- Canvas-based cropper (no external library)
- Ratio presets: 1:1, 4:3, 16:9, 3:4, free
- Drag to move crop box, drag corners to resize
- Touch support for mobile
- Crops client-side then uploads the result
- Frontend gallery: ba-label (قبل/بعد) now:
- Centered horizontally (block + width 100%)
- Wraps to multiple lines (white-space:normal)
- Responsive — never overflows or gets clipped
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>