fix
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m5s

This commit is contained in:
2025-11-22 02:25:04 -06:00
parent c4be9649b8
commit 8a7a409de6
2 changed files with 29 additions and 2 deletions

View File

@@ -228,7 +228,7 @@
<div>
<h3 class="text-lg font-semibold">Detalle de Operación</h3>
<p class="text-sm text-gray-500" v-if="selectedOperacion">
{{ getTipoLabel(selectedOperacion.tipo) }} · {{ formatDate(selectedOperacion.fecha) }}
{{ getOperacionTipoLabel(selectedOperacion.tipo) }} · {{ formatDate(selectedOperacion.fecha) }}
</p>
</div>
<UButton icon="i-heroicons-x-mark" variant="ghost" @click="closeOperacionDetailModal" />
@@ -246,7 +246,7 @@
</div>
<div class="col-span-2">
<p class="text-xs uppercase text-gray-500">Tipo</p>
<UBadge color="blue" variant="subtle">{{ getTipoLabel(selectedOperacion.tipo) }}</UBadge>
<UBadge color="blue" variant="subtle">{{ getOperacionTipoLabel(selectedOperacion.tipo) }}</UBadge>
</div>
</div>
<div>
@@ -351,6 +351,21 @@ const closeOperacionDetailModal = () => {
selectedOperacion.value = null
}
const getOperacionTipoLabel = (tipo: string) => {
const found = TIPOS_OPERACION.find((t) => t.value === tipo)
return found?.label || tipo
}
const formatDate = (dateString: string) => {
return new Date(dateString).toLocaleDateString('es-AR', {
day: '2-digit',
month: '2-digit',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
})
}
// Datos para grafos
const graphSelectItems = computed(() =>
graphLotes.value.map((lote) => ({