Merge pull request 'dev' (#106) from dev into master

Reviewed-on: WillaEngine-Project/WillaEngine#106
pull/134/head
saeid_01 4 years ago
commit f4364aa4a1

@ -2,20 +2,21 @@
<v-container> <v-container>
<v-row class="reverse"> <v-row class="reverse">
<v-col xl="8" lg="8" offset-xl="2" offset-lg="2" class="fade-in fast delay-01"> <v-col xl="8" lg="8" offset-xl="2" offset-lg="2" class="fade-in fast delay-01">
<big-section-title title_fa="سیستم مدیریت یک پارچه" title_en="Integrated Management System" desc="هر آنچه مربوط به مدیریت مجموعه ی شما می باشد." /> <big-section-title title_fa="سیستم مدیریت یک پارچه" title_en="Integrated Management System"
desc="هر آنچه مربوط به مدیریت مجموعه ی شما می باشد."/>
</v-col> </v-col>
</v-row> </v-row>
<v-row> <v-row>
<a <a
:href="module.href" :href="module.hasModule ? module.href : 'javascript:void(0)'"
:class="'flex fade-in fast ' + module.main_class" :class="'flex fade-in fast ' + module.main_class"
v-for="( module ,key ) in getModules" v-for="( module ,key ) in modules"
:key="key" :key="key"
:style="`animation-delay: ${key * 0.1}s;`" :style="`animation-delay: ${key * 0.1}s;`"
> >
<icon-tile <icon-tile
:theme="module.title_class +' Shadowed'" :theme="module.title_class +' Shadowed'"
:class="module.hasModule ? '' : 'has-blur'"
:TitleEn="module.title_en" :TitleEn="module.title_en"
:TitleFa="module.title_fa" :TitleFa="module.title_fa"
:GradientBegin="module.gradient_begin" :GradientBegin="module.gradient_begin"
@ -35,35 +36,44 @@
</template> </template>
<script> <script>
import Tile from "@Global/components/Tiles/Tile"; import IconTile from '@Global/components/Tiles/Icon-Tile';
import IconTile from '@Global/components/Tiles/Icon-Tile'; import {mapGetters, mapActions} from "vuex";
import { mapGetters, mapActions } from "vuex"; import routes from '@Global/utils/common/routes';
import routes from '@Global/utils/common/routes'; import BigSectionTitle from '@Global/components/Dividers/Section-Title-Big';
import BigSectionTitle from '@Global/components/Dividers/Section-Title-Big';
export default {
export default { data: () => ({
data: () => ({ hostname: window.location.hostname,
hostname : window.location.hostname, originHostName: routes.originHostName()
originHostName : routes.originHostName() }),
}), components: {
components: { IconTile,
IconTile, BigSectionTitle
BigSectionTitle },
}, computed: {
computed: { ...mapGetters("rolePermission", ["getModules", "getAllModules"]),
...mapGetters("rolePermission", ["getModules"]), ...mapGetters("auth", ["getAuthUser"]),
...mapGetters("auth", ["getAuthUser"]), modules() {
}, let modules = this.getAllModules.filter(x => x.load_in_home === "yes");
methods: { return modules.map(x => {
...mapActions("rolePermission", ["loadModules"]), if (this.getModules.map(y => y.id).includes(x.id)) {
}, x.hasModule = true;
created() { } else {
this.loadModules({ home_page: true }); x.hasModule = false;
} }
}; return x;
});
}
},
methods: {
...mapActions("rolePermission", ["loadModules", "loadAllModules"]),
},
created() {
this.loadModules();
this.loadAllModules();
}
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

Loading…
Cancel
Save