Add published time for announcements
This commit is contained in:
parent
7a73f2fcd2
commit
68ef7e4e65
@ -33,6 +33,14 @@ const Announcement = {
|
|||||||
isRead () {
|
isRead () {
|
||||||
return this.announcement.read
|
return this.announcement.read
|
||||||
},
|
},
|
||||||
|
publishedAt () {
|
||||||
|
const time = this.announcement['published_at']
|
||||||
|
if (!time) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.formatTimeOrDate(time, localeService.internalToBrowserLocale(this.$i18n.locale))
|
||||||
|
},
|
||||||
startsAt () {
|
startsAt () {
|
||||||
const time = this.announcement['starts_at']
|
const time = this.announcement['starts_at']
|
||||||
if (!time) {
|
if (!time) {
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
v-if="!editing"
|
v-if="!editing"
|
||||||
class="times"
|
class="times"
|
||||||
>
|
>
|
||||||
|
<span v-if="publishedAt">
|
||||||
|
{{ $t('announcements.published_time_display', { time: publishedAt }) }}
|
||||||
|
</span>
|
||||||
<span v-if="startsAt">
|
<span v-if="startsAt">
|
||||||
{{ $t('announcements.start_time_display', { time: startsAt }) }}
|
{{ $t('announcements.start_time_display', { time: startsAt }) }}
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user