diff options
Diffstat (limited to 'src/views/_sila/Overview/OverviewQuickLinks.vue')
-rw-r--r-- | src/views/_sila/Overview/OverviewQuickLinks.vue | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/views/_sila/Overview/OverviewQuickLinks.vue b/src/views/_sila/Overview/OverviewQuickLinks.vue index ca069fe0..e7b6b03e 100644 --- a/src/views/_sila/Overview/OverviewQuickLinks.vue +++ b/src/views/_sila/Overview/OverviewQuickLinks.vue @@ -4,12 +4,12 @@ <b-col sm="6" lg="9" class="mb-2 mt-2"> <dl> <dt>{{ $t('pageOverview.bmcTime') }}</dt> - <dd v-if="liveBmcTime" data-test-id="overviewQuickLinks-text-bmcTime"> - {{ liveBmcTime | formatDate }} - <span style="display: inline-block; width: 68px">{{ - liveClock - }}</span> - {{ isUtcDisplay ? $t('pageProfileSettings.UTC') : timezone }} + <dd + v-if="liveDate && liveTime" + data-test-id="overviewQuickLinks-text-bmcTime" + > + {{ liveDate }} {{ liveTime }} + <!--{{ isUtcDisplay ? $t('pageProfileSettings.UTC') : timezone }}--> </dd> <dd v-else>--</dd> </dl> @@ -41,15 +41,26 @@ export default { }, mixins: [BVToastMixin, LocalTimezoneLabelMixin], computed: { - liveBmcTime() { - if (!this.$store.getters['global/liveBmcTime']) { - return; - } - return new Date(this.$store.getters['global/liveBmcTime']); + timeZone() { + return this.$store.getters['global/timeZone']; + }, + liveDate() { + return this.$store.getters['global/liveDate']; }, liveClock() { return this.$store.getters['global/liveClock']; }, + liveTime() { + if (!this.liveClock || !this.timeZone) { + return; + } + + return ( + this.$store.getters['global/liveClock'] + + ' ' + + this.timeZone.split(' ')[0] + ); + }, timezone() { return this.localOffset(); }, |