@@ -107,6 +115,7 @@ const shelvingFilter = {
diff --git a/src/pages/Shelving/Card/ShelvingSearchbar.vue b/src/pages/Shelving/Card/ShelvingSearchbar.vue
index 89a4de01e..bfc8ad4f5 100644
--- a/src/pages/Shelving/Card/ShelvingSearchbar.vue
+++ b/src/pages/Shelving/Card/ShelvingSearchbar.vue
@@ -7,12 +7,12 @@ const { t } = useI18n();
-
es:
Search shelving: Buscar carros
diff --git a/src/pages/Shelving/Card/ShelvingSummary.vue b/src/pages/Shelving/Card/ShelvingSummary.vue
index f1f914385..409329c88 100644
--- a/src/pages/Shelving/Card/ShelvingSummary.vue
+++ b/src/pages/Shelving/Card/ShelvingSummary.vue
@@ -6,6 +6,7 @@ import { useStateStore } from 'stores/useStateStore';
import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'components/ui/VnLv.vue';
import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
+import VnUserLink from "components/ui/VnUserLink.vue";
const $props = defineProps({
id: {
@@ -24,7 +25,7 @@ const hideRightDrawer = () => {
if (!isDialog) {
stateStore.rightDrawer = false;
}
-}
+};
onMounted(hideRightDrawer);
onUnmounted(hideRightDrawer);
const filter = {
@@ -69,9 +70,13 @@ const filter = {
-
+
+
-
+
+
+
+
+
@@ -93,17 +94,10 @@ function exprBuilder(param, value) {
/>
-
diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js
index fa57682af..716b0fa6c 100644
--- a/src/router/modules/customer.js
+++ b/src/router/modules/customer.js
@@ -254,13 +254,31 @@ export default {
},
{
path: 'greuges',
- name: 'CustomerGreuges',
- meta: {
- title: 'greuges',
- icon: 'vn:greuge',
- },
- component: () =>
- import('src/pages/Customer/Card/CustomerGreuges.vue'),
+ name: 'GreugesCard',
+ redirect: { name: 'CustomerGreuges' },
+ children: [
+ {
+ path: '',
+ name: 'CustomerGreuges',
+ meta: {
+ title: 'greuges',
+ icon: 'vn:greuge',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerGreuges.vue'),
+ },
+ {
+ path: 'create',
+ name: 'CustomerGreugeCreate',
+ meta: {
+ title: 'greuge-create',
+ },
+ component: () =>
+ import(
+ 'src/pages/Customer/components/CustomerGreugeCreate.vue'
+ ),
+ },
+ ],
},
{
path: 'balance',
@@ -274,13 +292,31 @@ export default {
},
{
path: 'recoveries',
- name: 'CustomerRecoveries',
- meta: {
- title: 'recoveries',
- icon: 'vn:recovery',
- },
- component: () =>
- import('src/pages/Customer/Card/CustomerRecoveries.vue'),
+ name: 'RecoveriesCard',
+ redirect: { name: 'CustomerRecoveries' },
+ children: [
+ {
+ path: '',
+ name: 'CustomerRecoveries',
+ meta: {
+ title: 'recoveries',
+ icon: 'vn:recovery',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerRecoveries.vue'),
+ },
+ {
+ path: 'create',
+ name: 'CustomerRecoverieCreate',
+ meta: {
+ title: 'recoverie-create',
+ },
+ component: () =>
+ import(
+ 'src/pages/Customer/components/CustomerRecoverieCreate.vue'
+ ),
+ },
+ ],
},
{
path: 'web-access',
@@ -316,10 +352,49 @@ export default {
meta: {
title: 'creditManagement',
icon: 'paid',
+ menuChildren: [
+ {
+ name: 'CustomerCreditContracts',
+ title: 'creditContracts',
+ icon: 'paid',
+ },
+ {
+ name: 'CustomerCreditOpinion',
+ title: 'creditOpinion',
+ icon: 'paid',
+ },
+ ],
},
component: () =>
import('src/pages/Customer/Card/CustomerCreditManagement.vue'),
+ children: [
+ {
+ path: 'credit-contracts',
+ name: 'CustomerCreditContracts',
+ meta: {
+ title: 'creditContracts',
+ icon: 'paid',
+ },
+ component: () =>
+ import(
+ 'src/pages/Customer/Card/CustomerCreditContracts.vue'
+ ),
+ },
+ {
+ path: 'credit-opinion',
+ name: 'CustomerCreditOpinion',
+ meta: {
+ title: 'creditOpinion',
+ icon: 'paid',
+ },
+ component: () =>
+ import(
+ 'src/pages/Customer/Card/CustomerCreditOpinion.vue'
+ ),
+ },
+ ],
},
+
{
path: 'others',
name: 'CustomerOthers',
diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js
index 568063d1d..afd3af0c0 100644
--- a/src/stores/useNavigationStore.js
+++ b/src/stores/useNavigationStore.js
@@ -52,13 +52,20 @@ export const useNavigationStore = defineStore('navigationStore', () => {
function addMenuItem(module, route, parent) {
const { meta } = route;
+ let { menuChildren = null } = meta;
+ if (menuChildren)
+ menuChildren = menuChildren.map(({ name, title, icon }) => ({
+ name,
+ icon,
+ title: `${module}.pageTitles.${title}`,
+ }));
if (meta && meta.roles && role.hasAny(meta.roles) === false) return;
const item = {
name: route.name,
+ children: menuChildren,
};
-
if (meta) {
item.title = `${module}.pageTitles.${meta.title}`;
item.icon = meta.icon;
diff --git a/test/vitest/__tests__/components/Leftmenu.spec.js b/test/vitest/__tests__/components/Leftmenu.spec.js
index ffdaebe7b..ea1c51f8d 100644
--- a/test/vitest/__tests__/components/Leftmenu.spec.js
+++ b/test/vitest/__tests__/components/Leftmenu.spec.js
@@ -76,11 +76,13 @@ describe('Leftmenu', () => {
it('should return a proper formated object with two child items', async () => {
const expectedMenuItem = [
{
+ children: null,
name: 'CustomerList',
title: 'customer.pageTitles.list',
icon: 'view_list',
},
{
+ children: null,
name: 'CustomerCreate',
title: 'customer.pageTitles.createCustomer',
icon: 'vn:addperson',