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
+6 -6
View File
@@ -24,7 +24,7 @@ Create a doctor profile for the authenticated user.
### Request Body (`application/json`)
```json
{
"title": "دکتر علی احمدی",
"title": "علی احمدی",
"gender": "male",
"medical_system_code": "12345",
"degree": "متخصص",
@@ -36,7 +36,7 @@ Create a doctor profile for the authenticated user.
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `title` | string | ✅ | Full name with title |
| `title` | string | ✅ | نام پزشک **بدون** عنوان. پیشوند «دکتر» سمت سرور با `PersianText::stripDoctorTitle()` حذف می‌شود؛ نمایش عنوان کار لایهٔ UI است. |
| `gender` | string | ❌ | `"male"` or `"female"` |
| `medical_system_code` | string | ❌ | Nظام پزشکی code |
| `degree` | string | ❌ | Academic degree |
@@ -51,7 +51,7 @@ Create a doctor profile for the authenticated user.
"success": true,
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "دکتر علی احمدی",
"title": "علی احمدی",
"gender": "male",
"medical_system_code": "12345",
"degree": "متخصص",
@@ -93,7 +93,7 @@ Get doctor detail with clinics.
"data": {
"data": {
"uuid": "550e8400-...",
"name": "دکتر علی احمدی",
"name": "علی احمدی",
"gender": "man",
"medical_system_code": "12345",
"degree": "specialist",
@@ -153,7 +153,7 @@ Get doctor detail for clinic owner — only doctors who are members of the authe
"data": {
"data": {
"uuid": "...",
"title": "دکتر علی احمدی",
"title": "علی احمدی",
"specialties": [...],
"clinics": [{ "uuid": "...", "name": "کلینیک نور", "address": "...", "telephone": "..." }]
}
@@ -219,7 +219,7 @@ List doctors with pagination and filters.
"data": [
{
"uuid": "...",
"name": "دکتر علی احمدی",
"name": "علی احمدی",
"gender": "man",
"degree": "specialist",
"img": [],