Client Fixed (#9017)

* fix spacing between rewards and items

* fix rewards description

* rewards cost in bold

* fix gp notifications

* fix dailies gray text

* fix cancel in task edit modal

* tags: use AND not OR for filtering

* fix tasksDefaults so that monthlies can be created correctly

* tags: usable if no task selected, saving checklist and tags saved the one being added without requiting to press enter

* remove tags from tasks when they are deleted

* fix tags removal when multiple tags are deleted and fix tags editing
This commit is contained in:
Matteo Pagliazzi
2017-09-02 18:08:32 +02:00
committed by GitHub
parent c2aaa9b592
commit 0424d214c5
11 changed files with 92 additions and 60 deletions

View File

@@ -18,7 +18,7 @@
@editTask="editTask",
:group='group',
)
template(v-if="isUser === true && type === 'reward' && activeFilter.label !== 'custom'")
template(v-if="hasRewardsList")
.reward-items
shopItem(
v-for="reward in inAppRewards",
@@ -31,7 +31,7 @@
.column-background(
v-if="isUser === true",
:class="{'initial-description': tasks[`${type}s`].length === 0}",
:class="{'initial-description': initialColumnDescription}",
ref="columnBackground",
)
.svg-icon(v-html="icons[type]", :class="`icon-${type}`", v-once)
@@ -46,7 +46,7 @@
height: 556px;
}
.task + .reward-items {
.task-wrapper + .reward-items {
margin-top: 16px;
}
@@ -243,6 +243,17 @@ export default {
inAppRewards () {
return inAppRewards(this.user);
},
hasRewardsList () {
return this.isUser === true && this.type === 'reward' && this.activeFilter.label !== 'custom';
},
initialColumnDescription () {
// Show the column description in the middle only if there are no elements (tasks or in app items)
if (this.hasRewardsList) {
if (this.inAppRewards && this.inAppRewards.length >= 0) return false;
}
return this.tasks[`${this.type}s`].length === 0;
},
},
watch: {
taskList: {
@@ -299,11 +310,11 @@ export default {
const selectedTags = this.selectedTags;
if (selectedTags && selectedTags.length > 0) {
const hasSelectedTag = task.tags.find(tagId => {
return selectedTags.indexOf(tagId) !== -1;
const hasAllSelectedTag = selectedTags.every(tagId => {
return task.tags.indexOf(tagId) !== -1;
});
if (!hasSelectedTag) return false;
if (!hasAllSelectedTag) return false;
}
// Text