fix : correction des liens et tableau de bord

This commit is contained in:
2026-02-09 10:03:11 +01:00
parent bb71b1de63
commit e9e96b7ec3
2 changed files with 6 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
<div class="flex items-center justify-between ">
<h1 class="text-3xl font-bold uppercase">listes des transporteurs</h1>
<button
@Click="router.push(`/admin/carrier/add-carrier`)"
@Click="goToCarrier()"
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px] justify-self-end"
>Ajouter
</button>
@@ -37,8 +37,8 @@ import {getCarrierList} from "~/services/carrier";
const carrierList = ref<CarrierData[]>()
const router = useRouter()
const goToCarrier = (id: number) => {
router.push(`/admin/carrier/${id}`)
const goToCarrier = (id: number|null = null) => {
id !== null ? router.push(`/admin/carrier/${id}`) : router.push(`/admin/carrier`)
}
definePageMeta({