mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 14:24:24 +00:00
FIX: Ouvert depuis
This commit is contained in:
parent
d00b76ffcd
commit
f0045edd6c
@ -22,7 +22,7 @@
|
||||
<h3 class="fst-italic" v-if="ticket.createdAt">
|
||||
{{
|
||||
$t("banner.since", {
|
||||
days: getSince(ticket.createdAt),
|
||||
count: getSince(ticket.createdAt),
|
||||
})
|
||||
}}
|
||||
</h3>
|
||||
@ -128,9 +128,10 @@ export default defineComponent({
|
||||
() => store.getters.getDistinctAddressesHistory
|
||||
);
|
||||
|
||||
function getSince(createdAt: DateTime) {
|
||||
function getSince(createdAt: any) {
|
||||
const today = new Date();
|
||||
const date = new Date(createdAt.datetime);
|
||||
const date = new Date(createdAt.date);
|
||||
|
||||
const timeDiff = Math.abs(today.getTime() - date.getTime());
|
||||
const daysDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));
|
||||
return daysDiff;
|
||||
|
@ -42,7 +42,7 @@ const messages = {
|
||||
caller: "Appelant",
|
||||
speaker: "Intervenant",
|
||||
open: "Ouvert",
|
||||
since: "Depuis 1 jour | Depuis {days} jour(s)",
|
||||
since: "Aucun jour | Depuis 1 jour | Depuis {count} jours",
|
||||
no_motive: "Pas de motif",
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user