diff --git a/artifacts/tx-os/src/locales/ar.json b/artifacts/tx-os/src/locales/ar.json index e3f03894..c71669ae 100644 --- a/artifacts/tx-os/src/locales/ar.json +++ b/artifacts/tx-os/src/locales/ar.json @@ -1174,7 +1174,9 @@ "exit": "الخروج من ملء الشاشة" }, "quickNote": { - "label": "اكتب ملاحظة…" + "label": "اكتب ملاحظة…", + "placeholder": "اكتب ملاحظة سريعة…", + "send": "إرسال" }, "noMeetings": "لا توجد اجتماعات في هذا اليوم", "virtual": "اتصال مرئي", diff --git a/artifacts/tx-os/src/locales/en.json b/artifacts/tx-os/src/locales/en.json index 34dbe57c..5b156861 100644 --- a/artifacts/tx-os/src/locales/en.json +++ b/artifacts/tx-os/src/locales/en.json @@ -1082,7 +1082,9 @@ "exit": "Exit fullscreen" }, "quickNote": { - "label": "Take a note…" + "label": "Take a note…", + "placeholder": "Write a quick note…", + "send": "Send" }, "noMeetings": "No meetings scheduled for this day", "virtual": "Virtual", diff --git a/artifacts/tx-os/src/pages/admin.tsx b/artifacts/tx-os/src/pages/admin.tsx index a8b03443..adc30979 100644 --- a/artifacts/tx-os/src/pages/admin.tsx +++ b/artifacts/tx-os/src/pages/admin.tsx @@ -2514,11 +2514,7 @@ function SystemUpdatesPanel() { data-testid="system-updates-started-at" > {t("admin.systemUpdates.serverStartedAt")}:{" "} - {formatChecked( - typeof data.startedAt === "string" - ? data.startedAt - : data.startedAt.toISOString(), - )} + {formatChecked(data.startedAt)} )} diff --git a/artifacts/tx-os/src/pages/executive-meetings.tsx b/artifacts/tx-os/src/pages/executive-meetings.tsx index d4131787..32888dc4 100644 --- a/artifacts/tx-os/src/pages/executive-meetings.tsx +++ b/artifacts/tx-os/src/pages/executive-meetings.tsx @@ -784,25 +784,19 @@ export default function ExecutiveMeetingsPage() { } function HeaderClock({ lang, date }: { lang: "ar" | "en"; date: string }) { - const [now, setNow] = useState(() => new Date()); - useEffect(() => { - const id = window.setInterval(() => setNow(new Date()), 1000); - return () => window.clearInterval(id); - }, []); + // The analog dial already conveys the live time — the previous digital + // "HH:MM:SS" string next to it was redundant, so it was removed. We + // keep weekday + date because those are calendar info, not clock info. return (
- +
-
- {formatWeekday(date, lang, "long")} - · - - {formatTimeI18n(now, lang, { hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: true })} - +
+ {formatWeekday(date, lang, "long")}
{formatDate(date, lang)} @@ -840,6 +834,114 @@ function MeetingsQuickNoteTab({ ); } +function InlineQuickNotePanel({ + lang, + onClose, +}: { + lang: "ar" | "en"; + onClose: () => void; +}) { + const { t } = useTranslation(); + const [content, setContent] = useState(""); + const [busy, setBusy] = useState(false); + const [error, setError] = useState(null); + const textareaRef = useRef(null); + useEffect(() => { + textareaRef.current?.focus(); + }, []); + const submit = async () => { + const trimmed = content.trim(); + if (!trimmed || busy) return; + setBusy(true); + setError(null); + try { + const res = await fetch("/api/notes", { + method: "POST", + credentials: "include", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ content: trimmed, color: "yellow" }), + }); + if (!res.ok) { + const data = (await res.json().catch(() => ({}))) as { error?: string }; + throw new Error(data.error || `HTTP ${res.status}`); + } + setContent(""); + onClose(); + } catch (e) { + setError(e instanceof Error ? e.message : String(e)); + } finally { + setBusy(false); + } + }; + const placeholder = t( + "executiveMeetings.quickNote.placeholder", + lang === "ar" ? "اكتب ملاحظة سريعة…" : "Write a quick note…", + ); + const sendLabel = t("executiveMeetings.quickNote.send", lang === "ar" ? "إرسال" : "Send"); + const cancelLabel = t("common.cancel", lang === "ar" ? "إلغاء" : "Cancel"); + return ( +
+
+
+ {t("executiveMeetings.quickNote.label", lang === "ar" ? "اكتب ملاحظة…" : "Take a note…")} +
+ +
+
+