From f57fe9e233dafaa3d3b6acaba30a9e90ba90a16f Mon Sep 17 00:00:00 2001 From: Nikitha Date: Tue, 14 Apr 2026 22:02:05 -0600 Subject: [PATCH] Chat Saving saving chat history --- web/components/FloatingChat.js | 68 ++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/web/components/FloatingChat.js b/web/components/FloatingChat.js index 4b17232d..9db78e1a 100644 --- a/web/components/FloatingChat.js +++ b/web/components/FloatingChat.js @@ -130,22 +130,66 @@ export default function FloatingChat() { )} - {conversations.map((conv) => ( - - ))} - + + + + ))} + + {/* Unclaimed - waiting for staff */} + {conversations.filter(c => c.status === "OPEN" && !c.staffId).length > 0 && ( +
Waiting
)} + {conversations.filter(c => c.status === "OPEN" && !c.staffId).map((conv) => ( + + + ))} + + {/* Closed convesations*/} + {conversations.filter(c => c.status === "CLOSED").length > 0 && ( +
Closed
+ )} + {conversations.filter(c => c.status === "CLOSED").map((conv) => ( + + ))} + + + )} + + {/* Live chat view */} {user && view === "live" && ( @@ -457,6 +501,14 @@ const s = { padding: "0.45rem 0.85rem", borderBottom: "1px solid #f0f0f0", background: "#fafafa", flexShrink: 0, }, + statusUnclaimed: { background: "#fff8e1", color: "#f57f17" }, + sectionLabel: { + fontSize: "0.7rem", fontWeight: 700, color: "#aaa", + padding: "0.4rem 0.85rem 0.2rem", textTransform: "uppercase", + letterSpacing: "0.05em", background: "#fafafa", + }, + +convItemClosed: { background: "#fafafa", opacity: 0.75 }, closedBanner: { background: "#f5f5f5", borderTop: "1px solid #e0e0e0", color: "#888", padding: "0.65rem 0.85rem", fontSize: "0.84rem", textAlign: "center", flexShrink: 0,