feature/IO-3096-GlobalNotifications - Checkpoint
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
||||
Reference in New Issue
Block a user