+
)
diff --git a/web/i18n/translations.ts b/web/i18n/translations.ts
index 5c47e3d..76c2eb7 100644
--- a/web/i18n/translations.ts
+++ b/web/i18n/translations.ts
@@ -13,11 +13,16 @@ export type TasksTranslationEntries = {
'assignee': string,
'confirm': string,
'createdAt': string,
+ 'dashboard': string,
'developmentAndPreviewInstance': string,
'dismiss': string,
'dueDate': string,
'homePage': string,
'imprint': string,
+ 'login': string,
+ 'loginRequired': string,
+ 'loginRequiredDescription': string,
+ 'myTasks': string,
'nBed': (values: { count: number }) => string,
'nOrganization': (values: { count: number }) => string,
'notes': string,
@@ -27,10 +32,12 @@ export type TasksTranslationEntries = {
'pages.404.notFound': string,
'pages.404.notFoundDescription1': string,
'pages.404.notFoundDescription2': string,
+ 'patients': string,
'privacy': string,
'private': string,
'public': string,
'publish': string,
+ 'rooms': string,
'stagingModalDisclaimerMarkdown': string,
'status': string,
'visibility': string,
@@ -41,11 +48,16 @@ export const tasksTranslation: Translation
{
return TranslationGen.resolvePlural(count, {
'=1': `${count} Bett`,
@@ -80,10 +92,12 @@ export const tasksTranslation: Translation {
return TranslationGen.resolvePlural(count, {
'=1': `${count} Bed`,
@@ -131,10 +150,12 @@ export const tasksTranslation: Translation
///
+import './build/dev/types/routes.d.ts'
// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
diff --git a/web/package-lock.json b/web/package-lock.json
index 52b4754..8ed2593 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -19,9 +19,9 @@
"@tanstack/react-query-devtools": "4.36.1",
"@tanstack/react-table": "8.21.3",
"clsx": "2.1.1",
- "dotenv": "^17.2.3",
+ "dotenv": "17.2.3",
"lucide-react": "0.468.0",
- "next": "^15.5.7",
+ "next": "16.0.7",
"oidc-client-ts": "3.4.1",
"postcss": "8.5.3",
"react": "18.3.1",
@@ -3446,9 +3446,10 @@
}
},
"node_modules/@next/env": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.7.tgz",
- "integrity": "sha512-4h6Y2NyEkIEN7Z8YxkA27pq6zTkS09bUSYC0xjd0NpwFxjnIKeZEeH591o5WECSmjpUhLn3H2QLJcDye3Uzcvg=="
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-16.0.7.tgz",
+ "integrity": "sha512-gpaNgUh5nftFKRkRQGnVi5dpcYSKGcZZkQffZ172OrG/XkrnS7UBTQ648YY+8ME92cC4IojpI2LqTC8sTDhAaw==",
+ "license": "MIT"
},
"node_modules/@next/eslint-plugin-next": {
"version": "15.5.6",
@@ -3461,12 +3462,13 @@
}
},
"node_modules/@next/swc-darwin-arm64": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.7.tgz",
- "integrity": "sha512-IZwtxCEpI91HVU/rAUOOobWSZv4P2DeTtNaCdHqLcTJU4wdNXgAySvKa/qJCgR5m6KI8UsKDXtO2B31jcaw1Yw==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.0.7.tgz",
+ "integrity": "sha512-LlDtCYOEj/rfSnEn/Idi+j1QKHxY9BJFmxx7108A6D8K0SB+bNgfYQATPk/4LqOl4C0Wo3LACg2ie6s7xqMpJg==",
"cpu": [
"arm64"
],
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -3476,12 +3478,13 @@
}
},
"node_modules/@next/swc-darwin-x64": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.7.tgz",
- "integrity": "sha512-UP6CaDBcqaCBuiq/gfCEJw7sPEoX1aIjZHnBWN9v9qYHQdMKvCKcAVs4OX1vIjeE+tC5EIuwDTVIoXpUes29lg==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.0.7.tgz",
+ "integrity": "sha512-rtZ7BhnVvO1ICf3QzfW9H3aPz7GhBrnSIMZyr4Qy6boXF0b5E3QLs+cvJmg3PsTCG2M1PBoC+DANUi4wCOKXpA==",
"cpu": [
"x64"
],
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -3491,12 +3494,13 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.7.tgz",
- "integrity": "sha512-NCslw3GrNIw7OgmRBxHtdWFQYhexoUCq+0oS2ccjyYLtcn1SzGzeM54jpTFonIMUjNbHmpKpziXnpxhSWLcmBA==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.0.7.tgz",
+ "integrity": "sha512-mloD5WcPIeIeeZqAIP5c2kdaTa6StwP4/2EGy1mUw8HiexSHGK/jcM7lFuS3u3i2zn+xH9+wXJs6njO7VrAqww==",
"cpu": [
"arm64"
],
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -3506,12 +3510,13 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.7.tgz",
- "integrity": "sha512-nfymt+SE5cvtTrG9u1wdoxBr9bVB7mtKTcj0ltRn6gkP/2Nu1zM5ei8rwP9qKQP0Y//umK+TtkKgNtfboBxRrw==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.0.7.tgz",
+ "integrity": "sha512-+ksWNrZrthisXuo9gd1XnjHRowCbMtl/YgMpbRvFeDEqEBd523YHPWpBuDjomod88U8Xliw5DHhekBC3EOOd9g==",
"cpu": [
"arm64"
],
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -3521,12 +3526,13 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.7.tgz",
- "integrity": "sha512-hvXcZvCaaEbCZcVzcY7E1uXN9xWZfFvkNHwbe/n4OkRhFWrs1J1QV+4U1BN06tXLdaS4DazEGXwgqnu/VMcmqw==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.0.7.tgz",
+ "integrity": "sha512-4WtJU5cRDxpEE44Ana2Xro1284hnyVpBb62lIpU5k85D8xXxatT+rXxBgPkc7C1XwkZMWpK5rXLXTh9PFipWsA==",
"cpu": [
"x64"
],
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -3536,12 +3542,13 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.7.tgz",
- "integrity": "sha512-4IUO539b8FmF0odY6/SqANJdgwn1xs1GkPO5doZugwZ3ETF6JUdckk7RGmsfSf7ws8Qb2YB5It33mvNL/0acqA==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.0.7.tgz",
+ "integrity": "sha512-HYlhqIP6kBPXalW2dbMTSuB4+8fe+j9juyxwfMwCe9kQPPeiyFn7NMjNfoFOfJ2eXkeQsoUGXg+O2SE3m4Qg2w==",
"cpu": [
"x64"
],
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -3551,12 +3558,13 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.7.tgz",
- "integrity": "sha512-CpJVTkYI3ZajQkC5vajM7/ApKJUOlm6uP4BknM3XKvJ7VXAvCqSjSLmM0LKdYzn6nBJVSjdclx8nYJSa3xlTgQ==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.0.7.tgz",
+ "integrity": "sha512-EviG+43iOoBRZg9deGauXExjRphhuYmIOJ12b9sAPy0eQ6iwcPxfED2asb/s2/yiLYOdm37kPaiZu8uXSYPs0Q==",
"cpu": [
"arm64"
],
+ "license": "MIT",
"optional": true,
"os": [
"win32"
@@ -3566,12 +3574,13 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.7.tgz",
- "integrity": "sha512-gMzgBX164I6DN+9/PGA+9dQiwmTkE4TloBNx8Kv9UiGARsr9Nba7IpcBRA1iTV9vwlYnrE3Uy6I7Aj6qLjQuqw==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.0.7.tgz",
+ "integrity": "sha512-gniPjy55zp5Eg0896qSrf3yB1dw4F/3s8VK1ephdsZZ129j2n6e1WqCbE2YgcKhW9hPB9TVZENugquWJD5x0ug==",
"cpu": [
"x64"
],
+ "license": "MIT",
"optional": true,
"os": [
"win32"
@@ -10894,11 +10903,12 @@
"license": "MIT"
},
"node_modules/next": {
- "version": "15.5.7",
- "resolved": "https://registry.npmjs.org/next/-/next-15.5.7.tgz",
- "integrity": "sha512-+t2/0jIJ48kUpGKkdlhgkv+zPTEOoXyr60qXe68eB/pl3CMJaLeIGjzp5D6Oqt25hCBiBTt8wEeeAzfJvUKnPQ==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/next/-/next-16.0.7.tgz",
+ "integrity": "sha512-3mBRJyPxT4LOxAJI6IsXeFtKfiJUbjCLgvXO02fV8Wy/lIhPvP94Fe7dGhUgHXcQy4sSuYwQNcOLhIfOm0rL0A==",
+ "license": "MIT",
"dependencies": {
- "@next/env": "15.5.7",
+ "@next/env": "16.0.7",
"@swc/helpers": "0.5.15",
"caniuse-lite": "^1.0.30001579",
"postcss": "8.4.31",
@@ -10908,18 +10918,18 @@
"next": "dist/bin/next"
},
"engines": {
- "node": "^18.18.0 || ^19.8.0 || >= 20.0.0"
+ "node": ">=20.9.0"
},
"optionalDependencies": {
- "@next/swc-darwin-arm64": "15.5.7",
- "@next/swc-darwin-x64": "15.5.7",
- "@next/swc-linux-arm64-gnu": "15.5.7",
- "@next/swc-linux-arm64-musl": "15.5.7",
- "@next/swc-linux-x64-gnu": "15.5.7",
- "@next/swc-linux-x64-musl": "15.5.7",
- "@next/swc-win32-arm64-msvc": "15.5.7",
- "@next/swc-win32-x64-msvc": "15.5.7",
- "sharp": "^0.34.3"
+ "@next/swc-darwin-arm64": "16.0.7",
+ "@next/swc-darwin-x64": "16.0.7",
+ "@next/swc-linux-arm64-gnu": "16.0.7",
+ "@next/swc-linux-arm64-musl": "16.0.7",
+ "@next/swc-linux-x64-gnu": "16.0.7",
+ "@next/swc-linux-x64-musl": "16.0.7",
+ "@next/swc-win32-arm64-msvc": "16.0.7",
+ "@next/swc-win32-x64-msvc": "16.0.7",
+ "sharp": "^0.34.4"
},
"peerDependencies": {
"@opentelemetry/api": "^1.1.0",
diff --git a/web/package.json b/web/package.json
index 89d13c6..6bc8598 100644
--- a/web/package.json
+++ b/web/package.json
@@ -23,9 +23,9 @@
"@tanstack/react-query-devtools": "4.36.1",
"@tanstack/react-table": "8.21.3",
"clsx": "2.1.1",
- "dotenv": "^17.2.3",
+ "dotenv": "17.2.3",
"lucide-react": "0.468.0",
- "next": "^15.5.7",
+ "next": "16.0.7",
"oidc-client-ts": "3.4.1",
"postcss": "8.5.3",
"react": "18.3.1",
@@ -45,7 +45,7 @@
"@types/react": "18.3.17",
"@types/react-dom": "18.3.5",
"eslint": "9.39.1",
- "graphql": "^16.12.0",
+ "graphql": "16.12.0",
"graphql-request": "^7.3.5"
}
}
diff --git a/web/pages/index.tsx b/web/pages/index.tsx
index 346b42a..f8c07d4 100644
--- a/web/pages/index.tsx
+++ b/web/pages/index.tsx
@@ -245,7 +245,6 @@ const Dashboard: NextPage = () => {
], [])
const { data, isLoading } = useMyQueryQuery()
-
return (
diff --git a/web/pages/patients/index.tsx b/web/pages/patients/index.tsx
new file mode 100644
index 0000000..f8c07d4
--- /dev/null
+++ b/web/pages/patients/index.tsx
@@ -0,0 +1,263 @@
+import type { NextPage } from 'next'
+import { Page } from '@/components/layout/Page'
+import titleWrapper from '@/utils/titleWrapper'
+import { useTasksTranslation } from '@/i18n/useTasksTranslation'
+import { ContentPanel } from '@/components/layout/ContentPanel'
+import { Chip, SolidButton, Table } from '@helpwave/hightide'
+import { useMemo } from 'react'
+import type { ColumnDef } from '@tanstack/table-core'
+import { withAuth } from '@/hooks/useAuth'
+import { useMyQueryQuery } from '@/api/gql/generated'
+
+type Patient = {
+ name: string,
+}
+
+type Room = {
+ name: string,
+}
+
+type Task = {
+ id: string,
+ name: string,
+ dueDate: Date,
+ patient?: Patient,
+ room?: Room,
+ done: boolean,
+}
+
+const tasks: Task[] = [
+ {
+ id: 't1',
+ name: 'Check vitals',
+ dueDate: new Date('2025-01-10T08:00'),
+ patient: { name: 'Alice Kim' },
+ done: false
+ },
+ {
+ id: 't2',
+ name: 'Administer medication',
+ dueDate: new Date('2025-01-10T09:30'),
+ patient: { name: 'John Park' },
+ done: false
+ },
+ {
+ id: 't3',
+ name: 'Prepare room for surgery',
+ dueDate: new Date('2025-01-10T10:00'),
+ room: { name: 'OR-2' },
+ done: false
+ },
+ {
+ id: 't4',
+ name: 'Daily wound inspection',
+ dueDate: new Date('2025-01-10T11:00'),
+ patient: { name: 'Sarah Lee' },
+ done: false
+ },
+ {
+ id: 't5',
+ name: 'Clean recovery room',
+ dueDate: new Date('2025-01-10T12:00'),
+ room: { name: 'Recovery-5' },
+ done: false
+ },
+ {
+ id: 't6',
+ name: 'Update patient chart',
+ dueDate: new Date('2025-01-10T13:00'),
+ patient: { name: 'Daniel Cho' },
+ done: false
+ },
+ {
+ id: 't7',
+ name: 'Disinfect equipment',
+ dueDate: new Date('2025-01-10T14:00'),
+ room: { name: 'Utility-3' },
+ done: true
+ },
+ {
+ id: 't8',
+ name: 'Prepare IV line',
+ dueDate: new Date('2025-01-10T14:30'),
+ patient: { name: 'Emma Yoon' },
+ done: false
+ },
+ {
+ id: 't9',
+ name: 'Room ventilation check',
+ dueDate: new Date('2025-01-10T15:00'),
+ room: { name: 'ICU-1' },
+ done: false
+ },
+ {
+ id: 't10',
+ name: 'Transport patient for imaging',
+ dueDate: new Date('2025-01-10T15:30'),
+ patient: { name: 'Michael Han' },
+ done: true
+ },
+ {
+ id: 't11',
+ name: 'Replace linens',
+ dueDate: new Date('2025-01-10T16:00'),
+ room: { name: 'Room-204' },
+ done: false
+ },
+ {
+ id: 't12',
+ name: 'Monitor infusion pump',
+ dueDate: new Date('2025-01-10T16:30'),
+ patient: { name: 'Grace Jung' },
+ done: false
+ },
+ {
+ id: 't13',
+ name: 'Calibrate sensors',
+ dueDate: new Date('2025-01-10T17:00'),
+ room: { name: 'Lab-1' },
+ done: true
+ },
+ {
+ id: 't14',
+ name: 'Check oxygen supply',
+ dueDate: new Date('2025-01-10T17:30'),
+ room: { name: 'ICU-3' },
+ done: false
+ },
+ {
+ id: 't15',
+ name: 'Assist with mobility',
+ dueDate: new Date('2025-01-10T18:00'),
+ patient: { name: 'Henry Park' },
+ done: false
+ },
+ {
+ id: 't16',
+ name: 'Inventory medications',
+ dueDate: new Date('2025-01-10T18:30'),
+ room: { name: 'Pharmacy' },
+ done: true
+ },
+ {
+ id: 't17',
+ name: 'Measure blood glucose',
+ dueDate: new Date('2025-01-10T19:00'),
+ patient: { name: 'Lina Seo' },
+ done: false
+ },
+ {
+ id: 't18',
+ name: 'Sanitize surfaces',
+ dueDate: new Date('2025-01-10T19:30'),
+ room: { name: 'ER-2' },
+ done: false
+ },
+ {
+ id: 't19',
+ name: 'Check respiratory status',
+ dueDate: new Date('2025-01-10T20:00'),
+ patient: { name: 'Robert Shin' },
+ done: false
+ },
+ {
+ id: 't20',
+ name: 'Test emergency lighting',
+ dueDate: new Date('2025-01-10T20:30'),
+ room: { name: 'Hallway-A' },
+ done: true
+ }
+]
+
+
+const Dashboard: NextPage = () => {
+ const translation = useTasksTranslation()
+
+ const columns = useMemo[]>(() => [
+ {
+ id: 'description',
+ header: 'Description',
+ accessorKey: 'name',
+ minSize: 200,
+ size: 250,
+ maxSize: 300,
+ },
+ {
+ id: 'dueDate',
+ header: 'dueDate',
+ accessorKey: 'dueDate',
+ cell: ({ row }) => row.original.dueDate.toLocaleString(),
+ minSize: 150,
+ size: 200,
+ maxSize: 200,
+ },
+ {
+ id: 'patient',
+ header: 'Patient',
+ accessorFn: ({ patient }) => patient?.name,
+ sortingFn: 'text',
+ minSize: 250,
+ size: 250,
+ maxSize: 400,
+ },
+ {
+ id: 'room',
+ header: 'Room',
+ accessorFn: ({ room }) => room?.name,
+ minSize: 250,
+ size: 250,
+ maxSize: 400,
+ },
+ {
+ id: 'status',
+ header: 'status',
+ accessorKey: 'done',
+ cell: ({ row }) => (
+
+ {row.original.done ? 'done' : 'todo'}
+
+ ),
+ minSize: 250,
+ size: 250,
+ maxSize: 400,
+ },
+ {
+ id: 'actions',
+ header: 'Actions',
+ cell: ({ row }) => {
+ const task = row.original
+ return (
+ {
+ console.log(`clicked on finish of task ${task.id}`)
+ }}
+ >
+ {'Finish'}
+
+ )
+ },
+ enableSorting: false,
+ enableColumnFilter: false,
+ size: 120,
+ minSize: 100,
+ maxSize: 150
+ }
+ ], [])
+
+ const { data, isLoading } = useMyQueryQuery()
+ return (
+
+
+
+
+ {isLoading ? 'Loading' : data?.patients.toString()}
+
+
+ )
+}
+
+export default withAuth(Dashboard)
diff --git a/web/pages/tasks/index.tsx b/web/pages/tasks/index.tsx
new file mode 100644
index 0000000..f8c07d4
--- /dev/null
+++ b/web/pages/tasks/index.tsx
@@ -0,0 +1,263 @@
+import type { NextPage } from 'next'
+import { Page } from '@/components/layout/Page'
+import titleWrapper from '@/utils/titleWrapper'
+import { useTasksTranslation } from '@/i18n/useTasksTranslation'
+import { ContentPanel } from '@/components/layout/ContentPanel'
+import { Chip, SolidButton, Table } from '@helpwave/hightide'
+import { useMemo } from 'react'
+import type { ColumnDef } from '@tanstack/table-core'
+import { withAuth } from '@/hooks/useAuth'
+import { useMyQueryQuery } from '@/api/gql/generated'
+
+type Patient = {
+ name: string,
+}
+
+type Room = {
+ name: string,
+}
+
+type Task = {
+ id: string,
+ name: string,
+ dueDate: Date,
+ patient?: Patient,
+ room?: Room,
+ done: boolean,
+}
+
+const tasks: Task[] = [
+ {
+ id: 't1',
+ name: 'Check vitals',
+ dueDate: new Date('2025-01-10T08:00'),
+ patient: { name: 'Alice Kim' },
+ done: false
+ },
+ {
+ id: 't2',
+ name: 'Administer medication',
+ dueDate: new Date('2025-01-10T09:30'),
+ patient: { name: 'John Park' },
+ done: false
+ },
+ {
+ id: 't3',
+ name: 'Prepare room for surgery',
+ dueDate: new Date('2025-01-10T10:00'),
+ room: { name: 'OR-2' },
+ done: false
+ },
+ {
+ id: 't4',
+ name: 'Daily wound inspection',
+ dueDate: new Date('2025-01-10T11:00'),
+ patient: { name: 'Sarah Lee' },
+ done: false
+ },
+ {
+ id: 't5',
+ name: 'Clean recovery room',
+ dueDate: new Date('2025-01-10T12:00'),
+ room: { name: 'Recovery-5' },
+ done: false
+ },
+ {
+ id: 't6',
+ name: 'Update patient chart',
+ dueDate: new Date('2025-01-10T13:00'),
+ patient: { name: 'Daniel Cho' },
+ done: false
+ },
+ {
+ id: 't7',
+ name: 'Disinfect equipment',
+ dueDate: new Date('2025-01-10T14:00'),
+ room: { name: 'Utility-3' },
+ done: true
+ },
+ {
+ id: 't8',
+ name: 'Prepare IV line',
+ dueDate: new Date('2025-01-10T14:30'),
+ patient: { name: 'Emma Yoon' },
+ done: false
+ },
+ {
+ id: 't9',
+ name: 'Room ventilation check',
+ dueDate: new Date('2025-01-10T15:00'),
+ room: { name: 'ICU-1' },
+ done: false
+ },
+ {
+ id: 't10',
+ name: 'Transport patient for imaging',
+ dueDate: new Date('2025-01-10T15:30'),
+ patient: { name: 'Michael Han' },
+ done: true
+ },
+ {
+ id: 't11',
+ name: 'Replace linens',
+ dueDate: new Date('2025-01-10T16:00'),
+ room: { name: 'Room-204' },
+ done: false
+ },
+ {
+ id: 't12',
+ name: 'Monitor infusion pump',
+ dueDate: new Date('2025-01-10T16:30'),
+ patient: { name: 'Grace Jung' },
+ done: false
+ },
+ {
+ id: 't13',
+ name: 'Calibrate sensors',
+ dueDate: new Date('2025-01-10T17:00'),
+ room: { name: 'Lab-1' },
+ done: true
+ },
+ {
+ id: 't14',
+ name: 'Check oxygen supply',
+ dueDate: new Date('2025-01-10T17:30'),
+ room: { name: 'ICU-3' },
+ done: false
+ },
+ {
+ id: 't15',
+ name: 'Assist with mobility',
+ dueDate: new Date('2025-01-10T18:00'),
+ patient: { name: 'Henry Park' },
+ done: false
+ },
+ {
+ id: 't16',
+ name: 'Inventory medications',
+ dueDate: new Date('2025-01-10T18:30'),
+ room: { name: 'Pharmacy' },
+ done: true
+ },
+ {
+ id: 't17',
+ name: 'Measure blood glucose',
+ dueDate: new Date('2025-01-10T19:00'),
+ patient: { name: 'Lina Seo' },
+ done: false
+ },
+ {
+ id: 't18',
+ name: 'Sanitize surfaces',
+ dueDate: new Date('2025-01-10T19:30'),
+ room: { name: 'ER-2' },
+ done: false
+ },
+ {
+ id: 't19',
+ name: 'Check respiratory status',
+ dueDate: new Date('2025-01-10T20:00'),
+ patient: { name: 'Robert Shin' },
+ done: false
+ },
+ {
+ id: 't20',
+ name: 'Test emergency lighting',
+ dueDate: new Date('2025-01-10T20:30'),
+ room: { name: 'Hallway-A' },
+ done: true
+ }
+]
+
+
+const Dashboard: NextPage = () => {
+ const translation = useTasksTranslation()
+
+ const columns = useMemo[]>(() => [
+ {
+ id: 'description',
+ header: 'Description',
+ accessorKey: 'name',
+ minSize: 200,
+ size: 250,
+ maxSize: 300,
+ },
+ {
+ id: 'dueDate',
+ header: 'dueDate',
+ accessorKey: 'dueDate',
+ cell: ({ row }) => row.original.dueDate.toLocaleString(),
+ minSize: 150,
+ size: 200,
+ maxSize: 200,
+ },
+ {
+ id: 'patient',
+ header: 'Patient',
+ accessorFn: ({ patient }) => patient?.name,
+ sortingFn: 'text',
+ minSize: 250,
+ size: 250,
+ maxSize: 400,
+ },
+ {
+ id: 'room',
+ header: 'Room',
+ accessorFn: ({ room }) => room?.name,
+ minSize: 250,
+ size: 250,
+ maxSize: 400,
+ },
+ {
+ id: 'status',
+ header: 'status',
+ accessorKey: 'done',
+ cell: ({ row }) => (
+
+ {row.original.done ? 'done' : 'todo'}
+
+ ),
+ minSize: 250,
+ size: 250,
+ maxSize: 400,
+ },
+ {
+ id: 'actions',
+ header: 'Actions',
+ cell: ({ row }) => {
+ const task = row.original
+ return (
+ {
+ console.log(`clicked on finish of task ${task.id}`)
+ }}
+ >
+ {'Finish'}
+
+ )
+ },
+ enableSorting: false,
+ enableColumnFilter: false,
+ size: 120,
+ minSize: 100,
+ maxSize: 150
+ }
+ ], [])
+
+ const { data, isLoading } = useMyQueryQuery()
+ return (
+
+
+
+
+ {isLoading ? 'Loading' : data?.patients.toString()}
+
+
+ )
+}
+
+export default withAuth(Dashboard)
diff --git a/web/tsconfig.json b/web/tsconfig.json
index 2b9d863..220a868 100644
--- a/web/tsconfig.json
+++ b/web/tsconfig.json
@@ -15,7 +15,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
- "jsx": "preserve",
+ "jsx": "react-jsx",
"incremental": true,
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,