diff --git a/public/site/config/routes/validate-brief.php b/public/site/config/routes/validate-brief.php index 342e6f8..cca9907 100644 --- a/public/site/config/routes/validate-brief.php +++ b/public/site/config/routes/validate-brief.php @@ -16,6 +16,9 @@ return [ 'isValidated' => 'true' ]); + $timezone = new DateTimeZone('Europe/Paris'); + $dateTime = new DateTime('now', $timezone); + $notification = [ 'location' => [ 'href' => (string) $href, @@ -24,7 +27,7 @@ return [ 'uri' => (string) $project->url() ] ], - 'date' => $newPage->modified('YYYY-MM-DD'), + 'date' => $dateTime->format('Y-m-d\TH:i:sP'), 'author' => [ 'name' => (string) kirby()->user()->name(), 'email' => (string) kirby()->user()->email(), diff --git a/src/views/Notifications.vue b/src/views/Notifications.vue index f7a5e53..8c0be33 100644 --- a/src/views/Notifications.vue +++ b/src/views/Notifications.vue @@ -137,11 +137,9 @@ const tabs = computed(() => { }); const sortedNotifications = computed(() => { - const sortedNotifications = notifications.value.sort((a, b) => { - dayjs(b.date).diff(dayjs(a.date)); + return [...notifications.value].sort((a, b) => { + return dayjs(b.date).diff(dayjs(a.date)); }); - - return sortedNotifications; }); function changeTab(newValue) {