Refactor doctor name handling across the application

- Removed the "دکتر" prefix from doctor names in various components and API responses to ensure consistency and clarity.
- Updated the AppointmentDetailPage, CommentsPage, DashboardPage, RatingsPage, SecretariesPage, and other relevant files to reflect the changes in doctor name formatting.
- Adjusted API documentation to align with the new naming conventions.
- Implemented validation to prevent the creation of clinics without a name and restricted users to a single clinic.
- Added tests to verify that doctor names are stored without titles and that clinic creation adheres to the new validation rules.
This commit is contained in:
hamed
2026-07-19 16:09:55 +03:30
parent 7761c37a3e
commit b05aeaf58b
30 changed files with 260 additions and 71 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ export default function RatingsPage() {
const columns: Column<Rating>[] = [
{ key: 'patient_name', header: 'بیمار', render: (r) => <b>{r.patient_name}</b> },
{ key: 'doctor_name', header: 'پزشک', render: (r) => `دکتر ${r.doctor_name}` },
{ key: 'doctor_name', header: 'پزشک', render: (r) => r.doctor_name },
{ key: 'overall', header: 'کلی', render: (r) => <Stars value={r.overall} /> },
{
key: 'ratings_detail',
@@ -111,7 +111,7 @@ export default function RatingsPage() {
<ConfirmDialog
open={!!deleteTarget}
title="حذف امتیاز"
message={`آیا از حذف امتیاز ${deleteTarget?.patient_name} برای دکتر ${deleteTarget?.doctor_name} اطمینان دارید؟`}
message={`آیا از حذف امتیاز ${deleteTarget?.patient_name} برای ${deleteTarget?.doctor_name} اطمینان دارید؟`}
confirmLabel="حذف"
danger
loading={deleteMutation.isPending}