Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
183 righe
7.1 KiB
183 righe
7.1 KiB
<? |
|
|
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
|
|
$id_modulo = "contratti"; |
|
$cmd_info = Modulo::getInfo($id_modulo); |
|
if (!empty($_SESSION["utente"]) && $_SESSION['utente']->permission($radice, $_GET['codice'],'classe-documentale')) { |
|
$contratto = stipula::init($_GET["codice"]); |
|
|
|
if (!empty($contratto)) { |
|
|
|
$titolo_modulo = __('Monitoraggio Documentale'); |
|
|
|
$breadcrumb = array(); |
|
$breadcrumb["/".$radice."/"] = Modulo::getInfo($radice)["titolo"]; |
|
$breadcrumb = $contratto->getBreadcrumb($breadcrumb); |
|
$breadcrumb["/".$radice."/panel.php?codice=".$contratto->info["codice"]] = __("Pannello"); |
|
$breadcrumb[""] = $titolo_modulo; |
|
|
|
include_once ($beRoot."/layout/top.php"); |
|
|
|
?> |
|
<h1> |
|
<?= $titolo_modulo ?> |
|
</h1> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid"> |
|
<div class="row justify-content-end align-items-end"> |
|
|
|
<div class="mr-4"> |
|
|
|
<a type="button" class="btn btn-primary text-white mr-1" onclick="showModalWithURL('/backend/contratti/documentale/soggettiAssociati.php?codice=<?= $contratto->info['codice'] ?>&soggetto=10');"> |
|
<span class="fa fa-search mr-1"></span> |
|
<?= __('Anagrafiche associate') ?> |
|
</a> |
|
<a type="button" class="btn btn-primary text-white mr-1" onclick="showModalWithURL('/backend/contratti/documentale/soggettiAssociati.php?codice=<?= $contratto->info['codice'] ?>&soggetto=15');"> |
|
<span class="fa fa-search mr-1"></span> |
|
<?= __('Strumentazione associata') ?> |
|
</a> |
|
</div> |
|
|
|
<div> |
|
|
|
<? if(RichiestaDocumentale::getRichieste(['codice_contratto' => $contratto->info['codice'], 'bozza' => 'S'])){ ?> |
|
<a type="button" class="btn btn-secondary text-white" onclick="showModalWithURL('/backend/contratti/documentale/gestione_bozza/gestione_bozza.php?codice=<?= $contratto->info['codice'] ?>');"> |
|
<span class="fas fa-archive mr-1"></span> |
|
<?= __('Richieste in bozza') ?> |
|
</a> |
|
<? } ?> |
|
|
|
<a type="button" class="btn btn-success text-white" onclick="showModalWithURL('/backend/contratti/documentale/add.php?codice=<?= $contratto->info['codice'] ?>');"> |
|
<span class="fa fa-plus-circle mr-1"></span> |
|
<?= __('Aggiungi Nuovo') ?> |
|
</a> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
</div> |
|
</div> |
|
|
|
<? |
|
$richieste = RichiestaDocumentale::getRichieste(['codice_contratto' => $contratto->info['codice']]); |
|
$richieste = rispostaDocumentale::getBadge($contratto->info['codice'], $richieste, "sa"); |
|
?> |
|
<? if(!empty($richieste)) { ?> |
|
|
|
<div class="btn-group-toggle mb-2" data-toggle="buttons"> |
|
<label id="stato--button" class="btn btn-light active"> |
|
<input type="radio" name="status" value="" onChange='table.draw();' autocomplete="off" checked> |
|
<span class='label-html'> |
|
<?= __("Tutti") ?> |
|
</span> |
|
</label> |
|
<? |
|
foreach(RichiestaDocumentale::getStati("sa") AS $stat => $stato) { |
|
$count = 0; |
|
foreach ($richieste as $richiesta) { |
|
if(!empty($richiesta['statoLabel']) && $richiesta['statoLabel']['key'] == $stat){ |
|
$count++; |
|
}if(!empty($richiesta['statoBadges'])){ |
|
$count += $richiesta['statoBadges'][$stat]['contatori']; |
|
} |
|
} |
|
?> |
|
<label style="border-bottom: 5px solid <?= $stato["color"] ?>" id="stato-<?= $stat ?>-button" class="btn btn-light"> |
|
<input type="radio" name="status" value="<?= $stat ?>" onChange='table.draw();' autocomplete="off" > |
|
<span class='label-html'> |
|
<?= __($stato["titolo"]) ?> |
|
<? |
|
if ($count > 0) { |
|
?> |
|
<span class="badge badge-<?= $stato['class'] ?>"><?= $count ?></span> |
|
<? |
|
} |
|
?> |
|
</span> |
|
</label> |
|
<? |
|
} |
|
?> |
|
</div> |
|
<div class="card mb-2"> |
|
<div class="card-body"> |
|
<div class="table-responsive"> |
|
<h2 id="table-title"></h2> |
|
<table class="table table-striped table-hover" id="tab-data" width="100%"> |
|
<thead> |
|
<tr> |
|
<th width="10"></th> |
|
<th><?= __("Titolo") ?></th> |
|
<th><?= __("Ambito Validità") ?></th> |
|
<th><?= __("Soggetto") ?></th> |
|
<th><?= __('Data') ?> |
|
<th width="170"><?= __("Stato Risposte") ?></th> |
|
<th width="5"></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
</div> |
|
<script> |
|
var table = $("#tab-data").DataTable({ |
|
"processing": true, |
|
"serverSide": true, |
|
"filter": false, |
|
"paging": false, |
|
'searching': true, |
|
"language": { |
|
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang" |
|
}, |
|
"ajax": { |
|
"url": "tables/tablePanel.php", |
|
"data": function (d) { |
|
d.stato = $('input[name=status]:checked').val(); |
|
d.codice_contratto = <?= $contratto->info['codice'] ?>; |
|
} |
|
}, |
|
"order": [[4,'desc']], |
|
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']], |
|
"columns": [ |
|
{ "orderable": false }, |
|
{ "orderable": false }, |
|
{ "orderable": false }, |
|
{ "orderable": false }, |
|
{ "orderable": true }, |
|
{ "orderable": false , "class": "text-nowrap"}, |
|
{ "orderable": false}, |
|
], |
|
"drawCallback": function(settings, json) { |
|
$('[data-toggle="tooltip"]').tooltip(); |
|
} |
|
}); |
|
|
|
$(function(){ |
|
$('#modal-helper').on('shown.bs.modal', function() { |
|
$(document).off('focusin.modal'); |
|
}); |
|
}) |
|
</script> |
|
<?}else{ |
|
alertManager::printWarningBox(__("Nessun risultato")); |
|
}?> |
|
|
|
<? |
|
|
|
|
|
include_once ($beRoot."/layout/bottom.php"); |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/index.php">'; |
|
die(); |
|
} |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/index.php">'; |
|
die(); |
|
} |
|
?>
|
|
|