From a4bf222dc44518cfef8129edf08c7fb9ecaa4747 Mon Sep 17 00:00:00 2001 From: Replit Agent Date: Thu, 9 Jul 2026 08:19:42 +0000 Subject: [PATCH] Task #725: red "external" badge + structured expanded booking details table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - protocol.tsx bookings table: external meeting-type badge changed from violet to rose (bg-rose-100 text-rose-700); internal unchanged. - Expanded row rebuilt as a professional card-table: header row with meeting title (label above value, full width), grid of labeled cells (requester, department, phone, entity for external only, meeting type, attendee count, booking reference, purpose) with light dividers, keyAttendees AttendeesTable section below, rejection reason as a red banner row. - Added i18n key protocol.bookings.table.title (ar: "اسم الاجتماع", en: "Meeting name"). - UI-only; tsc --noEmit clean; HMR applied; architect review PASS. --- artifacts/tx-os/src/locales/ar.json | 1 + artifacts/tx-os/src/locales/en.json | 1 + artifacts/tx-os/src/pages/protocol.tsx | 67 +++++++++++++++----------- 3 files changed, 42 insertions(+), 27 deletions(-) diff --git a/artifacts/tx-os/src/locales/ar.json b/artifacts/tx-os/src/locales/ar.json index 7996a583..b1146b4d 100644 --- a/artifacts/tx-os/src/locales/ar.json +++ b/artifacts/tx-os/src/locales/ar.json @@ -1811,6 +1811,7 @@ "linkCopied": "تم نسخ الرابط", "linkCopyFailed": "تعذّر نسخ الرابط", "table": { + "title": "اسم الاجتماع", "number": "رقم الحجز", "requester": "مقدم الطلب", "date": "تاريخ الحجز", diff --git a/artifacts/tx-os/src/locales/en.json b/artifacts/tx-os/src/locales/en.json index 5096ff45..96442bb7 100644 --- a/artifacts/tx-os/src/locales/en.json +++ b/artifacts/tx-os/src/locales/en.json @@ -1664,6 +1664,7 @@ "linkCopied": "Link copied", "linkCopyFailed": "Could not copy the link", "table": { + "title": "Meeting name", "number": "Booking No.", "requester": "Requester", "date": "Booking date", diff --git a/artifacts/tx-os/src/pages/protocol.tsx b/artifacts/tx-os/src/pages/protocol.tsx index efc72a6c..0bc476c7 100644 --- a/artifacts/tx-os/src/pages/protocol.tsx +++ b/artifacts/tx-os/src/pages/protocol.tsx @@ -1104,7 +1104,7 @@ export default function ProtocolPage() { className={cn( "text-xs px-2 py-0.5 rounded-full", b.meetingType === "external" - ? "bg-violet-100 text-violet-700" + ? "bg-rose-100 text-rose-700" : "bg-slate-100 text-slate-600", )} > @@ -1219,19 +1219,26 @@ export default function ProtocolPage() { {expanded && ( - -
-
- {b.title} + +
+
+ + {t("protocol.bookings.table.title")} + +
+ {b.title} +
-
+
{( [ [t("protocol.bookings.requester"), b.requesterName], [t("protocol.bookings.department"), b.department], [ - t("protocol.bookings.meetingType"), - t(`protocol.bookings.meetingTypes.${b.meetingType}`), + t("protocol.bookings.phone"), + b.requesterPhone ? ( + {b.requesterPhone} + ) : null, ], ...(b.meetingType === "external" ? [ @@ -1242,49 +1249,55 @@ export default function ProtocolPage() { ] : []), [ - t("protocol.bookings.phone"), - b.requesterPhone ? ( - {b.requesterPhone} - ) : null, + t("protocol.bookings.meetingType"), + t(`protocol.bookings.meetingTypes.${b.meetingType}`), ], [ t("protocol.bookings.attendeeCount"), b.attendeeCount != null ? b.attendeeCount : null, ], - [t("protocol.bookings.purpose"), b.purpose], [ t("protocol.bookings.reference"), b.bookingReference ? ( {b.bookingReference} ) : null, ], + [t("protocol.bookings.purpose"), b.purpose], ] as Array<[string, React.ReactNode]> ).map(([label, value], i) => ( -
- - {label}: - - +
+
+ {label} +
+
{value != null && value !== "" ? value : "—"} - +
))}
-
- - {t("protocol.bookings.keyAttendees")}: - +
+
+ {t("protocol.bookings.keyAttendees")} +
{b.keyAttendees && b.keyAttendees.length > 0 ? ( -
+
) : ( - + )}
{b.status === "rejected" && b.rejectionReason && ( -
- {b.rejectionReason} +
+
+ {t("protocol.bookings.details.rejectionReason")} +
+
+ {b.rejectionReason} +
)}