1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-19 21:10:49 +01:00

refactor: riordinamento azioni di gruppo standard

This commit is contained in:
loviuz 2025-02-15 21:22:15 +01:00
parent 3f6f1549d9
commit 9eb63c33f2
7 changed files with 97 additions and 98 deletions

View File

@ -99,25 +99,6 @@ switch (post('op')) {
$operations = [];
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
'data' => [
'msg' => tr('Vuoi davvero eliminare le anagrafiche selezionate?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-danger',
],
];
$operations['export-csv'] = [
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta selezionati').'</span>',
'data' => [
'msg' => tr('Vuoi esportare un CSV con le anagrafiche selezionate?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-success',
'blank' => true,
],
];
$operations['ricerca-coordinate'] = [
'text' => '<span><i class="fa fa-map"></i> '.tr('Ricerca coordinate').'</span>',
'data' => [
@ -145,4 +126,25 @@ $operations['aggiorna-listino'] = [
],
];
$operations['export-csv'] = [
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta').'</span>',
'data' => [
'msg' => tr('Vuoi esportare un CSV con le anagrafiche selezionate?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-success',
'blank' => true,
],
];
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
'data' => [
'msg' => tr('Vuoi davvero eliminare le anagrafiche selezionate?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-danger',
],
];
return $operations;

View File

@ -597,27 +597,6 @@ $operations['crea-preventivo'] = [
],
];
if (App::debug()) {
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
'data' => [
'msg' => tr('Vuoi davvero eliminare gli articoli selezionati?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-danger',
],
];
}
$operations['export-csv'] = [
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta selezionati').'</span>',
'data' => [
'msg' => tr('Vuoi esportare un CSV con gli articoli selezionati?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-success',
'blank' => true,
],
];
$operations['set-acquisto-ifzero'] = [
'text' => '<span><i class="fa fa-refresh"></i> '.tr('Imposta prezzo di acquisto da fattura ').'</span>',
'data' => [
@ -676,4 +655,23 @@ $operations['change-attivo'] = [
],
];
$operations['export-csv'] = [
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta').'</span>',
'data' => [
'msg' => tr('Vuoi esportare un CSV con gli articoli selezionati?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-success',
'blank' => true,
],
];
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
'data' => [
'msg' => tr('Vuoi davvero eliminare gli articoli selezionati?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-danger',
],
];
return $operations;

View File

@ -179,17 +179,6 @@ switch (post('op')) {
break;
}
if (App::debug()) {
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
'data' => [
'msg' => tr('Vuoi davvero eliminare i ddt selezionati?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-danger',
],
];
}
$operations['crea_fattura'] = [
'text' => '<span><i class="fa fa-file-code-o"></i> '.tr('Fattura _TYPE_', ['_TYPE_' => strtolower((string) $module->getTranslation('title'))]),
'data' => [
@ -216,4 +205,13 @@ $operations['cambia_stato'] = [
],
];
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
'data' => [
'msg' => tr('Vuoi davvero eliminare i ddt selezionati?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-danger',
],
];
return $operations;

View File

@ -669,19 +669,6 @@ if ($module->name == 'Fatture di vendita') {
];
}
$operations['copy-bulk'] = [
'text' => '<span><i class="fa fa-copy"></i> '.tr('Duplica selezionati').'</span>',
'data' => [
'msg' => tr('Vuoi davvero duplicare le righe selezionate?').'<br><br>{[ "type": "select", "label": "'.tr('Fattura in avanti di').'", "name": "skip_time", "required": 1, "values": "list=\"Giorno\":\"'.tr('Un giorno').'\", \"Settimana\":\"'.tr('Una settimana').'\", \"Mese\":\"'.tr('Un mese').'\", \"Anno\":\"'.tr('Un anno').'\" ", "value": "Giorno" ]}<br>{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "ajax-source": "segmenti", "select-options": '.json_encode(['id_module' => $id_module, 'is_sezionale' => 1]).', "value": "'.$_SESSION['module_'.$id_module]['id_segment'].'", "select-options-escape": true ]}<br>{[ "type": "checkbox", "label": "'.tr('Aggiungere i riferimenti ai documenti esterni?').'", "placeholder": "'.tr('Aggiungere i riferimenti ai documenti esterni?').'", "name": "riferimenti" ]}',
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-warning',
],
];
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
];
if ($dir == 'entrata') {
$operations['change-stato'] = [
'text' => '<span><i class="fa fa-refresh"></i> '.tr('Emetti fatture').'</span>',
@ -694,16 +681,6 @@ if ($dir == 'entrata') {
];
}
$operations['export-csv'] = [
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta selezionati').'</span>',
'data' => [
'msg' => tr('Vuoi esportare un CSV con le fatture selezionate?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-success',
'blank' => true,
],
];
if ($module->name == 'Fatture di vendita') {
$operations['export-bulk'] = [
'text' => '<span class="'.((!extension_loaded('zip')) ? 'text-muted disabled' : '').'"><i class="fa fa-file-archive-o"></i> '.tr('Esporta stampe').'</span>',
@ -785,4 +762,28 @@ if (Interaction::isEnabled()) {
];
}
$operations['export-csv'] = [
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta').'</span>',
'data' => [
'msg' => tr('Vuoi esportare un CSV con le fatture selezionate?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-success',
'blank' => true,
],
];
$operations['copy-bulk'] = [
'text' => '<span><i class="fa fa-copy"></i> '.tr('Duplica').'</span>',
'data' => [
'msg' => tr('Vuoi davvero duplicare le righe selezionate?').'<br><br>{[ "type": "select", "label": "'.tr('Fattura in avanti di').'", "name": "skip_time", "required": 1, "values": "list=\"Giorno\":\"'.tr('Un giorno').'\", \"Settimana\":\"'.tr('Una settimana').'\", \"Mese\":\"'.tr('Un mese').'\", \"Anno\":\"'.tr('Un anno').'\" ", "value": "Giorno" ]}<br>{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "ajax-source": "segmenti", "select-options": '.json_encode(['id_module' => $id_module, 'is_sezionale' => 1]).', "value": "'.$_SESSION['module_'.$id_module]['id_segment'].'", "select-options-escape": true ]}<br>{[ "type": "checkbox", "label": "'.tr('Aggiungere i riferimenti ai documenti esterni?').'", "placeholder": "'.tr('Aggiungere i riferimenti ai documenti esterni?').'", "name": "riferimenti" ]}',
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-warning',
],
];
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
];
return $operations;

View File

@ -65,7 +65,7 @@ switch (post('op')) {
}
$operations['export-csv'] = [
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta selezionati').'</span>',
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta').'</span>',
'data' => [
'msg' => tr('Vuoi esportare un CSV con tutti gli impianti?'),
'button' => tr('Procedi'),
@ -75,7 +75,7 @@ $operations['export-csv'] = [
];
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
'data' => [
'msg' => tr('Vuoi davvero eliminare gli impianti selezionati?'),
'button' => tr('Procedi'),

View File

@ -452,27 +452,6 @@ $operations['cambia_stato'] = [
],
];
$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,
],
];
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
];
$operations['export-bulk'] = [
'text' => '<span><i class="fa fa-file-archive-o"></i> '.tr('Esporta stampe'),
'data' => [
@ -531,4 +510,25 @@ $operations['stampa-riepilogo'] = [
],
];
$operations['copy-bulk'] = [
'text' => '<span><i class="fa fa-clone"></i> '.tr('Duplica'),
'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,
],
];
$operations['delete-bulk'] = [
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
];
return $operations;

View File

@ -51,7 +51,7 @@ switch (post('op')) {
}
$bulk = [
'delete-bulk' => tr('Elimina selezionati'),
'delete-bulk' => tr('Elimina'),
];
return $bulk;