1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-22 13:26:38 +01:00

fix: gestione eventi ricorrenti in dashboard

This commit is contained in:
valentina 2024-12-11 09:05:45 +01:00
parent 9965cab299
commit ce2728826a
2 changed files with 13 additions and 4 deletions

View File

@ -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;

View File

@ -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' => '<span class="fc-event-title">'.$evento['nome'].'</span>',
'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',