updated Address filter

This commit is contained in:
Frank Schubert
2024-01-23 21:12:46 +01:00
parent 2c5e4b1f5c
commit 76def95fd9
11 changed files with 6576 additions and 55 deletions

View File

@@ -60,22 +60,22 @@
<div class="col-2">
<label class="form-label" for="filter_addresstype">Rolle</label>
<select name="filter[addresstype][]" id="filter_addresstype" class="form-control" multiple="multiple">
<option value="systemowner" <?=(in_array("systemowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("systemowner")?></option>
<option value="productowner" <?=(in_array("productowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("productowner")?></option>
<option value="netowner" <?=(in_array("netowner", $filter["addresstype"])) ? "selected='selected'" : "netowner"?>><?=__("netowner")?></option>
<option value="salespartner" <?=(in_array("salespartner", $filter["addresstype"])) ? "selected='selected'" : "salespartner"?>><?=__("salespartner")?></option>
<option value="pipeworker" <?=(in_array("pipeworker", $filter["addresstype"])) ? "selected='selected'" : "pipeworker"?>><?=__("pipeworker")?></option>
<option value="lineworker" <?=(in_array("lineworker", $filter["addresstype"])) ? "selected='selected'" : "lineworker"?>><?=__("lineworker")?></option>
<option value="pipeplanner" <?=(in_array("pipeplanner", $filter["addresstype"])) ? "selected='selected'" : "pipeplanner"?>><?=__("pipeplanner")?></option>
<option value="lineplanner" <?=(in_array("lineplanner", $filter["addresstype"])) ? "selected='selected'" : "lineplanner"?>><?=__("lineplanner")?></option>
<option value="netoperator" <?=(in_array("netoperator", $filter["addresstype"])) ? "selected='selected'" : "netoperator"?>><?=__("netoperator")?></option>
<option value="support" <?=(in_array("support", $filter["addresstype"])) ? "selected='selected'" : "support"?>><?=__("support")?></option>
<option value="billing" <?=(in_array("billing", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("billing")?></option>
<option value="employee" <?=(in_array("employee", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("employee")?></option>
<option value="customer" <?=(in_array("customer", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("customer")?></option>
<option value="supplier" <?=(in_array("supplier", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("supplier")?></option>
<option value="contact" <?=(in_array("contact", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("contact")?></option>
<option value="techcontact" <?=(in_array("techcontact", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("techcontact")?></option>
<option value="systemowner" <?=(array_key_exists("addresstype", $filter) && in_array("systemowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("systemowner")?></option>
<option value="productowner" <?=(array_key_exists("addresstype", $filter) && in_array("productowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("productowner")?></option>
<option value="netowner" <?=(array_key_exists("addresstype", $filter) && in_array("netowner", $filter["addresstype"])) ? "selected='selected'" : "netowner"?>><?=__("netowner")?></option>
<option value="salespartner" <?=(array_key_exists("addresstype", $filter) && in_array("salespartner", $filter["addresstype"])) ? "selected='selected'" : "salespartner"?>><?=__("salespartner")?></option>
<option value="pipeworker" <?=(array_key_exists("addresstype", $filter) && in_array("pipeworker", $filter["addresstype"])) ? "selected='selected'" : "pipeworker"?>><?=__("pipeworker")?></option>
<option value="lineworker" <?=(array_key_exists("addresstype", $filter) && in_array("lineworker", $filter["addresstype"])) ? "selected='selected'" : "lineworker"?>><?=__("lineworker")?></option>
<option value="pipeplanner" <?=(array_key_exists("addresstype", $filter) && in_array("pipeplanner", $filter["addresstype"])) ? "selected='selected'" : "pipeplanner"?>><?=__("pipeplanner")?></option>
<option value="lineplanner" <?=(array_key_exists("addresstype", $filter) && in_array("lineplanner", $filter["addresstype"])) ? "selected='selected'" : "lineplanner"?>><?=__("lineplanner")?></option>
<option value="netoperator" <?=(array_key_exists("addresstype", $filter) && in_array("netoperator", $filter["addresstype"])) ? "selected='selected'" : "netoperator"?>><?=__("netoperator")?></option>
<option value="support" <?=(array_key_exists("addresstype", $filter) && in_array("support", $filter["addresstype"])) ? "selected='selected'" : "support"?>><?=__("support")?></option>
<option value="billing" <?=(array_key_exists("addresstype", $filter) && in_array("billing", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("billing")?></option>
<option value="employee" <?=(array_key_exists("addresstype", $filter) && in_array("employee", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("employee")?></option>
<option value="customer" <?=(array_key_exists("addresstype", $filter) && in_array("customer", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("customer")?></option>
<option value="supplier" <?=(array_key_exists("addresstype", $filter) && in_array("supplier", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("supplier")?></option>
<option value="contact" <?=(array_key_exists("addresstype", $filter) && in_array("contact", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("contact")?></option>
<option value="techcontact" <?=(array_key_exists("addresstype", $filter) && in_array("techcontact", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("techcontact")?></option>
</select>
</div>
<?php endif; ?>
@@ -209,7 +209,7 @@
<td></td>
<?php endif; ?>
<td>
<a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 'filter' => $filter, 's' => $pagination['start']])?>">
<a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 's' => $pagination['start']])?>">
<?=$address->customer_number?>
<?=($address->spin) ? "<br /><span class='text-pink'>".$address->spin."</span>" : ""?>
</a>
@@ -222,8 +222,8 @@
<br /><span title="Lieferantenkonto"><?=$address->fibu_supplier_number?></span>
<?php endif; ?>
</td>
<td><a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 'filter' => $filter, 's' => $pagination['start']])?>"><?=nl2br($address->company)?></a></td>
<td><a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 'filter' => $filter, 's' => $pagination['start']])?>"><?=$address->getFullName()?></a></td>
<td><a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 's' => $pagination['start']])?>"><?=nl2br($address->company)?></a></td>
<td><a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 's' => $pagination['start']])?>"><?=$address->getFullName()?></a></td>
<td>
<?=$address->street?><br />
<?=$address->zip?> <?=$address->city?>
@@ -232,7 +232,7 @@
<td><?=$address->email?></td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?=self::getUrl("User", "Index", ["filter" => ["address_id" => $address->id]])?>" title="Benutzer anzeigen"><i class="fas fa-users"></i></a>
<a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 'filter' => $filter, 's' => $pagination['start']])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
<a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 's' => $pagination['start']])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
<a href="<?=self::getUrl("Address", "edit", ["id" => $address->id, 's' => $pagination['start']])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
<a href="<?=self::getUrl("Address", "delete", ["id" => $address->id, 's' => $pagination['start']])?>" onclick="if(!confirm('Person/Firma wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
</td>