dev: hotfix, cleaning data-table

This commit is contained in:
2025-10-15 07:37:57 +07:00
parent 0e43bff367
commit 32c815a6e5
83 changed files with 2260 additions and 2487 deletions

No files matched your search

+63 -64
View File
@@ -1,78 +1,77 @@
import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, Th } from '~/components/pub/my-ui/data/types'
import type { Config } from '~/components/pub/my-ui/data-table'
import { defineAsyncComponent } from 'vue'
type SepDto = any
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
export const cols: Col[] = [
{ width: 120 }, // TGL. SEP
{ width: 150 }, // NO. SEP
{ width: 120 }, // PELAYANAN
{ width: 100 }, // JALUR
{ width: 150 }, // NO. RM
{ width: 200 }, // NAMA PASIEN
{ width: 150 }, // NO. KARTU BPJS
{ width: 150 }, // NO. SURAT KONTROL
{ width: 150 }, // TGL SURAT KONTROL
{ width: 150 }, // KLINIK TUJUAN
{ width: 200 }, // DPJP
{ width: 200 }, // DIAGNOSIS AWAL
{ width: 100 }, // AKSI
]
export const header: Th[][] = [
[
{ label: 'TGL. SEP' },
{ label: 'NO. SEP' },
{ label: 'PELAYANAN' },
{ label: 'JALUR' },
{ label: 'NO. RM' },
{ label: 'NAMA PASIEN' },
{ label: 'NO. KARTU BPJS' },
{ label: 'NO. SURAT KONTROL' },
{ label: 'TGL SURAT KONTROL' },
{ label: 'KLINIK TUJUAN' },
{ label: 'DPJP' },
{ label: 'DIAGNOSIS AWAL' },
{ label: 'AKSI' },
export const config: Config = {
cols: [
{ width: 120 }, // TGL. SEP
{ width: 150 }, // NO. SEP
{ width: 120 }, // PELAYANAN
{ width: 100 }, // JALUR
{ width: 150 }, // NO. RM
{ width: 200 }, // NAMA PASIEN
{ width: 150 }, // NO. KARTU BPJS
{ width: 150 }, // NO. SURAT KONTROL
{ width: 150 }, // TGL SURAT KONTROL
{ width: 150 }, // KLINIK TUJUAN
{ width: 200 }, // DPJP
{ width: 200 }, // DIAGNOSIS AWAL
{ width: 100 }, // AKSI
],
]
export const keys = [
'tgl_sep',
'no_sep',
'pelayanan',
'jalur',
'no_rm',
'nama_pasien',
'no_kartu_bpjs',
'no_surat_kontrol',
'tgl_surat_kontrol',
'klinik_tujuan',
'dpjp',
'diagnosis_awal',
'action',
]
headers: [
[
{ label: 'TGL. SEP' },
{ label: 'NO. SEP' },
{ label: 'PELAYANAN' },
{ label: 'JALUR' },
{ label: 'NO. RM' },
{ label: 'NAMA PASIEN' },
{ label: 'NO. KARTU BPJS' },
{ label: 'NO. SURAT KONTROL' },
{ label: 'TGL SURAT KONTROL' },
{ label: 'KLINIK TUJUAN' },
{ label: 'DPJP' },
{ label: 'DIAGNOSIS AWAL' },
{ label: 'AKSI' },
],
],
export const delKeyNames: KeyLabel[] = [
{ key: 'no_sep', label: 'NO. SEP' },
{ key: 'nama_pasien', label: 'Nama Pasien' },
]
keys: [
'tgl_sep',
'no_sep',
'pelayanan',
'jalur',
'no_rm',
'nama_pasien',
'no_kartu_bpjs',
'no_surat_kontrol',
'tgl_surat_kontrol',
'klinik_tujuan',
'dpjp',
'diagnosis_awal',
'action',
],
export const funcParsed: Record<string, (row: any, ...args: any[]) => any> = {
delKeyNames: [
{ key: 'no_sep', label: 'NO. SEP' },
{ key: 'nama_pasien', label: 'Nama Pasien' },
],
}
parses: {},
export const funcComponent: RecStrFuncComponent = {
action(rec, idx) {
const res: RecComponent = {
idx,
rec: rec as object,
component: action,
}
return res
components: {
action(rec, idx) {
return {
idx,
rec: rec as object,
component: action,
}
},
},
}
export const funcHtml: Record<string, (row: any, ...args: any[]) => any> = {}
htmls: {},
}
+2 -7
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { cols, header, keys, funcParsed, funcComponent, funcHtml } from './list-cfg'
import { config } from './list-cfg'
interface SepData {
tgl_sep: string
@@ -23,12 +23,7 @@ const props = defineProps<{
<template>
<PubMyUiDataTable
:cols="cols"
:header="header"
:keys="keys"
v-bind="config"
:rows="props.data"
:funcParsed="funcParsed"
:funcComponent="funcComponent"
:funcHtml="funcHtml"
/>
</template>