Finalisation réception marchandise, ajout de composant UI et ajout de fixtures (!7)
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
Build Release Artefact / build (push) Successful in 1m15s

| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [x] Pas de régression
- [ ] TU/TI/TF rédigée
- [x] TU/TI/TF OK
- [x] CHANGELOG modifié

Reviewed-on: #7
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #7.
This commit is contained in:
2026-01-30 14:10:40 +00:00
committed by Autin
parent 9ae073e69e
commit 1ce6357c1d
90 changed files with 4280 additions and 307 deletions

View File

@@ -0,0 +1,23 @@
import { useApi } from '~/composables/useApi'
import type { TruckData } from '~/services/dto/truck-data'
export type TruckListResponse =
| TruckData[]
| { 'hydra:member'?: TruckData[] }
export async function getTruckList(): Promise<TruckData[]> {
const api = useApi()
const response = await api.get<TruckListResponse>('trucks', {}, {
toastErrorKey: 'errors.truck.list'
})
if (Array.isArray(response)) {
return response
}
if (response && typeof response === 'object' && Array.isArray(response['hydra:member'])) {
return response['hydra:member']
}
return []
}