feat : creation du composant datatable (WIP)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<UiDataTable
|
||||
:columns="columns"
|
||||
url="receptions"
|
||||
class="ps-20"
|
||||
:query="{ isValid: true }"
|
||||
@row-click="goToReception"
|
||||
/>
|
||||
@@ -22,13 +23,14 @@ type ReceptionRow = {
|
||||
|
||||
const router = useRouter()
|
||||
const columns = [
|
||||
{key: 'identificationNumber', label: 'Numero'},
|
||||
{key: 'receptionDate', label: 'Date de livraison'},
|
||||
{key: 'supplier', label: 'Fournisseur'},
|
||||
{key: 'address.fullAddress', label: 'Adresse'},
|
||||
{key: 'receptionType', label: 'Type'},
|
||||
{key: 'weights', label: 'Poids', format: formatWeights}
|
||||
{ key: 'identificationNumber', label: 'Numero', isSearchable:true },
|
||||
{ key: 'receptionDate', label: 'Date de livraison', isSearchable: true, type: 'date' },
|
||||
{ key: 'supplier.name', label: 'Fournisseur', isSearchable: true },
|
||||
{ key: 'address.fullAddress', label: 'Adresse', isSearchable: true },
|
||||
{ key: 'receptionType.label', label: 'Type', isSearchable: true, type:'selectTypeReception' },
|
||||
{ key: 'weights', label: 'Poids', format: formatWeights }
|
||||
]
|
||||
|
||||
const goToReception = (row: ReceptionRow) => {
|
||||
const id = Number(row?.id)
|
||||
if (!Number.isFinite(id)) return
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-10">
|
||||
<div class="flex items-center justify-start gap-10">
|
||||
<Icon @click="router.push('/')" name="gg:arrow-left-o" size="44" class="cursor-pointer text-primary-500"/>
|
||||
<h1 class="text-3xl font-bold uppercase text-primary-500">listes des réceptions en attente</h1>
|
||||
</div>
|
||||
</div>
|
||||
<UiDataTable
|
||||
:columns="columns"
|
||||
@@ -19,11 +17,11 @@ const router = useRouter()
|
||||
|
||||
|
||||
const columns = [
|
||||
{key: 'supplier', label: 'Fournisseur'},
|
||||
{key: 'address.fullAddress', label: 'Adresse'},
|
||||
{key: 'receptionType', label: 'Type'},
|
||||
{key: 'carrier', label: 'Transporteur'},
|
||||
{key: 'licensePlate', label: 'Immatriculation'},
|
||||
{key: 'supplier.name', label: 'Fournisseur', isSearchable:true},
|
||||
{ key: 'address.fullAddress', label: 'Adresse', isSearchable: true },
|
||||
{key: 'carrier.name', label: 'Transporteur', isSearchable:true},
|
||||
{key: 'receptionType.label', label: 'Type', isSearchable:true, type:'selectTypeReception'},
|
||||
{key: 'licensePlate', label: 'Immatriculation', isSearchable:true, type:'licensePlate'},
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user