From bff63e4b5c9aa2a63c51c8aada8fbc1df910e8cb Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 29 Oct 2020 16:54:22 +0100 Subject: [PATCH] Miglioria minore widget note interne --- modules/dashboard/widgets/notifiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/dashboard/widgets/notifiche.php b/modules/dashboard/widgets/notifiche.php index ffb683734..0c2bcbabf 100755 --- a/modules/dashboard/widgets/notifiche.php +++ b/modules/dashboard/widgets/notifiche.php @@ -32,7 +32,7 @@ $notes = collect(); $moduli = Module::getAll()->where('permission', '<>', '-'); foreach ($moduli as $modulo) { - $note = $modulo->notes()->where('notification_date', '>=', date('Y-m-d'))->get(); + $note = $modulo->notes()->whereNotNull('notification_date')->orderBy('notification_date', 'asc')->get(); $notes = $notes->merge($note); } @@ -42,7 +42,7 @@ if (!empty($is_number_request)) { return; } -if (empty($notes)) { +if ($notes->count() < 1) { echo '

'.tr('Non ci sono note da notificare').'.

';