feat(ui) : clickable entity links, site→machines links, DataTable fixedLayout

- Add NuxtLink on component/piece/product names in machine hierarchy
  (using composantId, pieceId, product.id)
- Make site machine count badges clickable → /machines?sites={id}
- Add opt-in fixedLayout prop and minWidth to DataTable columns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-04 16:39:21 +02:00
parent 6716d31126
commit 4f13f7d301
7 changed files with 43 additions and 13 deletions

View File

@@ -11,13 +11,14 @@
<h3 class="card-title text-lg text-base-content">
{{ site.name }}
</h3>
<div
class="badge font-bold"
<NuxtLink
:to="`/machines?sites=${site.id}`"
class="badge font-bold hover:opacity-80 transition-opacity"
:style="site.color ? { backgroundColor: site.color + '30', color: site.color, borderColor: site.color + '50' } : {}"
:class="!site.color ? 'badge-primary' : ''"
>
{{ machineCount }} machines
</div>
</NuxtLink>
</div>
<div class="space-y-3 text-sm">
@@ -39,10 +40,10 @@
</span>
</div>
<div class="flex items-center gap-2 text-base-content/60">
<NuxtLink :to="`/machines?sites=${site.id}`" class="flex items-center gap-2 text-base-content/60 hover:text-primary transition-colors">
<IconLucideFactory class="w-4 h-4 text-blue-500" aria-hidden="true" />
<span>{{ machineCount }} machine(s)</span>
</div>
</NuxtLink>
</div>
<div class="card-actions justify-end mt-4">