feature/IO-3096-GlobalNotifications - Checkpoint

This commit is contained in:
Dave Richer
2025-02-25 20:08:55 -05:00
parent 7f547c90c2
commit 7e2bd128e8
2 changed files with 4 additions and 30 deletions

View File

@@ -87,6 +87,8 @@ export const SocketProvider = ({ children, bodyshop }) => {
const handleNotification = (data) => {
const { jobId, jobRoNumber, notificationId, associationId, notifications } = data;
console.log(`Got RO ${jobRoNumber}`);
const newNotification = {
__typename: "notifications",
id: notificationId,
@@ -96,8 +98,7 @@ export const SocketProvider = ({ children, bodyshop }) => {
fcm_text: notifications.map((notif) => notif.body).join(". ") + ".",
scenario_meta: JSON.stringify(notifications.map((notif) => notif.variables || {})),
created_at: new Date(notifications[0].timestamp).toISOString(),
read: null,
job: { ro_number: jobRoNumber }
read: null
};
try {
@@ -115,9 +116,6 @@ export const SocketProvider = ({ children, bodyshop }) => {
scenario_meta
created_at
read
job {
ro_number
}
}
}
`
@@ -140,9 +138,6 @@ export const SocketProvider = ({ children, bodyshop }) => {
scenario_meta
created_at
read
job {
ro_number
}
}
}
`,