diff --git a/.prettierrc.json b/.prettierrc.json index 28b1a8b3..bff36007 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -5,5 +5,7 @@ "trailingComma": "all", "printWidth": 120, "semi": false, - "plugins": ["prettier-plugin-tailwindcss"] + "plugins": ["prettier-plugin-tailwindcss"], + "htmlWhitespaceSensitivity": "ignore", + "singleAttributePerLine": true } diff --git a/app/assets/css/main.css b/app/assets/css/main.css index 8f547641..b5064af7 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -346,6 +346,7 @@ body, table, label { color: hsl(var(--destructive)); /* font-size: 0.875rem; */ margin-top: 0.25rem; + min-height: 1rem; /* Reserve space to prevent CLS */ line-height: 1.25; } @@ -374,4 +375,4 @@ body, table, label { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } -} \ No newline at end of file +} diff --git a/app/components/app/assesment-function/entry-form.vue b/app/components/app/assesment-function/entry-form.vue new file mode 100644 index 00000000..5768c6a0 --- /dev/null +++ b/app/components/app/assesment-function/entry-form.vue @@ -0,0 +1,47 @@ + + + diff --git a/app/components/app/assesment-function/list-cfg.ts b/app/components/app/assesment-function/list-cfg.ts new file mode 100644 index 00000000..460cacd9 --- /dev/null +++ b/app/components/app/assesment-function/list-cfg.ts @@ -0,0 +1,119 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [ + {}, + {}, + {}, + { width: 100 }, + { width: 120 }, + {}, + {}, + {}, + { width: 100 }, + { width: 100 }, + {}, + { width: 50 }, +] + +export const header: Th[][] = [ + [ + { label: 'Nama' }, + { label: 'Rekam Medis' }, + { label: 'KTP' }, + { label: 'Tgl Lahir' }, + { label: 'Umur' }, + { label: 'JK' }, + { label: 'Pendidikan' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'name', + 'medicalRecord_number', + 'identity_number', + 'birth_date', + 'patient_age', + 'gender', + 'education', + 'status', + 'action', +] + +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 || ''}` + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + birth_date: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.birth_date == 'object' && recX.birth_date) { + return (recX.birth_date as Date).toLocaleDateString() + } else if (typeof recX.birth_date == 'string') { + return (recX.birth_date as string).substring(0, 10) + } + return recX.birth_date + }, + patient_age: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.birth_date?.split('T')[0] + }, + gender: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') { + return 'Tidak Diketahui' + } + return recX.gender_code + }, + education: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.education_code == 'number' && recX.education_code >= 0) { + return recX.education_code + } else if (typeof recX.education_code) { + return recX.education_code + } + return '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/assesment-function/list.vue b/app/components/app/assesment-function/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/assesment-function/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/assesment-function/picker.vue b/app/components/app/assesment-function/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/assesment-function/search.vue b/app/components/app/assesment-function/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/bed/entry-form.vue b/app/components/app/bed/entry-form.vue new file mode 100644 index 00000000..fb851aa4 --- /dev/null +++ b/app/components/app/bed/entry-form.vue @@ -0,0 +1,105 @@ + + + diff --git a/app/components/app/bed/list-cfg.ts b/app/components/app/bed/list-cfg.ts new file mode 100644 index 00000000..5174e69a --- /dev/null +++ b/app/components/app/bed/list-cfg.ts @@ -0,0 +1,47 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{ width: 100 }, {}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Counter Induk' }, { label: '' }]] + +export const keys = ['code', 'name', 'parent', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/bed/list.vue b/app/components/app/bed/list.vue new file mode 100644 index 00000000..af63d76e --- /dev/null +++ b/app/components/app/bed/list.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/components/app/building/entry-form.vue b/app/components/app/building/entry-form.vue new file mode 100644 index 00000000..c2851e2d --- /dev/null +++ b/app/components/app/building/entry-form.vue @@ -0,0 +1,108 @@ + + + diff --git a/app/components/app/building/list-cfg.ts b/app/components/app/building/list-cfg.ts new file mode 100644 index 00000000..905ec837 --- /dev/null +++ b/app/components/app/building/list-cfg.ts @@ -0,0 +1,37 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: '' }]] + +export const keys = ['code', 'name', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = {} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/building/list.vue b/app/components/app/building/list.vue new file mode 100644 index 00000000..e1b056ce --- /dev/null +++ b/app/components/app/building/list.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/components/app/chamber/entry-form.vue b/app/components/app/chamber/entry-form.vue new file mode 100644 index 00000000..fb851aa4 --- /dev/null +++ b/app/components/app/chamber/entry-form.vue @@ -0,0 +1,105 @@ + + + diff --git a/app/components/app/chamber/list-cfg.ts b/app/components/app/chamber/list-cfg.ts new file mode 100644 index 00000000..5174e69a --- /dev/null +++ b/app/components/app/chamber/list-cfg.ts @@ -0,0 +1,47 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{ width: 100 }, {}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Counter Induk' }, { label: '' }]] + +export const keys = ['code', 'name', 'parent', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/chamber/list.vue b/app/components/app/chamber/list.vue new file mode 100644 index 00000000..af63d76e --- /dev/null +++ b/app/components/app/chamber/list.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/components/app/consultation/entry.vue b/app/components/app/consultation/entry.vue new file mode 100644 index 00000000..db983ef1 --- /dev/null +++ b/app/components/app/consultation/entry.vue @@ -0,0 +1,122 @@ + + +