From a1a2a92ebd01c94a785e59640dd2d49b5eb220aa Mon Sep 17 00:00:00 2001 From: Abizrh Date: Tue, 2 Dec 2025 14:45:51 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20chore=20(initial-nursing):?= =?UTF-8?q?=20remove=20unused=20functions=20and=20adjust=20type=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../content/initial-nursing/form.vue | 25 ++----------------- .../content/initial-nursing/list.vue | 4 +-- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/app/components/content/initial-nursing/form.vue b/app/components/content/initial-nursing/form.vue index 71dae2b8..33f23dcb 100644 --- a/app/components/content/initial-nursing/form.vue +++ b/app/components/content/initial-nursing/form.vue @@ -54,29 +54,6 @@ const isLoading = reactive({ isTableLoading: false, }) -async function getDiagnoses() { - isLoading.isTableLoading = true - const resp = await xfetch('/api/v1/diagnose-src') - if (resp.success) { - diagnoses.value = (resp.body as Record).data - } - isLoading.isTableLoading = false -} - -async function getProcedures() { - isLoading.isTableLoading = true - const resp = await xfetch('/api/v1/procedure-src') - if (resp.success) { - procedures.value = (resp.body as Record).data - } - isLoading.isTableLoading = false -} - -onMounted(() => { - getProcedures() - getDiagnoses() -}) - function handleOpen(type: string) { if (type === 'fungsional') { isOpenDiagnose.value = true @@ -105,6 +82,8 @@ async function actionHandler(type: string) { {}, toast, ) + + backToList() } else { console.log('Ada error di form', result) } diff --git a/app/components/content/initial-nursing/list.vue b/app/components/content/initial-nursing/list.vue index 31cbac96..2e783337 100644 --- a/app/components/content/initial-nursing/list.vue +++ b/app/components/content/initial-nursing/list.vue @@ -27,7 +27,7 @@ import { handleActionEdit, handleActionRemove, handleCancelForm, -} from '~/handlers/consultation.handler' +} from '~/handlers/soapi-early.handler' // Services import { getList, getDetail } from '~/services/soapi-early.service' @@ -63,7 +63,7 @@ const { fetchFn: async ({ page, search }) => { const result = await getList({ 'encounter-id': id, - typeCode: 'dev-record', + 'type-code': 'early-nursery', includes: 'encounter', search, page,