diff --git a/gulpfile.js b/gulpfile.js index a69b4e2f0..60b1b54b7 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -53,7 +53,7 @@ const inquirer = require('inquirer'); const config = { production: 'assets/dist', // Cartella di destinazione development: 'assets/src', // Cartella dei file di personalizzazione - debug: false, + debug: true, nodeDirectory: './node_modules', // Percorso per node_modules paths: { js: 'js', @@ -62,7 +62,7 @@ const config = { fonts: 'fonts' }, babelOptions: { - compact: true, + compact: false, presets: [ ['@babel/env', { modules: false @@ -98,7 +98,9 @@ const JS = gulp.parallel(() => { 'dropzone/dist/dropzone.js', 'autonumeric/dist/autoNumeric.min.js', 'eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js', - 'fullcalendar/dist/fullcalendar.js', + 'fullcalendar-scheduler/index.global.js', + '@fullcalendar/moment/index.global.js', + '@fullcalendar/core/locales/it.global.js', 'geocomplete/jquery.geocomplete.js', 'inputmask/dist/min/jquery.inputmask.bundle.min.js', 'jquery-form/src/jquery.form.js', @@ -161,7 +163,6 @@ const CSS = gulp.parallel(() => { 'dropzone/dist/dropzone.css', 'eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css', 'font-awesome/css/font-awesome.min.css', - 'fullcalendar/dist/fullcalendar.css', 'parsleyjs/src/parsley.css', 'select2/dist/css/select2.min.css', 'sweetalert2/dist/sweetalert2.css', @@ -208,7 +209,6 @@ function srcCSS() { const print = gulp.src([ config.development + '/' + config.paths.css + '/print/*.{css,scss,less,styl}', - config.nodeDirectory + '/fullcalendar/fullcalendar.print.css', ], { allowEmpty: true }) diff --git a/modules/dashboard/ajax.php b/modules/dashboard/ajax.php index 64b4312db..b70dfc3ba 100644 --- a/modules/dashboard/ajax.php +++ b/modules/dashboard/ajax.php @@ -105,12 +105,14 @@ switch (filter('op')) { $results[] = [ 'id' => $sessione['id'], - 'idintervento' => $sessione['idintervento'], - 'idtecnico' => $sessione['idtecnico'], 'title' => (($sessione['is_completato']) ? '' : '').' '.(($sessione['have_attachments']) ? '' : '').($sessione['is_completato'] || $sessione['have_attachments'] ? '
' : '').'Int. '.$sessione['codice'].' '.$sessione['cliente'].'
'.tr('Tecnici').': '.$sessione['nome_tecnico'], 'start' => $sessione['orario_inizio'], 'end' => $sessione['orario_fine'], - 'link' => base_path().'/editor.php?id_module='.$modulo_interventi->id.'&id_record='.$sessione['idintervento'], + 'extendedProps' => [ + 'link' => base_path().'/editor.php?id_module='.$modulo_interventi->id.'&id_record='.$sessione['idintervento'], + 'idintervento' => $sessione['idintervento'], + 'idtecnico' => $sessione['idtecnico'], + ], 'backgroundColor' => $backgroundcolor, 'textColor' => color_inverse($backgroundcolor), 'borderColor' => empty($bordercolor) ? '#FFFFFF' : $bordercolor, @@ -190,13 +192,15 @@ switch (filter('op')) { foreach ($alldays as $evento) { $results[] = [ 'id' => $modulo_eventi->id.'_'.$evento['id'], - 'idintervento' => $evento['id'], - 'idtecnico' => '', 'title' => ''.tr('Evento').': '.$evento['nome'].'
'.tr('Festività').': '.($evento['is_bank_holiday'] ? '' : ''), 'start' => $evento['data'], 'end' => $evento['data'], - 'url' => base_path().'/editor.php?id_module='.$modulo_eventi->id.'&id_record='.$evento['id'], + 'extendedProps' => [ + 'link' => base_path().'/editor.php?id_module='.$modulo_eventi->id.'&id_record='.$evento['id'], + 'idintervento' => $evento['id'], + 'idtecnico' => '', + ], 'backgroundColor' => '#ffebcd', 'textColor' => color_inverse('#ffebcd'), 'borderColor' => '#ffebcd', diff --git a/modules/dashboard/edit.php b/modules/dashboard/edit.php index b6898f55e..34e8608cd 100755 --- a/modules/dashboard/edit.php +++ b/modules/dashboard/edit.php @@ -329,11 +329,11 @@ WHERE (SELECT COUNT(*) FROM in_interventi_tecnici WHERE in_interventi_tecnici.id $vista = setting('Vista dashboard'); if ($vista == 'mese') { - $def = 'month'; + $def = 'dayGridMonth'; } elseif ($vista == 'giorno') { - $def = 'agendaDay'; + $def = 'timeGridWeek'; } elseif ($vista == 'settimana') { - $def = 'agendaWeek'; + $def = 'listWeek'; } else { $def = 'listWeek'; } @@ -341,8 +341,8 @@ if ($vista == 'mese') { $modulo_interventi = Modules::get('Interventi'); echo ' -