diff --git a/src/components/Feed.vue b/src/components/Feed.vue index c706d3b..63473fa 100644 --- a/src/components/Feed.vue +++ b/src/components/Feed.vue @@ -20,7 +20,7 @@ - {{timeAgo(history.date)}} + {{timeAgo(history.date || history.created)}} @@ -63,7 +63,7 @@ export default { if (hoursDiff < 24) { return `il y a ${hoursDiff} heure(s)` } else { - let daysDiff = date.getDateDiff(date2, date1) + let daysDiff = date.getDateDiff(date2, date1, 'days') return `il y a ${daysDiff} jour(s)` } }, diff --git a/src/layouts/DefaultLayout.vue b/src/layouts/DefaultLayout.vue index 622cc9f..056f1f7 100644 --- a/src/layouts/DefaultLayout.vue +++ b/src/layouts/DefaultLayout.vue @@ -224,12 +224,9 @@ export default { ok: 'Oui, STP', cancel: 'Osef' }) - .then(() => { + .onOk(() => { this.$router.push(`/item/${newItem.ref}`) }) - .catch(() => { - // Picked "Cancel" or dismissed - }) } } }