Merge branch 'AddressDB/add-new-tool-type-field' into 'master'

added new tool type field

See merge request fronk/thetool!1392
This commit is contained in:
Luca Haid
2025-05-27 12:06:28 +00:00
9 changed files with 207 additions and 14 deletions

View File

@@ -133,17 +133,43 @@
<?php endif; ?>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="hausnummer">Hausnummer *</label>
<div class="col-lg-10">
<?php if(is_array($save_data) && array_key_exists("hausnummer", $save_data)): ?>
<input type="text" class="form-control" name="hausnummer" id="hausnummer" value="<?=$save_data['hausnummer']?>">
<?php else: ?>
<input type="text" class="form-control" name="hausnummer" id="hausnummer" value="<?=$address->hausnummer?>">
<?php endif; ?>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="hausnummer">Hausnummer *</label>
<div class="col-lg-10">
<?php if(is_array($save_data) && array_key_exists("hausnummer", $save_data)): ?>
<input type="text" class="form-control" name="hausnummer" id="hausnummer" value="<?=$save_data['hausnummer']?>">
<?php else: ?>
<input type="text" class="form-control" name="hausnummer" id="hausnummer" value="<?=$address->hausnummer?>">
<?php endif; ?>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="tool_building_type">Gebäudetyp</label>
<div class="col-lg-10">
<select name="tool_building_type" id="tool_building_type" class="form-control">
<option value="">Alle</option>
<option value="0" <?=($address->tool_building_type == "0") ? "selected='selected'" : ""?>>Unbekannt</option>
<option value="1" <?=($address->tool_building_type == "1") ? "selected='selected'" : ""?>>EFH</option>
<option value="2" <?=($address->tool_building_type == "2") ? "selected='selected'" : ""?>>MFH</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="tool_building_type_override">Gebäudetyp überschreiben</label>
<div class="col-lg-10" style="padding-left: 40px">
<?php
$isChecked = false;
if ($address->tool_building_type_override == 1) {
$isChecked = true;
}
?>
<input type="hidden" name="tool_building_type_override" value="0">
<input type="checkbox" class="form-check-input" name="tool_building_type_override" id="tool_building_type_override" value="1" <?= $isChecked ? "checked" : "" ?>>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="hausnummer">Stiege</label>

View File

@@ -153,10 +153,19 @@
<div class="row mt-1">
<div class="col-2">
<label class="form-label" for="filter_rimo_id">Rimo External ID</label>
<input type="text" class="form-control" name="filter[rimo_id]" id="filter_rimo_id" value="<?=(array_key_exists("rimo_id", $filter)) ? $filter['rimo_id'] : ""?>" />
</div>
<label class="form-label" for="filter_rimo_id">Rimo External ID</label>
<input type="text" class="form-control" name="filter[rimo_id]" id="filter_rimo_id" value="<?=(array_key_exists("rimo_id", $filter)) ? $filter['rimo_id'] : ""?>" />
</div>
<div class="col-2">
<label class="form-label" for="filter_tool_building_type">Gebäude Typ</label>
<select name="filter[tool_building_type]" id="filter_tool_building_type" class="form-control">
<option value="">Alle</option>
<option value="0" <?=(array_key_exists("tool_building_type", $filter) && $filter['tool_building_type'] == "0") ? "selected='selected'" : ""?>>Unbekannt</option>
<option value="1" <?=(array_key_exists("tool_building_type", $filter) && $filter['tool_building_type'] == "1") ? "selected='selected'" : ""?>>EFH</option>
<option value="2" <?=(array_key_exists("tool_building_type", $filter) && $filter['tool_building_type'] == "2") ? "selected='selected'" : ""?>>MFH</option>
</select>
</div>
</div>
<div class="row mt-2">

View File

@@ -57,6 +57,9 @@
<th>Wohneinheiten</th>
<td><?=count($address->wohneinheiten)?></td>
</tr><tr>
<th>Tool-Gebäudetyp</th>
<td><?= $address->tool_building_type == 0 ? "Unbekannt" : ($address->tool_building_type == 1 ? "EFH" : "MFH") ?></td>
</tr><tr>
<th>GPS Koordinaten</th>
<td>
<?php if($address->gps_lat && $address->gps_long): ?>