make guilds not display group plans as title section (#12761)

* make guilds not display group plans as title section

* fix for parties as well

* task board for group plans now says group plans

* fix party title

Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
Shadow
2020-11-14 12:35:09 -06:00
committed by GitHub
parent cb96ff84d1
commit 8c98b7127e
2 changed files with 8 additions and 6 deletions

View File

@@ -226,7 +226,7 @@ export default {
});
this.$store.dispatch('common:setTitle', {
subSection: this.group.name,
section: this.$t('group'),
section: this.$route.path.startsWith('/group-plans') ? this.$t('groupPlans') : this.$t('group'),
});
const members = await this.$store.dispatch('members:getGroupMembers', { groupId: this.searchId });
this.group.members = members;

View File

@@ -500,8 +500,10 @@ export default {
if (this.isParty) this.searchId = 'party';
if (!this.searchId) this.searchId = this.groupId;
await this.fetchGuild();
const type = this.isParty ? 'party' : 'guilds';
this.$store.dispatch('common:setTitle', {
section: this.$t('groupPlans'),
section: this.$route.path.startsWith('/group-plans') ? this.$t('groupPlans') : this.$t(type),
subSection: this.group.name,
});
this.$root.$on('updatedGroup', this.onGroupUpdate);
@@ -520,8 +522,9 @@ export default {
onGroupUpdate (group) {
const updatedGroup = extend(this.group, group);
this.$set(this.group, updatedGroup);
const type = this.isParty ? 'party' : 'guilds';
this.$store.dispatch('common:setTitle', {
section: this.$t('groupPlans'),
section: this.$route.path.startsWith('/group-plans') ? this.$t('groupPlans') : this.$t(type),
subSection: group.name,
});
},
@@ -584,19 +587,18 @@ export default {
this.$root.$emit('bv::show::modal', 'create-party-modal');
return;
}
if (this.isParty) {
await this.$store.dispatch('party:getParty', true);
this.group = this.$store.state.party.data;
this.$store.dispatch('common:setTitle', {
section: this.$t('party'),
section: this.$route.path.startsWith('/group-plans') ? this.$t('groupPlans') : this.$t('party'),
subSection: this.group.name,
});
} else {
const group = await this.$store.dispatch('guilds:getGroup', { groupId: this.searchId });
this.$set(this, 'group', group);
this.$store.dispatch('common:setTitle', {
section: this.$t('guilds'),
section: this.$route.path.startsWith('/group-plans') ? this.$t('groupPlans') : this.$t('guilds'),
subSection: group.name,
});
}