diff --git a/app/components/app/cemotherapy/list-cfg.ts b/app/components/app/cemotherapy/list-cfg.ts new file mode 100644 index 00000000..29c24e6f --- /dev/null +++ b/app/components/app/cemotherapy/list-cfg.ts @@ -0,0 +1,80 @@ +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: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 50 }, + ], + + headers: [ + [ + { label: 'TANGGAL' }, + { label: 'NO. RM' }, + { label: 'NO. BILL' }, + { label: 'JK' }, + { label: 'ALAMAT' }, + { label: 'KLINIK ASAL' }, + { label: 'NAMA DOKTER' }, + { label: 'CARA BAYAR' }, + { label: 'RUJUKAN' }, + { label: 'KET. RUJUKAN' }, + { label: 'ASAL' }, + { label: '' }, + ], + ], + + keys: [ + 'tanggal', + 'noRm', + 'noBill', + 'jk', + 'alamat', + 'klinik', + 'dokter', + 'caraBayar', + 'rujukan', + 'ketRujukan', + 'asal', + '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.vue b/app/components/app/cemotherapy/list.vue new file mode 100644 index 00000000..19642581 --- /dev/null +++ b/app/components/app/cemotherapy/list.vue @@ -0,0 +1,36 @@ + + + \ No newline at end of file diff --git a/app/components/app/cemotherapy/sample.ts b/app/components/app/cemotherapy/sample.ts new file mode 100644 index 00000000..254e64f6 --- /dev/null +++ b/app/components/app/cemotherapy/sample.ts @@ -0,0 +1,49 @@ +export type Row = { + id: number + tanggal: string + noRm: string + noBill: string + nama: string + jk: string + alamat: string + klinik: string + dokter: string + caraBayar: string + rujukan: string + ketRujukan: string + asal: string +} + +export const sampleRows: Row[] = [ + { + id: 1, + tanggal: '12 Agustus 2025', + noRm: 'RM23311224', + noBill: '-', + nama: 'Ahmad Baidowi', + jk: 'L', + alamat: 'Jl Jaksa Agung S. No. 9', + klinik: 'Penyakit dalam', + dokter: 'Dr. Andreas Sutaji', + caraBayar: 'JKN', + rujukan: 'Faskes BPJS', + ketRujukan: 'RUMAH SAKIT - RS Lawang Medika - Malang', + asal: 'Rawat Jalan Reguler', + }, + { + id: 2, + tanggal: '11 Agustus 2025', + noRm: 'RM23455667', + noBill: '-', + nama: 'Abraham Sulaiman', + jk: 'L', + alamat: 'Purwantoro, Blimbing', + klinik: 'Penyakit dalam', + dokter: 'Dr. Andreas Sutaji', + caraBayar: 'JKN', + rujukan: 'Faskes BPJS', + ketRujukan: 'RUMAH SAKIT - RS Lawang Medika - Malang', + asal: 'Rawat Jalan Reguler', + }, + // tambahkan lebih banyak baris contoh jika perlu +]