Fix: refactor constList Uplaod Doc

This commit is contained in:
hasyim_kai
2025-11-14 15:47:11 +07:00
parent 60c13649d9
commit bb0017ffcb
4 changed files with 15 additions and 6 deletions
@@ -2,7 +2,7 @@
import type { FormErrors } from '~/types/error'
import Combobox from '~/components/pub/my-ui/combobox/combobox.vue'
import { cn, mapToComboboxOptList } from '~/lib/utils'
import { supportingDocTypeCode, supportingDocOpt, type supportingDocTypeCodeKey } from '~/lib/constants'
import { docTypeCode, supportingDocOpt, type docTypeCodeKey } from '~/lib/constants'
import { getValueLabelList as getDoctorLabelList } from '~/services/doctor.service'
import { getValueLabelList as getUnitLabelList } from '~/services/unit.service'
@@ -1,5 +1,6 @@
import type { Config } from '~/components/pub/my-ui/data-table'
import { defineAsyncComponent } from 'vue'
import { docTypeCode, docTypeLabel, type docTypeCodeKey } from '~/lib/constants'
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dd.vue'))
@@ -22,6 +23,10 @@ export const config: Config = {
],
parses: {
type_code: (v: unknown) => {
console.log(v)
return docTypeLabel[v as docTypeCodeKey]
},
},
components: {