feat: enhance staff management and payment gateway features
- Fix national code handling in staff creation and updates to support Persian digits. - Update ClinicStaff entity to allow longer national codes (up to 15 characters). - Implement support for clinic secretaries in SecretaryController, allowing creation without a doctor UUID. - Add a new endpoint to retrieve doctors associated with a clinic for secretary management. - Improve appointment management by ensuring doctors are selectable even when no appointments exist. - Extend PatientController to allow secretaries to create patient records if they have the appropriate permissions. - Introduce a PriceInput component for better price formatting in forms, supporting Persian digits. - Add a MockGateway for testing payment processes without real transactions. - Enhance SMS settings management with an approval flow for post-visit text messages, including new fields for pending text and status. - Update migrations to reflect changes in database schema for national codes and SMS settings.
This commit is contained in:
@@ -390,6 +390,9 @@ Updated template with `status: "rejected"`.
|
||||
"reminder_hours_before": 2,
|
||||
"post_visit_enabled": false,
|
||||
"post_visit_text": null,
|
||||
"post_visit_text_pending": null,
|
||||
"post_visit_text_status": "none",
|
||||
"post_visit_text_reject_reason": null,
|
||||
"updated_at": 1718000000
|
||||
}
|
||||
}
|
||||
@@ -408,10 +411,50 @@ Updated template with `status: "rejected"`.
|
||||
}
|
||||
```
|
||||
|
||||
**تغییر رفتار `post_visit_text`:** متن ارسالشده مستقیماً اعمال نمیشود — در فیلد `post_visit_text_pending` ذخیره میشود و وضعیت `post_visit_text_status` به `pending` تغییر میکند. پس از تأیید ادمین، به `post_visit_text` منتقل میشود.
|
||||
|
||||
**مقادیر `post_visit_text_status`:** `none` | `pending` | `approved` | `rejected`
|
||||
|
||||
---
|
||||
|
||||
## Admin Endpoints
|
||||
|
||||
### GET /api/v1/admin/sms/settings/review
|
||||
|
||||
**Permission:** `ROLE_ADMIN` — لیست همه تنظیمات SMS با وضعیت `pending`
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"data": [
|
||||
{
|
||||
"id": 3,
|
||||
"entity_type": "doctor",
|
||||
"entity_id": 7,
|
||||
"post_visit_text_pending": "متن در انتظار تأیید",
|
||||
"post_visit_text_status": "pending",
|
||||
...
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### POST /api/v1/admin/sms/settings/{id}/approve
|
||||
|
||||
**Permission:** `ROLE_ADMIN` — تأیید متن پیامک. `post_visit_text_pending` به `post_visit_text` منتقل میشود.
|
||||
|
||||
### POST /api/v1/admin/sms/settings/{id}/reject
|
||||
|
||||
**Permission:** `ROLE_ADMIN` — رد متن پیامک.
|
||||
|
||||
```json
|
||||
{ "reason": "متن نامناسب است" }
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### GET /api/v1/admin/sms/wallet-report
|
||||
|
||||
**Permission:** `ROLE_ADMIN` — لیست همه کیفهای پیامکی (paginated)
|
||||
|
||||
Reference in New Issue
Block a user