From c751f0cba40063b09a2df101f34fda88b8c1a025 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Wed, 5 Feb 2025 15:10:18 -0800 Subject: [PATCH 01/14] IO-3127 Dashboard Schedule Translations Signed-off-by: Allan Carr --- client/src/translations/en_us/common.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 1c153d26a..ce466aa5b 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -970,10 +970,10 @@ "productiondollars": "Total Dollars in Production", "productionhours": "Total Hours in Production", "projectedmonthlysales": "Projected Monthly Sales", - "scheduledindate": "Sheduled In Today: {{date}}", - "scheduledintoday": "Sheduled In Today", - "scheduledoutdate": "Sheduled Out Today: {{date}}", - "scheduledouttoday": "Sheduled Out Today", + "scheduledindate": "Scheduled In Today: {{date}}", + "scheduledintoday": "Scheduled In Today", + "scheduledoutdate": "Scheduled Out Today: {{date}}", + "scheduledouttoday": "Scheduled Out Today", "tasks": "Tasks" } }, From 760f2ac7f9bb634d21700c20b5437d804c207535 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Thu, 6 Feb 2025 12:49:51 -0500 Subject: [PATCH 02/14] hotfix/IO-3128-Unread-Messages-Not-Updating - Initial fix just to make sure clients see messages, will poll and update every 60 seconds if the chat window is closed and has never been opened. --- .../chat-popup/chat-popup.component.jsx | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/client/src/components/chat-popup/chat-popup.component.jsx b/client/src/components/chat-popup/chat-popup.component.jsx index 96a87885e..0226cc354 100644 --- a/client/src/components/chat-popup/chat-popup.component.jsx +++ b/client/src/components/chat-popup/chat-popup.component.jsx @@ -42,8 +42,7 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh const { data: unreadData } = useQuery(UNREAD_CONVERSATION_COUNT, { fetchPolicy: "network-only", nextFetchPolicy: "network-only", - skip: chatVisible, // Skip when chat is visible - ...(pollInterval > 0 ? { pollInterval } : {}) + pollInterval: 60 * 1000 // TODO: This is a fix for now, should be coming from sockets }); // Socket connection status @@ -85,29 +84,25 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh // Get unread count from the cache const unreadCount = (() => { - if (chatVisible) { - try { - const cachedData = client.readQuery({ - query: CONVERSATION_LIST_QUERY, - variables: { offset: 0 } - }); + try { + const cachedData = client.readQuery({ + query: CONVERSATION_LIST_QUERY, + variables: { offset: 0 } + }); - if (!cachedData?.conversations) return 0; - - // Aggregate unread message count - return cachedData.conversations.reduce((total, conversation) => { - const unread = conversation.messages_aggregate?.aggregate?.count || 0; - return total + unread; - }, 0); - } catch (error) { - console.warn("Unread count not found in cache:", error); - return 0; // Fallback if not in cache + if (!cachedData?.conversations) { + return unreadData?.messages_aggregate?.aggregate?.count; } - } else if (unreadData?.messages_aggregate?.aggregate?.count) { - // Use the unread count from the query result - return unreadData.messages_aggregate.aggregate.count; + + // Aggregate unread message count + return cachedData.conversations.reduce((total, conversation) => { + const unread = conversation.messages_aggregate?.aggregate?.count || 0; + return total + unread; + }, 0); + } catch (error) { + console.warn("Unread count not found in cache:", error); + return 0; // Fallback if not in cache } - return 0; })(); return ( From 35a3726cf032c3b7e439daeb22581a8167a2d2cd Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 10 Feb 2025 14:24:50 -0800 Subject: [PATCH 03/14] IO-3077 Implement import rules engine. --- bodyshop_translations.babel | 243 +- .../shop-info/shop-info.parts-scan.jsx | 193 +- client/src/translations/en_us/common.json | 7530 +++++++++-------- client/src/translations/es/common.json | 7530 +++++++++-------- client/src/translations/fr/common.json | 7530 +++++++++-------- server/graphql-client/queries.js | 21 +- server/parts-scan/parts-scan.js | 71 +- 7 files changed, 11748 insertions(+), 11370 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 0432eaaf1..d92f00f41 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -1,4 +1,4 @@ - +