+
+
+
+
aaaaaaaaaaaaaaa
+
+
+
+
+
+
+
diff --git a/app/components/content/resume/list.vue b/app/components/content/resume/list.vue
index 5c5e3658..389c830d 100644
--- a/app/components/content/resume/list.vue
+++ b/app/components/content/resume/list.vue
@@ -10,9 +10,12 @@ import { ActionEvents } from '~/components/pub/my-ui/data/types'
import Header from '~/components/pub/my-ui/nav-header/prep.vue'
import SummaryCard from '~/components/pub/my-ui/summary-card/summary-card.vue'
import { usePaginatedList } from '~/composables/usePaginatedList'
+import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
import { getPatients, removePatient } from '~/services/patient.service'
import DetailRow from '~/components/pub/my-ui/form/view/detail-row.vue'
+import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
+import Confirmation from '~/components/pub/my-ui/confirmation/confirmation.vue'
// #endregion
@@ -35,6 +38,7 @@ const refSearchNav: RefSearchNav = {
}
const formType = ref<`a` | `b`>(`a`)
+const isVerifyDialogOpen = ref(false)
const isRecordConfirmationOpen = ref(false)
const summaryLoading = ref(false)
@@ -69,23 +73,61 @@ async function getPatientSummary() {
summaryLoading.value = false
}
}
-function handleFormScreening(key: string) {
- switch (key) {
- case 'form-a':
- navigateTo("/screening-mpp/add/a")
- break;
- case 'preview-form-a':
- navigateTo('https://google.com', { external: true, open: { target: '_blank' } });
- break;
- case 'form-b':
- navigateTo("/screening-mpp/add/b")
- break;
- case 'preview-form-b':
- navigateTo('https://google.com', { external: true, open: { target: '_blank' } });
- break;
- default:
- break;
+
+async function handleActionClick(eventType: string) {
+ if (eventType === 'submit') {
+ // const patient: Patient = await composeFormData()
+ // let createdPatientId = 0
+
+ // const response = await handleActionSave(
+ // patient,
+ // () => {},
+ // () => {},
+ // toast,
+ // )
+
+ // const data = (response?.body?.data ?? null) as PatientBase | null
+ // if (!data) return
+ // createdPatientId = data.id
+
+ // If has callback provided redirect to callback with patientData
+ // if (props.callbackUrl) {
+ // await navigateTo(props.callbackUrl + '?patient-id=' + patient.id)
+ // return
+ // }
+
+ // Navigate to patient list or show success message
+ // await navigateTo('/outpatient/encounter')
+ // return
}
+
+ if (eventType === 'back') {
+ isVerifyDialogOpen.value = false
+ }
+}
+
+async function handleConfirmDelete() {
+ try {
+ const result = await removePatient(recId.value)
+ if (result.success) {
+ console.log('Patient deleted successfully')
+ // Refresh the list
+ await fetchData()
+ } else {
+ console.error('Failed to delete patient:', result)
+ // Handle error - show error message to user
+ }
+ } catch (error) {
+ console.error('Error deleting patient:', error)
+ // Handle error - show error message to user
+ }
+}
+
+function handleCancelConfirmation() {
+ // Reset record state when cancelled
+ recId.value = 0
+ recAction.value = ''
+ recItem.value = null
}
// #endregion
@@ -99,26 +141,15 @@ provide('table_data_loader', isLoading)
// #region Watchers
watch([recId, recAction], () => {
switch (recAction.value) {
- case ActionEvents.showDetail:
- navigateTo({
- name: 'outpatient-encounter-id',
- params: { id: recId.value },
- })
+ case ActionEvents.showVerify:
+ isVerifyDialogOpen.value = true
break
-
- case ActionEvents.showEdit:
- // TODO: Handle edit action
- // isFormEntryDialogOpen.value = true
- navigateTo({
- name: 'outpatient-encounter-id-edit',
- params: { id: recId.value },
- })
- break
-
- case ActionEvents.showConfirmDelete:
- // Trigger confirmation modal open
+ case ActionEvents.showValidate:
isRecordConfirmationOpen.value = true
break
+ case ActionEvents.showPrint:
+ navigateTo('https://google.com', {external: true,open: { target: "_blank" },});
+ break
}
})
// #endregion
@@ -126,26 +157,29 @@ watch([recId, recAction], () => {
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/components/pub/my-ui/data/dropdown-action-dvvp.vue b/app/components/pub/my-ui/data/dropdown-action-dvvp.vue
new file mode 100644
index 00000000..00e15096
--- /dev/null
+++ b/app/components/pub/my-ui/data/dropdown-action-dvvp.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/pub/my-ui/data/types.ts b/app/components/pub/my-ui/data/types.ts
index c0d283de..c86e1752 100644
--- a/app/components/pub/my-ui/data/types.ts
+++ b/app/components/pub/my-ui/data/types.ts
@@ -76,6 +76,9 @@ export const ActionEvents = {
showEdit: 'showEdit',
showDetail: 'showDetail',
showProcess: 'showProcess',
+ showVerify: 'showVerify',
+ showValidate: 'showValidate',
+ showPrint: 'showPrint',
}
export interface DataTableLoader {
diff --git a/app/components/pub/my-ui/form/input-base.vue b/app/components/pub/my-ui/form/input-base.vue
index aeb4a4af..c31b2073 100644
--- a/app/components/pub/my-ui/form/input-base.vue
+++ b/app/components/pub/my-ui/form/input-base.vue
@@ -19,6 +19,8 @@ const props = defineProps<{
maxLength?: number
isRequired?: boolean
isDisabled?: boolean
+ rightLabel?: string
+ bottomLabel?: string
}>()
function handleInput(event: Event) {
@@ -61,14 +63,14 @@ function handleInput(event: Event) {
v-slot="{ componentField }"
:name="fieldName"
>
-
+
+ {{ rightLabel }}
+ {{ bottomLabel }}
diff --git a/app/components/pub/my-ui/form/text-area-input.vue b/app/components/pub/my-ui/form/text-area-input.vue
index 7747e727..c7b7c794 100644
--- a/app/components/pub/my-ui/form/text-area-input.vue
+++ b/app/components/pub/my-ui/form/text-area-input.vue
@@ -47,7 +47,7 @@ function handleInput(event: Event) {
().default("krs"),
faskes: z.string({ required_error: 'Faskes harus diisi' }).optional(),
clinic: z.string({ required_error: 'Klinik harus diisi' }).optional(),
deathDate: z.string({ required_error: 'Tanggal harus diisi' }).optional(),
deathCause: z.array(z.string()).optional().default([]),
+ deathCauseDescription: z.string({ required_error: 'Uraian harus diisi' })
+ .min(1, 'Uraian minimum 1 karakter')
+ .max(2048, 'Uraian maksimum 2048 karakter')
+ .optional(),
keterangan: z.string({ required_error: 'Uraian harus diisi' })
.min(1, 'Uraian minimum 1 karakter')
.max(2048, 'Uraian maksimum 2048 karakter')