diff --git a/frontend/app/components/machine/MachineDetailHeader.vue b/frontend/app/components/machine/MachineDetailHeader.vue index 2613a96..22440e3 100644 --- a/frontend/app/components/machine/MachineDetailHeader.vue +++ b/frontend/app/components/machine/MachineDetailHeader.vue @@ -1,40 +1,46 @@ @@ -43,11 +49,16 @@ import IconLucideSquarePen from '~icons/lucide/square-pen' import IconLucideEye from '~icons/lucide/eye' import IconLucidePrinter from '~icons/lucide/printer' +import IconLucideArrowLeft from '~icons/lucide/arrow-left' -const router = useRouter() +const { canEdit } = usePermissions() -defineProps<{ +const props = defineProps<{ title: string + description?: string + siteName?: string + siteColor?: string + reference?: string isEditMode: boolean }>() @@ -56,12 +67,12 @@ defineEmits<{ 'open-print': [] }>() -function goBack() { - if (window.history.length > 1) { - router.back() +const siteStyle = computed(() => { + if (!props.siteColor) return {} + return { + borderColor: props.siteColor + '60', + backgroundColor: props.siteColor + '25', + color: props.siteColor, } - else { - navigateTo('/machines') - } -} +}) diff --git a/frontend/app/pages/machine/[id].vue b/frontend/app/pages/machine/[id].vue index 306c98e..9c7b07d 100644 --- a/frontend/app/pages/machine/[id].vue +++ b/frontend/app/pages/machine/[id].vue @@ -17,123 +17,129 @@ - -
-

Debug: Machine trouvée - {{ d.machine.value.name }}

-

Components count: {{ d.components.value.length }}

-

Pieces count: {{ d.pieces.value.length }}

-
- - - -
-
- {{ d.machine.value.site?.name }} + + + + + - - + - - - - - - - - - - - + +
- - - - - - - - -
- -
@@ -224,12 +201,11 @@