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.
 
 
 
 
 

152 righe
6.6 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (!empty($_SESSION["utente"]->oe) && $_SESSION['ente']->hasModulo('contratti.documentale')) {
$moduloInfo = Modulo::getInfo($_GET["modulo"]);
$contratto = publicStipula::init($_GET['codice_elemento']);
if (!empty($contratto)) {
$managerRichieste = RichiestaDocumentale::init($contratto);
if (!empty($moduloInfo)) {
$breadcrumb = [];
$breadcrumb["/{$_GET["modulo"]}"] = $moduloInfo["titolo"];
if (is_numeric($_GET["codice_elemento"])) {
$breadcrumb["/{$_GET["modulo"]}/dettaglio.php?codice={$_GET["codice_elemento"]}"] = __("Dettaglio");
}
$breadcrumb[] = __("Richieste Documentali");
}
include_once($root."/layout/top.php");
?>
<div class="container-fluid">
<div class="row mb-4 mb-lg-0">
<div class="col-12 col-lg-8">
<h1><?= __("Richiesta Documentali") ?></h1>
</div>
<div class="col-12 col-lg-4 d-flex align-items-center justify-content-start justify-content-lg-end">
<button type="button" onclick="showModalWithURL('/contratti/rubrica/relaziona/soggettiAssociati.php?codice_contratto=<?= $contratto->info['codice'] ?>&soggetto=10')" class="btn btn-sm btn-success mx-1"><?= __('Anagrafiche Incaricati') ?></button>
<button type="button" onclick="showModalWithURL('/contratti/rubrica/relaziona/soggettiAssociati.php?codice_contratto=<?= $contratto->info['codice'] ?>&soggetto=15')" class="btn btn-sm btn-success mx-1"><?= __('Elenco Strumentazione') ?></button>
</div>
</div>
<?
$richieste = $managerRichieste->getRichieste(['codice_oe' => $_SESSION['utente']->oe['codice'], 'codice_contratto' => $contratto->info['codice'], 'bozza' => 'N']);
$richieste = publicRispostaDocumentale::getBadge($contratto->info['codice'], $richieste, "oe");
if (!empty($richieste)) {
?>
<div class="btn-group-toggle mb-2" data-toggle="buttons">
<label id="stato--button" class="btn btn-default active">
<input type="radio" name="status" value="" onchange="table.draw();" autocomplete="off" checked>
<span class='label-html'>
<?= __("Tutti") ?>
</span>
</label>
<?
foreach(publicRispostaDocumentale::getStati("oe") 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-default" 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-<?= $stato['class'] ?>"><?= $count ?></span>
<?
}
?>
</span>
</label>
<?
}
?>
</div>
<div class="card 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 width="10"></th>
<th><?= __("Documentale Contratto") ?></th>
<th width="100"><?= __("Bloccante") ?></th>
<th width="150"><?= __("Data richiesta") ?></th>
<th width="250"><?= __('Stato') ?></th>
<th width="10"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<script>
var table = $("#tab-data").DataTable({
"processing": true,
"serverSide": true,
"filter": false,
"paging": false,
"language": {
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang"
},
"ajax": {
"url": "/contratti/documentale/table.php",
"data": function (d) {
d.stato = $('input[name=status]:checked').val();
d.codice_contratto = <?= json_encode($contratto->info['codice']); ?>;
}
},
"order": [[4,'desc']],
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']],
"columns": [
{ "orderable": false },
{ "orderable": false },
{ "orderable": false , "class": "text-wrap"},
{ "orderable": false },
{ "orderable": true },
{ "orderable": false },
{ "orderable": false },
]
});
$(function(){
$('#modal-helper').on('hidden.bs.modal', function(){
table.ajax.reload();
})
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<?
} else {
?>
<div class="row">
<div class="offset-lg-3 col-lg-6 col-12">
<? alertManager::printWarningBox(__("Nessun risultato")); ?>
</div>
</div>
<?
}
?>
</div>
<?
include_once($root."/layout/bottom.php");
}
}else{
echo '<meta http-equiv="refresh" content="0;URL=/index.php">';
die();
}
?>