feat(resources): warn before switching a resource off, and pick dates in Jalali
The deactivation warning was blocked on task 07: there was no way to count "the
appointments on this resource" until occupancy rows linked the two. They do
now, so GET /resource/{uuid} returns upcoming_appointments. It stays off the
list endpoint, where it would be one count query per row.
It is a warning, not a block, and the wording says so: switching a resource off
does not cancel anything, it only removes the resource from future searches.
The panel shows it the moment the "active" box is unticked.
The calendar's exception range still used <input type="date">, which is
Gregorian. Operators say dates in Jalali, and the mental conversion is exactly
where an exception gets recorded a day off. PersianDateInput takes the same
YYYY-MM-DD string, so this is a drop-in swap.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
| ۳.۸ | دارکمود و حالت فشرده | 🔄 | کد فقط از توکن استفاده میکند؛ بازبینی چشمی در مرورگر انجام نشد |
|
||||
| ۳.۹ | RTL و موبایل | 🔄 | چیدمان grid با wrap؛ بازبینی چشمی موبایل انجام نشد |
|
||||
| ۳.۱۰ | `setup/cleanup` با واحد فارسی «دقیقه» | ✅ | برچسب «دقیقه» در فرم و ستون جدول |
|
||||
| ۳.۱۱ | هشدار «این منبع N نوبت آیندهٔ فعال دارد» هنگام غیرفعالسازی | ⏳ | نوبت هنوز به منبع وصل نیست — شمارش «نوبت آیندهٔ این منبع» تا تسک ۰۷ ممکن نیست |
|
||||
| ۳.۱۱ | هشدار «این منبع N نوبت آیندهٔ فعال دارد» هنگام غیرفعالسازی | ✅ | ⭐ `upcoming_appointments` روی `GET /resource/{uuid}`؛ هشدار است نه مانع — غیرفعالسازی نوبتها را لغو نمیکند |
|
||||
|
||||
## ۴. تست
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|---|---|---|---|
|
||||
| ۵.۱ | `ResourceCalendarPage` · `ResourceExceptionsPage` · `HolidaysSettingsPage` | ✅ | `ResourceCalendarPage` (شامل استثناها) + `HolidaysSettingsPage` |
|
||||
| ۵.۲ | گرید هفتروزه با فرم ساده (بدون drag) | ✅ | گرید هفتروزه با فرم ساده |
|
||||
| ۵.۳ | بازهٔ تاریخ با `PersianDatePicker` | ⏳ | ورودی تاریخ فعلاً `<input type="date">` میلادی است، نه `PersianDatePicker`. مقصد: پاس UI فارسیسازی |
|
||||
| ۵.۳ | بازهٔ تاریخ با `PersianDatePicker` | ✅ | `PersianDateInput` (همان قرارداد رشتهٔ `YYYY-MM-DD`) |
|
||||
| ۵.۴ | `backTo`/`BackButton` روی هر سه | ✅ | `backTo` + breadcrumb |
|
||||
| ۵.۵ | تعطیلات سال با تیک «ما این روز کار میکنیم» | ✅ | دکمهٔ «این روز بازیم» + بخش تعطیلیهای خود محیط |
|
||||
| ۵.۶ | هیچ رنگ/شعاع hard-code | ✅ | همه از `var(--…)` |
|
||||
|
||||
Reference in New Issue
Block a user