feat(sep): implement save sep
This commit is contained in:
@@ -74,6 +74,7 @@ const [supportCode, supportCodeAttrs] = defineField('supportCode')
|
||||
// Submit handler
|
||||
const onSubmit = handleSubmit((values) => {
|
||||
console.log('✅ Validated form values:', values)
|
||||
emit('event', 'save-sep', values)
|
||||
})
|
||||
|
||||
watch(props, (value) => {
|
||||
@@ -256,6 +257,7 @@ watch(props, (value) => {
|
||||
/>
|
||||
<Button
|
||||
variant="outline"
|
||||
type="button"
|
||||
class="h-[40px] rounded-md border-orange-400 text-orange-400 hover:bg-green-50"
|
||||
@click="emit('event', 'search-letter')"
|
||||
>
|
||||
@@ -504,8 +506,8 @@ watch(props, (value) => {
|
||||
<!-- Actions -->
|
||||
<div class="mt-6 flex justify-end gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
type="button"
|
||||
class="h-[40px] min-w-[120px] text-orange-400 hover:bg-green-50"
|
||||
@click="emit('event', 'history-sep')"
|
||||
>
|
||||
@@ -516,8 +518,8 @@ watch(props, (value) => {
|
||||
Riwayat SEP
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
type="button"
|
||||
class="h-[40px] min-w-[120px] rounded-md border-orange-400 text-orange-400 hover:bg-green-50 hover:text-orange-400"
|
||||
>
|
||||
<Icon
|
||||
|
||||
@@ -21,6 +21,7 @@ import { getValueLabelList as getDiagnoseLabelList } from '~/services/vclaim-dia
|
||||
import { getList as getDiagnoseReferralList } from '~/services/vclaim-diagnose-referral.service'
|
||||
import { getList as geMonitoringVisitList } from '~/services/vclaim-monitoring-visit.service'
|
||||
import { getList as getMonitoringHistoryList } from '~/services/vclaim-monitoring-history.service'
|
||||
import { create as createSep, createPayload as createSepPayload } from '~/services/vclaim-sep.service'
|
||||
|
||||
const openPatient = ref(false)
|
||||
const openLetter = ref(false)
|
||||
@@ -228,6 +229,11 @@ function handleEvent(menu: string, value: string) {
|
||||
if (menu === 'back') {
|
||||
navigateTo('/bpjs/sep')
|
||||
}
|
||||
if (menu === 'save-sep') {
|
||||
createSep(createSepPayload()).then(() => {
|
||||
navigateTo('/bpjs/sep')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
|
||||
Reference in New Issue
Block a user