feat(material): finishing integration of material
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { ref } from 'vue'
|
||||
|
||||
// Services
|
||||
import { postSourceMaterial, putSourceMaterial, removeSourceMaterial } from '~/services/material.service'
|
||||
import { postSourceMaterial, patchSourceMaterial, removeSourceMaterial } from '~/services/material.service'
|
||||
|
||||
const recId = ref<number>(0)
|
||||
const recAction = ref<string>('')
|
||||
const recItem = ref<any>(null)
|
||||
const isReadonly = ref(false)
|
||||
const isProcessing = ref(false)
|
||||
const isFormEntryDialogOpen = ref(false)
|
||||
const isRecordConfirmationOpen = ref(false)
|
||||
@@ -43,7 +44,7 @@ export async function handleActionEdit(id: number | string, values: any, refresh
|
||||
let isSuccess = false
|
||||
isProcessing.value = true
|
||||
try {
|
||||
const result = await putSourceMaterial(id, values)
|
||||
const result = await patchSourceMaterial(id, values)
|
||||
if (result.success) {
|
||||
isFormEntryDialogOpen.value = false
|
||||
isSuccess = true
|
||||
@@ -84,4 +85,4 @@ export function handleCancelForm(reset: () => void) {
|
||||
}, 500)
|
||||
}
|
||||
|
||||
export { recId, recAction, recItem, isProcessing, isFormEntryDialogOpen, isRecordConfirmationOpen }
|
||||
export { recId, recAction, recItem, isReadonly, isProcessing, isFormEntryDialogOpen, isRecordConfirmationOpen }
|
||||
|
||||
Reference in New Issue
Block a user