From ce2728826a94f64b85d5f1ed44ac772fa9f0e109 Mon Sep 17 00:00:00 2001 From: valentina Date: Wed, 11 Dec 2024 09:05:45 +0100 Subject: [PATCH] fix: gestione eventi ricorrenti in dashboard --- assets/src/css/style.css | 11 ++++++++++- modules/dashboard/ajax.php | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/assets/src/css/style.css b/assets/src/css/style.css index 582a9a2a1..663ddf225 100755 --- a/assets/src/css/style.css +++ b/assets/src/css/style.css @@ -1035,7 +1035,7 @@ table.dataTable { * Colore eventi fullcalendar */ .fc .fc-bg-event { - background: rgba(255, 49, 21, .5); + background: rgba(255, 49, 21, .3); } kbd{ @@ -1662,6 +1662,15 @@ body:not(.sidebar-collapse) .sidebar .nav-treeview .nav-treeview .nav-link { overflow: hidden; } +.fc-event-title { + color: red; + font-weight: bold; +} + +.fc-event { + opacity:1 !important; +} + @media screen and (max-width: 767px) { .navbar-left { display: inline-block; diff --git a/modules/dashboard/ajax.php b/modules/dashboard/ajax.php index ccdb53237..5bbb22f73 100644 --- a/modules/dashboard/ajax.php +++ b/modules/dashboard/ajax.php @@ -198,7 +198,7 @@ switch (filter('op')) { WHERE `zz_events`.`is_bank_holiday` = 0 AND (`zz_events`.`is_recurring` = 1 AND - DAYOFYEAR(`zz_events`.`data`) BETWEEN DAYOFYEAR('.prepare($start).') AND IF(YEAR('.prepare($start).') = YEAR('.prepare($end).'), DAYOFYEAR('.prepare($end).'), DAYOFYEAR('.prepare(date('Y-m-d', strtotime($end.'-1 day'))).')) + DAYOFYEAR(`zz_events`.`data`) BETWEEN DAYOFYEAR('.prepare($start).') AND IF(YEAR('.prepare($start).') = YEAR('.prepare($end).'), DAYOFYEAR('.prepare($end).'), 365 + DAYOFYEAR('.prepare($end).')) ) OR (`zz_events`.`is_recurring` = 0 AND `zz_events`.`data` >= '.prepare($start).' AND `zz_events`.`data` <= '.prepare($end).')'; @@ -541,7 +541,7 @@ switch (filter('op')) { WHERE `zz_events`.`is_bank_holiday` = 1 AND (`zz_events`.`is_recurring` = 1 - AND DAYOFYEAR(`zz_events`.`data`) BETWEEN DAYOFYEAR('.prepare($start).') AND IF(YEAR('.prepare($start).') = YEAR('.prepare($end).'), DAYOFYEAR('.prepare($end).'), DAYOFYEAR('.prepare(date('Y-m-d', strtotime($end.'-1 day'))).')) ) + AND DAYOFYEAR(`zz_events`.`data`) BETWEEN DAYOFYEAR('.prepare($start).') AND IF(YEAR('.prepare($start).') = YEAR('.prepare($end).'), DAYOFYEAR('.prepare($end).'), 365 + DAYOFYEAR('.prepare($end).')) ) OR (`zz_events`.`is_recurring` = 0 AND `zz_events`.`data` >= '.prepare($start).' AND `zz_events`.`data` <= '.prepare($end).')'; @@ -551,7 +551,7 @@ switch (filter('op')) { foreach ($eventi as $evento) { $results[] = [ 'id' => $evento['id'], - 'title' => $evento['nome'], + 'title' => ''.$evento['nome'].'', 'start' => ($evento['is_recurring'] ? date('Y-', strtotime($start)).date('m-d', strtotime((string) $evento['data'])) : $evento['data']), // 'end' => date('Y-m-d', strtotime($evento['data']. '+1 day')), 'display' => 'background',