mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Fix casting items on parties that exceed it limit by showing Load More Button (#13509)
* Fixed party size and notification when inviting Fixed party limit to 30 members (previously 31) and pop-up when trying to invite someone, when party has already reached it's members limit, to properly show members number. * Fixed View Party button in header Fixed View Party button in header to properly show Load More button when party size exceeds party limit. * Fixed View Party button to properly open party Fixed View Party button to properly open party members list on refreshing the main page, this bug was caused by previous commit. * Fixed SelectMembersModal to properly show Load More button Fixed SelectMembersModal (the modal that apperas when casting cards/specials on party member) to properly show Load More button when party size exceeds party limit * fix(test): limit now technically 29 plus leader * fix(test): adjust for tweakage Co-authored-by: Sabe Jones <sabrecat@gmail.com>
This commit is contained in:
@@ -145,6 +145,9 @@ export default {
|
||||
currentWidth: 0,
|
||||
inviteModalGroup: undefined,
|
||||
inviteModalGroupType: undefined,
|
||||
group: {},
|
||||
members: [],
|
||||
membersLoaded: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -236,14 +239,26 @@ export default {
|
||||
this.$root.$emit('bv::show::modal', 'create-party-modal');
|
||||
}
|
||||
},
|
||||
async showPartyMembers () {
|
||||
const party = await this.$store.dispatch('party:getParty');
|
||||
loadMembers (payload = null) {
|
||||
// Remove unnecessary data
|
||||
if (payload && payload.challengeId) {
|
||||
delete payload.challengeId;
|
||||
}
|
||||
|
||||
return this.$store.dispatch('members:getGroupMembers', payload);
|
||||
},
|
||||
async showPartyMembers () {
|
||||
this.group = await this.$store.dispatch('party:getParty');
|
||||
this.group = this.$store.state.party.data;
|
||||
this.membersLoaded = true;
|
||||
this.members = this.partyMembers;
|
||||
this.$store.state.memberModalOptions.loading = false;
|
||||
this.$root.$emit('habitica:show-member-modal', {
|
||||
groupId: party.data._id,
|
||||
viewingMembers: this.partyMembers,
|
||||
group: party.data,
|
||||
fetchMoreMembers: p => this.$store.dispatch('members:getGroupMembers', p),
|
||||
groupId: this.group._id,
|
||||
group: this.group,
|
||||
memberCount: this.group.memberCount,
|
||||
viewingMembers: this.members,
|
||||
fetchMoreMembers: this.loadMembers,
|
||||
});
|
||||
},
|
||||
setPartyMembersWidth ($event) {
|
||||
|
||||
Reference in New Issue
Block a user