Skip to content

Commit

Permalink
Check if current project (initiial) belong to a macrogroup/s checking…
Browse files Browse the repository at this point in the history
… initCongif.group.macrogroup_id attribute
  • Loading branch information
volterra79 committed Feb 19, 2024
1 parent dbbd3c9 commit e5b89e7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/ChangeMapMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,13 @@ export default {
this.steps = [];
this.showGroups(item);
} else {
if (this.init && undefined === this.parent.macro_id) {
await this.showGroups(this.macrogroups.find(mg => 1 === mg.id));
if (
this.init
&& Array.isArray(this.parent.macrogroup_id)
&& this.parent.macrogroup_id.length > 0
) {
//get first
await this.showGroups(this.macrogroups.find(mg => this.parent.macrogroup_id[0] === mg.id));
this.init = false;
} else {
this.showRoot();
Expand Down

0 comments on commit e5b89e7

Please sign in to comment.