feat(route): refs # agency add agencyList

This commit is contained in:
Pablo Natek 2024-04-03 08:38:26 +02:00
parent af4927167f
commit f404243d63
4 changed files with 51 additions and 1 deletions

View File

@ -937,6 +937,7 @@ export default {
pageTitles: {
routes: 'Routes',
cmrsList: 'External CMRs list',
agencyList: 'Agency',
RouteList: 'List',
create: 'Create',
basicData: 'Basic Data',

View File

@ -937,6 +937,7 @@ export default {
pageTitles: {
routes: 'Rutas',
cmrsList: 'Listado de CMRs externos',
agency: 'Agency',
RouteList: 'Listado',
create: 'Crear',
basicData: 'Datos básicos',

View File

@ -0,0 +1,39 @@
<script setup>
import VnPaginate from 'src/components/ui/VnPaginate.vue';
import CardList from 'src/components/ui/CardList.vue';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
const router = useRouter();
function navigate(id) {
router.push({ path: `/agencies/${id}` });
}
</script>
<template>
<QPage class="column items-center q-pa-md">
<div class="vn-card-list">
<VnPaginate
data-key="AgencyList"
url="agencies"
limit="20"
order-by="name"
auto-load
>
<template #body="{ rows }">
<CardList
:id="row.id"
:key="row.id"
:title="row.name"
@click="navigate(row.id)"
v-for="row of rows"
>
</CardList>
</template>
</VnPaginate>
</div>
</QPage>
</template>
<style lang="scss"></style>

View File

@ -10,7 +10,7 @@ export default {
component: RouterView,
redirect: { name: 'RouteMain' },
menus: {
main: ['RouteList', 'CmrList'],
main: ['RouteList', 'CmrList', 'agencyList'],
card: ['RouteBasicData'],
},
children: [
@ -29,6 +29,15 @@ export default {
},
component: () => import('src/pages/Route/Cmr/CmrList.vue'),
},
{
path: 'agency',
name: 'agencyList',
meta: {
title: 'agencyList',
icon: 'package',
},
component: () => import('src/pages/Route/Agency/AgencyList.vue'),
},
{
path: 'list',
name: 'RouteList',