diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 0a5facb..a908a2f 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -4,7 +4,9 @@ "Bash(npm run:*)", "WebFetch(domain:geo.api.gouv.fr)", "Bash(pip3 install:*)", - "Bash(python3 -c \":*)" + "Bash(python3 -c \":*)", + "Bash(make cache-clear *)", + "Bash(make test *)" ] } } diff --git a/.idea/db-forest-config.xml b/.idea/db-forest-config.xml index 235c8ff..21f9f78 100644 --- a/.idea/db-forest-config.xml +++ b/.idea/db-forest-config.xml @@ -1,5 +1,15 @@ + + . + ---------------------------------------- + 1:0:9cad43df-2147-4989-b7a4-443067034884 + 2:0:ae622167-c834-4e7b-87a5-c1721036f5dc + 3:0:f407a514-c6b4-4b26-9555-445a85892502 + 4:0:09e221b8-067a-488b-9c1d-4e155a333079 + 5:0:9d8c1ad3-2491-4642-964a-666003c14128 + . + diff --git a/.idea/ferme.iml b/.idea/ferme.iml index 9cfc341..fad0a5a 100644 --- a/.idea/ferme.iml +++ b/.idea/ferme.iml @@ -155,6 +155,11 @@ + + + + + diff --git a/.idea/php.xml b/.idea/php.xml index a081fbb..94dd869 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -174,6 +174,11 @@ + + + + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 3afb783..4adf605 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,12 +4,16 @@ - + + + + + - - - + + + - - - - @@ -792,10 +809,14 @@ - - diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f1c9e2..095a2f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ Ajouter dans le fichier .env du frontend * [#FER-15] Les non-admin ne peuvent plus supprimer de réception/expédition en attente * [#FER-17] Ecran d'ajout de bovin * [#FER-18] Mise à jour du tableau d'arrivage +* [#FER-26] Passeport du bovin ### Changed diff --git a/frontend/components/ui/UiTabs.vue b/frontend/components/ui/UiTabs.vue new file mode 100644 index 0000000..25891b3 --- /dev/null +++ b/frontend/components/ui/UiTabs.vue @@ -0,0 +1,35 @@ + + + diff --git a/frontend/pages/bovine/[id].vue b/frontend/pages/bovine/[id].vue new file mode 100644 index 0000000..941c3b6 --- /dev/null +++ b/frontend/pages/bovine/[id].vue @@ -0,0 +1,359 @@ + + + diff --git a/frontend/pages/infrastructure/bovine.vue b/frontend/pages/infrastructure/bovine.vue deleted file mode 100644 index 3eeeb35..0000000 --- a/frontend/pages/infrastructure/bovine.vue +++ /dev/null @@ -1,182 +0,0 @@ - - - diff --git a/frontend/pages/infrastructure/case.vue b/frontend/pages/infrastructure/case.vue index 8de1836..220ee52 100644 --- a/frontend/pages/infrastructure/case.vue +++ b/frontend/pages/infrastructure/case.vue @@ -23,14 +23,6 @@ - - - Ajouter -
@@ -56,7 +48,7 @@ :items="items" :total-items="totalItems" :loading="loading" - :row-clickable="auth.isAdmin" + row-clickable empty-message="Aucun bovin dans cette case." @row-click="goToBovine" > @@ -134,7 +126,6 @@ useHead({ title: 'Cases' }) import type { BuildingCaseData } from '~/services/dto/building-case-data' import type { BovineData } from '~/services/dto/bovine-data' -import { useAuthStore } from '~/stores/auth' import { useDataTableServerState } from '~/composables/useDataTableServerState' import { useBovineColumns } from '~/composables/useBovineColumns' import { formatAgeLabel, ageBadgeClass } from '~/utils/bovine-age' @@ -143,7 +134,6 @@ const route = useRoute() const router = useRouter() const { printPdf } = usePdfPrinter() const api = useApi() -const auth = useAuthStore() const caseId = computed(() => Number(route.query.id)) const hasCaseId = computed(() => Number.isFinite(caseId.value) && caseId.value > 0) @@ -233,11 +223,6 @@ const title = computed(() => { return `${buildingLabel} case ${caseNumber}`.trim() }) -const addBovineRoute = computed(() => ({ - path: '/infrastructure/bovine', - query: { caseId: String(caseId.value) } -})) - const formatDate = (date: string | null) => { if (!date) return '—' const d = new Date(date) @@ -270,11 +255,7 @@ const printCaseReport = async () => { } const goToBovine = (bovine: BovineData) => { - if (!auth.isAdmin) return - router.push({ - path: '/infrastructure/bovine', - query: { id: String(bovine.id), caseId: String(caseId.value) } - }) + router.push(`/bovine/${bovine.id}`) } watch(caseId, (id) => { diff --git a/frontend/pages/inventory.vue b/frontend/pages/inventory.vue index e2b06b0..e3faa7b 100644 --- a/frontend/pages/inventory.vue +++ b/frontend/pages/inventory.vue @@ -57,6 +57,8 @@ :items="items" :total-items="totalItems" :loading="loading" + row-clickable + @row-click="(item: BovineData) => router.push(`/bovine/${item.id}`)" >