feat(device): update list

This commit is contained in:
riefive
2025-09-25 13:33:03 +07:00
parent e3d3188b1d
commit 46045ebb41
4 changed files with 12 additions and 15 deletions
+5 -4
View File
@@ -8,7 +8,7 @@ import AppToolsEntryForm from '~/components/app/tools/entry-form.vue'
import RecordConfirmation from '~/components/pub/custom-ui/confirmation/record-confirmation.vue'
// helpers
import { toast } from "~/components/pub/ui/toast"
import { toast } from '~/components/pub/ui/toast'
// Types
import type { Uom } from '~/models/uom'
@@ -40,7 +40,6 @@ const getToolsDetail = async (id: number | string) => {
if (result.success) {
const currentDevice = result.body?.data || {}
recItem.value = currentDevice
isFormEntryDialogOpen.value = true
}
}
@@ -104,17 +103,19 @@ provide('rec_item', recItem)
provide('table_data_loader', isLoading)
// Watch for row actions
watch(recId, () => {
watch([recId, recAction], () => {
switch (recAction.value) {
case ActionEvents.showDetail:
getToolsDetail(recId.value)
title.value = 'Detail Peralatan'
isReadonly.value = true
isFormEntryDialogOpen.value = true
break
case ActionEvents.showEdit:
getToolsDetail(recId.value)
title.value = 'Edit Peralatan'
isReadonly.value = false
isFormEntryDialogOpen.value = true
break
case ActionEvents.showConfirmDelete:
isRecordConfirmationOpen.value = true
@@ -177,4 +178,4 @@ onMounted(async () => {
</template>
</RecordConfirmation>
</div>
</template>
</template>