feat(sep): update filter function

This commit is contained in:
riefive
2025-09-11 13:33:26 +07:00
parent bbb0ac03d4
commit 9638f208f1
4 changed files with 92 additions and 62 deletions
+42 -22
View File
@@ -1,7 +1,8 @@
<script setup lang="ts">
const isLoading = ref(false)
const open = ref(false)
const selected = ref('3456512345678880')
const openPatient = ref(false)
const openLetter = ref(false)
const selectedPatient = ref('3456512345678880')
const selectedLetter = ref('SK22334442')
const patients = [
{
@@ -20,35 +21,43 @@ const patients = [
const letters = [
{
noSurat: "SK22334442",
tglRencana: "12 Agustus 2025",
noSep: "SEP3232332",
namaPasien: "Ahmad Baidowi",
noBpjs: "33442331214",
klinik: "Penyakit Dalam",
dokter: "dr. Andi Prasetyo, Sp.PD-KHOM",
noSurat: 'SK22334442',
tglRencana: '12 Agustus 2025',
noSep: 'SEP3232332',
namaPasien: 'Ahmad Baidowi',
noBpjs: '33442331214',
klinik: 'Penyakit Dalam',
dokter: 'dr. Andi Prasetyo, Sp.PD-KHOM',
},
{
noSurat: "SK99120039",
tglRencana: "12 Agustus 2025",
noSep: "SEP4443232",
namaPasien: "Bian Maulana",
noBpjs: "33442367656",
klinik: "Gigi",
dokter: "dr. Achmad Suparjo",
noSurat: 'SK99120039',
tglRencana: '12 Agustus 2025',
noSep: 'SEP4443232',
namaPasien: 'Bian Maulana',
noBpjs: '33442367656',
klinik: 'Gigi',
dokter: 'dr. Achmad Suparjo',
},
]
function handleSavePatient() {
console.log('Pasien dipilih:', selectedPatient.value)
}
function handleSave() {
console.log('Pasien dipilih:', selected.value)
function handleSaveLetter() {
console.log('Letter dipilih:', selectedLetter.value)
}
function handleEvent(value: string) {
if (value === 'search-patient') {
open.value = true
openPatient.value = true
return
} else if (value === 'back') {
}
if (value === 'search-letter') {
openLetter.value = true
return
}
if (value === 'back') {
navigateTo('/bpjs/sep')
}
}
@@ -60,5 +69,16 @@ function handleEvent(value: string) {
<span class="font-semibold">Tambah</span> SEP
</div>
<AppSepEntryForm @event="handleEvent" />
<AppSepSearchPatient v-model:open="open" v-model:selected="selected" :patients="patients" @save="handleSave" />
<AppSepSearchPatient
v-model:open="openPatient"
v-model:selected="selectedPatient"
:patients="patients"
@save="handleSavePatient"
/>
<AppSepSearchLetter
v-model:open="openLetter"
v-model:selected="selectedLetter"
:letters="letters"
@save="handleSaveLetter"
/>
</template>