gestione gare pubbliche
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.
 
 
 
 
 

149 righe
5.5 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$id_modulo = "contratti";
$cmd_info = Modulo::getInfo($id_modulo);
$codice_classe_documentale = $_GET['codice_classe_documentale'];
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice) && $_SESSION["utente"]->permission('contratti.documentale')) {
$contratto = stipula::init($_GET["codice_contratto"]);
if (!empty($contratto)) {
$managerRichieste = RichiestaDocumentale::init($contratto);
$titolo_modulo = __('Richiesta Documentale Contratti');
$breadcrumb = array();
$breadcrumb["/".$radice."/"] = Modulo::getInfo($radice)["titolo"];
$breadcrumb = $contratto->getBreadcrumb($breadcrumb);
$breadcrumb["/".$radice."/panel.php?codice=".$contratto->info["codice"]] = __("Pannello");
$breadcrumb["/".$radice."/documentale/panel.php?codice=".$contratto->info['codice']] = __('Monitoraggio Documentale');
$breadcrumb[""] = $titolo_modulo;
include_once ($beRoot."/layout/top.php");
?>
<h1 class="my-5">
<?= $titolo_modulo ?>
</h1>
<?
$richieste = $managerRichieste->getRichieste(['codice_classe_documentale' => $codice_classe_documentale, '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 id="stato-<?= $stat ?>-button" class="btn btn-light" style="border-bottom: 5px solid <?= $stato["color"] ?>" >
<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-primary"><?= $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><?= __("Documentale Contratto") ?></th>
<th><?= __("Operatore Economico") ?></th>
<th><?= __("Bloccante") ?></th>
<th><?= __("Data Richiesta") ?></th>
<th><?= __("Stato Risposte") ?></th>
<th width="10"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<script>
var table = $("#tab-data").DataTable({
"processing": true,
"serverSide": true,
"filter": false,
"language": {
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang"
},
"ajax": {
"url": "tables/table.php",
"data": function (d) {
d.stato = $('input[name=status]:checked').val();
d.codice_contratto = <?= $contratto->info['codice'] ?>;
d.codice_classe_documentale = <?= $codice_classe_documentale ?>
}
},
"order": [[5,'desc']],
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']],
"columns": [
{ "orderable": false },
{ "orderable": false },
{ "orderable": false },
{ "orderable": false },
{ "orderable": true },
{ "orderable": false },
{ "orderable": false },
]
});
$(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();
}
?>