Debug: Agregar console.logs a componentes de tablas
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m4s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m4s
This commit is contained in:
@@ -91,6 +91,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Lote } from '~/composables/useLotes'
|
import type { Lote } from '~/composables/useLotes'
|
||||||
|
|
||||||
|
console.log('🟢 LotesTable: Script ejecutado')
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
create: []
|
create: []
|
||||||
view: [lote: Lote]
|
view: [lote: Lote]
|
||||||
@@ -99,6 +101,7 @@ const emit = defineEmits<{
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
const { fetchLotes, TIPOS_LOTE } = useLotes()
|
const { fetchLotes, TIPOS_LOTE } = useLotes()
|
||||||
|
console.log('🟢 LotesTable: Composable cargado, TIPOS_LOTE:', TIPOS_LOTE?.length)
|
||||||
|
|
||||||
const lotes = ref<Lote[]>([])
|
const lotes = ref<Lote[]>([])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@@ -159,7 +162,10 @@ const formatDate = (dateString: string) => {
|
|||||||
|
|
||||||
// Cargar lotes al montar
|
// Cargar lotes al montar
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadLotes()
|
console.log('🔵 LotesTable montado correctamente')
|
||||||
|
loadLotes().catch(error => {
|
||||||
|
console.error('❌ Error cargando lotes:', error)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// Recargar cuando cambia el filtro
|
// Recargar cuando cambia el filtro
|
||||||
|
|||||||
@@ -68,12 +68,15 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Operacion } from '~/composables/useLotes'
|
import type { Operacion } from '~/composables/useLotes'
|
||||||
|
|
||||||
|
console.log('🟡 OperacionesTable: Script ejecutado')
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
create: []
|
create: []
|
||||||
view: [operacion: Operacion]
|
view: [operacion: Operacion]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const { fetchOperaciones, TIPOS_OPERACION } = useLotes()
|
const { fetchOperaciones, TIPOS_OPERACION } = useLotes()
|
||||||
|
console.log('🟡 OperacionesTable: Composable cargado')
|
||||||
|
|
||||||
const operaciones = ref<Operacion[]>([])
|
const operaciones = ref<Operacion[]>([])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@@ -135,7 +138,10 @@ const formatDate = (dateString: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadOperaciones()
|
console.log('🟡 OperacionesTable montado correctamente')
|
||||||
|
loadOperaciones().catch(error => {
|
||||||
|
console.error('❌ Error cargando operaciones:', error)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(filtroTipo, () => {
|
watch(filtroTipo, () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user