Skip to content

Commit

Permalink
Don't show duration on scheduled campaigns that are finished. Closes k…
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Mar 2, 2022
1 parent 8d6e475 commit b4c7163
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions frontend/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/views/Campaigns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit b4c7163

Please sign in to comment.