feat(material): create model interface of material
This commit is contained in:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user