From 6a43f08df85264334d5757019920b8c3c6f6c463 Mon Sep 17 00:00:00 2001 From: r-dev Date: Sat, 4 Apr 2026 17:12:20 +0200 Subject: [PATCH] =?UTF-8?q?fix(ui)=20:=20phase=201=20review=20fixes=20?= =?UTF-8?q?=E2=80=94=20machine=20context=20links,=20type=20annotations,=20?= =?UTF-8?q?double=20arrow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add ?from=machine&machineId=xxx query params to entity NuxtLinks in hierarchy - Add useRoute + machineId computed to ComponentItem, PieceItem, MachineProductsCard - Add :string type to confirmRemove* handlers in machine page - Remove unicode arrow from DetailHeader backLabel (icon already provides it) - Add !isEditMode guard on product links in MachineProductsCard Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/app/components/ComponentItem.vue | 7 ++++++- frontend/app/components/DetailHeader.vue | 2 +- frontend/app/components/PieceItem.vue | 7 ++++++- .../app/components/machine/MachineProductsCard.vue | 11 ++++++++--- frontend/app/pages/machine/[id].vue | 8 ++++---- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/frontend/app/components/ComponentItem.vue b/frontend/app/components/ComponentItem.vue index bf13921..60bf917 100644 --- a/frontend/app/components/ComponentItem.vue +++ b/frontend/app/components/ComponentItem.vue @@ -32,7 +32,9 @@

@@ -353,6 +355,9 @@ import { useEntityProductDisplay } from '~/composables/useEntityProductDisplay' import { useCustomFields } from '~/composables/useCustomFields' import { mergeDefinitionsWithValues } from '~/shared/utils/customFields' +const route = useRoute() +const machineId = computed(() => route.params.id as string | undefined) + const props = defineProps({ component: { type: Object, required: true }, isEditMode: { type: Boolean, default: false }, diff --git a/frontend/app/components/DetailHeader.vue b/frontend/app/components/DetailHeader.vue index 598a544..1fc7552 100644 --- a/frontend/app/components/DetailHeader.vue +++ b/frontend/app/components/DetailHeader.vue @@ -52,7 +52,7 @@ const backDestination = computed(() => { const backLabel = computed(() => { if (route.query.from === 'machine') { - return '← Retour à la machine' + return 'Retour à la machine' } return props.backLinkLabel ?? 'Retour au catalogue' }) diff --git a/frontend/app/components/PieceItem.vue b/frontend/app/components/PieceItem.vue index 63e8ad8..27d3db9 100644 --- a/frontend/app/components/PieceItem.vue +++ b/frontend/app/components/PieceItem.vue @@ -31,7 +31,9 @@

@@ -332,6 +334,9 @@ import { useCustomFields } from '~/composables/useCustomFields' import { useEntityDocuments } from '~/composables/useEntityDocuments' import { useEntityProductDisplay } from '~/composables/useEntityProductDisplay' +const route = useRoute() +const machineId = computed(() => route.params.id as string | undefined) + const props = defineProps({ piece: { type: Object, required: true }, isEditMode: { type: Boolean, default: false }, diff --git a/frontend/app/components/machine/MachineProductsCard.vue b/frontend/app/components/machine/MachineProductsCard.vue index 9efa98c..033feb6 100644 --- a/frontend/app/components/machine/MachineProductsCard.vue +++ b/frontend/app/components/machine/MachineProductsCard.vue @@ -30,8 +30,10 @@

{{ product.name }} @@ -140,8 +142,11 @@