feat: importar csv y auditar ediciones
This commit is contained in:
@@ -15,7 +15,16 @@
|
||||
</v-navigation-drawer>
|
||||
|
||||
<v-main>
|
||||
<v-container fluid>
|
||||
<v-container fluid class="pa-4 pa-md-6">
|
||||
<div class="d-flex flex-wrap align-center justify-space-between mb-3 ga-2">
|
||||
<v-breadcrumbs :items="breadcrumbs" class="pa-0" aria-label="Migas de pan">
|
||||
<template #prepend><v-icon icon="mdi-home-outline" size="small" /></template>
|
||||
</v-breadcrumbs>
|
||||
<div class="d-flex ga-2">
|
||||
<v-btn variant="text" size="small" prepend-icon="mdi-arrow-left" data-testid="back-button" @click="goBack">Atrás</v-btn>
|
||||
<v-btn to="/" variant="text" size="small" prepend-icon="mdi-home">Inicio</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
<router-view />
|
||||
</v-container>
|
||||
</v-main>
|
||||
@@ -23,13 +32,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, ref } from 'vue';
|
||||
import { computed, onMounted, onUnmounted, ref } from 'vue';
|
||||
import { JornadaService } from '@toldo/services';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
const drawer = ref(true);
|
||||
const isMobile = ref(false);
|
||||
const jornada = ref<any>(null);
|
||||
const jornadaService = new JornadaService();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const navItems = [
|
||||
{ to: '/jornada', icon: 'mdi-calendar-check', title: 'Jornada' },
|
||||
{ to: '/inventario', icon: 'mdi-package-variant', title: 'Inventario' },
|
||||
@@ -40,6 +52,8 @@ const navItems = [
|
||||
{ to: '/reportes', icon: 'mdi-chart-bar', title: 'Reportes' },
|
||||
{ to: '/exportar', icon: 'mdi-export', title: 'Exportar / importar' },
|
||||
];
|
||||
const breadcrumbs = computed(() => [{ title: 'Inicio', disabled: false, to: '/' }, ...(route.path === '/' ? [] : [{ title: String(route.meta.title ?? 'Sección'), disabled: true }])]);
|
||||
function goBack() { if (window.history.state?.back) router.back(); else router.push('/'); }
|
||||
function updateViewport() { isMobile.value = window.innerWidth < 960; if (isMobile.value) drawer.value = false; }
|
||||
function closeOnMobile() { if (isMobile.value) drawer.value = false; }
|
||||
onMounted(async () => { updateViewport(); window.addEventListener('resize', updateViewport); jornada.value = await jornadaService.getJornadaAbierta(); });
|
||||
|
||||
Reference in New Issue
Block a user