mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
fix(needs-work): don't show Gold/Experience depletion for manager
This commit is contained in:
@@ -1162,6 +1162,18 @@ export default {
|
|||||||
async score (direction) {
|
async score (direction) {
|
||||||
if (this.showTaskLockIcon) return;
|
if (this.showTaskLockIcon) return;
|
||||||
if (this.task.type === 'habit' && !this.task[direction]) return;
|
if (this.task.type === 'habit' && !this.task[direction]) return;
|
||||||
|
if (
|
||||||
|
this.isGroupTask && direction === 'down'
|
||||||
|
&& ['todo', 'daily'].indexOf(this.task.type) !== -1
|
||||||
|
&& this.task.group.assignedUsers && !this.task.group.assignedUsers[this.user._id]
|
||||||
|
) {
|
||||||
|
this.$store.dispatch('tasks:needsWork', {
|
||||||
|
taskId: this.task._id,
|
||||||
|
userId: keys(this.task.group.assignedUsers)[0],
|
||||||
|
});
|
||||||
|
this.task.completed = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.isYesterdaily === true) {
|
if (this.isYesterdaily === true) {
|
||||||
await this.beforeTaskScore(this.task);
|
await this.beforeTaskScore(this.task);
|
||||||
this.task.completed = !this.task.completed;
|
this.task.completed = !this.task.completed;
|
||||||
|
|||||||
Reference in New Issue
Block a user