diff --git a/artifacts/tx-os/src/pages/protocol-request.tsx b/artifacts/tx-os/src/pages/protocol-request.tsx index f8f174d7..9e508de2 100644 --- a/artifacts/tx-os/src/pages/protocol-request.tsx +++ b/artifacts/tx-os/src/pages/protocol-request.tsx @@ -437,7 +437,22 @@ export default function ProtocolRequestPage() { - + // Reset the time selection when the room changes so no stale + // date/slot/free-time values survive a room switch (the slot + // grid is per-room and slot mode itself may flip). + setForm((f) => ({ + ...f, + roomId: v, + date: "", + slotId: "", + startsAt: "", + endsAt: "", + })) + } + > - {slotMode ? ( + {form.roomId === "" ? ( + // No room chosen yet → we don't know whether slot mode is on, so + // show a hint instead of the (possibly wrong) free pickers. +
+ +

+ اختر القاعة أولًا لعرض المواعيد المتاحة. +

+
+ ) : slotProbe.isLoading ? ( +
+ +

+ جارٍ تحميل المواعيد المتاحة… +

+
+ ) : slotProbe.isError ? ( +
+ +

+ تعذّر تحميل المواعيد، يرجى المحاولة مرة أخرى. +

+
+ ) : slotMode ? ( <>