saeid 4 years ago
commit ef2542e4ac

@ -132,14 +132,14 @@ export default {
};
},
computed: {
...mapGetters("rolePermission", ["getAllModules", "getModules"])
...mapGetters("rolePermission", ["getHomeModules", "getModules"])
},
methods: {
...mapActions("rolePermission", ["loadAllModules", "loadModules"]),
...mapActions("rolePermission", ["loadHomeModules", "loadModules"]),
async loadPage() {
await this.loadAllModules({ home_page: true });
await this.loadHomeModules({ home_page: true });
await this.loadModules({ home_page: true });
for (const allModule of this.getAllModules) {
for (const allModule of this.getHomeModules) {
let module = this.getModules.find(x => x.id == allModule.id);
if (module) {
allModule['has_module'] = 'yes';
@ -148,7 +148,7 @@ export default {
allModule['has_module'] = 'no';
}
}
this.allModules = this.getAllModules;
this.allModules = this.getHomeModules;
}
},
beforeMount() {

Loading…
Cancel
Save