diff --git a/components/layout/full/Main.vue b/components/layout/full/Main.vue index 9b769ca..a69480b 100644 --- a/components/layout/full/Main.vue +++ b/components/layout/full/Main.vue @@ -69,9 +69,9 @@ watch(mdAndDown, (val) => { - + diff --git a/components/pendaftaran/BiodataPasienV2.vue b/components/pendaftaran/BiodataPasienV2.vue new file mode 100644 index 0000000..56b26ad --- /dev/null +++ b/components/pendaftaran/BiodataPasienV2.vue @@ -0,0 +1,333 @@ + + + diff --git a/components/pendaftaran/CardAntrianList.vue b/components/pendaftaran/CardAntrianList.vue new file mode 100644 index 0000000..8e51aa3 --- /dev/null +++ b/components/pendaftaran/CardAntrianList.vue @@ -0,0 +1,269 @@ + + + \ No newline at end of file diff --git a/components/pendaftaran/CardAntrianListV2.vue b/components/pendaftaran/CardAntrianListV2.vue new file mode 100644 index 0000000..8a8c8f8 --- /dev/null +++ b/components/pendaftaran/CardAntrianListV2.vue @@ -0,0 +1,258 @@ + + + \ No newline at end of file diff --git a/components/pendaftaran/FilterSortMenu.vue b/components/pendaftaran/FilterSortMenu.vue new file mode 100644 index 0000000..65cd18c --- /dev/null +++ b/components/pendaftaran/FilterSortMenu.vue @@ -0,0 +1,145 @@ + + + diff --git a/components/pendaftaran/MedisPasienV2.vue b/components/pendaftaran/MedisPasienV2.vue new file mode 100644 index 0000000..ec5400e --- /dev/null +++ b/components/pendaftaran/MedisPasienV2.vue @@ -0,0 +1,587 @@ + + + diff --git a/components/pendaftaran/ModalDetailPendaftaran.vue b/components/pendaftaran/ModalDetailPendaftaran.vue index 44d01db..6e5ce0e 100644 --- a/components/pendaftaran/ModalDetailPendaftaran.vue +++ b/components/pendaftaran/ModalDetailPendaftaran.vue @@ -133,10 +133,10 @@ const initializeForm = () => { alamat: '', nomorTelepon: [] }; - + diagnosisItems.value = []; tindakanItems.value = []; - + rencanaOperasiData.value = { spesialis: null, SpesialisName: '', @@ -148,9 +148,9 @@ const initializeForm = () => { rencanaOperasi: null, keterangan: null }; - + dokterPelaksanaItems.value = []; - + statusPasienData.value = { tanggalSelesai: null, statusOperasi: '', @@ -161,41 +161,41 @@ const initializeForm = () => { // Fetch detail data const fetchDetailData = async () => { if (!props.id) return; - + loading.value = true; error.value = false; - + try { const response = await getAntrianOperasiById(props.id); - + if (response.success && response.data) { const data = response.data; - + // Set form data if (data.formData) { formData.value = { ...data.formData }; } - + // Set diagnosis items if (data.diagnosisItems) { diagnosisItems.value = data.diagnosisItems; } - + // Set tindakan items if (data.tindakanItems) { tindakanItems.value = data.tindakanItems; } - + // Set rencana operasi data if (data.rencanaOperasiData) { rencanaOperasiData.value = { ...data.rencanaOperasiData }; } - + // Set dokter pelaksana items if (data.dokterPelaksanaItems) { dokterPelaksanaItems.value = data.dokterPelaksanaItems; } - + // Set status pasien data if (data.statusPasienData) { statusPasienData.value = { ...data.statusPasienData }; @@ -224,441 +224,371 @@ const closeModal = () => { diff --git a/components/pendaftaran/ModalPendaftaranV2.vue b/components/pendaftaran/ModalPendaftaranV2.vue new file mode 100644 index 0000000..2d47244 --- /dev/null +++ b/components/pendaftaran/ModalPendaftaranV2.vue @@ -0,0 +1,358 @@ + + + diff --git a/components/pendaftaran/ModalUpdateStatus.vue b/components/pendaftaran/ModalUpdateStatus.vue index 6b42d28..88b75a1 100644 --- a/components/pendaftaran/ModalUpdateStatus.vue +++ b/components/pendaftaran/ModalUpdateStatus.vue @@ -52,16 +52,16 @@ const showSnackbar = (message: string, color: string = 'success') => { // Fetch data pasien const fetchData = async () => { if (!props.id) return; - + loading.value = true; error.value = false; - + try { const response = await getAntrianOperasiById(props.id); - + if (response.success && response.data) { pasienData.value = response.data; - + // Set initial form data dari status yang ada if (pasienData.value.statusPasienData) { formData.value.statusOperasi = pasienData.value.statusPasienData.statusOperasi || STATUS.BELUM; @@ -87,7 +87,7 @@ const isFormValid = computed(() => { if (formData.value.statusOperasi === STATUS.SELESAI && !formData.value.tanggalSelesai) { return false; } - if ((formData.value.statusOperasi === STATUS.TUNDA || formData.value.statusOperasi === STATUS.BATAL) + if ((formData.value.statusOperasi === STATUS.TUNDA || formData.value.statusOperasi === STATUS.BATAL) && !formData.value.keteranganStatus.trim()) { return false; } @@ -100,7 +100,7 @@ const handleSubmit = async () => { showSnackbar('Mohon lengkapi data yang diperlukan', 'error'); return; } - + loadingSubmit.value = true; try { const response = await updateStatusAntrianOperasi(props.id, { @@ -108,13 +108,13 @@ const handleSubmit = async () => { tanggalSelesai: formData.value.tanggalSelesai ? new Date(formData.value.tanggalSelesai).toISOString() : null, keteranganStatus: formData.value.keteranganStatus || null }); - + if (response.success) { showSnackbar('Status antrian berhasil diupdate', 'success'); emit('success'); dialog.value = false; } else { - showSnackbar( 'Gagal mengupdate status antrian', 'error'); + showSnackbar('Gagal mengupdate status antrian', 'error'); } } catch (error: any) { console.error('Error updating status:', error); @@ -127,9 +127,9 @@ const handleSubmit = async () => { // Format date const formatDate = (date: string) => { if (!date) return '-'; - return new Date(date).toLocaleDateString('id-ID', { - year: 'numeric', - month: 'short', + return new Date(date).toLocaleDateString('id-ID', { + year: 'numeric', + month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' @@ -166,31 +166,22 @@ watch(() => props.modelValue, (isOpen) => {