Remove menu items order
gitea/hedera-web/pipeline/pr-4922-vueMigration This commit looks good
Details
gitea/hedera-web/pipeline/pr-4922-vueMigration This commit looks good
Details
This commit is contained in:
parent
0b70344708
commit
56cf0f0e64
|
@ -16,15 +16,6 @@ export const useAppStore = defineStore('hedera', {
|
||||||
rightDrawerOpen: false,
|
rightDrawerOpen: false,
|
||||||
isHeaderMounted: false,
|
isHeaderMounted: false,
|
||||||
menuEssentialLinks: [],
|
menuEssentialLinks: [],
|
||||||
menuOrderLinks: [
|
|
||||||
'Home',
|
|
||||||
'Orders',
|
|
||||||
'Basket',
|
|
||||||
'Catalog',
|
|
||||||
'Administration',
|
|
||||||
'Agencies',
|
|
||||||
'Configuration'
|
|
||||||
],
|
|
||||||
hiddenMenuLinks: new Set(['Reports']),
|
hiddenMenuLinks: new Set(['Reports']),
|
||||||
basketOrderId: null,
|
basketOrderId: null,
|
||||||
localeDates: {
|
localeDates: {
|
||||||
|
@ -58,17 +49,6 @@ export const useAppStore = defineStore('hedera', {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Crear un objeto que mapea los elementos de menuOrderLinks a sus índices
|
|
||||||
const orderMap = {};
|
|
||||||
this.menuOrderLinks.forEach((item, index) => {
|
|
||||||
orderMap[item] = index;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Ordenar sectionTree basado en el orden de menuOrderLinks
|
|
||||||
sectionTree.sort((a, b) => {
|
|
||||||
return orderMap[a.name] - orderMap[b.name];
|
|
||||||
});
|
|
||||||
|
|
||||||
this.menuEssentialLinks = sectionTree;
|
this.menuEssentialLinks = sectionTree;
|
||||||
},
|
},
|
||||||
async loadConfig() {
|
async loadConfig() {
|
||||||
|
|
Loading…
Reference in New Issue