Don't show duration on scheduled campaigns that are finished. Closes #701.

This commit is contained in:
Kailash Nadh 2022-03-02 21:22:44 +05:30
parent 8d6e475479
commit b4c716302f
2 changed files with 7 additions and 2 deletions

View file

@ -49,6 +49,8 @@ export default class Utils {
}
}
getDate = (d) => dayjs(d);
// Parses an ISO timestamp to a simpler form.
niceDate = (stamp, showTime) => {
if (!stamp) {

View file

@ -61,8 +61,11 @@
<b-tooltip :label="$t('scheduled')" type="is-dark">
<span class="is-size-7 has-text-grey scheduled">
<b-icon icon="alarm" size="is-small" />
{{ $utils.duration(Date(), props.row.sendAt, true) }}
<br />{{ $utils.niceDate(props.row.sendAt, true) }}
<span v-if="!isDone(props.row) && !isRunning(props.row)">
{{ $utils.duration(new Date(), props.row.sendAt, true) }}
<br />
</span>
{{ $utils.niceDate(props.row.sendAt, true) }}
</span>
</b-tooltip>
</p>