feat : creation du composant datatable (WIP)

This commit is contained in:
2026-02-17 14:52:23 +01:00
parent 850e412840
commit 74de31721c
15 changed files with 355 additions and 567 deletions

View File

@@ -14,6 +14,12 @@
<script setup lang="ts">
import {formatWeights} from "~/utils/datatable-formatters";
type ReceptionRow = {
id?: number | string
}
const router = useRouter()
const columns = [
{key: 'identificationNumber', label: 'Numero'},
@@ -23,16 +29,9 @@ const columns = [
{key: 'receptionType', label: 'Type'},
{key: 'weights', label: 'Poids', format: formatWeights}
]
type ReceptionRow = {
id?: number | string
}
const goToReception = (row: ReceptionRow) => {
const id = Number(row?.id)
if (!Number.isFinite(id)) return
router.push(`/reception/update/${id}`)
}
onMounted(async () => {
receptionList.value = await getReceptionList(true)
})
</script>