Updated routes
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-04-19 14:24:15 +02:00
parent 7a99ad1887
commit ab9f19445c
6 changed files with 41 additions and 10 deletions

View File

@ -1,7 +1,13 @@
<script setup> <script setup>
import { computed } from 'vue';
import { useState } from 'src/composables/useState'; import { useState } from 'src/composables/useState';
import { useRouter } from 'vue-router';
const state = useState(); const state = useState();
const router = useRouter();
const entityId = computed(function () {
return router.currentRoute.value.params.id;
});
</script> </script>
<template> <template>
<q-drawer v-model="state.drawer.value" show-if-above :width="200" :breakpoint="500"> <q-drawer v-model="state.drawer.value" show-if-above :width="200" :breakpoint="500">
@ -9,6 +15,7 @@ const state = useState();
<router-link :to="{ path: '/customer/list' }"> <router-link :to="{ path: '/customer/list' }">
<q-icon name="arrow_back" size="md" color="primary" /> <q-icon name="arrow_back" size="md" color="primary" />
</router-link> </router-link>
<div>Customer ID: {{ entityId }}</div>
</q-scroll-area> </q-scroll-area>
</q-drawer> </q-drawer>
<q-page-container> <q-page-container>

View File

@ -0,0 +1,3 @@
<template>
<q-card>Basic Data</q-card>
</template>

View File

@ -0,0 +1,24 @@
<script setup>
import { computed } from 'vue';
import { useState } from 'src/composables/useState';
import { useRouter } from 'vue-router';
const state = useState();
const router = useRouter();
const entityId = computed(function () {
return router.currentRoute.value.params.id;
});
</script>
<template>
<q-drawer v-model="state.drawer.value" show-if-above :width="200" :breakpoint="500">
<q-scroll-area class="fit text-grey-8">
<router-link :to="{ path: '/customer/list' }">
<q-icon name="arrow_back" size="md" color="primary" />
</router-link>
<div>Customer ID: {{ entityId }}</div>
</q-scroll-area>
</q-drawer>
<q-page-container>
<router-view></router-view>
</q-page-container>
</template>

View File

@ -1,14 +1,15 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
import { useState } from 'src/composables/useState';
import LeftMenu from 'src/components/LeftMenu.vue'; import LeftMenu from 'src/components/LeftMenu.vue';
const drawer = ref(false); const state = useState();
const miniState = ref(true); const miniState = ref(true);
</script> </script>
<template> <template>
<q-drawer <q-drawer
v-model="drawer" v-model="state.drawer.value"
show-if-above show-if-above
:mini="miniState" :mini="miniState"
@mouseover="miniState = false" @mouseover="miniState = false"

View File

@ -29,16 +29,16 @@ export default {
}, },
{ {
path: ':id', path: ':id',
component: () => import('src/pages/Customer/Card/CustomerCard.vue'), component: () => import('src/pages/Ticket/Card/TicketCard.vue'),
redirect: { name: 'CustomerBasicData' }, redirect: { name: 'TicketBasicData' },
children: [ children: [
{ {
path: 'basic-data', path: 'basic-data',
name: 'CustomerBasicData', name: 'TicketBasicData',
meta: { meta: {
title: 'basicData' title: 'basicData'
}, },
component: () => import('src/pages/Customer/Card/CustomerBasicData.vue'), component: () => import('src/pages/Ticket/Card/TicketBasicData.vue'),
} }
] ]
}, },

View File

@ -1,4 +0,0 @@
export interface Route {
path: string;
component: any;
}