fix: resolve white screen crashes and restructure layout hierarchy
- Move NavBar from App.vue to layouts/default.vue to fix nested v-app/v-main - Replace VSkeletonLoader with v-progress-circular to avoid genStructure crash - Initialize payment_methods as [] and add fallback in v-select - Remove duplicate fetchClients call from mounted() - Add authStore.user check in admin route guard - Replace window.location.href with router.push for SPA navigation - Add !important to page-header gradient styles
This commit is contained in:
@@ -13,10 +13,15 @@
|
||||
|
||||
<!-- Loading -->
|
||||
<template v-if="loading">
|
||||
<v-skeleton-loader
|
||||
class="mb-4 rounded-lg"
|
||||
type="card-heading, list-item-two-line, list-item-two-line"
|
||||
></v-skeleton-loader>
|
||||
<v-sheet class="d-flex flex-column align-center justify-center pa-12 rounded-lg" elevation="2">
|
||||
<v-progress-circular
|
||||
indeterminate
|
||||
color="primary"
|
||||
size="64"
|
||||
width="6"
|
||||
></v-progress-circular>
|
||||
<p class="text-body-1 text-grey mt-4">Cargando datos...</p>
|
||||
</v-sheet>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
@@ -246,7 +251,7 @@
|
||||
<v-row align="center">
|
||||
<v-col cols="12" md="6">
|
||||
<v-select
|
||||
:items="payment_methods"
|
||||
:items="payment_methods || []"
|
||||
v-model="purchase.payment_method"
|
||||
item-title="text"
|
||||
item-value="value"
|
||||
@@ -337,7 +342,7 @@
|
||||
show_alert_purchase: false,
|
||||
client_search: '',
|
||||
product_search: '',
|
||||
payment_methods: null,
|
||||
payment_methods: [],
|
||||
purchase: {
|
||||
date: this.getCurrentDate(),
|
||||
customer: null,
|
||||
@@ -471,15 +476,13 @@
|
||||
formatPrice(price) {
|
||||
return new Intl.NumberFormat('es-CO', { style: 'currency', currency: 'COP', minimumFractionDigits: 0 }).format(price);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.fetchClients();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.page-header {
|
||||
background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
|
||||
background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.product-line:nth-child(odd) {
|
||||
|
||||
Reference in New Issue
Block a user