Commit Graph

2217 Commits

Author SHA1 Message Date
Replit Agent 406db18797 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: da2f3322-16f4-462d-bc6b-8ad4d6dcec77
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ZgwFc55
Replit-Helium-Checkpoint-Created: true
2026-07-09 06:13:39 +00:00
Replit Agent 7daaf6f2f0 Task #718: Numbered key-attendees table auto-synced with expected attendee count
- New shared component artifacts/tx-os/src/components/attendee-table-editor.tsx:
  AttendeeTableEditor (# | name | position | side select | remove), plus
  syncAttendeeRows/emptyAttendeeRow helpers and MAX_ATTENDEE_ROWS=50 cap.
- Internal booking dialog (protocol.tsx): replaced the two side-by-side
  BookingAttendeeColumn lists with the single numbered table; each row now
  carries its own side. Edit mode prefills existing keyAttendees then pads
  to attendeeCount. useEffect syncs row count with the attendeeCount field:
  growing adds empty rows, shrinking removes only empty trailing rows (never
  filled ones), min 1 row.
- Public form (protocol-request.tsx): same conversion (AttendeeColumn removed,
  Arabic labels passed directly since the page is forced-RTL Arabic).
- Submission payload unchanged: only rows with non-empty name sent, same
  keyAttendees {name, position, side} shape — no API/schema changes.
- i18n: added protocol.bookings.form.side ("الجهة"/"Side") in ar.json/en.json.
- Removed dead code (BookingAttendeeColumn, AttendeeColumn, AttendeeRow type,
  unused Plus/X imports in protocol-request).
- Verified: tsc --noEmit clean; page serves 200; architect review PASS.
- Follow-up proposed: #719 UI test for count sync/prefill/submit.
2026-07-09 06:03:40 +00:00
Replit Agent 3cf4aae18e Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: b18cdf1b-39b5-433f-9939-bfcfb9f4ae75
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ZgwFc55
Replit-Helium-Checkpoint-Created: true
2026-07-09 05:58:14 +00:00
Replit Agent e3484819dc 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).
2026-07-09 05:54:18 +00:00
Replit Agent 893b3d5bfb Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 6a17c6cd-b780-4128-9961-becb0e8426a0
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ZgwFc55
Replit-Helium-Checkpoint-Created: true
2026-07-09 05:49:59 +00:00
Replit Agent 89331004f3 Task #714: rooms management submenu + rooms dashboard
- protocol.tsx: added collapsible "إدارة القاعات" nav group (giftsGroup pattern)
  containing لوحة القاعات (roomsDashboard, new), القاعات (rooms),
  حجز القاعات (bookings), إعدادات الحجوزات (bookingSettings, canManageRooms only).
- Deep-link slugs: /protocol/rooms-dashboard, /protocol/booking-settings.
- SlotsAdminSection moved from rooms tab to booking-settings tab; non-manager
  deep-link shows no-access empty state.
- New RoomsDashboardView (recharts): KPI cards, next-booking countdown,
  14/30-day area chart, by-room bar chart, by-status pie.
- API: new GET /api/protocol/rooms-stats (requireProtocolAccess), Riyadh-tz
  day boundaries, 30-day zero-filled daily series, byRoom/byStatus, nextBooking.
- i18n keys ar/en (tabs + protocol.roomsDash.* with Arabic plurals).
- Tests: artifacts/api-server/tests/protocol-rooms-stats.test.mjs (2 pass).
- Architect review passed; typechecks clean (pre-existing errors in
  executive-meetings.ts/push.ts untouched).
2026-07-08 20:39:29 +00:00
Replit Agent 81dd7b708f Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 196a45c9-4ecf-4b59-a6af-904354bd7ede
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ZgwFc55
Replit-Helium-Checkpoint-Created: true
2026-07-08 20:30:26 +00:00
Replit Agent b56f1682a9 Task #710: Weekly availability intervals (Calendly-style) for protocol booking slots
- DB: protocol_booking_slots.days_of_week integer[] NOT NULL default {0..6} (0=Sun..6=Sat, Riyadh); pushed via drizzle-kit, legacy rows keep all-days behaviour.
- API (routes/protocol.ts): slot create/patch accept daysOfWeek (validated, deduped, sorted); new POST /protocol/booking-slots/generate (requireManageRooms) generates stepped slots in [from,to); duplicate rule is day-scoped: same start time on a different day merges the days into the existing slot (existing duration kept), fully covered times skipped; returns {created,merged,skipped,slots}; manual POST create also merges disjoint days instead of 409; matchesActiveSlot and public availability filter by Riyadh weekday.
- UI (protocol.tsx): interval-generation form (from/to/duration + day toggle pills + workdays/all-days presets), toast shows created/merged/skipped, slot list shows day names, booking dialog filters slots by chosen date weekday with stale-selection reset and empty-day hint. i18n keys added (ar/en).
- Tests: 13/13 pass incl. generation, day-scoped merge (same time different day is NOT a duplicate), duplicate skipping, validation, weekday filtering in availability + booking rejection, viewer 403 on generate.
2026-07-08 20:20:30 +00:00
Replit Agent 19e6693200 Task #710: Weekly availability intervals (Calendly-style) for protocol booking slots
- DB: protocol_booking_slots.days_of_week integer[] NOT NULL default {0..6} (0=Sun..6=Sat, Riyadh); pushed via drizzle-kit, legacy rows keep all-days behaviour.
- API (routes/protocol.ts): slot create/patch accept daysOfWeek (validated, deduped, sorted); new POST /protocol/booking-slots/generate (requireManageRooms) generates stepped slots in [from,to) skipping existing start times (onConflictDoNothing), returns {created,skipped,slots}, 400 interval_too_short; matchesActiveSlot and public availability now filter by Riyadh weekday.
- UI (protocol.tsx): interval-generation form (from/to/duration + day toggle pills + workdays/all-days presets), slot list shows day names, booking dialog filters slots by chosen date weekday with stale-selection reset and empty-day hint. i18n keys added (ar/en).
- Tests: 13/13 pass incl. generation, duplicate skipping, validation, weekday filtering in availability + booking rejection, viewer 403 on generate.
- Architect review: Pass; added the suggested authz test.
2026-07-08 20:16:33 +00:00
Replit Agent de407b6a8d Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 5b26c109-9a5c-47da-9dea-bc14e4fc54ac
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/1d5UAHB
Replit-Helium-Checkpoint-Created: true
2026-07-08 20:06:57 +00:00
Replit Agent 57bb2e83cc Task #709: إخفاء رابط الحجز العام وإضافة زر فتح
- شريط "رابط الحجز العام (للمشاركة مع الضيوف)" في صفحة المراسم:
  - أُزيل عرض نص الرابط الكامل (بقي العنوان والأيقونة فقط).
  - أُضيف زر "فتح" (ExternalLink) بجانب زر "نسخ الرابط" يفتح
    publicBookingUrl في تبويب جديد عبر window.open مع noopener,noreferrer.
  - زر النسخ يعمل كما هو دون تغيير.
- مفاتيح ترجمة جديدة: protocol.bookings.openLink (ar: "فتح", en: "Open").
- لا تغييرات في الخادم. tsc نظيف. مراجعة architect: Pass.
2026-07-08 19:58:29 +00:00
Replit Agent 2465c6a641 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: a6420223-943d-410b-913b-7e1ec0f9fdec
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/1d5UAHB
Replit-Helium-Checkpoint-Created: true
2026-07-08 19:56:32 +00:00
Replit Agent ac57e8cb01 Task #708: تصحيح اتجاه نص أوقات الحجز (ص/م) في أزرار الأوقات
- المشكلة: نطاق الوقت مثل "8:00 ص – 9:00 ص" كان داخل عناصر dir="ltr"،
  و"ص/م" أحرف عربية RTL فيعيد المتصفح ترتيب الأجزاء فتظهر مقلوبة
  ("ص – 9:00 ص 8:00").
- الإصلاح:
  - النموذج العام (protocol-request.tsx): زر الوقت أصبح dir="rtl"
    (الصفحة عربية دائمًا).
  - protocol.tsx: قسم إدارة الأوقات وقائمة اختيار الوقت في حوار الحجز
    الداخلي أصبحا dir={isAr ? "rtl" : "ltr"} — العربية تُعرض RTL صحيحة
    والإنجليزية (AM/PM) تبقى LTR.
- لا تغييرات في الخادم أو الصيغة نفسها. tsc نظيف.
2026-07-08 17:41:09 +00:00
Replit Agent d81b32c605 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f04cbeba-ac46-4a39-a7ae-3506fda71e41
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/1d5UAHB
Replit-Helium-Checkpoint-Created: true
2026-07-08 17:39:30 +00:00
Replit Agent d3d152ba86 Task #706: إخفاء منتقي الوقت الحر قبل اختيار القاعة في نموذج الطلب العام
- نموذج الطلب العام (/protocol/request) كان يعرض منتقي التاريخ/الوقت الحر
  القديم قبل اختيار القاعة، لأن فحص وجود الأوقات (slot probe) مرتبط بالقاعة.
- الآن قبل اختيار القاعة تظهر رسالة "اختر القاعة أولًا لعرض المواعيد
  المتاحة"، وأثناء تحميل الفحص تظهر حالة تحميل، وعند فشله رسالة خطأ؛
  شبكة الأوقات أو المنتقي الحر لا يظهران إلا بعد نجاح الفحص.
- تعزيز: تغيير القاعة يصفّر التاريخ/الوقت/الوقت المحدد المختار لتجنّب
  قيم قديمة عند التبديل السريع بين القاعات.
- حوار الحجز الداخلي لم يحتج تعديلًا (الأوقات تُجلب عالميًا عبر
  /protocol/booking-slots/active فلا توجد المشكلة نفسها).
- لا تغييرات في الخادم. الصفحة العامة نصوصها عربية ثابتة (بدون i18n)
  فلم تلزم مفاتيح ترجمة جديدة — انحراف بسيط عن خطوة الترجمة في الخطة.
- tsc نظيف؛ مراجعة الarchitect: PASS.
2026-07-08 15:04:12 +00:00
Replit Agent 0873c3a0eb Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 2b8f20f6-2a27-409c-acac-66952f46d9a6
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/1d5UAHB
Replit-Helium-Checkpoint-Created: true
2026-07-08 15:00:43 +00:00
Replit Agent a2abc146cd Task #704: أوقات حجز محددة يديرها الأدمن + مهلة حجز مسبقة
- DB: protocol_booking_slots (وقت "HH:mm" بتوقيت الرياض، مدة، تفعيل، ترتيب)
  + protocol_settings (booking.minLeadMinutes، الافتراضي 60 دقيقة).
- API: CRUD ‎/protocol/booking-slots (الكتابة تتطلب protocol.rooms.manage،
  تكرار الوقت → 409 duplicate_slot)، GET/PATCH ‎/protocol/settings (upsert + سجل
  تدقيق)، ونقطة عامة ‎/protocol/public/availability (محدّد معدل خاص، تعيد
  booked/tooSoon/available لكل وقت).
- الفرض في الخادم: الطلب العام يجب أن يطابق وقتاً مفعّلاً + يحترم المهلة
  (400 invalid_slot / lead_time برسائل عربية)؛ الموظفون ملزمون بالأوقات لكن
  معفيون من المهلة. بدون أوقات مفعّلة يعمل الوضع الحر القديم.
- الواجهة: نموذج الطلب العام يعرض شبكة أوقات حسب التوفر (مع fallback قديم)؛
  تبويب القاعات يعرض قسم إدارة الأوقات + المهلة لمن يملك canManageRooms؛
  حوار الحجز الداخلي يتحول لتاريخ + قائمة أوقات عند وجود أوقات مفعّلة.
- i18n: مفاتيح protocol.slots.* بالعربية والإنجليزية.
- اختبارات: tests/protocol-booking-slots.test.mjs — ‏10 اختبارات ناجحة
  (CRUD/تكرار، الإعدادات، التوفر، invalid_slot، lead_time، تعارض، وقت معطّل،
  إعفاء الموظفين، صلاحيات القراءة/الكتابة، الحذف).
- مراجعة المعماري: PASS؛ عولجت الملاحظات (توثيق قرار الصلاحيات + اختبار
  regression له، ومنع الإرسال في الواجهة قبل اختيار التاريخ والوقت).
- تعديل بعد الرفض الأول: قراءة قائمة الأوقات الكاملة والإعدادات تتطلب
  protocol.rooms.manage (حسب المواصفة)؛ أُضيفت نقطة قراءة مصغّرة
  ‎/protocol/booking-slots/active (protocol.access) لحوار الحجز فقط.
- تعديل بعد الرفض الثاني: مهلة الحجز المسبقة (minLeadMinutes) تُطبَّق الآن
  أيضًا على الحجوزات الداخلية (إنشاء وتعديل) — لا استثناء للموظفين.
2026-07-08 14:51:04 +00:00
Replit Agent df2c0e728b Task #704: أوقات حجز محددة يديرها الأدمن + مهلة حجز مسبقة
- DB: protocol_booking_slots (وقت "HH:mm" بتوقيت الرياض، مدة، تفعيل، ترتيب)
  + protocol_settings (booking.minLeadMinutes، الافتراضي 60 دقيقة).
- API: CRUD ‎/protocol/booking-slots (الكتابة تتطلب protocol.rooms.manage،
  تكرار الوقت → 409 duplicate_slot)، GET/PATCH ‎/protocol/settings (upsert + سجل
  تدقيق)، ونقطة عامة ‎/protocol/public/availability (محدّد معدل خاص، تعيد
  booked/tooSoon/available لكل وقت).
- الفرض في الخادم: الطلب العام يجب أن يطابق وقتاً مفعّلاً + يحترم المهلة
  (400 invalid_slot / lead_time برسائل عربية)؛ الموظفون ملزمون بالأوقات لكن
  معفيون من المهلة. بدون أوقات مفعّلة يعمل الوضع الحر القديم.
- الواجهة: نموذج الطلب العام يعرض شبكة أوقات حسب التوفر (مع fallback قديم)؛
  تبويب القاعات يعرض قسم إدارة الأوقات + المهلة لمن يملك canManageRooms؛
  حوار الحجز الداخلي يتحول لتاريخ + قائمة أوقات عند وجود أوقات مفعّلة.
- i18n: مفاتيح protocol.slots.* بالعربية والإنجليزية.
- اختبارات: tests/protocol-booking-slots.test.mjs — ‏10 اختبارات ناجحة
  (CRUD/تكرار، الإعدادات، التوفر، invalid_slot، lead_time، تعارض، وقت معطّل،
  إعفاء الموظفين، صلاحيات القراءة/الكتابة، الحذف).
- مراجعة المعماري: PASS؛ عولجت الملاحظات (توثيق قرار الصلاحيات + اختبار
  regression له، ومنع الإرسال في الواجهة قبل اختيار التاريخ والوقت).
- تعديل بعد الرفض الأول: قراءة قائمة الأوقات الكاملة والإعدادات تتطلب
  protocol.rooms.manage (حسب المواصفة)؛ أُضيفت نقطة قراءة مصغّرة
  ‎/protocol/booking-slots/active (protocol.access) لحوار الحجز فقط.
2026-07-08 14:48:11 +00:00
Replit Agent f3fe741314 Task #704: أوقات حجز محددة يديرها الأدمن + مهلة حجز مسبقة
- DB: protocol_booking_slots (وقت "HH:mm" بتوقيت الرياض، مدة، تفعيل، ترتيب)
  + protocol_settings (booking.minLeadMinutes، الافتراضي 60 دقيقة).
- API: CRUD ‎/protocol/booking-slots (الكتابة تتطلب protocol.rooms.manage،
  تكرار الوقت → 409 duplicate_slot)، GET/PATCH ‎/protocol/settings (upsert + سجل
  تدقيق)، ونقطة عامة ‎/protocol/public/availability (محدّد معدل خاص، تعيد
  booked/tooSoon/available لكل وقت).
- الفرض في الخادم: الطلب العام يجب أن يطابق وقتاً مفعّلاً + يحترم المهلة
  (400 invalid_slot / lead_time برسائل عربية)؛ الموظفون ملزمون بالأوقات لكن
  معفيون من المهلة. بدون أوقات مفعّلة يعمل الوضع الحر القديم.
- الواجهة: نموذج الطلب العام يعرض شبكة أوقات حسب التوفر (مع fallback قديم)؛
  تبويب القاعات يعرض قسم إدارة الأوقات + المهلة لمن يملك canManageRooms؛
  حوار الحجز الداخلي يتحول لتاريخ + قائمة أوقات عند وجود أوقات مفعّلة.
- i18n: مفاتيح protocol.slots.* بالعربية والإنجليزية.
- اختبارات: tests/protocol-booking-slots.test.mjs — ‏10 اختبارات ناجحة
  (CRUD/تكرار، الإعدادات، التوفر، invalid_slot، lead_time، تعارض، وقت معطّل،
  إعفاء الموظفين، صلاحيات القراءة/الكتابة، الحذف).
- مراجعة المعماري: PASS؛ عولجت الملاحظات (توثيق قرار الصلاحيات + اختبار
  regression له، ومنع الإرسال في الواجهة قبل اختيار التاريخ والوقت).
2026-07-08 14:43:44 +00:00
Replit Agent d48e434400 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 86f1b5f9-5aa6-4fd7-9973-3a2b7c0c178b
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/9DP8Avu
Replit-Helium-Checkpoint-Created: true
2026-07-08 14:27:26 +00:00
Riydx0 da000a07d9 Merge origin/main before push
# Conflicts:
#	artifacts/api-server/src/routes/protocol.ts
#	artifacts/tx-os/src/locales/ar.json
#	artifacts/tx-os/src/locales/en.json
#	artifacts/tx-os/src/pages/protocol.tsx
2026-07-08 14:16:15 +00:00
Replit Agent c81487b6ba Task #703: تمكين التمرير داخل نافذة الحجز الطويلة
- DialogShell (artifacts/tx-os/src/pages/protocol.tsx) now caps the dialog at
  max-h-[85vh] with a flex column layout: the title (DialogHeader) and the
  save/cancel footer stay always visible, while the form fields scroll in an
  inner overflow-y-auto area (overscroll-contain).
- Applies to all DialogShell users (booking, room, gift dialogs); short forms
  are unaffected since the container only scrolls when content exceeds 85vh.
- RTL unaffected (dir attribute preserved).
- Verified: tsc clean for tx-os; architect review run.
- Architect flagged a potential grid-vs-flex display conflict in DialogContent,
  but cn() uses tailwind-merge, so the later "flex" class deterministically
  replaces the base "grid" — no change needed.
2026-07-08 13:46:08 +00:00
Replit Agent a9eaf2719f Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 46f19c55-44cb-4c1a-bc1e-481868cc60bf
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/9DP8Avu
Replit-Helium-Checkpoint-Created: true
2026-07-08 13:44:05 +00:00
Replit Agent 89f29e2169 Task #701: توحيد نموذج الحجز الداخلي مع نموذج الرابط العام
- Extended internal BookingDialog (artifacts/tx-os/src/pages/protocol.tsx) to match
  the public booking form: requester name, phone, room, department, meeting title,
  meeting type toggle (داخلي / مع جهة خارجية), conditional entity name (external only),
  expected attendee count, purpose, from/to, key attendees in two columns
  (من الهيئة / خارج الهيئة) with add/remove name+position rows, and notes.
- Edit mode prefills all new fields from the booking; click-to-book initialStart
  behavior unchanged.
- api-server (artifacts/api-server/src/routes/protocol.ts): bookingCreateSchema and
  bookingPatchSchema now accept requesterPhone, requesterOrg, department, meetingType,
  purpose, keyAttendees; POST/PATCH /protocol/bookings persist them. requesterOrg is
  nulled whenever effective meetingType is internal (create and patch).
- Added i18n keys protocol.bookings.form.{name,position,addRow,removeRow} (ar/en);
  all other labels reuse existing protocol.bookings keys.
- Verified: tsc clean for changed files (push.ts / executive-meetings.ts errors are
  pre-existing and unrelated); API workflow restarted and serving; architect review PASS.
- Note: entity name (اسم الجهة) is not enforced as required for external meetings on
  the internal endpoint (unlike the strict public endpoint) — internal staff keep
  flexibility; can be tightened later if requested.
2026-07-08 13:40:20 +00:00
Replit Agent 088e17bf85 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 6a5eb766-023e-4a1b-8a34-df4bdbd061c6
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/EHswFlf
Replit-Helium-Checkpoint-Created: true
2026-07-08 13:34:18 +00:00
Replit Agent 0fc96b544b Task #699: الحجز بالنقر على وقت فارغ في تقويم اليوم
- BookingDayGrid (artifacts/tx-os/src/pages/protocol.tsx) now accepts
  onSlotClick?: (start: Date) => void. Clicking the empty grid background
  computes the time from click Y (getBoundingClientRect + clientY), snaps
  down to the nearest 30 minutes, clamps within grid hours (7–22, keeping
  a full hour inside), and calls onSlotClick with the resulting Date on
  the selected day. Cursor becomes pointer when handler is set.
- Booking blocks now stopPropagation on click so existing behavior
  (opening the details dialog) is unchanged and never double-triggers.
- ProtocolPage passes onSlotClick only when capabilities.canRequest,
  opening the existing BookingDialog (same form as the "حجز +" button)
  with the new start prefilled.
- BookingDialog: new optional initialStart prop; startsAt = initialStart,
  endsAt = initialStart + 1h (falls back to prior 9–10 defaults).
- Verified: tsc --noEmit clean in artifacts/tx-os; architect review Pass.
2026-07-08 13:27:35 +00:00
Replit Agent 8105c487ef Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 7321f9dc-f48b-4e6d-8d9a-bba842875c43
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/EHswFlf
Replit-Helium-Checkpoint-Created: true
2026-07-08 13:24:58 +00:00
Replit Agent 49f71389b3 Task #697: جدول حضور احترافي متوسّط + جدول في الصف الموسّع
- Extracted shared AttendeesTable component in artifacts/tx-os/src/pages/protocol.tsx
  (columns: name / position / side) with centered headers and cells, distinct
  header background (bg-slate-100/80), comfortable row heights (py-2.5),
  zebra striping (even:bg-slate-50/60), rounded border + shadow, side pill
  colored by side (sky=internal, violet=external), overflow-x-auto for small
  screens. Center alignment is RTL/LTR-safe.
- Booking details dialog now uses AttendeesTable (replaced inline table).
- Expanded row in bookings list now renders keyAttendees as the same table
  (replaced dash-separated <ul> lines), capped at max-w-2xl.
- No i18n changes needed (reuses protocol.bookings.details.attendeeCols.*).
- Verified: tsc --noEmit clean in artifacts/tx-os; architect review passed.
2026-07-08 13:15:04 +00:00
Replit Agent a7acdb216f Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: ba27b261-4a26-4cd1-b252-bc7e5886c5d5
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/EHswFlf
Replit-Helium-Checkpoint-Created: true
2026-07-08 13:11:19 +00:00
Replit Agent 3802f785a1 Task #696: Key attendees as a table in booking details dialog
- artifacts/tx-os/src/pages/protocol.tsx: replaced the dash-separated
  <ul> list of keyAttendees in the booking details dialog with a shadcn
  Table (already imported) with 3 columns: Name, Position/Title, Side.
  Headers use text-start for correct RTL alignment; empty name/position
  cells render an em dash; side rendered as the existing pill using
  protocol.bookings.attendeeSides.*; table wrapped in rounded border +
  overflow-x-auto so it stays responsive inside the dialog.
- i18n: added protocol.bookings.details.attendeeCols.{name,position,side}
  to ar.json (الاسم/الصفة/الجهة) and en.json (Name/Title/Side).
- Scope limited to the details dialog; the expanded-row attendee display
  elsewhere is unchanged (per task out-of-scope).
- Verified: both locale JSONs valid, tsc --noEmit clean, architect review
  PASS.
- No follow-ups proposed: pending Task #695 already covers e2e testing of
  the details dialog contents.
2026-07-08 13:06:18 +00:00
Replit Agent a62aabf465 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: b860798d-1b52-4c35-b92e-335742115bc2
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/EHswFlf
Replit-Helium-Checkpoint-Created: true
2026-07-08 13:04:20 +00:00
Replit Agent ea5055de85 Task #694: Booking details dialog from calendar day-grid
- BookingDayGrid (artifacts/tx-os/src/pages/protocol.tsx): booking blocks are
  now <button type="button"> with onClick -> new optional onSelect prop,
  hover/focus-visible styles, aria-label (title/room/time) and
  data-testid="calendar-booking-{id}".
- ProtocolPage: new detailsBooking state; day grid passes onSelect; new
  read-only details Dialog (before AppDock) with:
  header = booking title + status pill + public-request badge;
  summary card = date, time range (LTR), duration, room, reference,
  meeting type; requester section = name, phone (LTR), entity (external
  only), department, attendee count; meeting section = purpose + key
  attendees with side badges; notes; rejection-reason box when rejected.
  Empty/null fields hidden via DetailRow helper.
- New helpers: DetailRow component, formatDuration(start,end,t) using
  pluralized i18n keys.
- i18n: protocol.bookings.details.* added to ar.json (full Arabic plural
  forms for hours/minutes) and en.json.
- View-only per task scope (no edit/approve/cancel in dialog).
- tsc --noEmit clean; both locale JSONs valid; architect review PASS.
- Added explicit 'Request source' row (internal/public) in summary card per review; keys protocol.bookings.details.source/sources.* in ar/en.
2026-07-08 12:52:13 +00:00
Replit Agent 5fe978c0ca Task #694: Booking details dialog from calendar day-grid
- BookingDayGrid (artifacts/tx-os/src/pages/protocol.tsx): booking blocks are
  now <button type="button"> with onClick -> new optional onSelect prop,
  hover/focus-visible styles, aria-label (title/room/time) and
  data-testid="calendar-booking-{id}".
- ProtocolPage: new detailsBooking state; day grid passes onSelect; new
  read-only details Dialog (before AppDock) with:
  header = booking title + status pill + public-request badge;
  summary card = date, time range (LTR), duration, room, reference,
  meeting type; requester section = name, phone (LTR), entity (external
  only), department, attendee count; meeting section = purpose + key
  attendees with side badges; notes; rejection-reason box when rejected.
  Empty/null fields hidden via DetailRow helper.
- New helpers: DetailRow component, formatDuration(start,end,t) using
  pluralized i18n keys.
- i18n: protocol.bookings.details.* added to ar.json (full Arabic plural
  forms for hours/minutes) and en.json.
- View-only per task scope (no edit/approve/cancel in dialog).
- tsc --noEmit clean; both locale JSONs valid; architect review PASS.
2026-07-08 12:50:33 +00:00
Replit Agent e11510778f Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: d6cdadfc-5863-4793-a19b-afbbc982aa0b
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/EHswFlf
Replit-Helium-Checkpoint-Created: true
2026-07-08 12:46:25 +00:00
Replit Agent 9184a0c223 Task #692: Auto-scroll bookings day grid to current time (red now-line)
- BookingDayGrid (artifacts/tx-os/src/pages/protocol.tsx) now renders inside
  its own scroll container (max-h-[60vh] overflow-y-auto overscroll-contain).
- New scrollRef + useEffect: when the selected day is today and the now-line
  is within grid hours (showNow), sets scrollTop = nowTop - clientHeight/3
  so the red line sits ~1/3 from the top; otherwise resets scroll to top.
  Effect deps: [dayKey, showNow, scrollSignal] — not re-run on minute ticks,
  so it never fights user scrolling.
- "اليوم" button bumps a todayScrollSignal counter passed as optional
  scrollSignal prop, re-scrolling even when the selected day is already today.
- Removed the previous outer max-h-[70vh] wrapper around BookingDayGrid to
  avoid nested scrollbars.
- No changes to booking block layout, statuses, or list view. RTL-safe
  (logical properties untouched).
- tsc --noEmit clean for tx-os; architect review addressed (60vh per spec).
2026-07-08 12:43:22 +00:00
Replit Agent c8be955b64 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 71e93092-50ee-4ad4-8084-dc6ab3f8bf76
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/EHswFlf
Replit-Helium-Checkpoint-Created: true
2026-07-08 12:40:54 +00:00
Replit Agent 6f47e3ee71 Add functionality to select and delete multiple bookings
Implements bulk booking deletion with API endpoint, UI elements for selection, and updated localization files.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: b10c2dde-049d-45ea-9f02-7d538e07d5de
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/EHswFlf
Replit-Helium-Checkpoint-Created: true
2026-07-08 12:36:17 +00:00
Replit Agent 4c770fc49f Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 373ab23e-44fc-4e5d-aa97-2e9a57b9e433
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ychh3tH
Replit-Helium-Checkpoint-Created: true
2026-07-08 12:30:15 +00:00
Replit Agent 14a02e978f Improve table alignment and action button presentation
Updates table cell alignment to center content, replaces "Cancel" action with a Ban icon, and adjusts header alignment for a more professional and consistent UI.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 7586707e-fb86-49e4-96d4-0802eb9f8d87
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ychh3tH
Replit-Helium-Checkpoint-Created: true
2026-07-08 12:27:54 +00:00
Replit Agent 896993da73 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: a30ab4f7-3b15-4737-b37d-9452711461e5
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ychh3tH
Replit-Helium-Checkpoint-Created: true
2026-07-08 12:25:27 +00:00
Replit Agent 2ac960b69a Update booking display with index numbers and structured details
Refactors the `ProtocolPage` component to include an index column for bookings and restructures the booking detail view into a fixed grid layout.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 9637de15-465f-4172-bea0-f0b45a37bd23
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ychh3tH
Replit-Helium-Checkpoint-Created: true
2026-07-08 12:19:27 +00:00
Replit Agent 1b263a9f05 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: bba99012-85e7-4a4e-9780-0b007f67499d
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ychh3tH
Replit-Helium-Checkpoint-Created: true
2026-07-08 12:15:56 +00:00
Replit Agent 79a9e5236d Update bookings view to use a table layout
Replaces the card-based list view with a table component in `protocol.tsx`. Adds new translation keys for table headers and meeting types in `ar.json` and `en.json`. Formats booking references to display only numeric characters and dashes.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: e1793d98-fbd5-4c99-99a0-e01d493482cc
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ychh3tH
Replit-Helium-Checkpoint-Created: true
2026-07-08 11:12:41 +00:00
Replit Agent 3a20a334bd Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: ce4771fc-f082-462d-954a-91c8cadbf2c7
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ychh3tH
Replit-Helium-Checkpoint-Created: true
2026-07-08 11:08:47 +00:00
Riyadh 459999a9e2 Preserve meeting metadata when duplicating and fix switch alignment in RTL
Update executive meeting duplication to maintain `isExternal` and `rowColor` properties, and adjust switch component's RTL translation for correct alignment.
2026-07-08 10:06:53 +00:00
Replit Agent c54a6972ec Preserve meeting metadata when duplicating and fix switch alignment in RTL
Update executive meeting duplication to maintain `isExternal` and `rowColor` properties, and adjust switch component's RTL translation for correct alignment.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f7213345-78e8-4ed4-a72e-0e4b9bc6e00f
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/ychh3tH
Replit-Helium-Checkpoint-Created: true
2026-07-08 10:06:53 +00:00
Riyadh 5a3d7464d9 Transitioned from Plan to Build mode 2026-07-08 08:32:24 +00:00
Replit Agent f829e1fac6 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f4f13f6b-7ba5-4e00-b88f-162970fdea20
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/9OolNGV
Replit-Helium-Checkpoint-Created: true
2026-07-08 08:32:24 +00:00
Riyadh bd62b79d0c Collapsible booking cards in Protocol → Bookings list (Task #676)
Original task: make the protocol booking-requests LIST cards collapsed by
default, showing a compact summary and expanding full details only when opened;
add numbering, show the booking reference, and highlight today's bookings green.

Changes (artifacts/tx-os/src/pages/protocol.tsx):
- renderBookingCard(b, index) now renders a collapsible card. Collapsed shows
  only: sequence number (1-based over the current/filtered list), title,
  room · date-time range, booking reference, status/public pills, and a chevron.
- Summary header is a real <button type="button"> with onClick toggle and
  aria-expanded for keyboard accessibility.
- Expanded reveals the previously-shown detail fields (requester, department,
  meeting type, entity, phone, attendee count, purpose, key attendees) and the
  action buttons (approve/reject/cancel/edit/delete) — no functionality lost.
- Bookings starting today (sameYmd(startsAt, now)) get a green card
  (emerald border/bg/ring) plus an "اليوم"/"Today" badge.
- Added expandedBookings Set state + toggleBookingExpanded near booking state.
- List map updated to pass 1-based index.

i18n: added protocol.bookings.today ("اليوم" / "Today") to ar.json and en.json.

Scope: list view only; calendar view, public request form, and other tabs
unchanged. Client-only "today" derivation, no backend changes.

Verification: tsc --noEmit passes; architect code review PASSED (no critical
issues). Screenshot skipped — protocol page requires auth.
2026-07-07 14:08:51 +00:00
Replit Agent 0808d8bdeb Collapsible booking cards in Protocol → Bookings list (Task #676)
Original task: make the protocol booking-requests LIST cards collapsed by
default, showing a compact summary and expanding full details only when opened;
add numbering, show the booking reference, and highlight today's bookings green.

Changes (artifacts/tx-os/src/pages/protocol.tsx):
- renderBookingCard(b, index) now renders a collapsible card. Collapsed shows
  only: sequence number (1-based over the current/filtered list), title,
  room · date-time range, booking reference, status/public pills, and a chevron.
- Summary header is a real <button type="button"> with onClick toggle and
  aria-expanded for keyboard accessibility.
- Expanded reveals the previously-shown detail fields (requester, department,
  meeting type, entity, phone, attendee count, purpose, key attendees) and the
  action buttons (approve/reject/cancel/edit/delete) — no functionality lost.
- Bookings starting today (sameYmd(startsAt, now)) get a green card
  (emerald border/bg/ring) plus an "اليوم"/"Today" badge.
- Added expandedBookings Set state + toggleBookingExpanded near booking state.
- List map updated to pass 1-based index.

i18n: added protocol.bookings.today ("اليوم" / "Today") to ar.json and en.json.

Scope: list view only; calendar view, public request form, and other tabs
unchanged. Client-only "today" derivation, no backend changes.

Verification: tsc --noEmit passes; architect code review PASSED (no critical
issues). Screenshot skipped — protocol page requires auth.
2026-07-07 14:08:51 +00:00