Split Travellers data into Trips; Added 'Risk Audit' screen; Added follow-up checks; connected 'Trips' to Juvonno.

This commit is contained in:
2026-09-03 15:18:32 -04:00
parent 7085a478fb
commit 8e14bb438d
21 changed files with 3958 additions and 226 deletions
+21
View File
@@ -16,6 +16,7 @@ const ALLOWED_SEND_CHANNELS = [
'schedule:fetch',
'app:ready',
'pb:fetch-entries',
'pb:fetch-travellers',
'pb:create-entry',
'pb:update-entry',
'pb:delete-entry',
@@ -23,6 +24,8 @@ const ALLOWED_SEND_CHANNELS = [
'pb:fetch-vaccine-records',
'pb:save-vaccine-record',
'pb:update-vaccine-record',
'audit:run-health-audit',
'juvonno:fetch-chart',
]
const ALLOWED_RECEIVE_CHANNELS = [
@@ -31,6 +34,7 @@ const ALLOWED_RECEIVE_CHANNELS = [
'schedule:response',
'app:get-version',
'pb:fetch-entries',
'pb:fetch-travellers',
'pb:create-entry',
'pb:update-entry',
'pb:delete-entry',
@@ -38,6 +42,8 @@ const ALLOWED_RECEIVE_CHANNELS = [
'pb:fetch-vaccine-records',
'pb:save-vaccine-record',
'pb:update-vaccine-record',
'audit:run-health-audit',
'juvonno:fetch-chart',
]
// ─── Exposed API ──────────────────────────────────────────────────────────
@@ -47,6 +53,7 @@ contextBridge.exposeInMainWorld('api', {
*/
pb: {
fetchEntries: () => ipcRenderer.invoke('pb:fetch-entries'),
fetchTravellers: () => ipcRenderer.invoke('pb:fetch-travellers'),
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),
@@ -56,6 +63,20 @@ contextBridge.exposeInMainWorld('api', {
updateVaccineRecord: (id, data) => ipcRenderer.invoke('pb:update-vaccine-record', id, data),
},
/**
* Health Risk Audit helper methods
*/
audit: {
runHealthAudit: (payload) => ipcRenderer.invoke('audit:run-health-audit', payload),
},
/**
* Juvonno EMR helper methods
*/
juvonno: {
fetchChart: (emrId) => ipcRenderer.invoke('juvonno:fetch-chart', emrId),
},
/**
* Send a one-way message to the main process.
* @param {string} channel - Must be in ALLOWED_SEND_CHANNELS