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:
@@ -30,8 +30,10 @@
|
||||
<div class="flex items-center justify-between flex-wrap gap-2">
|
||||
<p class="font-semibold" :class="product.pendingEntity ? 'text-error' : 'text-base-content'">
|
||||
<NuxtLink
|
||||
v-if="!product.pendingEntity && product.id"
|
||||
:to="`/product/${product.id}`"
|
||||
v-if="!isEditMode && !product.pendingEntity && product.id"
|
||||
:to="machineId
|
||||
? { path: `/product/${product.id}`, query: { from: 'machine', machineId } }
|
||||
: `/product/${product.id}`"
|
||||
class="hover:underline hover:text-primary transition-colors"
|
||||
>
|
||||
{{ product.name }}
|
||||
@@ -140,8 +142,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import DocumentPreviewModal from '~/components/DocumentPreviewModal.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const machineId = computed(() => route.params.id as string | undefined)
|
||||
import { canPreviewDocument } from '~/utils/documentPreview'
|
||||
import {
|
||||
formatSize,
|
||||
|
||||
Reference in New Issue
Block a user