* fix(style): formatting inconsistencies across codebase - Remove trailing semicolons from TypeScript imports - Fix Vue template indentation and line breaks - Standardize component attribute formatting - Remove unnecessary empty lines - Reorder import statements for consistency * chore: update import path and add editorconfig Update SidebarNavLink import path to match new component structure and add standard editorconfig for consistent code formatting
115 lines
2.4 KiB
TypeScript
115 lines
2.4 KiB
TypeScript
import type {
|
|
Col,
|
|
KeyLabel,
|
|
RecComponent,
|
|
RecStrFuncComponent,
|
|
RecStrFuncUnknown,
|
|
Th,
|
|
} from '~/components/pub/custom-ui/data/types'
|
|
import { defineAsyncComponent } from 'vue'
|
|
|
|
type SmallDetailDto = any
|
|
|
|
const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue'))
|
|
const statusBadge = defineAsyncComponent(() => import('./status-badge.vue'))
|
|
|
|
const _doctorStatus = {
|
|
0: 'Tidak Aktif',
|
|
1: 'Aktif',
|
|
}
|
|
|
|
export const cols: Col[] = [
|
|
{ width: 100 },
|
|
{ width: 250 },
|
|
{},
|
|
{ width: 100 },
|
|
{ width: 100 },
|
|
{},
|
|
{},
|
|
{},
|
|
{ width: 120 },
|
|
{ width: 100 },
|
|
{},
|
|
{},
|
|
]
|
|
|
|
export const header: Th[][] = [
|
|
[
|
|
{ label: 'Kode JKN' },
|
|
{ label: 'Nama' },
|
|
{ label: 'No KTP' },
|
|
{ label: 'No SIP' },
|
|
{ label: 'No IHS' },
|
|
{ label: 'Telpon' },
|
|
{ label: 'Fee Ranap' },
|
|
{ label: 'Fee Rajal' },
|
|
{ label: 'Status' },
|
|
{ label: '' },
|
|
],
|
|
]
|
|
|
|
export const keys = [
|
|
'bpjs_code',
|
|
'name',
|
|
'identity_number',
|
|
'sip_no',
|
|
'ihs_number',
|
|
'phone',
|
|
'inPatient_itemPrice',
|
|
'outPatient_itemPrice',
|
|
'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.frontTitle} ${recX.name} ${recX.endTitle}`.trim()
|
|
},
|
|
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
|
|
},
|
|
inPatient_itemPrice: (rec: unknown): unknown => {
|
|
const recX = rec as SmallDetailDto
|
|
return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID')
|
|
},
|
|
outPatient_itemPrice: (rec: unknown): unknown => {
|
|
const recX = rec as SmallDetailDto
|
|
return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID')
|
|
},
|
|
}
|
|
|
|
export const funcComponent: RecStrFuncComponent = {
|
|
action(rec, idx) {
|
|
const res: RecComponent = {
|
|
idx,
|
|
rec: rec as object,
|
|
component: action,
|
|
}
|
|
return res
|
|
},
|
|
status(rec, idx) {
|
|
const res: RecComponent = {
|
|
idx,
|
|
rec: rec as object,
|
|
component: statusBadge,
|
|
}
|
|
return res
|
|
},
|
|
}
|
|
|
|
export const funcHtml: RecStrFuncUnknown = {
|
|
patient_address(_rec) {
|
|
return '-'
|
|
},
|
|
}
|