mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 00:55:01 +00:00
homepage_widget: init counters on load, arrange MyCustoms tab
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link"
|
||||
:class="{'active': activeTab === 'MyCustoms'}"
|
||||
@load="selectTab('MyCustoms')" @click="selectTab('MyCustoms')">
|
||||
@click="selectTab('MyCustoms')">
|
||||
<i class="fa fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
@@ -115,9 +115,20 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
selectTab(tab) {
|
||||
this.$store.dispatch('getByTab', tab);
|
||||
this.$store.dispatch('getByTab', { tab: tab });
|
||||
this.activeTab = tab;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
for (const m of [
|
||||
'MyNotifications',
|
||||
'MyAccompanyingCourses',
|
||||
'MyWorks',
|
||||
'MyEvaluations',
|
||||
'MyTasks',
|
||||
]) {
|
||||
this.$store.dispatch('getByTab', { tab: m, param: "countOnly=1" });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user