Merge pull request 'Create child submodules feature' (#82) from feature/CreateChildSubmodulesFeature into dev

Reviewed-on: hyervoni/salix-front-mindshore#82
This commit is contained in:
Carlos Fonseca 2024-01-27 15:18:19 +00:00
commit 9122431588
5 changed files with 37 additions and 2 deletions

View File

@ -206,6 +206,17 @@ async function togglePinned(item, event) {
<template v-if="$props.source === 'card'">
<template v-for="item in items" :key="item.name">
<LeftMenuItem v-if="!item.children" :item="item" />
<QList v-else>
<QExpansionItem
v-ripple
clickable
:icon="item.icon"
:label="t(item.title)"
:content-inset-level="0.5"
>
<LeftMenuItemGroup :item="item" />
</QExpansionItem>
</QList>
</template>
</template>
</QList>

View File

@ -131,6 +131,8 @@ export default {
log: 'Log',
sms: 'Sms',
creditManagement: 'Credit management',
creditContracts: 'Credit contracts',
creditOpinion: 'Credit opinion',
others: 'Others',
},
list: {
@ -886,7 +888,7 @@ export default {
RouteList: 'List',
create: 'Create',
basicData: 'Basic Data',
summary: 'Summary'
summary: 'Summary',
},
cmr: {
list: {

View File

@ -131,6 +131,8 @@ export default {
log: 'Historial',
sms: 'Sms',
creditManagement: 'Gestión de crédito',
creditContracts: 'Contratos de crédito',
creditOpinion: 'Opinión de crédito',
others: 'Otros',
},
list: {

View File

@ -352,6 +352,18 @@ 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'),
@ -382,6 +394,7 @@ export default {
},
],
},
{
path: 'others',
name: 'CustomerOthers',

View File

@ -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;