From e866c0cf2ae2c3daf1b508e31b9b0ad8a28cfa69 Mon Sep 17 00:00:00 2001 From: riefive Date: Thu, 30 Oct 2025 14:41:52 +0700 Subject: [PATCH] feat(cemo): layouting protocol --- .../app/cemotherapy/list-cfg.protocol.ts | 62 ++++++++++ .../app/cemotherapy/list.protocol.vue | 75 +++++++++++++ .../content/cemotherapy/protocol.vue | 106 ++++++++++++++++++ .../outpation-action/cemotherapy/index.vue | 7 +- 4 files changed, 245 insertions(+), 5 deletions(-) create mode 100644 app/components/app/cemotherapy/list-cfg.protocol.ts create mode 100644 app/components/app/cemotherapy/list.protocol.vue create mode 100644 app/components/content/cemotherapy/protocol.vue diff --git a/app/components/app/cemotherapy/list-cfg.protocol.ts b/app/components/app/cemotherapy/list-cfg.protocol.ts new file mode 100644 index 00000000..da678c0f --- /dev/null +++ b/app/components/app/cemotherapy/list-cfg.protocol.ts @@ -0,0 +1,62 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [ + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 50 }, + ], + + headers: [ + [ + { label: 'NO.' }, + { label: 'TANGGAL' }, + { label: 'SIKLUS' }, + { label: 'PERIODE KEMOTERAPI' }, + { label: 'KEHADIRAN' }, + { label: '' }, + ], + ], + + keys: [ + 'number', + 'tanggal', + 'siklus', + 'periode', + 'kehadiran', + 'action', + ], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, + }, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: {}, +} diff --git a/app/components/app/cemotherapy/list.protocol.vue b/app/components/app/cemotherapy/list.protocol.vue new file mode 100644 index 00000000..7b5c3234 --- /dev/null +++ b/app/components/app/cemotherapy/list.protocol.vue @@ -0,0 +1,75 @@ + + + diff --git a/app/components/content/cemotherapy/protocol.vue b/app/components/content/cemotherapy/protocol.vue new file mode 100644 index 00000000..427b4642 --- /dev/null +++ b/app/components/content/cemotherapy/protocol.vue @@ -0,0 +1,106 @@ + + + diff --git a/app/pages/(features)/outpation-action/cemotherapy/index.vue b/app/pages/(features)/outpation-action/cemotherapy/index.vue index 50485cec..06da4369 100644 --- a/app/pages/(features)/outpation-action/cemotherapy/index.vue +++ b/app/pages/(features)/outpation-action/cemotherapy/index.vue @@ -1,10 +1,7 @@