diff options
author | James Lopez <james@jameslopez.es> | 2016-11-29 12:42:01 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-29 12:42:01 +0100 |
commit | e40172548bcbb5af3657c679ca304016ba280b4c (patch) | |
tree | 2e6a5ed8b98b40634c243b75b8a2dc465addcb25 | |
parent | a32dd93a4c5c0ae647beac425ed23e4b9c3d27f2 (diff) | |
parent | 8b265aa3cadf9a9c4727495ff4fa9f2aa3a39375 (diff) | |
download | gitlab-ce-e40172548bcbb5af3657c679ca304016ba280b4c.tar.gz |
Merge remote-tracking branch 'origin/fix/ca-no-date' into fix/ca-no-datefix/ca-no-date
-rw-r--r-- | app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 index b9675f50e31..0d85e1a4678 100644 --- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 @@ -10,10 +10,15 @@ }, template: ` <span class="total-time"> - <template v-if="time.days">{{ time.days }} <span>{{ time.days === 1 ? 'day' : 'days' }}</span></template> - <template v-if="time.hours">{{ time.hours }} <span>hr</span></template> - <template v-if="time.mins && !time.days">{{ time.mins }} <span>mins</span></template> - <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>s</span></template> + <template v-if="Object.keys(time).length"> + <template v-if="time.days">{{ time.days }} <span>{{ time.days === 1 ? 'day' : 'days' }}</span></template> + <template v-if="time.hours">{{ time.hours }} <span>hr</span></template> + <template v-if="time.mins && !time.days">{{ time.mins }} <span>mins</span></template> + <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>s</span></template> + </template> + <template v-else> + -- + </template> </span> `, }); |