refactor(bovine) : redirige page case vers Vie du bovin et supprime l'édition front
- infrastructure/case : clic ligne → /bovine/{id}, bouton Ajouter retiré, row-clickable ouvert à tous
- infrastructure/bovine.vue supprimée (création/édition de bovin gérée via EDNOTIF)
- bouton précédent de la page Vie du bovin : router.back avec fallback /inventory
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="flex items-center justify-between relative mb-10">
|
||||
<div class="flex flex-row absolute -left-[60px]">
|
||||
<Icon
|
||||
@click="router.push('/inventory')"
|
||||
@click="goBack"
|
||||
name="gg:arrow-left-o"
|
||||
size="44"
|
||||
class="cursor-pointer text-primary-500"
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<div v-show="activeTab === 'mouvement'">
|
||||
<form :class="{ submitted: movementSubmitted }" @submit.prevent="submitMovement">
|
||||
<div class="flex flex-cols-3 justify-between mb-11 pt-7">
|
||||
<div class="flex flex-cols-3 justify-between mb-10">
|
||||
<UiSelect
|
||||
id="movement-building"
|
||||
v-model="newMovementBuildingId"
|
||||
@@ -207,6 +207,14 @@ const router = useRouter()
|
||||
const route = useRoute()
|
||||
const api = useApi()
|
||||
|
||||
const goBack = () => {
|
||||
if (window.history.state?.back) {
|
||||
router.back()
|
||||
} else {
|
||||
router.push('/inventory')
|
||||
}
|
||||
}
|
||||
|
||||
const bovine = ref<BovinePassportData | null>(null)
|
||||
const buildings = ref<BuildingData[]>([])
|
||||
const newMovementBuildingId = ref<string | number | null>(null)
|
||||
|
||||
Reference in New Issue
Block a user