feat(sep): make default value for destination clinic
This commit is contained in:
@@ -957,6 +957,8 @@ onMounted(() => {
|
||||
|
||||
<!-- {{ JSON.stringify(errors, null, 2) }} -->
|
||||
|
||||
{{ JSON.stringify(errors, null, 2) }}
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="mt-6 flex justify-end gap-2">
|
||||
<Button
|
||||
|
||||
@@ -442,6 +442,10 @@ async function handleEvent(menu: string, value: any) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!value.destinationClinic) {
|
||||
mappedValues.destinationClinic = selectedObjects.value['destination'] || ''
|
||||
}
|
||||
|
||||
createSep(makeSepData(mappedValues))
|
||||
.then((res) => {
|
||||
|
||||
@@ -78,7 +78,7 @@ const IntegrationBpjsSchema = z
|
||||
.optional(),
|
||||
destinationClinic: z
|
||||
.string({ required_error: ERROR_MESSAGES.required.destinationClinic })
|
||||
.min(1, ERROR_MESSAGES.required.destinationClinic),
|
||||
.min(1, ERROR_MESSAGES.required.destinationClinic).optional(),
|
||||
attendingDoctor: z
|
||||
.string({ required_error: ERROR_MESSAGES.required.attendingDoctor })
|
||||
.min(1, ERROR_MESSAGES.required.attendingDoctor),
|
||||
|
||||
Reference in New Issue
Block a user