feat: Implement item management module and add encounter initialization handler.

This commit is contained in:
riefive
2025-12-05 14:53:31 +07:00
parent 615a7c4485
commit 4715e5330a
5 changed files with 149 additions and 47 deletions
+2 -5
View File
@@ -7,7 +7,7 @@ import AppItemEntryForm from '~/components/app/item/entry-form.vue'
import RecordConfirmation from '~/components/pub/my-ui/confirmation/record-confirmation.vue'
// Constants
import { infraGroupCodesKeys } from '~/lib/constants'
import { itemGroupCodes } from '~/lib/constants'
// Helpers
import { usePaginatedList } from '~/composables/usePaginatedList'
@@ -33,9 +33,6 @@ import {
handleCancelForm,
} from '~/handlers/item.handler'
// Constants
import { itemGroupCodes } from '~/lib/constants'
// Services
import { getList, getDetail } from '~/services/item.service'
import { getValueLabelList as getUomList } from '~/services/uom.service'
@@ -171,7 +168,7 @@ onMounted(async () => {
@submit="
(values: ItemFormData | Record<string, any>, resetForm: () => void) => {
if (recId > 0) {
handleActionEdit(recId, values, getItemList, resetForm, toast)
handleActionEdit(recItem?.code ? recItem.code : recId, values, getItemList, resetForm, toast)
return
}
handleActionSave(values, getItemList, resetForm, toast)