diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..9c243a03 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:3000", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 9dc0e298..694ddf34 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ RSSA - Front End - [Vue Style Guide](https://vuejs.org/style-guide) - [Nuxt Style Guide](https://nuxt.com/docs/4.x/guide) +- [Shadcn Vue @radix-ui](https://radix.shadcn-vue.com/) ## Configuration diff --git a/app/assets/css/main.css b/app/assets/css/main.css index eb54a75e..1c7eaef2 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -21,9 +21,9 @@ --muted: 210 25% 95%; --muted-foreground: 210 15% 50%; - /* Accent - Professional Blue */ - --accent: 210 100% 50%; - --accent-foreground: 0 0% 100%; + /* Accent - Neutral Gray */ + --accent: 210 40% 96%; + --accent-foreground: 222.2 84% 4.9%; --destructive: 0 75% 55%; --destructive-foreground: 0 0% 100%; --border: 210 20% 88%; @@ -67,45 +67,43 @@ --sidebar-accent-foreground: 240 5.9% 10%; --sidebar-border: 220 13% 91%; --sidebar-ring: 217.2 91.2% 59.8%; + /* .dark { */ + /* --background: 210 25% 8%; */ + /* --foreground: 210 20% 95%; */ + /* --card: 210 25% 10%; */ + /* --card-foreground: 210 20% 95%; */ + /* --popover: 210 25% 10%; */ + /* --popover-foreground: 210 20% 95%; */ + /* --primary: 150 75% 45%; */ + /* --primary-foreground: 0 0% 100%; */ + /* --primary-hover: 150 75% 50%; */ + /* --secondary: 210 25% 15%; */ + /* --secondary-foreground: 210 20% 90%; */ + /* --muted: 210 25% 15%; */ + /* --muted-foreground: 210 15% 65%; */ + /* --accent: 210 100% 55%; */ + /* --accent-foreground: 0 0% 100%; */ + /* --destructive: 0 75% 60%; */ + /* --destructive-foreground: 0 0% 100%; */ + /* --border: 210 25% 20%; */ + /* --input: 210 25% 15%; */ + /* --ring: 150 75% 45%; */ + /* --success: 150 75% 50%; */ + /* --warning: 45 95% 65%; */ + /* --info: 210 100% 60%; */ + /* --gradient-primary: linear-gradient(135deg, hsl(150 75% 45%), hsl(150 75% 55%)); */ + /* --gradient-medical: linear-gradient(135deg, hsl(150 75% 45%), hsl(210 100% 55%)); */ + /* --gradient-subtle: linear-gradient(180deg, hsl(210 25% 8%), hsl(210 25% 12%)); */ + /* --sidebar-background: 240 5.9% 10%; */ + /* --sidebar-foreground: 240 4.8% 95.9%; */ + /* --sidebar-primary: 224.3 76.3% 48%; */ + /* --sidebar-primary-foreground: 0 0% 100%; */ + /* --sidebar-accent: 240 3.7% 15.9%; */ + /* --sidebar-accent-foreground: 240 4.8% 95.9%; */ + /* --sidebar-border: 240 3.7% 15.9%; */ + /* --sidebar-ring: 217.2 91.2% 59.8%; */ } -/* .dark { */ -/* --background: 210 25% 8%; */ -/* --foreground: 210 20% 95%; */ -/* --card: 210 25% 10%; */ -/* --card-foreground: 210 20% 95%; */ -/* --popover: 210 25% 10%; */ -/* --popover-foreground: 210 20% 95%; */ -/* --primary: 150 75% 45%; */ -/* --primary-foreground: 0 0% 100%; */ -/* --primary-hover: 150 75% 50%; */ -/* --secondary: 210 25% 15%; */ -/* --secondary-foreground: 210 20% 90%; */ -/* --muted: 210 25% 15%; */ -/* --muted-foreground: 210 15% 65%; */ -/* --accent: 210 100% 55%; */ -/* --accent-foreground: 0 0% 100%; */ -/* --destructive: 0 75% 60%; */ -/* --destructive-foreground: 0 0% 100%; */ -/* --border: 210 25% 20%; */ -/* --input: 210 25% 15%; */ -/* --ring: 150 75% 45%; */ -/* --success: 150 75% 50%; */ -/* --warning: 45 95% 65%; */ -/* --info: 210 100% 60%; */ -/* --gradient-primary: linear-gradient(135deg, hsl(150 75% 45%), hsl(150 75% 55%)); */ -/* --gradient-medical: linear-gradient(135deg, hsl(150 75% 45%), hsl(210 100% 55%)); */ -/* --gradient-subtle: linear-gradient(180deg, hsl(210 25% 8%), hsl(210 25% 12%)); */ -/* --sidebar-background: 240 5.9% 10%; */ -/* --sidebar-foreground: 240 4.8% 95.9%; */ -/* --sidebar-primary: 224.3 76.3% 48%; */ -/* --sidebar-primary-foreground: 0 0% 100%; */ -/* --sidebar-accent: 240 3.7% 15.9%; */ -/* --sidebar-accent-foreground: 240 4.8% 95.9%; */ -/* --sidebar-border: 240 3.7% 15.9%; */ -/* --sidebar-ring: 217.2 91.2% 59.8%; */ -/* } */ - /* Keyframes for Animations */ @keyframes accordion-down { from { diff --git a/app/components/app/doctor/list-cfg.ts b/app/components/app/doctor/list-cfg.ts index f697dc88..fcd73e98 100644 --- a/app/components/app/doctor/list-cfg.ts +++ b/app/components/app/doctor/list-cfg.ts @@ -11,6 +11,7 @@ import { defineAsyncComponent } from 'vue' type SmallDetailDto = any const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) const doctorStatus = { 0: 'Tidak Aktif', @@ -26,10 +27,10 @@ export const cols: Col[] = [ {}, {}, {}, + { width: 120 }, { width: 100 }, - { width: 100 }, - { width: 100 }, - { width: 50 }, + {}, + {}, ] export const header: Th[][] = [ @@ -43,6 +44,7 @@ export const header: Th[][] = [ { label: 'Fee Ranap' }, { label: 'Fee Rajal' }, { label: 'Status' }, + { label: '' }, ], ] @@ -66,7 +68,6 @@ export const delKeyNames: KeyLabel[] = [ export const funcParsed: RecStrFuncUnknown = { name: (rec: unknown): unknown => { - console.log(rec) const recX = rec as SmallDetailDto return `${recX.frontTitle} ${recX.name} ${recX.endTitle}`.trim() }, @@ -85,10 +86,6 @@ export const funcParsed: RecStrFuncUnknown = { const recX = rec as SmallDetailDto return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') }, - status: (rec: unknown): unknown => { - const recX = rec as SmallDetailDto - return doctorStatus[recX.status_code as keyof typeof doctorStatus] - }, } export const funcComponent: RecStrFuncComponent = { @@ -100,6 +97,14 @@ export const funcComponent: RecStrFuncComponent = { } return res }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, } export const funcHtml: RecStrFuncUnknown = { diff --git a/app/components/app/doctor/status-badge.vue b/app/components/app/doctor/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/doctor/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/patient/list-cfg.ts b/app/components/app/patient/list-cfg.ts index d9c9439f..fd4d0317 100644 --- a/app/components/app/patient/list-cfg.ts +++ b/app/components/app/patient/list-cfg.ts @@ -11,6 +11,7 @@ import { defineAsyncComponent } from 'vue' type SmallDetailDto = any const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) export const cols: Col[] = [ {}, @@ -110,6 +111,17 @@ export const funcComponent: RecStrFuncComponent = { } return res }, + status(rec, idx) { + if (rec.status === null) { + rec.status_code = 0 + } + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, } export const funcHtml: RecStrFuncUnknown = { diff --git a/app/components/app/patient/status-badge.vue b/app/components/app/patient/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/patient/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts b/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts index 0e1fe7f4..24cc80d1 100644 --- a/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts +++ b/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts @@ -1,9 +1,9 @@ -import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, RecStrFuncUnknown, Th } from '../../pub/nav/types' +import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, RecStrFuncUnknown, Th } from '~/components/pub/custom-ui/data/types' import { defineAsyncComponent } from 'vue' type SmallDetailDto = any -const action = defineAsyncComponent(() => import('~/components/pub/nav/dropdown-action-dud.vue')) +const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue')) export const cols: Col[] = [ {}, diff --git a/app/components/app/satusehat/badge-patient.vue b/app/components/app/satusehat/badge-patient.vue new file mode 100644 index 00000000..41202aaf --- /dev/null +++ b/app/components/app/satusehat/badge-patient.vue @@ -0,0 +1,13 @@ + + + diff --git a/app/components/app/satusehat/badge-status.vue b/app/components/app/satusehat/badge-status.vue new file mode 100644 index 00000000..5ff492f0 --- /dev/null +++ b/app/components/app/satusehat/badge-status.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/satusehat/badge.vue b/app/components/app/satusehat/badge.vue new file mode 100644 index 00000000..197cb084 --- /dev/null +++ b/app/components/app/satusehat/badge.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/components/app/satusehat/button-action.vue b/app/components/app/satusehat/button-action.vue new file mode 100644 index 00000000..f8ee85ec --- /dev/null +++ b/app/components/app/satusehat/button-action.vue @@ -0,0 +1,16 @@ + + + diff --git a/app/components/app/satusehat/card-summary.vue b/app/components/app/satusehat/card-summary.vue new file mode 100644 index 00000000..d0c142df --- /dev/null +++ b/app/components/app/satusehat/card-summary.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/satusehat/entry-form.vue b/app/components/app/satusehat/entry-form.vue new file mode 100644 index 00000000..5768c6a0 --- /dev/null +++ b/app/components/app/satusehat/entry-form.vue @@ -0,0 +1,47 @@ + + + diff --git a/app/components/app/satusehat/list-cfg.ts b/app/components/app/satusehat/list-cfg.ts new file mode 100644 index 00000000..d287a38b --- /dev/null +++ b/app/components/app/satusehat/list-cfg.ts @@ -0,0 +1,78 @@ +import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, RecStrFuncUnknown, Th } from '../../pub/nav/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +export const rowType = { + 1: 'Patient', + 2: 'Encounter', + 3: 'Observation', +} + +export const rowStatus = { + 0: 'Gagal', + 1: 'Pending', + 2: 'Terkirim', +} + +const patientBadge = defineAsyncComponent(() => import('./badge-patient.vue')) +const statusBadge = defineAsyncComponent(() => import('./badge-status.vue')) + +export const cols: Col[] = [ + { width: 100 }, + { width: 100 }, + { width: 100 }, + { width: 100 }, + { width: 100 }, + { width: 100 }, +] + +export const header: Th[][] = [ + [ + { label: 'ID' }, + { label: 'Jenis' }, + { label: 'Pasien' }, + { label: 'Status' }, + { label: 'Terakhir Update' }, + { label: 'FHIR ID' }, + ], +] + +export const keys = ['id', 'resource_type', 'patient', 'status', 'updated_at', 'fhir_id'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}` + }, +} + +export const funcComponent: RecStrFuncComponent = { + patient(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: patientBadge, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/satusehat/list.vue b/app/components/app/satusehat/list.vue new file mode 100644 index 00000000..e2921fef --- /dev/null +++ b/app/components/app/satusehat/list.vue @@ -0,0 +1,12 @@ + + + diff --git a/app/components/app/satusehat/picker.vue b/app/components/app/satusehat/picker.vue new file mode 100644 index 00000000..29f282d7 --- /dev/null +++ b/app/components/app/satusehat/picker.vue @@ -0,0 +1,51 @@ + + + diff --git a/app/components/app/satusehat/search.vue b/app/components/app/satusehat/search.vue new file mode 100644 index 00000000..9e2d2405 --- /dev/null +++ b/app/components/app/satusehat/search.vue @@ -0,0 +1,12 @@ + + + diff --git a/app/components/flow/dashboard/index.vue b/app/components/flow/dashboard/index.vue index bcb3b251..2195b428 100644 --- a/app/components/flow/dashboard/index.vue +++ b/app/components/flow/dashboard/index.vue @@ -1,5 +1,5 @@ diff --git a/app/components/flow/patient/list.vue b/app/components/flow/patient/list.vue index 82081596..6f6c0822 100644 --- a/app/components/flow/patient/list.vue +++ b/app/components/flow/patient/list.vue @@ -1,6 +1,7 @@