From 409b2c6fd51dff64168c61347c0971fe7e98721c Mon Sep 17 00:00:00 2001 From: Replit Agent Date: Thu, 9 Jul 2026 09:58:09 +0000 Subject: [PATCH] =?UTF-8?q?Task=20#739:=20=D8=AA=D8=AD=D9=88=D9=8A=D9=84?= =?UTF-8?q?=20=D8=AA=D8=A8=D9=88=D9=8A=D8=A8=20=D8=A7=D9=84=D9=82=D8=A7?= =?UTF-8?q?=D8=B9=D8=A7=D8=AA=20=D9=85=D9=86=20=D8=A8=D8=B7=D8=A7=D9=82?= =?UTF-8?q?=D8=A7=D8=AA=20=D8=A5=D9=84=D9=89=20=D8=AC=D8=AF=D9=88=D9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - protocol.tsx (tab === "rooms"): replaced the 2-column card grid with a Table styled like the bookings table (bg-slate-100/80 header, centered headers/cells) with columns: # | القاعات | الحالة | الإجراء. - # = sequential index; name via nameOf with capacity line beneath. - Status badge keeps emerald-100 / slate-200 colors. - Actions column (edit/delete, same setRoomDialog/setDeleteTarget handlers) rendered only when canManageRooms. - EmptyState (rooms.empty), "قاعة جديدة" button, and dialogs unchanged. - i18n: added protocol.rooms.status ("الحالة"/"Status") and protocol.rooms.actions ("الإجراء"/"Action") to ar.json and en.json. - Verified: pnpm --filter @workspace/tx-os exec tsc --noEmit clean; architect review passed with no blocking issues. --- artifacts/tx-os/src/locales/ar.json | 2 + artifacts/tx-os/src/locales/en.json | 2 + artifacts/tx-os/src/pages/protocol.tsx | 133 +++++++++++++++---------- 3 files changed, 84 insertions(+), 53 deletions(-) diff --git a/artifacts/tx-os/src/locales/ar.json b/artifacts/tx-os/src/locales/ar.json index 7996a583..38aa674c 100644 --- a/artifacts/tx-os/src/locales/ar.json +++ b/artifacts/tx-os/src/locales/ar.json @@ -1893,6 +1893,8 @@ "location": "الموقع", "active": "مفعّلة", "isActive": "مفعّلة", + "status": "الحالة", + "actions": "الإجراء", "empty": "لا توجد قاعات." }, "issues": { diff --git a/artifacts/tx-os/src/locales/en.json b/artifacts/tx-os/src/locales/en.json index 5096ff45..5a682038 100644 --- a/artifacts/tx-os/src/locales/en.json +++ b/artifacts/tx-os/src/locales/en.json @@ -1738,6 +1738,8 @@ "location": "Location", "active": "Active", "isActive": "Active", + "status": "Status", + "actions": "Action", "empty": "No rooms." }, "issues": { diff --git a/artifacts/tx-os/src/pages/protocol.tsx b/artifacts/tx-os/src/pages/protocol.tsx index 655d6cd3..c707bf9e 100644 --- a/artifacts/tx-os/src/pages/protocol.tsx +++ b/artifacts/tx-os/src/pages/protocol.tsx @@ -1780,60 +1780,87 @@ export default function ProtocolPage() { )} -
- {(rooms.data ?? []).map((r) => ( -
-
-
-
- {nameOf(r.nameAr, r.nameEn)} -
-
- {r.capacity - ? `${t("protocol.rooms.capacity")}: ${r.capacity}` - : ""} -
-
- + ) : ( +
+ + + + # + + {t("protocol.rooms.title")} + + + {t("protocol.rooms.status")} + + {c?.canManageRooms && ( + + {t("protocol.rooms.actions")} + )} - > - {r.isActive - ? t("protocol.rooms.active") - : t("protocol.rooms.inactive")} - - - {c?.canManageRooms && ( -
- - -
- )} - - ))} - {rooms.data?.length === 0 && ( - - )} - +
+
+ + {(rooms.data ?? []).map((r, i) => ( + + + {i + 1} + + +
+ {nameOf(r.nameAr, r.nameEn)} +
+ {r.capacity ? ( +
+ {`${t("protocol.rooms.capacity")}: ${r.capacity}`} +
+ ) : null} +
+ + + {r.isActive + ? t("protocol.rooms.active") + : t("protocol.rooms.inactive")} + + + {c?.canManageRooms && ( + +
+ + +
+
+ )} +
+ ))} +
+
+
+ )} )}