fix(tasks): don't show reset counter control on group tasks

This commit is contained in:
SabreCat 2022-08-23 12:40:32 -05:00
parent aebf13810f
commit 67ee0b72d3

View file

@ -386,7 +386,7 @@
</div>
</div>
<div
v-if="task.type === 'habit'"
v-if="task.type === 'habit' && !groupId"
class="option mt-3"
>
<div class="form-group">
@ -1092,11 +1092,11 @@ export default {
isChallengeTask () {
return Boolean(this.task.challenge && this.task.challenge.id);
},
onUserPage () {
isUserTask () {
return !this.challengeId && !this.groupId;
},
challengeAccessRequired () {
return this.onUserPage && this.isChallengeTask;
return this.isUserTask && this.isChallengeTask;
},
isOriginalChallengeTask () {
const isUserChallenge = Boolean(this.task.userId);
@ -1113,9 +1113,6 @@ export default {
const type = this.$t(this.task.type);
return this.$t(this.purpose === 'edit' ? 'editATask' : 'createTask', { type });
},
isUserTask () {
return !this.challengeId && !this.groupId;
},
repeatSuffix () {
const { task } = this;