From c65c09c39c990bd6b72be4cc59e65db1814c80fe Mon Sep 17 00:00:00 2001 From: pablone Date: Tue, 16 Apr 2024 07:45:33 +0200 Subject: [PATCH] feat(agency): refs #4988 add agency router and sections --- src/components/common/VnBreadcrumbs.vue | 1 + src/i18n/en/index.js | 8 ++- src/pages/Agency/AgencyList.vue | 9 ++-- src/pages/Agency/Card/AgencyBasicData.vue | 59 ++++++++++++++++++++++ src/pages/Agency/Card/AgencyCard.vue | 46 +++++++++++------ src/pages/Agency/Card/AgencyDescriptor.vue | 39 ++++++++++++++ src/pages/Agency/Card/AgencyLog.vue | 6 +++ src/pages/Agency/Card/AgencySummary.vue | 44 ++++++++++++++++ src/router/modules/index.js | 2 + src/router/routes.js | 2 + 10 files changed, 196 insertions(+), 20 deletions(-) create mode 100644 src/pages/Agency/Card/AgencyBasicData.vue create mode 100644 src/pages/Agency/Card/AgencyDescriptor.vue create mode 100644 src/pages/Agency/Card/AgencyLog.vue create mode 100644 src/pages/Agency/Card/AgencySummary.vue diff --git a/src/components/common/VnBreadcrumbs.vue b/src/components/common/VnBreadcrumbs.vue index 337507233..65f6946f4 100644 --- a/src/components/common/VnBreadcrumbs.vue +++ b/src/components/common/VnBreadcrumbs.vue @@ -30,6 +30,7 @@ watchEffect(() => { }); function getBreadcrumb(param) { + console.log('param.meta.title: ', param.meta.title); const breadcrumb = { icon: param.meta.icon, path: param.path, diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 0f90d5f44..d26ee26a3 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -1003,9 +1003,10 @@ export default { }, route: { pageTitles: { + agency: 'Agency', routes: 'Routes', cmrsList: 'External CMRs list', - agencyList: 'Agency', + agencyList: 'Agency list', RouteList: 'List', create: 'Create', basicData: 'Basic Data', @@ -1033,6 +1034,11 @@ export default { }, }, }, + agency: { + pageTitles: { + agency: 'Agency', + }, + }, supplier: { pageTitles: { suppliers: 'Suppliers', diff --git a/src/pages/Agency/AgencyList.vue b/src/pages/Agency/AgencyList.vue index 2746f8529..6f8185864 100644 --- a/src/pages/Agency/AgencyList.vue +++ b/src/pages/Agency/AgencyList.vue @@ -15,10 +15,11 @@ function navigate(id) { router.push({ path: `/agency/${id}` }); } function exprBuilder(param, value) { - switch (param) { - case 'search': - return { name: { like: `%${value}%` } }; - } + if (param !== 'search') return; + + if (!isNaN(value)) return { id: value }; + + return { name: { like: `%${value}%` } }; }