mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Hotfix/oct 24 fixes (#9261)
* Removed max height from text section * Added items to mystery sets * Group manager fixes * Fixed promo code apply
This commit is contained in:
committed by
Sabe Jones
parent
b445bc8261
commit
6bc70ca471
@@ -32,13 +32,20 @@ export default {
|
||||
user: 'user.data',
|
||||
groupPlans: 'groupPlans',
|
||||
}),
|
||||
isLeader () {
|
||||
currentGroup () {
|
||||
let groupFound = this.groupPlans.find(group => {
|
||||
return group._id === this.groupId;
|
||||
});
|
||||
|
||||
if (!groupFound) return false;
|
||||
return groupFound.leader === this.user._id;
|
||||
return groupFound;
|
||||
},
|
||||
isLeader () {
|
||||
if (!this.currentGroup) return false;
|
||||
return this.currentGroup.leader === this.user._id;
|
||||
},
|
||||
isManager () {
|
||||
if (!this.currentGroup) return false;
|
||||
return Boolean(this.currentGroup.managers[this.user._id]);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -40,11 +40,11 @@ div
|
||||
span.dropdown-icon-item
|
||||
.svg-icon.inline(v-html="icons.starIcon")
|
||||
span.text {{$t('promoteToLeader')}}
|
||||
b-dropdown-item(@click='addManager(member)', v-if='isLeader && groupIsSubscribed')
|
||||
b-dropdown-item(@click='addManager(member._id)', v-if='isLeader && groupIsSubscribed')
|
||||
span.dropdown-icon-item
|
||||
.svg-icon.inline(v-html="icons.starIcon")
|
||||
span.text {{$t('addManager')}}
|
||||
b-dropdown-item(@click='removeManager(member)', v-if='isLeader && groupIsSubscribed')
|
||||
b-dropdown-item(@click='removeManager(member._id)', v-if='isLeader && groupIsSubscribed')
|
||||
span.dropdown-icon-item
|
||||
.svg-icon.inline(v-html="icons.removeIcon")
|
||||
span.text {{$t('removeManager2')}}
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
import { mapState } from 'client/libs/store';
|
||||
import notifications from 'client/mixins/notifications';
|
||||
|
||||
export default {
|
||||
mixins: [notifications],
|
||||
data () {
|
||||
return {
|
||||
codes: {
|
||||
@@ -51,10 +53,12 @@ export default {
|
||||
// })
|
||||
},
|
||||
async enterCoupon () {
|
||||
let code = await axios.get(`/api/v3/coupons/enter/${this.couponCode}`);
|
||||
let code = await axios.post(`/api/v3/coupons/enter/${this.couponCode}`);
|
||||
if (!code) return;
|
||||
// @TODO: what needs to be updated? User.sync();
|
||||
// @TODO: mixin Notification.text(env.t('promoCodeApplied'));
|
||||
|
||||
this.$store.state.user.data = code.data.data;
|
||||
|
||||
this.text(this.$t('promoCodeApplied'));
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
}
|
||||
|
||||
.text {
|
||||
max-height: 220px;
|
||||
margin-bottom: 8px;
|
||||
overflow-y: scroll;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -83,7 +83,6 @@
|
||||
@click.prevent.stop="togglePinned(ctx.item)"
|
||||
)
|
||||
span.svg-icon.inline.icon-12.color(v-html="icons.pin")
|
||||
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -219,6 +219,7 @@ module.exports = function getItemInfo (user, type, item, officialPinnedItems, la
|
||||
break;
|
||||
case 'mystery_set':
|
||||
itemInfo = {
|
||||
items: item.items,
|
||||
key: item.key,
|
||||
text: item.text(language),
|
||||
value: 1,
|
||||
|
||||
@@ -1287,7 +1287,7 @@ api.getGroupPlans = {
|
||||
.find({
|
||||
_id: {$in: userGroups},
|
||||
})
|
||||
.select('leaderOnly leader purchased name')
|
||||
.select('leaderOnly leader purchased name managers')
|
||||
.exec();
|
||||
|
||||
let groupPlans = groups.filter(group => {
|
||||
|
||||
Reference in New Issue
Block a user