mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-22 20:09:58 +01:00
Rimosso stato intervento default in fase di aggiunta + union select con zz_segments per modules
This commit is contained in:
parent
acf1db245e
commit
4f7da8b536
@ -10,7 +10,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 pull-right">
|
||||
{[ "type": "select", "label": "", "name": "idsezionale_", "required": 0, "class": "", "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module = '<?php echo $id_module; ?>'", "value": "<?php echo $_SESSION['m'.$id_module]['id_segment']; ?>", "extra": "" ]}
|
||||
{[ "type": "select", "label": "", "name": "id_segment_", "required": 0, "class": "", "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module = '<?php echo $id_module; ?>'", "value": "<?php echo $_SESSION['m'.$id_module]['id_segment']; ?>", "extra": "" ]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#idsezionale_").on("change", function(){
|
||||
$("#id_segment_").on("change", function(){
|
||||
|
||||
if ($(this).val()<1){
|
||||
session_set('<?php echo 'm'.$id_module; ?>,id_segment', '', 1, 1);
|
||||
|
@ -4,8 +4,6 @@ include_once __DIR__.'/../../core.php';
|
||||
|
||||
$disabled_fields = [];
|
||||
|
||||
$idstatointervento = 'CALL';
|
||||
|
||||
// rimuovo session usate sui select combinati (sedi, preventivi, contratti, impianti)
|
||||
unset($_SESSION['superselect']['idanagrafica']);
|
||||
unset($_SESSION['superselect']['idsede']);
|
||||
|
@ -38,7 +38,7 @@ class Modules
|
||||
|
||||
$user = Auth::user();
|
||||
|
||||
$results = $database->fetchArray('SELECT * FROM `zz_modules` LEFT JOIN (SELECT `idmodule`, `permessi` FROM `zz_permissions` WHERE `idgruppo` = (SELECT `idgruppo` FROM `zz_users` WHERE `id` = '.prepare($user['id_utente']).')) AS `zz_permissions` ON `zz_modules`.`id`=`zz_permissions`.`idmodule` LEFT JOIN (SELECT `id_module`, `clause`, `position` FROM `zz_segments`) AS `zz_segments` ON `zz_modules`.`id`=`zz_segments`.`id_module` LEFT JOIN (SELECT `idmodule`, `clause`, `position` FROM `zz_group_module` WHERE `idgruppo` = (SELECT `idgruppo` FROM `zz_users` WHERE `id` = '.prepare($user['id_utente']).') AND `enabled` = 1) AS `zz_group_module` ON `zz_modules`.`id`=`zz_group_module`.`idmodule`');
|
||||
$results = $database->fetchArray('SELECT * FROM `zz_modules` LEFT JOIN (SELECT `idmodule`, `permessi` FROM `zz_permissions` WHERE `idgruppo` = (SELECT `idgruppo` FROM `zz_users` WHERE `id` = '.prepare($user['id_utente']).')) AS `zz_permissions` ON `zz_modules`.`id`=`zz_permissions`.`idmodule` LEFT JOIN (SELECT `idmodule`, `clause`, `position` FROM `zz_group_module` WHERE `idgruppo` = (SELECT `idgruppo` FROM `zz_users` WHERE `id` = '.prepare($user['id_utente']).') AND `enabled` = 1 UNION SELECT `id_module` AS `idmodule`, `clause`, `position` FROM `zz_segments`) AS `zz_group_module` ON `zz_modules`.`id`=`zz_group_module`.`idmodule`');
|
||||
|
||||
$modules = [];
|
||||
$additionals = [];
|
||||
|
Loading…
Reference in New Issue
Block a user