fix(ui) : phase 1 review fixes — machine context links, type annotations, double arrow
- 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) <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,9 @@
|
||||
<h3 class="text-sm font-semibold truncate" :class="component.pendingEntity ? 'text-error' : 'text-base-content'">
|
||||
<NuxtLink
|
||||
v-if="!isEditMode && !component.pendingEntity && component.composantId"
|
||||
:to="`/component/${component.composantId}`"
|
||||
:to="machineId
|
||||
? { path: `/component/${component.composantId}`, query: { from: 'machine', machineId } }
|
||||
: `/component/${component.composantId}`"
|
||||
class="hover:underline hover:text-primary transition-colors"
|
||||
@click.stop
|
||||
>
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user