Skip to content

Commit

Permalink
Ordinamento azioni di gruppo Attività
Browse files Browse the repository at this point in the history
  • Loading branch information
Pek5892 committed Aug 7, 2024
1 parent aff534e commit 78f7ef6
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions modules/interventi/bulk.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,35 @@
break;
}

$operations['cambia_stato'] = [
'text' => '<span><i class="fa fa-refresh"></i> '.tr('Cambia stato'),
'data' => [
'title' => tr('Vuoi davvero cambiare lo stato per questi interventi?'),
'msg' => tr('Seleziona lo stato in cui spostare tutti gli interventi non completati').'.<br>
<br>{[ "type": "select", "label": "'.tr('Stato').'", "name": "id_stato", "required": 1, "values": "query=SELECT `in_statiintervento`.`id`, `title` as descrizione, `colore` AS _bgcolor_ FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento`.`id` = `in_statiintervento_lang`.`id_record` AND `in_statiintervento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`" ]}',
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-warning',
'blank' => false,
],
];

$operations['copy-bulk'] = [
'text' => '<span><i class="fa fa-clone"></i> '.tr('Duplica attività'),
'data' => [
'title' => tr('Vuoi davvero fare una copia degli interventi selezionati?'),
'msg' => '<br>{[ "type": "timestamp", "label": "'.tr('Data/ora richiesta').'", "name": "data_richiesta", "required": 0, "value": "-now-", "required":1 ]}
<br>{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatointervento", "required": 1, "values": "query=SELECT `in_statiintervento`.`id`, `title` as descrizione, `colore` AS _bgcolor_ FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento`.`id` = `in_statiintervento_lang`.`id_record` AND `in_statiintervento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`", "value": "" ]}
<br>{[ "type":"checkbox", "label":"'.tr('Duplica righe').'", "name":"righe", "value":"" ]}
<br>{[ "type":"checkbox", "label":"'.tr('Duplica sessioni').'", "name":"sessioni", "value":"" ]}
<br>{[ "type":"checkbox", "label":"'.tr('Duplica impianti').'", "name":"impianti", "value":"" ]}
<br>{[ "type":"checkbox", "label":"'.tr('Duplica allegati').'", "name":"allegati", "value":"" ]}
<style>.swal2-modal{ width:600px !important; }</style>',
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-warning',
'blank' => false,
],
];

// TODO: 06/08/2024 Migliorare e portare in versione stabile
if (App::debug()) {
$operations['delete-bulk'] = [
Expand Down Expand Up @@ -443,32 +472,24 @@
],
];

$operations['cambia_stato'] = [
'text' => '<span><i class="fa fa-refresh"></i> '.tr('Cambia stato'),
$operations['firma-intervento'] = [
'text' => '<span><i class="fa fa-pencil"></i> '.tr('Firma interventi').'</span>',
'data' => [
'title' => tr('Vuoi davvero cambiare lo stato per questi interventi?'),
'msg' => tr('Seleziona lo stato in cui spostare tutti gli interventi non completati').'.<br>
<br>{[ "type": "select", "label": "'.tr('Stato').'", "name": "id_stato", "required": 1, "values": "query=SELECT `in_statiintervento`.`id`, `title` as descrizione, `colore` AS _bgcolor_ FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento`.`id` = `in_statiintervento_lang`.`id_record` AND `in_statiintervento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`" ]}',
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-warning',
'blank' => false,
'title' => tr('Firma'),
'type' => 'modal',
'origine' => 'interventi',
'url' => $module->fileurl('modals/firma.php'),
],
];

$operations['copy-bulk'] = [
'text' => '<span><i class="fa fa-clone"></i> '.tr('Duplica attività'),
$operations['send-mail'] = [
'text' => '<span><i class="fa fa-envelope"></i> '.tr('Invia mail').'</span>',
'data' => [
'title' => tr('Vuoi davvero fare una copia degli interventi selezionati?'),
'msg' => '<br>{[ "type": "timestamp", "label": "'.tr('Data/ora richiesta').'", "name": "data_richiesta", "required": 0, "value": "-now-", "required":1 ]}
<br>{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatointervento", "required": 1, "values": "query=SELECT `in_statiintervento`.`id`, `title` as descrizione, `colore` AS _bgcolor_ FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento`.`id` = `in_statiintervento_lang`.`id_record` AND `in_statiintervento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`", "value": "" ]}
<br>{[ "type":"checkbox", "label":"'.tr('Duplica righe').'", "name":"righe", "value":"" ]}
<br>{[ "type":"checkbox", "label":"'.tr('Duplica sessioni').'", "name":"sessioni", "value":"" ]}
<br>{[ "type":"checkbox", "label":"'.tr('Duplica impianti').'", "name":"impianti", "value":"" ]}
<br>{[ "type":"checkbox", "label":"'.tr('Duplica allegati').'", "name":"allegati", "value":"" ]}
<style>.swal2-modal{ width:600px !important; }</style>',
'button' => tr('Procedi'),
'title' => tr('Inviare mail?'),
'msg' => tr('Per ciascuna attività selezionata, verrà inviata una mail').'<br><br>
{[ "type": "select", "label": "'.tr('Template').'", "name": "id_template", "required": "1", "values": "query=SELECT `em_templates`.`id`, `em_templates_lang`.`title` AS descrizione FROM `em_templates` LEFT JOIN `em_templates_lang` ON (`em_templates`.`id` = `em_templates_lang`.`id_record` AND `em_templates_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `id_module`='.prepare($id_module).' AND `deleted_at` IS NULL;" ]}',
'button' => tr('Invia'),
'class' => 'btn btn-lg btn-warning',
'blank' => false,
],
];

Expand All @@ -483,25 +504,4 @@
],
];

$operations['send-mail'] = [
'text' => '<span><i class="fa fa-envelope"></i> '.tr('Invia mail').'</span>',
'data' => [
'title' => tr('Inviare mail?'),
'msg' => tr('Per ciascuna attività selezionata, verrà inviata una mail').'<br><br>
{[ "type": "select", "label": "'.tr('Template').'", "name": "id_template", "required": "1", "values": "query=SELECT `em_templates`.`id`, `em_templates_lang`.`title` AS descrizione FROM `em_templates` LEFT JOIN `em_templates_lang` ON (`em_templates`.`id` = `em_templates_lang`.`id_record` AND `em_templates_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `id_module`='.prepare($id_module).' AND `deleted_at` IS NULL;" ]}',
'button' => tr('Invia'),
'class' => 'btn btn-lg btn-warning',
],
];

$operations['firma-intervento'] = [
'text' => '<span><i class="fa fa-pencil"></i> '.tr('Firma interventi').'</span>',
'data' => [
'title' => tr('Firma'),
'type' => 'modal',
'origine' => 'interventi',
'url' => $module->fileurl('modals/firma.php'),
],
];

return $operations;

0 comments on commit 78f7ef6

Please sign in to comment.