Added Notifications screen and logic for Records.

This commit is contained in:
Bruno Silva committed 2026-09-28 16:41:51 -04:00
1 parent 72ec7472c5
commit 697d72f379
13 files changed
+2255 -145

No files matched your search

+18
View File
@@ -17,6 +17,7 @@ const ALLOWED_SEND_CHANNELS = [
'app:ready',
'pb:fetch-entries',
'pb:fetch-travellers',
'pb:create-traveller',
'pb:create-entry',
'pb:update-entry',
'pb:delete-entry',
@@ -24,6 +25,11 @@ const ALLOWED_SEND_CHANNELS = [
'pb:fetch-vaccine-records',
'pb:save-vaccine-record',
'pb:update-vaccine-record',
'pb:fetch-notifications',
'pb:update-notification',
'pb:mark-notification-read',
'pb:mark-all-notifications-read',
'pb:archive-notification',
'audit:run-health-audit',
'juvonno:fetch-chart',
]
@@ -35,6 +41,7 @@ const ALLOWED_RECEIVE_CHANNELS = [
'app:get-version',
'pb:fetch-entries',
'pb:fetch-travellers',
'pb:create-traveller',
'pb:create-entry',
'pb:update-entry',
'pb:delete-entry',
@@ -42,6 +49,11 @@ const ALLOWED_RECEIVE_CHANNELS = [
'pb:fetch-vaccine-records',
'pb:save-vaccine-record',
'pb:update-vaccine-record',
'pb:fetch-notifications',
'pb:update-notification',
'pb:mark-notification-read',
'pb:mark-all-notifications-read',
'pb:archive-notification',
'audit:run-health-audit',
'juvonno:fetch-chart',
]
@@ -54,6 +66,7 @@ contextBridge.exposeInMainWorld('api', {
pb: {
fetchEntries: () => ipcRenderer.invoke('pb:fetch-entries'),
fetchTravellers: () => ipcRenderer.invoke('pb:fetch-travellers'),
createTraveller: (data) => ipcRenderer.invoke('pb:create-traveller', data),
createEntry: (trip) => ipcRenderer.invoke('pb:create-entry', trip),
updateEntry: (id, trip) => ipcRenderer.invoke('pb:update-entry', id, trip),
deleteEntry: (id) => ipcRenderer.invoke('pb:delete-entry', id),
@@ -61,6 +74,11 @@ contextBridge.exposeInMainWorld('api', {
fetchVaccineRecords: () => ipcRenderer.invoke('pb:fetch-vaccine-records'),
saveVaccineRecord: (data) => ipcRenderer.invoke('pb:save-vaccine-record', data),
updateVaccineRecord: (id, data) => ipcRenderer.invoke('pb:update-vaccine-record', id, data),
fetchNotifications: (options) => ipcRenderer.invoke('pb:fetch-notifications', options),
updateNotification: (id, data) => ipcRenderer.invoke('pb:update-notification', id, data),
markNotificationRead: (id, isRead) => ipcRenderer.invoke('pb:mark-notification-read', id, isRead),
markAllNotificationsRead: () => ipcRenderer.invoke('pb:mark-all-notifications-read'),
archiveNotification: (id, isArchived) => ipcRenderer.invoke('pb:archive-notification', id, isArchived),
},
/**