homepage_widget: init counters on load, arrange MyCustoms tab

This commit is contained in:
2022-01-28 18:01:26 +01:00
parent e95093f144
commit 00ac6aa1b9
4 changed files with 93 additions and 20 deletions

View File

@@ -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>