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
|
||||
|
||||
Reference in New Issue
Block a user