mejoras UI 3
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m5s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m5s
This commit is contained in:
@@ -150,7 +150,7 @@
|
|||||||
<!-- Modal: Ver Trazabilidad -->
|
<!-- Modal: Ver Trazabilidad -->
|
||||||
<UModal
|
<UModal
|
||||||
v-model:open="showTrazabilidadModal"
|
v-model:open="showTrazabilidadModal"
|
||||||
:ui="{ content: 'w-[calc(100vw-2rem)] max-w-4xl rounded-lg shadow-lg ring ring-default' }"
|
:ui="{ content: 'w-[calc(100vw-2rem)] max-w-4xl rounded-lg shadow-lg ring ring-default max-h-[80vh] overflow-y-auto' }"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<LotesTrazabilidad
|
<LotesTrazabilidad
|
||||||
|
|||||||
@@ -120,9 +120,9 @@ console.log('🟢 LotesTable: useLotes() completado')
|
|||||||
|
|
||||||
const lotes = ref<Lote[]>([])
|
const lotes = ref<Lote[]>([])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const filtroTipo = ref('')
|
const filtroTipo = ref<string | null>(null)
|
||||||
const selectOptions = computed(() => [
|
const selectOptions = computed(() => [
|
||||||
{ value: '', label: 'Todos los tipos' },
|
{ value: null, label: 'Todos los tipos' },
|
||||||
...TIPOS_LOTE,
|
...TIPOS_LOTE,
|
||||||
])
|
])
|
||||||
const error = ref<string | null>(null)
|
const error = ref<string | null>(null)
|
||||||
|
|||||||
@@ -29,17 +29,26 @@
|
|||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
|
|
||||||
<!-- Grid horizontal por nivel -->
|
<!-- Grid horizontal y vertical -->
|
||||||
<g stroke="#e2e8f0" stroke-width="1" :stroke-opacity="colorMode === 'dark' ? 0.1 : 0.35">
|
<g stroke="#e2e8f0" stroke-width="1" :stroke-opacity="colorMode === 'dark' ? 0.1 : 0.35">
|
||||||
<line
|
<line
|
||||||
v-for="depth in depthLines"
|
v-for="depth in depthLines"
|
||||||
:key="depth"
|
:key="`h-${depth}`"
|
||||||
:x1="0"
|
:x1="0"
|
||||||
:x2="svgWidth"
|
:x2="svgWidth"
|
||||||
:y1="paddingY + depth * levelGap"
|
:y1="paddingY + depth * levelGap"
|
||||||
:y2="paddingY + depth * levelGap"
|
:y2="paddingY + depth * levelGap"
|
||||||
stroke-dasharray="4 4"
|
stroke-dasharray="4 4"
|
||||||
/>
|
/>
|
||||||
|
<line
|
||||||
|
v-for="x in verticalGrid"
|
||||||
|
:key="`v-${x}`"
|
||||||
|
:x1="x"
|
||||||
|
:x2="x"
|
||||||
|
y1="0"
|
||||||
|
:y2="svgHeight"
|
||||||
|
stroke-dasharray="6 6"
|
||||||
|
/>
|
||||||
</g>
|
</g>
|
||||||
|
|
||||||
<!-- Aristas -->
|
<!-- Aristas -->
|
||||||
@@ -236,6 +245,19 @@ const depthLines = computed(() => {
|
|||||||
return Array.from({ length: maxDepth + 1 }, (_, i) => i)
|
return Array.from({ length: maxDepth + 1 }, (_, i) => i)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const verticalGrid = computed(() => {
|
||||||
|
if (!nodes.value.length) return []
|
||||||
|
const xs = nodes.value.map((n) => n.x)
|
||||||
|
const minX = Math.min(...xs)
|
||||||
|
const maxX = Math.max(...xs)
|
||||||
|
const step = 180
|
||||||
|
const coords: number[] = []
|
||||||
|
for (let x = minX - step; x <= maxX + step; x += step) {
|
||||||
|
coords.push(x)
|
||||||
|
}
|
||||||
|
return coords
|
||||||
|
})
|
||||||
|
|
||||||
const getNodeFill = (tipo: string): string => {
|
const getNodeFill = (tipo: string): string => {
|
||||||
const palette: Record<string, string> = {
|
const palette: Record<string, string> = {
|
||||||
uva: colorMode.value === 'dark' ? '#4c1d95' : '#F3E8FF',
|
uva: colorMode.value === 'dark' ? '#4c1d95' : '#F3E8FF',
|
||||||
|
|||||||
Reference in New Issue
Block a user