Hiding popunder if challenge data is incomplete (#10284)

* removing file that only contained a reference to a missing folder

* fixing typo

* using full dates to avoid moment warning in tests

* more typos

* sending an empty string to vue bootstrap tooltip (disabling it) if no challenge short name is set
This commit is contained in:
Brian Fenton
2018-04-28 10:38:38 -05:00
committed by Matteo Pagliazzi
parent 403ac1ab7e
commit c6c9503e22
7 changed files with 13 additions and 11 deletions

View File

@@ -81,7 +81,7 @@
span.m-0(v-if="task.up && task.down")  | 
span.m-0(v-if="task.down") -{{task.counterDown}}
.d-flex.align-items-center(v-if="task.challenge && task.challenge.id")
.svg-icon.challenge(v-html="icons.challenge", v-if='!task.challenge.broken', v-b-tooltip.hover.bottom="`${task.challenge.shortName}`")
.svg-icon.challenge(v-html="icons.challenge", v-if='!task.challenge.broken', v-b-tooltip.hover.bottom="shortName")
.svg-icon.challenge.broken(v-html="icons.brokenChallengeIcon", v-if='task.challenge.broken', @click='handleBrokenTask(task)', v-b-tooltip.hover.bottom="$t('brokenChaLink')")
.d-flex.align-items-center(v-if="hasTags", :id="`tags-icon-${task._id}`")
.svg-icon.tags(v-html="icons.tags")
@@ -627,6 +627,11 @@ export default {
hasTags () {
return this.task.tags && this.task.tags.length > 0;
},
shortName () {
if (this.task.challenge.broken) return '';
return this.task.challenge.shortName ? this.task.challenge.shortName.toString() : '';
},
},
methods: {
...mapActions({