frontend: refactor model type management and catalog routes

This commit is contained in:
Matthieu
2025-09-25 16:14:22 +02:00
parent 801fe5be95
commit 8e3894bfe2
9 changed files with 370 additions and 10 deletions

View File

@@ -6,8 +6,8 @@
<p class="text-sm text-gray-500">Gérez les modèles disponibles pour chaque famille de composant.</p>
</div>
<div class="tabs tabs-boxed">
<NuxtLink to="/models/components" class="tab tab-active">Composants</NuxtLink>
<NuxtLink to="/models/pieces" class="tab">Pièces</NuxtLink>
<NuxtLink to="/component-catalog" class="tab tab-active">Composants</NuxtLink>
<NuxtLink to="/pieces-catalog" class="tab">Pièces</NuxtLink>
</div>
</header>

View File

@@ -0,0 +1,10 @@
<template>
<ManagementView
category="COMPONENT"
heading="Catégories de composant"
/>
</template>
<script setup lang="ts">
import ManagementView from '~/components/model-types/ManagementView.vue'
</script>

View File

@@ -7,10 +7,10 @@
</p>
</div>
<div class="flex flex-wrap items-center justify-center gap-3">
<NuxtLink to="/models/components" class="btn btn-primary">
<NuxtLink to="/component-catalog" class="btn btn-primary">
Catalogue de composant
</NuxtLink>
<NuxtLink to="/models/pieces" class="btn btn-outline">
<NuxtLink to="/pieces-catalog" class="btn btn-outline">
Catalogue de pièce
</NuxtLink>
</div>
@@ -20,6 +20,6 @@
<script setup>
const route = useRoute()
if (route.fullPath === '/models') {
navigateTo('/models/components', { replace: true })
navigateTo('/component-catalog', { replace: true })
}
</script>

View File

@@ -0,0 +1,10 @@
<template>
<ManagementView
category="PIECE"
heading="Catégories de pièce"
/>
</template>
<script setup lang="ts">
import ManagementView from '~/components/model-types/ManagementView.vue'
</script>

View File

@@ -6,8 +6,8 @@
<p class="text-sm text-gray-500">Gérez les modèles disponibles pour chaque groupe de pièces.</p>
</div>
<div class="tabs tabs-boxed">
<NuxtLink to="/models/components" class="tab">Composants</NuxtLink>
<NuxtLink to="/models/pieces" class="tab tab-active">Pièces</NuxtLink>
<NuxtLink to="/component-catalog" class="tab">Composants</NuxtLink>
<NuxtLink to="/pieces-catalog" class="tab tab-active">Pièces</NuxtLink>
</div>
</header>