Browse Source

Fix feed date

Fix redirect to new item
master
mcarquigny 1 week ago
parent
commit
6459dbd68c
  1. 4
      src/components/Feed.vue
  2. 5
      src/layouts/DefaultLayout.vue

4
src/components/Feed.vue

@ -20,7 +20,7 @@
</q-item-section>
<q-item-section side top>
<q-item-label caption>{{timeAgo(history.date)}}</q-item-label>
<q-item-label caption>{{timeAgo(history.date || history.created)}}</q-item-label>
</q-item-section>
</q-item>
</q-list>
@ -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)`
}
},

5
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
})
}
}
}

Loading…
Cancel
Save