Added Changes in ConstructionConsent

This commit is contained in:
Luca Haid
2025-01-30 14:54:34 +01:00
parent e2d0f65a81
commit b85c93ad83
3 changed files with 137 additions and 30 deletions
+60 -25
View File
@@ -93,11 +93,11 @@ $pagination_entity_name = "Zustimmungserklärungen";
<th>Name</th>
<th>Objekttyp</th>
<th>Objektadresse</th>
<th title="Grundstücksnummer">GST-Nr.</th>
<th title="Grundbuch Einlagezahl">EZ</th>
<th>Besitzer</th>
<th>Besitzer Adresse</th>
<th>Besitzer Kontakt</th>
<!-- <th title="Grundstücksnummer">GST-Nr.</th>-->
<!-- <th title="Grundbuch Einlagezahl">EZ</th>-->
<!-- <th>Besitzer</th>-->
<!-- <th>Besitzer Adresse</th>-->
<!-- <th>Besitzer Kontakt</th>-->
<th>Anfragestatus</th>
<th>Anfrageresultat</th>
<th></th>
@@ -118,26 +118,41 @@ $pagination_entity_name = "Zustimmungserklärungen";
<?=$item->adb_hausnummer->strasse->gemeinde->name?>
<?php endif; ?>
</td>
<td><?=$item->gstnr?></td>
<td><?=$item->ez?></td>
<td><?=$item->owner_name?></td>
<td>
<?=$item->owner_street?><br />
<?=$item->owner_zip?> <?=$item->owner_city?><br />
</td>
<td>
<?php if($item->phone): ?>
Tel: <?=$item->phone?><br />
<?php endif; ?>
<?php if($item->fax): ?>
Fax: <?=$item->fax?><br />
<?php endif; ?>
<?php if($item->email): ?>
Email: <?=$item->email?>
<?php endif; ?>
</td>
<!-- <td>--><?php //=$item->gstnr?><!--</td>-->
<!-- <td>--><?php //=$item->ez?><!--</td>-->
<!-- <td>--><?php //=$item->owner_name?><!--</td>-->
<!-- <td>-->
<!-- --><?php //=$item->owner_street?><!--<br />-->
<!-- --><?php //=$item->owner_zip?><!-- --><?php //=$item->owner_city?><!--<br />-->
<!-- </td>-->
<!-- <td>-->
<!-- --><?php //if($item->phone): ?>
<!-- Tel: --><?php //=$item->phone?><!--<br />-->
<!-- --><?php //endif; ?>
<!-- --><?php //if($item->fax): ?>
<!-- Fax: --><?php //=$item->fax?><!--<br />-->
<!-- --><?php //endif; ?>
<!-- --><?php //if($item->email): ?>
<!-- Email: --><?php //=$item->email?>
<!-- --><?php //endif; ?>
<!-- </td>-->
<td><?=($item->status) ? __($item->status,"consent") : ""?></td>
<td><?=($item->result) ? __($item->result,"consent") : ""?></td>
<td>
<?php
// Determine the status based on the counts
$status_class = 'blue'; // Default to blue (all open)
if (isset($item->owner_result_counts['denied']) && $item->owner_result_counts['denied'] > 0) {
$status_class = 'red'; // Red if at least one denied
} elseif ((isset($item->owner_result_counts['unresolvable']) && $item->owner_result_counts['unresolvable'] > 0) ||
(isset($item->owner_result_counts['moved']) && $item->owner_result_counts['moved'] > 0)) {
$status_class = 'yellow'; // Yellow if at least one unresolvable or moved
} elseif (isset($item->owner_result_counts['accepted']) &&
$item->owner_result_counts['accepted'] === count($item->owners)) {
$status_class = 'green'; // Green if all accepted
}
?>
<div class="status-circle <?=$status_class?>"></div>
</td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?=self::getUrl("ConstructionConsent", "view", ["id" => $item->id])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
<?php if(!$item->result): ?>
@@ -163,5 +178,25 @@ $pagination_entity_name = "Zustimmungserklärungen";
</div>
</div>
<style>
/* Styles for the status circle */
.status-circle {
width: 25px;
height: 25px;
border-radius: 50%;
display: inline-block;
}
.status-circle.red {
background-color: #d9534f; /* Red */
}
.status-circle.yellow {
background-color: #f0ad4e; /* Yellow */
}
.status-circle.green {
background-color: #5cb85c; /* Green */
}
.status-circle.blue {
background-color: #337ab7; /* Blue */
}
</style>
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>