Added Filter to Order/Index
This commit is contained in:
@@ -19,6 +19,74 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title mb-3">Filter</h4>
|
||||
|
||||
<form method="get" action="<?=self::getUrl("Order")?>">
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_network_id">Netzgebiet</label>
|
||||
<select name="filter[network_id]" id="filter_network_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<option value="<?=$fnet->id?>" <?=($filter['network_id'] == $fnet->id) ? "selected='selected'" : ""?>><?=$fnet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_building_networksection_id">Bauabschnitt</label>
|
||||
<select name="filter[building_networksection_id]" id="filter_building_networksection_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<?php if(is_array($fnet->sections) && count($fnet->sections)): ?>
|
||||
<optgroup label="<?=$fnet->name?>">
|
||||
<?php foreach($fnet->sections as $section): ?>
|
||||
<option value="<?=$section->id?>" <?=($filter['building_networksection_id'] == $section->id) ? "selected='selected'" : ""?>><?=$section->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_status_id">Objektstatus</label>
|
||||
<select name="filter[building_status_id]" id="filter_building_status_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach(BuildingstatusModel::getAll() as $status): ?>
|
||||
<option value="<?=$status->id?>" <?=($filter['building_status_id'] == $status->id) ? "selected='selected'" : ""?>><?=$status->code?> - <?=__($status->name."-b")?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_building_code">Objekt ID</label>
|
||||
<input type="text" class="form-control" name="filter[building_code]" id="filter_building_code" value="<?=$filter['building_code']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_building_street">Straße</label>
|
||||
<input type="text" class="form-control" name="filter[building_street]" id="filter_building_street" value="<?=$filter['building_street']?>" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary">Filter anwenden</button>
|
||||
<a class="btn btn-secondary" href="<?=self::getUrl("Order")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
@@ -30,6 +98,7 @@
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Kunde</th>
|
||||
<th>Adresse</th>
|
||||
@@ -41,6 +110,7 @@
|
||||
</tr>
|
||||
<?php foreach($orders as $order): ?>
|
||||
<tr>
|
||||
<td><?=$order->id?></td>
|
||||
<td>
|
||||
<?php if(is_array($order->terminations) && count($order->terminations)): ?>
|
||||
<?php if($order->terminations[0]->status->code >= TT_TERMSTATUS_CONNECTED): ?>
|
||||
|
||||
Reference in New Issue
Block a user