mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
WIP(multiassign): resume shared completion implementation
This commit is contained in:
@@ -15,24 +15,8 @@ export default {
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
async beforeTaskScore (task) {
|
||||
const { user } = this;
|
||||
if (this.castingSpell) return false;
|
||||
|
||||
if (task.group.approval.required && !task.group.approval.approved) {
|
||||
task.group.approval.requested = true;
|
||||
const { data: groupPlans } = await this.$store.dispatch('guilds:getGroupPlans');
|
||||
const groupPlan = groupPlans.find(g => g.id === task.group.id);
|
||||
if (groupPlan) {
|
||||
const managers = Object.keys(groupPlan.managers);
|
||||
managers.push(groupPlan.leader);
|
||||
if (managers.indexOf(user._id) !== -1) {
|
||||
task.group.approval.approved = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
async beforeTaskScore () {
|
||||
return (!this.castingSpell);
|
||||
},
|
||||
playTaskScoreSound (task, direction) {
|
||||
switch (task.type) { // eslint-disable-line default-case
|
||||
|
||||
Reference in New Issue
Block a user