Task #716: Booking slots — edit dialog + compact numbered table
- SlotsAdminSection (artifacts/tx-os/src/pages/protocol.tsx): replaced the 2-column card grid of booking slots with a compact shadcn Table sorted by startTime: # | time range | duration | days | status | actions. Rows are dense (py-1.5, small text, h-7 icon buttons), RTL/LTR safe. - New edit flow: pencil button opens a Dialog to change start time, duration (5–480, step 5) and days-of-week (same day-chip UI as the generator). Saves via existing PATCH /api/protocol/booking-slots/:id (no backend changes needed — route already accepted startTime/durationMinutes/daysOfWeek). 409 duplicate_slot shows a dedicated destructive toast; other errors fall back to the shared onError. Invalidates slots-admin + parent slots queries. - i18n: new keys under protocol.slots in ar.json/en.json (colTime, colStatus, colActions, edit, editTitle, editSaved, duplicateSlot, durationValue with full Arabic plural categories). - tsc --noEmit passes for tx-os. Architect review: Pass; added the suggested <=480 client-side duration guard. - Follow-up #717 proposed (UI test for edit + 409 toast).
This commit is contained in:
@@ -1968,7 +1968,20 @@
|
||||
"generated": "تم توليد {{created}} وقتًا، ودمج الأيام في {{merged}}، وتجاهل {{skipped}} مكررًا.",
|
||||
"generatedNone": "لا جديد — كل الأوقات والأيام موجودة مسبقًا.",
|
||||
"pickDay": "اختر يومًا واحدًا على الأقل",
|
||||
"noSlotsForDay": "لا توجد أوقات متاحة في هذا اليوم"
|
||||
"noSlotsForDay": "لا توجد أوقات متاحة في هذا اليوم",
|
||||
"colTime": "الوقت",
|
||||
"colStatus": "الحالة",
|
||||
"colActions": "إجراءات",
|
||||
"edit": "تعديل",
|
||||
"editTitle": "تعديل وقت الحجز",
|
||||
"editSaved": "تم حفظ التعديل",
|
||||
"duplicateSlot": "يوجد وقت حجز يبدأ في نفس التوقيت.",
|
||||
"durationValue_zero": "{{count}} دقيقة",
|
||||
"durationValue_one": "دقيقة واحدة",
|
||||
"durationValue_two": "دقيقتان",
|
||||
"durationValue_few": "{{count}} دقائق",
|
||||
"durationValue_many": "{{count}} دقيقة",
|
||||
"durationValue_other": "{{count}} دقيقة"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user