feat(admin): a page for the official holiday calendar
The three admin endpoints shipped without anywhere to call them from, so the person who is supposed to maintain the national calendar could only do it with curl or a console command. That is not "the director can register the year's holidays". /admin/national-holidays is ROLE_ADMIN only and sits under the System group in the admin nav. The year lives in the query string, so back and refresh return to the year being edited. Editing takes only the title: `date` is the unique key, so moving a holiday is really deleting one and creating another, and the form says so rather than silently creating a duplicate. The date field is the shared Jalali picker, which speaks Gregorian, so the page converts before POSTing the jalali_date the API expects — and shows the converted value under the field so the user can see what will be stored. Deleting warns that the day leaves every clinic's calendar, because it does. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -212,6 +212,10 @@
|
||||
> `GET /api/v1/national-holidays` برای ادمین هم کار میکند: او محیط کاری ندارد، پس
|
||||
> بخش `overrides` برایش خالی برمیگردد و فقط تقویم را میبیند.
|
||||
|
||||
> **پنل:** صفحهٔ `/admin/national-holidays` (منو ← سیستم ← تعطیلات رسمی) تنها جای
|
||||
> ساخت و حذف است و فقط `ROLE_ADMIN` میبیندش. `/admin/holidays` مالِ محیط است و آنجا
|
||||
> فقط استثنا زده میشود، نه خودِ تعطیلی.
|
||||
|
||||
### `POST /api/v1/holiday-overrides`
|
||||
|
||||
| فیلد | نوع | توضیح |
|
||||
|
||||
Reference in New Issue
Block a user