0
0
Fork 0

fix: refs #7404 add e2e and fix route

This commit is contained in:
Pablo Natek 2024-07-01 07:39:35 +02:00
parent 86a016e375
commit a69235e4d4
17 changed files with 108 additions and 105 deletions

View File

@ -21,7 +21,7 @@ const itemComputed = computed(() => {
</script>
<template>
<QItem
active-class="bg-hover"
active-class="bg-vn-hover"
class="min-height"
:to="{ name: itemComputed.name }"
clickable

View File

@ -5,6 +5,7 @@
body.body--light {
--font-color: black;
--vn-section-color: #e0e0e0;
--vn-section-hover-color: #b9b9b9;
--vn-page-color: #ffffff;
--vn-text-color: var(--font-color);
--vn-label-color: #5f5f5f;
@ -19,6 +20,7 @@ body.body--light {
body.body--dark {
--vn-page-color: #222;
--vn-section-color: #3d3d3d;
--vn-section-hover-color: #747474;
--vn-text-color: white;
--vn-label-color: #a8a8a8;
--vn-accent-color: #424242;
@ -71,8 +73,9 @@ select:-webkit-autofill {
.bg-vn-section-color {
background-color: var(--vn-section-color);
}
.bg-hover {
background-color: #666666;
.bg-vn-hover {
background-color: var(--vn-section-hover-color);
}
.color-vn-label {
@ -183,8 +186,6 @@ select:-webkit-autofill {
justify-content: center;
}
/* q-notification row items-stretch q-notification--standard bg-negative text-white */
.q-card,
.q-table,
.q-table__bottom,

View File

@ -990,6 +990,7 @@ roadmap:
stops: Stops
route:
pageTitles:
agency: Agency List
routes: Routes
cmrsList: CMRs list
RouteList: List

View File

@ -33,6 +33,7 @@ function exprBuilder(param, value) {
url="Agencies"
order="name"
:expr-builder="exprBuilder"
auto-load
>
<template #body="{ rows }">
<CardList

View File

@ -1,5 +1,5 @@
<script setup>
import AgencyDescriptor from 'pages/Agency/Card/AgencyDescriptor.vue';
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
import VnCard from 'components/common/VnCard.vue';
</script>
<template>

View File

@ -1,88 +1,3 @@
import { RouterView } from 'vue-router';
export default {
path: '/agency',
name: 'Agency',
meta: {
title: 'agency',
icon: 'garage_home',
moduleName: 'Agency',
},
component: RouterView,
redirect: { name: 'AgencyCard' },
menus: {
main: [],
card: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
},
children: [
{
path: '/agency/:id',
name: 'AgencyCard',
component: () => import('src/pages/Agency/Card/AgencyCard.vue'),
redirect: { name: 'AgencySummary' },
children: [
{
name: 'AgencySummary',
path: 'summary',
meta: {
title: 'summary',
icon: 'view_list',
},
component: () => import('src/pages/Agency/Card/AgencySummary.vue'),
},
{
name: 'AgencyBasicData',
path: 'basic-data',
meta: {
title: 'basicData',
icon: 'vn:settings',
},
component: () => import('pages/Agency/Card/AgencyBasicData.vue'),
},
{
path: 'workCenter',
name: 'AgencyWorkCenterCard',
redirect: { name: 'AgencyWorkCenters' },
children: [
{
path: '',
name: 'AgencyWorkCenters',
meta: {
icon: 'apartment',
title: 'workCenters',
},
component: () =>
import('src/pages/Agency/Card/AgencyWorkcenter.vue'),
},
],
},
{
path: 'modes',
name: 'AgencyModesCard',
redirect: { name: 'AgencyModes' },
children: [
{
path: '',
name: 'AgencyModes',
meta: {
icon: 'format_list_bulleted',
title: 'modes',
},
component: () =>
import('src/pages/Agency/Card/AgencyModes.vue'),
},
],
},
{
name: 'AgencyLog',
path: 'log',
meta: {
title: 'log',
icon: 'history',
},
component: () => import('src/pages/Agency/Card/AgencyLog.vue'),
},
],
},
],
};
export default {};

View File

@ -11,7 +11,7 @@ export default {
component: RouterView,
redirect: { name: 'RouteMain' },
menus: {
main: ['RouteList', 'RouteAutonomous', 'RouteRoadmap', 'CmrList', 'AgencyList'],
main: ['RouteList', 'RouteAutonomous', 'RouteRoadmap', 'CmrList', 'Agency'],
card: ['RouteBasicData', 'RouteTickets', 'RouteLog'],
},
children: [
@ -76,17 +76,106 @@ export default {
component: () => import('src/pages/Route/Cmr/CmrList.vue'),
},
{
path: '/agency',
path: 'agency',
name: 'Agency',
meta: {
title: 'agency',
icon: 'garage_home',
moduleName: 'Agency',
},
redirect: { name: 'AgencyList' },
menus: {
main: [],
card: [
'AgencyBasicData',
'AgencyModes',
'AgencyWorkCenters',
'AgencyLog',
],
},
children: [
{
path: 'list',
name: 'AgencyList',
meta: {
title: 'agencyList',
icon: 'view_list',
},
component: () => import('src/pages/Agency/AgencyList.vue'),
path: '/agency',
name: 'AgencyCard',
component: () =>
import('src/pages/Route/Agency/Card/AgencyCard.vue'),
redirect: { name: 'AgencySummary' },
children: [
{
name: 'AgencySummary',
path: 'summary',
meta: {
title: 'summary',
icon: 'view_list',
},
component: () =>
import(
'src/pages/Route/Agency/Card/AgencySummary.vue'
),
},
{
name: 'AgencyBasicData',
path: 'basic-data',
meta: {
title: 'basicData',
icon: 'vn:settings',
},
component: () =>
import(
'pages/Route/Agency/Card/AgencyBasicData.vue'
),
},
{
path: 'workCenter',
name: 'AgencyWorkCenterCard',
redirect: { name: 'AgencyWorkCenters' },
children: [
{
path: '',
name: 'AgencyWorkCenters',
meta: {
icon: 'apartment',
title: 'workCenters',
},
component: () =>
import(
'src/pages/Route/Agency/Card/AgencyWorkcenter.vue'
),
},
],
},
{
path: 'modes',
name: 'AgencyModesCard',
redirect: { name: 'AgencyModes' },
children: [
{
path: '',
name: 'AgencyModes',
meta: {
icon: 'format_list_bulleted',
title: 'modes',
},
component: () =>
import(
'src/pages/Route/Agency/Card/AgencyModes.vue'
),
},
],
},
{
name: 'AgencyLog',
path: 'log',
meta: {
title: 'log',
icon: 'history',
},
component: () =>
import(
'src/pages/Route/Agency/Card/AgencyLog.vue'
),
},
],
},
],
},

View File

@ -17,7 +17,6 @@ import order from 'src/router/modules/order';
import entry from 'src/router/modules/entry';
import roadmap from 'src/router/modules/roadmap';
import parking from 'src/router/modules/parking';
import agency from 'src/router/modules/agency';
import zone from 'src/router/modules/zone';
import account from './modules/account';
import monitor from 'src/router/modules/monitor';
@ -79,7 +78,6 @@ const routes = [
roadmap,
entry,
parking,
agency,
ItemType,
zone,
account,

View File

@ -6,7 +6,6 @@ describe('AgencyWorkCenter', () => {
});
it('assign workCenter', () => {
cy.visit(`/#/agency`);
cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click();
cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click();
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
@ -27,7 +26,6 @@ describe('AgencyWorkCenter', () => {
});
it('error on duplicate workCenter', () => {
cy.visit(`/#/agency`);
cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click();
cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click();
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();