feat: port secretaries tab from tauri to admin my-secretaries page

- Redesign MySecretariesPage pixel-perfect to clinic-pro-tauri (active/previous
  tabs, desktop table, mobile cards, add/edit/view modal with permission
  accordions, deactivate confirm)
- Permission sections based on existing admin pages (appointments, patients,
  payments, insurances, addresses, clinic_info)
- Extend DoctorSecretary with national_code + address columns (+migration);
  wire create/update in SecretaryController; add patients/payments to
  DEFAULT_PERMISSIONS
- Extend Secretary/SecretaryPermissions types; update admin SecretariesPage
- Backend + frontend tests; update docs/api/secretary.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-07-15 12:23:17 +03:30
co-authored by Claude Opus 4.8
parent 57c5383baf
commit 89e23a2c0d
9 changed files with 1146 additions and 709 deletions
+21 -1
View File
@@ -14,9 +14,11 @@ import Modal from '../components/ui/Modal';
const DEFAULT_PERMISSIONS: SecretaryPermissions = {
appointments: { view: true, create: false, cancel: false, update_status: false },
patients: { view: true, create: false, update: false, delete: false },
payments: { view: true, create: false, update: false, delete: false },
insurances: { view: true, create: false, update: false, delete: false },
addresses: { view: true, create: false, update: false, delete: false },
clinic_info: { view: true, update: false },
insurances: { view: true, create: false, update: false, delete: false },
};
type PermSection = keyof SecretaryPermissions;
@@ -31,6 +33,24 @@ const PERMISSION_LABELS: Record<PermSection, { label: string; actions: { key: st
{ key: 'update_status', label: 'تغییر وضعیت' },
],
},
patients: {
label: 'پرونده بیماران',
actions: [
{ key: 'view', label: 'مشاهده' },
{ key: 'create', label: 'ایجاد' },
{ key: 'update', label: 'ویرایش' },
{ key: 'delete', label: 'حذف' },
],
},
payments: {
label: 'پرداخت‌ها',
actions: [
{ key: 'view', label: 'مشاهده' },
{ key: 'create', label: 'ایجاد' },
{ key: 'update', label: 'ویرایش' },
{ key: 'delete', label: 'حذف' },
],
},
addresses: {
label: 'آدرس‌ها',
actions: [