feat(material): create model interface of material

This commit is contained in:
riefive
2025-09-18 13:19:15 +07:00
parent 9ce5038e62
commit 117e72fdce
3 changed files with 24 additions and 4 deletions
+12 -3
View File
@@ -26,8 +26,13 @@ const items = [
// Fungsi untuk fetch data equipment
async function fetchEquipmentData(params: any) {
const endpoint = transform('/api/v1/equipment', params)
return await xfetch(endpoint)
// const endpoint = transform('/api/v1/equipment', params)
// return await xfetch(endpoint)
return await xfetch('/api/v1/material')
}
async function fetchUom() {
return await xfetch('/api/v1/uom')
}
// Menggunakan composable untuk pagination
@@ -169,10 +174,14 @@ const handleCancelConfirmation = () => {
recAction.value = ''
recItem.value = null
}
onMounted(async () => {
await fetchUom()
})
</script>
<template>
<div class="rounded-md border p-4">
<div class="p-4">
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
<div class="rounded-md border p-4">
<AppEquipmentList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />