Added Records screen; added follow up status.
This commit is contained in:
+23
-1
@@ -1,7 +1,16 @@
|
||||
import { app, BrowserWindow, shell, ipcMain } from 'electron'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import path from 'node:path'
|
||||
import { fetchEntries, createEntry, updateEntry, deleteEntry, fetchVaccines } from './pocketbase.js'
|
||||
import {
|
||||
fetchEntries,
|
||||
createEntry,
|
||||
updateEntry,
|
||||
deleteEntry,
|
||||
fetchVaccines,
|
||||
fetchVaccineRecords,
|
||||
saveVaccineRecord,
|
||||
updateVaccineRecord,
|
||||
} from './pocketbase.js'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
@@ -104,3 +113,16 @@ ipcMain.handle('pb:fetch-vaccines', async () => {
|
||||
return await fetchVaccines()
|
||||
})
|
||||
|
||||
ipcMain.handle('pb:fetch-vaccine-records', async () => {
|
||||
return await fetchVaccineRecords()
|
||||
})
|
||||
|
||||
ipcMain.handle('pb:save-vaccine-record', async (_event, recordData) => {
|
||||
return await saveVaccineRecord(recordData)
|
||||
})
|
||||
|
||||
ipcMain.handle('pb:update-vaccine-record', async (_event, id, recordData) => {
|
||||
return await updateVaccineRecord(id, recordData)
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user