Fix: Refactor Surat Kontrol CRUD {id} to {code}
This commit is contained in:
@@ -39,9 +39,9 @@ async function fetchDpjp(specialistId: string, subspecialistId: string) {
|
||||
specialistCode: 0,
|
||||
includes: 'employee-person',
|
||||
// "unit-id": parseInt(unitId),
|
||||
"specialist-id": parseInt(specialistId),
|
||||
"subspecialist-id": parseInt(subspecialistId),
|
||||
})
|
||||
"specialist-id": String(specialistId),
|
||||
"subspecialist-id": String(subspecialistId),
|
||||
}, true)
|
||||
}
|
||||
|
||||
// const selectedUnitId = inject<Ref<string | null>>("selectedUnitId")!
|
||||
|
||||
@@ -38,8 +38,8 @@ async function fetchSpecialists(unitId: string) {
|
||||
serviceType: 1,
|
||||
serviceDate: new Date().toISOString().substring(0, 10),
|
||||
specialistCode: 0,
|
||||
"unit-id": parseInt(unitId),
|
||||
})
|
||||
"unit-id": String(unitId),
|
||||
}, true)
|
||||
}
|
||||
|
||||
const selectedUnitId = inject<Ref<string | null>>("selectedUnitId")!
|
||||
|
||||
@@ -37,8 +37,8 @@ async function fetchSubSpecialists(specialistId: string) {
|
||||
serviceType: 1,
|
||||
serviceDate: new Date().toISOString().substring(0, 10),
|
||||
specialistCode: 0,
|
||||
"specialist-id": parseInt(specialistId),
|
||||
})
|
||||
"specialist-id": String(specialistId),
|
||||
}, true)
|
||||
}
|
||||
|
||||
const selectedSpecialistId = inject<Ref<string | null>>("selectedSpecialistId")!
|
||||
|
||||
@@ -33,7 +33,7 @@ const {
|
||||
const units = ref<Array<Item>>([])
|
||||
|
||||
async function fetchData() {
|
||||
units.value = await getUnitLabelList()
|
||||
units.value = await getUnitLabelList({}, true)
|
||||
}
|
||||
|
||||
const selectedUnitId = inject<Ref<string | null>>("selectedUnitId")!
|
||||
|
||||
@@ -60,28 +60,28 @@ defineExpose({
|
||||
<DE.Cell :col-span="2">
|
||||
<DE.Block :col-count="4" :cell-flex="false">
|
||||
<SelectUnit
|
||||
field-name="unit_id"
|
||||
field-name="unit_code"
|
||||
label="Unit"
|
||||
placeholder="Pilih Unit"
|
||||
:errors="errors"
|
||||
is-required
|
||||
/>
|
||||
<SelectSpecialist
|
||||
field-name="specialist_id"
|
||||
field-name="specialist_code"
|
||||
label="Spesialis/Sub Spesialis"
|
||||
placeholder="Pilih Spesialis/Sub Spesialis"
|
||||
:errors="errors"
|
||||
is-required
|
||||
/>
|
||||
<SelectSubspecialist
|
||||
field-name="subspecialist_id"
|
||||
field-name="subspecialist_code"
|
||||
label="Spesialis/Sub Spesialis"
|
||||
placeholder="Pilih Spesialis/Sub Spesialis"
|
||||
:errors="errors"
|
||||
is-required
|
||||
/>
|
||||
<SelectDpjp
|
||||
field-name="doctor_id"
|
||||
field-name="doctor_code"
|
||||
label="DPJP"
|
||||
placeholder="Pilih DPJP"
|
||||
:errors="errors"
|
||||
|
||||
@@ -13,14 +13,6 @@ const btnClass = props.smallMode ? '[&_button]:w-7 [&_button]:h-7 [&_button]:2xl
|
||||
|
||||
type ClickType = 'back' | 'draft' | 'submit'
|
||||
|
||||
const props = defineProps({
|
||||
enableDraft: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
required: false,
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'click', type: ClickType): void
|
||||
}>()
|
||||
|
||||
Reference in New Issue
Block a user