fix: cambiar filtro por defecto a Inactivos en gestión de productos

- Default filter cambia de 'all' a 'false' (Inactivos)
- Limpieza de whitespace
This commit is contained in:
2026-05-29 01:13:46 -05:00
parent d5e30c92b0
commit ed42eb324c

View File

@@ -50,7 +50,7 @@
> >
Activar seleccionados Activar seleccionados
</v-btn> </v-btn>
<!-- Botón Desactivar: solo visible en filtro "Activos" --> <!-- Botón Desactivar: solo visible en filtro "Activos" -->
<v-btn <v-btn
v-if="activeFilter === 'true'" v-if="activeFilter === 'true'"
@@ -158,7 +158,7 @@ import { ref, watch, inject, onMounted, computed } from "vue";
// Estado // Estado
const api = inject("api"); const api = inject("api");
const activeFilter = ref("all"); const activeFilter = ref("false");
const products = ref([]); const products = ref([]);
const selected = ref([]); const selected = ref([]);
const loading = ref(false); const loading = ref(false);
@@ -178,10 +178,10 @@ const filteredProducts = computed(() => {
if (!searchQuery.value) { if (!searchQuery.value) {
return products.value; return products.value;
} }
const query = searchQuery.value.toLowerCase().trim(); const query = searchQuery.value.toLowerCase().trim();
return products.value.filter(product => return products.value.filter((product) =>
product.name.toLowerCase().includes(query) product.name.toLowerCase().includes(query),
); );
}); });