Merge branch 'master' into 'devbyspi'
# Conflicts: # Layout/default/Device/Detail.php # Layout/default/Device/Form.php # Layout/default/Device/Index.php # application/Device/DeviceController.php # application/Device/DeviceModel.php # public/assets/css/datatables-std.css
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
<link href="<?=self::getResourcePath()?>assets/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>plugins/summernote/summernote-bs4.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>datatables/datatables.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/libs/select2/select2.min.js"></script>
|
||||
@@ -26,10 +27,12 @@
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap-datepicker.de.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/geo/geo.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/leaflet.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/leaflet.MakiMarkers.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/popper.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/bootstrap-select.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap-autocomplete.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>datatables/datatables.min.js"></script>
|
||||
|
||||
<?php if(MFAPPNAME == "devthetool"): ?>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -31,20 +31,21 @@
|
||||
<li><a href="<?=self::getUrl("Address")?>"><i class="fad fa-user text-info"></i> Personen & Firmen</a></li>
|
||||
<li><a href="<?=self::getUrl("Product")?>"><i class="far fa-rectangle-list text-info"></i> Produkte</a></li>
|
||||
<li><a href="<?=self::getUrl("Productgroup")?>"><i class="far fa-list-tree text-info"></i> Produktgruppen</a></li>
|
||||
|
||||
|
||||
<li><a href="<?=self::getUrl("Network")?>"><i class="fad fa-network-wired text-info"></i> Netzgebiete</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("User")?>"><i class="fad fa-users text-info"></i> Benutzer</a></li>
|
||||
|
||||
|
||||
<li class="has-sub-submenu" ><a href="<?=self::getUrl("Pop")?>"><i class="fad fa-house text-info"></i> Pops</a></li>
|
||||
<li ><a href="<?=self::getUrl("Devicemanufactor")?>"><i class="fad fa-router text-info"></i> Geräte Hersteller</a></li>
|
||||
<li><a href="<?=self::getUrl("Devicetype")?>"><i class="fad fa-router text-info"></i> Geräte Typen</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("Device")?>"><i class="fad fa-router text-info "></i> Devices</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("User")?>"><i class="fad fa-users text-info"></i> Benutzer</a></li>
|
||||
<li class="has-sub-submenu font-weight-bold mt-1"><a>Grundstammdaten</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if(false && $me->is(["Admin", "netowner"])): ?>
|
||||
<li><a href="<?=self::getUrl("AddressDB")?>"><i class="fas fa-city text-info"></i> GWR / AddressDB</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li><a href="<?=self::getUrl("Producttech")?>"><i class="fad fa-microchip text-info"></i> Technologien</a></li>
|
||||
<!--<li><a href="<?=self::getUrl("Contractconfig")?>"><i class="fad fa-gear text-info"></i> ContractConfig</a></li>-->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<?php
|
||||
@@ -0,0 +1 @@
|
||||
<?php
|
||||
+173
-152
@@ -27,163 +27,187 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h3 class="text-center mb-3"><?=$address->getCompanyOrName()?><?=($address->customer_number) ? " [".$address->customer_number."]" : ""?></h3>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
|
||||
<table class="table table-sm table-striped view-table">
|
||||
<tr>
|
||||
<th>Kundennummer</th>
|
||||
<td><?=$address->customer_number?></td>
|
||||
</tr><tr>
|
||||
<th>Firmenname</th>
|
||||
<td><?=nl2br($address->company)?></td>
|
||||
</tr><tr>
|
||||
<th>Vorname</th>
|
||||
<td><?=$address->firstname?></td>
|
||||
</tr><tr>
|
||||
<th>Nachname</th>
|
||||
<td><?=$address->lastname?></td>
|
||||
</tr><tr>
|
||||
<th>Straße</th>
|
||||
<td><?=$address->street?></td>
|
||||
</tr><tr>
|
||||
<th>PLZ / Ort</th>
|
||||
<td><?=$address->zip?> <?=$address->city?></td>
|
||||
</tr><tr>
|
||||
<th>Land</th>
|
||||
<td><?=$address->country?></td>
|
||||
</tr><tr>
|
||||
<th>Telefon</th>
|
||||
<td><?=$address->phone?></td>
|
||||
</tr><tr>
|
||||
<th>Mobil</th>
|
||||
<td><?=$address->mobile?></td>
|
||||
</tr><tr>
|
||||
<th>Fax</th>
|
||||
<td><?=$address->fax?></td>
|
||||
</tr><tr>
|
||||
<th>Email</th>
|
||||
<td><?=$address->email?></td>
|
||||
</tr><tr>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<th>Service PIN</th>
|
||||
<td><?=$address->spin?></td>
|
||||
</tr><tr>
|
||||
<th>Einwilligungen</th>
|
||||
<td>
|
||||
<p><i class="mr-1 fas <?=($address->allow_contact) ? "fa-check text-success" : "fa-xmark-large text-danger"?>"></i> Informationen per Post/Email/Telefon</p>
|
||||
<p><i class="mr-1 fas <?=($address->allow_spin) ? "fa-check text-success" : "fa-xmark-large text-danger"?>"></i>Auskunft mit Service PIN</p>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Rollen</th>
|
||||
<td>
|
||||
<?php if(is_array($address->types) && count($address->types)): ?>
|
||||
<?php foreach(TT_ROLES as $role): ?>
|
||||
<ul>
|
||||
<?php if(array_key_exists($role, $address->types)): ?>
|
||||
<li><?=__($role)?></li>
|
||||
<div class="card border-top-primary">
|
||||
<div class="card-body">
|
||||
<h3 class="text-center mb-3"><?=$address->getCompanyOrName()?><?=($address->customer_number) ? " [".$address->customer_number."]" : ""?></h3>
|
||||
|
||||
<table class="table table-sm table-striped view-table">
|
||||
<tr>
|
||||
<th>Kundennummer</th>
|
||||
<td><?=$address->customer_number?></td>
|
||||
</tr><tr>
|
||||
<th>Firmenname</th>
|
||||
<td><?=nl2br($address->company)?></td>
|
||||
</tr><tr>
|
||||
<th>Vorname</th>
|
||||
<td><?=$address->firstname?></td>
|
||||
</tr><tr>
|
||||
<th>Nachname</th>
|
||||
<td><?=$address->lastname?></td>
|
||||
</tr><tr>
|
||||
<th>Straße</th>
|
||||
<td><?=$address->street?></td>
|
||||
</tr><tr>
|
||||
<th>PLZ / Ort</th>
|
||||
<td><?=$address->zip?> <?=$address->city?></td>
|
||||
</tr><tr>
|
||||
<th>Land</th>
|
||||
<td><?=$address->country?></td>
|
||||
</tr><tr>
|
||||
<th>Telefon</th>
|
||||
<td><?=$address->phone?></td>
|
||||
</tr><tr>
|
||||
<th>Mobil</th>
|
||||
<td><?=$address->mobile?></td>
|
||||
</tr><tr>
|
||||
<th>Fax</th>
|
||||
<td><?=$address->fax?></td>
|
||||
</tr><tr>
|
||||
<th>Email</th>
|
||||
<td><?=$address->email?></td>
|
||||
</tr><tr>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<th>Service PIN</th>
|
||||
<td><?=$address->spin?></td>
|
||||
</tr><tr>
|
||||
<th>Einwilligungen</th>
|
||||
<td>
|
||||
<p><i class="mr-1 fas <?=($address->allow_contact) ? "fa-check text-success" : "fa-xmark-large text-danger"?>"></i> Informationen per Post/Email/Telefon</p>
|
||||
<p><i class="mr-1 fas <?=($address->allow_spin) ? "fa-check text-success" : "fa-xmark-large text-danger"?>"></i>Auskunft mit Service PIN</p>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Rollen</th>
|
||||
<td>
|
||||
<?php if(is_array($address->types) && count($address->types)): ?>
|
||||
<?php foreach(TT_ROLES as $role): ?>
|
||||
<ul>
|
||||
<?php if(array_key_exists($role, $address->types)): ?>
|
||||
<li><?=__($role)?></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Verrechnungsdaten</h4></td>
|
||||
</tr><tr>
|
||||
<th>UID</th>
|
||||
<td><?=$address->uid?></td>
|
||||
</tr><tr>
|
||||
<th>Verrechnungsart</th>
|
||||
<td><?=($address->billing_type == "sepa") ? "SEPA Bankeinzug" : "Rechnung"?></td>
|
||||
</tr><tr>
|
||||
<th>Rechnungsversand</th>
|
||||
<td><?=($address->billing_delivery == "paper") ? "POST" : "Email"?></td>
|
||||
</tr><tr>
|
||||
<th>Kreditinstitut</th>
|
||||
<td><?=$address->bank_account_bank?></td>
|
||||
</tr><tr>
|
||||
<th>Kontoinhaber</th>
|
||||
<td><?=$address->bank_account_owner?></td>
|
||||
</tr><tr>
|
||||
<th>IBAN</th>
|
||||
<td><?=$address->bank_account_iban?></td>
|
||||
</tr><tr>
|
||||
<th>BIC</th>
|
||||
<td><?=$address->bank_account_bic?></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Zusatzdaten</h4></td>
|
||||
</tr><tr>
|
||||
<th>RTR Code</th>
|
||||
<td><?=$address->attributes['rtrcode']->value?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>Verknüpfungen</h4>
|
||||
<?php if(is_array($address->links) && count($address->links)): ?>
|
||||
<div class="card">
|
||||
<div class="card-body" id="link-container">
|
||||
<table class="table table-striped table-sm table-bordered">
|
||||
<tr>
|
||||
<th>Typ</th>
|
||||
<th>Firma</th>
|
||||
<th>Name</th>
|
||||
<th>Telefon</th>
|
||||
<th>Mobil</th>
|
||||
<th>Email</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach(TT_ADDRESS_LINK_TYPES as $type): ?>
|
||||
<?php if(array_key_exists($type, $address->links)): ?>
|
||||
<?php foreach($address->links[$type] as $link): ?>
|
||||
<tr>
|
||||
<td class="font-weight-bold"><?=__($type)?></td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><?=$link->address->company?></a></td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><?=$link->address->getFullName()?></a></td>
|
||||
<td><?=$link->address->phone?></td>
|
||||
<td><?=$link->address->mobile?></td>
|
||||
<td><?=$link->address->email?></td>
|
||||
<td>
|
||||
<a class="mr-2" href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Verrechnungsdaten</h4></td>
|
||||
</tr><tr>
|
||||
<th>UID</th>
|
||||
<td><?=$address->uid?></td>
|
||||
</tr><tr>
|
||||
<th>Verrechnungsart</th>
|
||||
<td><?=($address->billing_type == "sepa") ? "SEPA Bankeinzug" : "Rechnung"?></td>
|
||||
</tr><tr>
|
||||
<th>Rechnungsversand</th>
|
||||
<td><?=($address->billing_delivery == "paper") ? "POST" : "Email"?></td>
|
||||
</tr><tr>
|
||||
<th>Kreditinstitut</th>
|
||||
<td><?=$address->bank_account_bank?></td>
|
||||
</tr><tr>
|
||||
<th>Kontoinhaber</th>
|
||||
<td><?=$address->bank_account_owner?></td>
|
||||
</tr><tr>
|
||||
<th>IBAN</th>
|
||||
<td><?=$address->bank_account_iban?></td>
|
||||
</tr><tr>
|
||||
<th>BIC</th>
|
||||
<td><?=$address->bank_account_bic?></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Zusatzdaten</h4></td>
|
||||
</tr><tr>
|
||||
<th>RTR Code</th>
|
||||
<td><?=$address->attributes['rtrcode']->value?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>Verknüpfungen</h4>
|
||||
<?php if(is_array($address->links) && count($address->links)): ?>
|
||||
<div class="card border-top-warning">
|
||||
<div class="card-body" id="link-container">
|
||||
<table class="table table-striped table-sm table-bordered">
|
||||
<tr>
|
||||
<th>Typ</th>
|
||||
<th>Firma</th>
|
||||
<th>Name</th>
|
||||
<th>Telefon</th>
|
||||
<th>Mobil</th>
|
||||
<th>Email</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach(TT_ADDRESS_LINK_TYPES as $type): ?>
|
||||
<?php if(array_key_exists($type, $address->links)): ?>
|
||||
<?php foreach($address->links[$type] as $link): ?>
|
||||
<tr>
|
||||
<td class="font-weight-bold"><?=__($type)?></td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><?=$link->address->company?></a></td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><?=$link->address->getFullName()?></a></td>
|
||||
<td><?=$link->address->phone?></td>
|
||||
<td><?=$link->address->mobile?></td>
|
||||
<td><?=$link->address->email?></td>
|
||||
<td>
|
||||
<a class="mr-2" href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(is_array($address->linked_as) && count($address->linked_as)): ?>
|
||||
<h4>Verknüpft als</h4>
|
||||
<div class="card">
|
||||
<div class="card-body" id="link-container">
|
||||
<table class="table-sm table-striped">
|
||||
<?php foreach(TT_ADDRESS_LINK_TYPES as $type): ?>
|
||||
<?php if(array_key_exists($type, $address->linked_as)): ?>
|
||||
<?php foreach($address->linked_as[$type] as $link): ?>
|
||||
<tr>
|
||||
<td><strong><?=__($type)?></strong> für:</td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ['id' => $link->origin_address_id])?>"><?=$link->origin->getCompanyOrName()?><?=($link->origin->customer_number) ? " [".$link->origin->customer_number."]" : ""?></a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(is_array($address->linked_as) && count($address->linked_as)): ?>
|
||||
<h4>Verknüpft als</h4>
|
||||
<div class="card">
|
||||
<div class="card-body" id="link-container">
|
||||
<table class="table-sm table-striped">
|
||||
<?php foreach(TT_ADDRESS_LINK_TYPES as $type): ?>
|
||||
<?php if(array_key_exists($type, $address->linked_as)): ?>
|
||||
<?php foreach($address->linked_as[$type] as $link): ?>
|
||||
<tr>
|
||||
<td><strong><?=__($type)?></strong> für:</td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ['id' => $link->origin_address_id])?>"><?=$link->origin->getCompanyOrName()?><?=($link->origin->customer_number) ? " [".$link->origin->customer_number."]" : ""?></a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
|
||||
<div class="card border-top-success">
|
||||
<div class="card-header">
|
||||
Aktive Produkte (Contracts)
|
||||
</div>
|
||||
<?php if(is_array($address->contracts) && count($address->contracts)): ?>
|
||||
<ul class="list-group list-group-flush">
|
||||
<?php foreach($address->contracts as $contract): ?>
|
||||
<li class="list-group-item"><a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>"><?=$contract->product_name?> [<?=$contract->matchcode?>]</a> <span class='text-secondary'><?=($contract->finish_date) ? "Fertigstellung: ".date('d.m.Y', $contract->finish_date) : "in Herstellung"?></span></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(is_array($address->contracts) && count($address->contracts)): ?>
|
||||
<div class="card">
|
||||
<?php if(is_array($address->active_contracts) && count($address->active_contracts)): ?>
|
||||
<div class="card border-top-success">
|
||||
<div class="card-header">
|
||||
Verträge
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h4>Verträge</h4>
|
||||
|
||||
<table class="table table-striped table-sm table-bordered table-hover">
|
||||
<tr>
|
||||
@@ -194,9 +218,8 @@
|
||||
<th>Bestelldatum</th>
|
||||
<th>Fertigstellung</th>
|
||||
<th>Kündigung</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($address->contracts as $contract): ?>
|
||||
<?php foreach($address->active_contracts as $contract): ?>
|
||||
<tr>
|
||||
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>">
|
||||
<a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>">
|
||||
@@ -213,9 +236,7 @@
|
||||
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>"><?=($contract->order_date) ? date('d.m.Y', $contract->order_date) : ""?></td>
|
||||
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>"><?=($contract->finish_date) ? date('d.m.Y', $contract->finish_date) : ""?></td>
|
||||
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>"><?=($contract->cancel_date) ? date('d.m.Y', $contract->cancel_date) : ""?></td>
|
||||
<td>
|
||||
<a href="<?=self::getUrl("Contract", "deleteLink", ["link_id" => $contract->id])?>" onclick="if(!confirm('Verknüpfung wirklich entfernen?')) return false;" class="text-danger" title="Verknüpfung entfernen"><i class="fas fa-xmark-large"></i></a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
@@ -175,6 +175,50 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="gdaeigenschaft">GDA-Eigenschaft</label>
|
||||
<div class="col-lg-10">
|
||||
<?php if(is_array($save_data) && array_key_exists("gdaeigenschaft", $save_data)): ?>
|
||||
<input type="text" class="form-control" name="gdaeigenschaft" id="gdaeigenschaft" value="<?=$save_data['gdaeigenschaft']?>">
|
||||
<?php else: ?>
|
||||
<input type="text" class="form-control" name="gdaeigenschaft" id="gdaeigenschaft" value="<?=$address->gdaeigenschaft?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="meridian">Meridian</label>
|
||||
<div class="col-lg-10">
|
||||
<?php if(is_array($save_data) && array_key_exists("meridian", $save_data)): ?>
|
||||
<input type="text" class="form-control" name="meridian" id="meridian" value="<?=$save_data['meridian']?>">
|
||||
<?php else: ?>
|
||||
<input type="text" class="form-control" name="meridian" id="meridian" value="<?=$address->meridian?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="rw">RW</label>
|
||||
<div class="col-lg-10">
|
||||
<?php if(is_array($save_data) && array_key_exists("rw", $save_data)): ?>
|
||||
<input type="text" class="form-control" name="rw" id="rw" value="<?=$save_data['rw']?>">
|
||||
<?php else: ?>
|
||||
<input type="text" class="form-control" name="rw" id="rw" value="<?=$address->rw?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="hw">HW</label>
|
||||
<div class="col-lg-10">
|
||||
<?php if(is_array($save_data) && array_key_exists("hw", $save_data)): ?>
|
||||
<input type="text" class="form-control" name="hw" id="hw" value="<?=$save_data['hw']?>">
|
||||
<?php else: ?>
|
||||
<input type="text" class="form-control" name="hw" id="hw" value="<?=$address->hw?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="gps_lat">GPS Breite</label>
|
||||
<div class="col-lg-10">
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
<th>Straße</th>
|
||||
<th>Hausnummer</th>
|
||||
<th>Wohneinheiten</th>
|
||||
<th>GDA-Eigenschaft</th>
|
||||
<th>Rollout Jahr</th>
|
||||
<th>Rollout Info</th>
|
||||
<th></th>
|
||||
@@ -174,6 +175,7 @@
|
||||
<td><?=$address->strasse->name?></td>
|
||||
<td><?=$address->hausnummer?></td>
|
||||
<td><?=count($address->wohneinheiten)?></td>
|
||||
<td><?=$address->gdaeigenschaft?></td>
|
||||
<td><?=$address->rollout?></td>
|
||||
<td><?=$address->rollout_info?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
|
||||
@@ -3,7 +3,7 @@ ob_end_flush();
|
||||
header("Content-type: text/csv");
|
||||
header('Content-disposition: attachment; filename="addressdb-export-'.date('Y-m-d_H-i-s').'.csv"');
|
||||
?>
|
||||
AddressDB_ID;Extref;Adrcd;OAID;Netzgebiet_Extref;Netzgebiet;GKZ;Gemeinde;OKZ;Ortschaft;PLZ;SKZ;Strasse;Hausnummer;Grundstueck;GPS Breite; GPS Laenge;Rollout;Rollout_Info;Freigabe;Nutzungseinheiten
|
||||
AddressDB_ID;Extref;Adrcd;OAID;Netzgebiet_Extref;Netzgebiet;GKZ;Gemeinde;OKZ;Ortschaft;PLZ;SKZ;Strasse;Hausnummer;Grundstueck;GPS Breite; GPS Laenge;Rollout;Rollout_Info;Freigabe;Nutzungseinheiten;GDA-Eigenschaft;Meridian;RW;HW
|
||||
<?php
|
||||
$line = 0;
|
||||
|
||||
@@ -21,7 +21,8 @@ while($data = mysqli_fetch_object($res)):
|
||||
}
|
||||
$unit_count = $data->unit_count;
|
||||
?>
|
||||
<?=$data->id?>;"<?=$data->extref?>";<?=$data->adrcd?>;"<?=$data->oaid?>";"<?=$netzgebiet->extref?>";"<?=$netzgebiet->name?>";<?=$gemeinde->kennziffer?>;"<?=$gemeinde->name?>";<?=$ortschaft->kennziffer?>;"<?=$ortschaft->name?>";"<?=$plz->plz?>";<?=$strasse->kennziffer?>;"<?=$strasse->name?>";"<?=$data->hausnummer?>";"<?=$data->grund_nr?>";<?=$data->gps_lat?>;<?=$data->gps_long?>;<?=$data->rollout?>;"<?=$data->rollout_info?>";"<?=$freigabe?>";<?=$unit_count?>;
|
||||
<?=$data->id?>;"<?=$data->extref?>";<?=$data->adrcd?>;"<?=$data->oaid?>";"<?=$netzgebiet->extref?>";"<?=$netzgebiet->name?>";<?=$gemeinde->kennziffer?>;"<?=$gemeinde->name?>";<?=$ortschaft->kennziffer?>;"<?=$ortschaft->name?>";"<?=$plz->plz?>";<?=$strasse->kennziffer?>;"<?=$strasse->name?>";"<?=$data->hausnummer?>";"<?=$data->grund_nr?>";<?=$data->gps_lat?>;<?=$data->gps_long?>;<?=$data->rollout?>;"<?=$data->rollout_info?>";"<?=$freigabe?>";<?=$unit_count?>;"<?=$data->gdaeigenschaft?>";"<?=$data->meridian?>";<?=$data->rw?>;<?=$data->hw?>
|
||||
|
||||
<?php
|
||||
$i++;
|
||||
if($line % 1000 === 0) {
|
||||
|
||||
@@ -20,7 +20,7 @@ ob_start();
|
||||
<td>{{POPNAME}}</td>
|
||||
</tr><tr>
|
||||
<th>GPS:</th>
|
||||
<td><a href="https://maps.google.com/maps?t=k&q=loc:{{GPS}}">{{GPS}}</a></td>
|
||||
<td><a href="https://maps.google.com/maps?t=k&q=loc:{{GPS}}" target="_blank">{{GPS}}</a></td>
|
||||
</tr><tr>
|
||||
<th>Kontakt:</th>
|
||||
<td>{{CONTACT}}</td>
|
||||
|
||||
@@ -158,6 +158,13 @@
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="order_date">Bestelldatum</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="order_date" id="order_date" value="<?=($contract->order_date) ? date("d.m.Y",$contract->order_date) : ""?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="finish_date">Fertigstellungsdatum</label>
|
||||
<div class="col-lg-10">
|
||||
@@ -193,7 +200,6 @@
|
||||
<th>Kunde</th>
|
||||
<th>Contract ID</th>
|
||||
<th>Produkt</th>
|
||||
<th>Matchcode</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($contract->links as $link): ?>
|
||||
@@ -201,8 +207,7 @@
|
||||
<td><?=__($link->type, "contract")?></td>
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $link->contract->owner_id])?>"><?=$link->contract->owner->getCompanyOrName()?></a></td>
|
||||
<td><a href="<?=self::getUrl("Contract", "View", ["id" => $link->contract_id])?>"><?=$link->contract_id?></a></td>
|
||||
<td><a href="<?=self::getUrl("Contract", "View", ["id" => $link->contract_id])?>"><?=$link->contract->product->name?></a></td>
|
||||
<td><a href="<?=self::getUrl("Contract", "View", ["id" => $link->contract_id])?>"><?=$link->contract->matchcode?></a></td>
|
||||
<td><a href="<?=self::getUrl("Contract", "View", ["id" => $link->contract_id])?>"><?=$link->contract->product->name?> [<?=$link->contract->matchcode?>]</a></td>
|
||||
<td>
|
||||
<a href="<?=self::getUrl("Contract", "deleteLink", ["link_id" => $link->id])?>" onclick="if(!confirm('Verknüpfung wirklich entfernen?')) return false;" class="text-danger" title="Verknüpfung entfernen"><i class="fas fa-xmark-large"></i></a>
|
||||
</td>
|
||||
@@ -354,9 +359,33 @@
|
||||
});
|
||||
|
||||
$('#product_id').on("autocomplete.select", function(evt, item) {
|
||||
if(item && item.value === 0) {
|
||||
$('#product_id').autoComplete('set', null);
|
||||
if(item) {
|
||||
if(item.value === 0) {
|
||||
$('#product_id').autoComplete('set', null);
|
||||
return;
|
||||
}
|
||||
product_id = item.value;
|
||||
|
||||
$.get("<?=self::getUrl("Product","api")?>", {
|
||||
do: "getProduct",
|
||||
"product_id": product_id
|
||||
},
|
||||
function(success) {
|
||||
if(success.status != "OK") return;
|
||||
|
||||
p = success.result.product;
|
||||
$("#price").val(p.price);
|
||||
$("#price_setup").val(p.price_setup);
|
||||
$("#price_nne").val(p.price_nne);
|
||||
$("#price_nbe").val(p.price_nbe);
|
||||
$("#billing_delay").val(p.billing_delay);
|
||||
$("#billing_period").val(p.billing_period);
|
||||
},
|
||||
"json"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
// product autocomplete
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-striped table-hover table-sm">
|
||||
<tr>
|
||||
<th>Contract ID</th>
|
||||
<th>Inhaber</th>
|
||||
@@ -109,7 +109,7 @@
|
||||
<?php foreach($contracts as $contract): ?>
|
||||
<tr>
|
||||
<td><a href="<?=self::getUrl("Contract", "view", ["contract_id" => $contract->id])?>"><?=$contract->id?></a></td>
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $contract->owner_id])?>" target="_blank"><i class="far fa-eyes" title="Kunde in neuem Tab anzeigen"></i></a> <?=$contract->owner->getCompanyOrName()?></td>
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $contract->owner_id])?>" target="_blank"><i class="far fa-eyes" title="Kunde in neuem Tab anzeigen"></i></a> <?=$contract->owner->getCompanyOrName()?> (<?=$contract->owner->customer_number?>)</td>
|
||||
<td><a href="<?=self::getUrl("Contract", "view", ["contract_id" => $contract->id])?>"><?=$contract->product_name?></a></td>
|
||||
<td><a href="<?=self::getUrl("Contract", "view", ["contract_id" => $contract->id])?>"><?=$contract->matchcode?></a></td>
|
||||
<!--<td>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card border-top-success">
|
||||
<div class="card-body">
|
||||
<?php if(!$contract->finish_date || $contract->finish_date > date('U')): ?>
|
||||
<h2 class="text-center mb-3 text-secondary">In Herstellung</h2>
|
||||
@@ -215,18 +215,113 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if((is_array($contract->linkFrom) && count($contract->linkFrom)) || (is_array($contract->linkTo) && count($contract->linkTo))): ?>
|
||||
<div class="card">
|
||||
|
||||
<div class="card border-top-warning">
|
||||
<div class="card-header">
|
||||
<h5>Journaleinträge</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
|
||||
<table class="table table-striped table-sm journal">
|
||||
<?php if(is_array($contract->journals) && count($contract->journals)): ?>
|
||||
<?php foreach($contract->journals as $j): ?>
|
||||
<tr>
|
||||
<td style="white-space: nowrap" class="text-monospace"><?=date("d.m.Y H:i", $j->create)?> (<?=$j->creator?>)</td>
|
||||
|
||||
<?php if($j->type == "text" || $j->type == "phone"):?>
|
||||
<td><i class="fas <?=($j->type == "text") ? "fa-align-left bg-success" : "fa-phone bg-success"?> text-white p-1"></i></td>
|
||||
<?php if(strlen($j->text) > 120): ?>
|
||||
<td style="width: 100%" class="pointer" onclick="toggleTruncatedJournalText(<?=$j->id?>)">
|
||||
<span id="truncated-<?=$j->id?>"><i class="fas fa-caret-right"></i> <?=self::strtrim(str_replace(["\n", "\r", "\t"]," ", $j->text), 120)?></span>
|
||||
<span id="fulltext-<?=$j->id?>" class="hidden"><?=nl2br(htmlentities($j->text))?></span>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td style="width: 100%">
|
||||
<?=str_replace(["\n", "\r", "\t"]," ", $j->text)?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<?php elseif($j->type == "file"): ?>
|
||||
<td><i class="fas fa-download bg-primary text-white p-1"></i></td>
|
||||
<td style="width: 100%">
|
||||
<?php if($j->text): ?>
|
||||
<?=self::strtrim(str_replace(["\n", "\r", "\t"]," ", $j->text), 128)?><br />
|
||||
<?php endif; ?>
|
||||
<a class="text-monospace" href="<?=self::getUrl("File", "download", ["id" => $j->contractfile->file_id])?>"><?=$j->contractfile->name?></a>
|
||||
</td>
|
||||
|
||||
<?php elseif($j->type == "created_from"): ?>
|
||||
<td><i class="fas fa-cogs text-secondary pl-1"></i></td>
|
||||
<td style="width: 100%">
|
||||
<?php if($j->value == "manual"): ?>
|
||||
<em>Vertrag manuell angelegt</em>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<?php elseif($j->type == "link"): ?>
|
||||
<?php $link = new Contract($j->value); ?>
|
||||
<td><i class="fas fa-link text-secondary pl-1"></i></td>
|
||||
<td style="width: 100%"><em>Verknüpfung mit <a href="<?=self::getUrl("Contract", "view", ['contract_id' => $link->id])?>"><?=$link->id?> - <?=$link->product_name?> [<?=$link->matchcode?>]</a> erstellt</em></td>
|
||||
|
||||
<?php endif; ?>
|
||||
<td style="white-space: nowrap">
|
||||
<a href="<?=self::getUrl("Contractjournal", "edit", ["journal_id" => $j->id])?>" title="Journaleintrag bearbeiten"><i class="fas fa-edit"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="ml-3"><button type="button" class="btn btn-sm btn-info" onclick="$('#new-journal').toggle()"><i class="fas fa-plus"></i> Journaleintrag hinzufügen</button></div>
|
||||
<div id="new-journal" class="card-body hidden border-top mt-2">
|
||||
<form method="post" action="<?=self::getUrl("Contractjournal", "save")?>" enctype="multipart/form-data">
|
||||
<input type="hidden" name="contract_id" value="<?=$contract->id?>">
|
||||
|
||||
<label for="new_journal_type" class="form-label">Typ</label>
|
||||
<select name="type" id="new_journal_type" class="form-control mb-2">
|
||||
<option value="phone">Telefongespräch</option>
|
||||
<option value="text">Kommentar</option>
|
||||
<option value="file">Dateiupload</option>
|
||||
</select>
|
||||
|
||||
<label for="new_journal_text" class="form-label">Text</label>
|
||||
<textarea name="text" id="new_journal_text" class="form-control mb-2" style="height:120px;"></textarea>
|
||||
|
||||
<div id="new-journal-file-container" class="hidden">
|
||||
<label for="new_journal_file" class="form-label">Dateianhang</label>
|
||||
<input type="file" name="journal_file" id="new_journal_file" class="form-control mb-2" />
|
||||
</div>
|
||||
|
||||
<button class="btn btn-sm btn-primary" type="submit"><i class="fas fa-save mr-1"></i> Speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card border-top-success">
|
||||
<div class="card-body">
|
||||
<h4>Verknüpfte Verträge <small><a href="<?=self::getUrl("Contract", "add", ["origin_contract_id" => $contract->id])?>"><i class="fas fa-plus"></i>Neuen Contract anlegen</a></small></h4>
|
||||
|
||||
<?php if((is_array($contract->linkFrom) && count($contract->linkFrom)) || (is_array($contract->linkTo) && count($contract->linkTo))): ?>
|
||||
<table class="table table-striped table-sm table-bordered table-hover">
|
||||
<tr>
|
||||
<th>Kunde</th>
|
||||
<th>Contract ID</th>
|
||||
<th>Typ</th>
|
||||
<th>Produkt</th>
|
||||
<th>Matchcode</th>
|
||||
<th>Bestelldatum</th>
|
||||
<th>Fertigstellung</th>
|
||||
<th>Kündigung</th>
|
||||
@@ -254,8 +349,7 @@
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $linkcontract->owner_id])?>"><?=$linkcontract->owner->getCompanyOrName()?></a></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><a href="<?=self::getUrl("Contract", "View", ["contract_id" => $linkcontract->id])?>"><?=$linkcontract->id?></a></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><?=__($link->type, "contract")?> <?=($link->type != "link") ? $direction : ""?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><a href="<?=self::getUrl("Contract", "View", ["contract_id" => $linkcontract->id])?>"><?=$linkcontract->product_name?></a></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><a href="<?=self::getUrl("Contract", "View", ["contract_id" => $linkcontract->id])?>"><?=$linkcontract->matchcode?></a></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><a href="<?=self::getUrl("Contract", "View", ["contract_id" => $linkcontract->id])?>"><?=$linkcontract->product_name?> [<?=$linkcontract->matchcode?>]</a></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><?=($linkcontract->order_date) ? date('d.m.Y', $linkcontract->order_date) : ""?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><?=($linkcontract->finish_date) ? date('d.m.Y', $linkcontract->finish_date) : ""?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><?=($linkcontract->cancel_date) ? date('d.m.Y', $linkcontract->cancel_date) : ""?></td>
|
||||
@@ -265,9 +359,10 @@
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -279,4 +374,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#new_journal_type').change(function() {
|
||||
if($('#new_journal_type').val() == "file") {
|
||||
$('#new-journal-file-container').show();
|
||||
} else {
|
||||
$('#new-journal-file-container').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function toggleTruncatedJournalText(id) {
|
||||
$("#truncated-" + id).toggle();
|
||||
$("#fulltext-" + id).toggle();
|
||||
}
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card border-top-success">
|
||||
<div class="card-body">
|
||||
<h3 class="text-center mb-3"><?=$contract->product_name?> (<?=$contract->id?>)</h3>
|
||||
|
||||
@@ -53,34 +53,77 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card border-top-info">
|
||||
<div class="card-body">
|
||||
<h4 class="text-center mb-3">Konfiguration bearbeiten</h4>
|
||||
<?php if(is_array($groups) && count($groups)): ?>
|
||||
<form method="post" action="<?=self::getUrl("Contractconfig", "Save")?>">
|
||||
<form id="contract-config-form" method="post" action="<?=self::getUrl("Contractconfig", "Save")?>">
|
||||
<input type="hidden" name="contract_id" value="<?=$contract->id?>" />
|
||||
<table class="table table-sm table-borderless view-table">
|
||||
<?php foreach($groups as $group): ?>
|
||||
<tr class="bg-light">
|
||||
<th><h4><u><?=$group->name?></u></h4></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php foreach($group->items as $item): ?>
|
||||
<tr>
|
||||
<th style="max-width: 50vw;"><?=$item->displayname?>:</th>
|
||||
<td style="width: 50vw;">
|
||||
<?php if($item->type == "enum"): ?>
|
||||
<select class="form-control" name="itemvalues[<?=$item->id?>]">
|
||||
<?php foreach($item->getTypedataArray() as $option): ?>
|
||||
<option value="<?=$option?>" <?=($item->getValue() == $option) ? "selected='selected'" : ""?>><?=$option?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php else: ?>
|
||||
<input type="text" class="form-control <?=(is_array($error_items) && in_array($item->id, $error_items)) ? "invalid" : ""?>" name="itemvalues[<?=$item->id?>]" value="<?=(isset($request)) ? $request->itemvalues[$item->id] : $item->getValue()?>" />
|
||||
<?php endif; ?>
|
||||
<small><?=$item->description?></small>
|
||||
</td>
|
||||
<tr class="bg-light">
|
||||
<th><h4><u><?=$group->name?></u></h4></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php foreach($group->items as $item): ?>
|
||||
<?php
|
||||
$inputname = "itemvalues[".$item->id."]";
|
||||
if($item->multiple) {
|
||||
$inputname .= "[]";
|
||||
}
|
||||
$inputid = "itemvalues_".$item->id;
|
||||
$array_count = 0;
|
||||
?>
|
||||
<?php if($item->multiple): ?>
|
||||
<?php foreach($item->getValue() as $item_value): ?>
|
||||
<tr id="tr-<?=$inputid?>_<?=$array_count?>">
|
||||
<th style="max-width: 50vw;"><?=$item->displayname?><span class="array_counter"> (<?=$array_count + 1?>)</span>:</th>
|
||||
<td style="width: 50vw;">
|
||||
<input type="text"
|
||||
class="form-control <?=(is_array($error_items) && in_array($item->id, $error_items)) ? "invalid" : ""?>"
|
||||
name="<?=$inputname?>"
|
||||
id="<?=$inputid?>_<?=$array_count?>"
|
||||
value="<?=(isset($request)) ? htmlentities($request->itemvalues[$item->id][$array_count]) : htmlentities($item_value)?>"
|
||||
<?=($item->multiple) ? "data-item-multiple='true'" : ""?> />
|
||||
<small><?=$item->description?></small>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $array_count++; ?>
|
||||
<?php endforeach; ?>
|
||||
<tr id="tr-<?=$inputid?>_<?=$array_count?>">
|
||||
<th style="max-width: 50vw;"><?=$item->displayname?><span class="array_counter"> (<?=$array_count + 1?>)</span>:</th>
|
||||
<td style="width: 50vw;">
|
||||
<input type="text"
|
||||
class="form-control <?=(is_array($error_items) && in_array($item->id, $error_items)) ? "invalid" : ""?>"
|
||||
name="<?=$inputname?>"
|
||||
id="<?=$inputid?>_<?=$array_count?>"
|
||||
value="<?=(isset($request)) ? htmlentities($request->itemvalues[$item->id][$array_count]) : ""?>"
|
||||
<?=($item->multiple) ? "data-item-multiple='true'" : ""?> />
|
||||
<small><?=$item->description?></small>
|
||||
</td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<tr id="tr-<?=$inputid?>_0">
|
||||
<th style="max-width: 50vw;"><?=$item->displayname?>:</th>
|
||||
<td style="width: 50vw;">
|
||||
<?php if($item->type == "enum"): ?>
|
||||
<select class="form-control" name="<?=$inputname?>" id="<?=$inputid?>" <?=($item->multiple) ? "data-item-multiple='true'" : ""?>>
|
||||
<?php foreach($item->getTypedataArray() as $option): ?>
|
||||
<option value="<?=htmlentities($option)?>" <?=($item->getValue() == $option) ? "selected='selected'" : ""?>><?=htmlentities($option)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php else: ?>
|
||||
<input type="text"
|
||||
class="form-control <?=(is_array($error_items) && in_array($item->id, $error_items)) ? "invalid" : ""?>"
|
||||
name="<?=$inputname?>"
|
||||
id="<?=$inputid?>_0"
|
||||
value="<?=(isset($request)) ? htmlentities($request->itemvalues[$item->id]) : htmlentities($item->getValue())?>"
|
||||
<?=($item->multiple) ? "data-item-multiple='true'" : ""?> />
|
||||
<?php endif; ?>
|
||||
<small><?=$item->description?></small>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
@@ -105,4 +148,73 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#contract-config-form input").each(function() {
|
||||
var input = this;
|
||||
if(!$(input).attr("name")) return;
|
||||
|
||||
//console.log(this);
|
||||
console.log($(input).attr("name"));
|
||||
if($(input).data("item-multiple")) {
|
||||
$(input).change(function() {
|
||||
addMultipleValueField($(this).prop("id"));
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function addMultipleValueField(id) {
|
||||
console.log(id);
|
||||
|
||||
var id_match = id.match(/^itemvalues_(\d+)_(\d+)$/);
|
||||
var elem_id = id_match[1];
|
||||
var last_elem_count = 0;
|
||||
|
||||
var stop = false;
|
||||
|
||||
// find last input
|
||||
$("input[id^=itemvalues_" + elem_id + "_").each(function() {
|
||||
console.log("input id: " + this.id)
|
||||
console.log("value: " + $(this).val());
|
||||
|
||||
if(!$(this).val()) {
|
||||
stop = true;
|
||||
return false;
|
||||
}
|
||||
var this_count_match = this.id.match(/^itemvalues_\d+_(\d+)$/);
|
||||
var this_count = this_count_match[1]
|
||||
if(this_count.length) {
|
||||
console.log("last_elem_count: " + last_elem_count);
|
||||
console.log("this count: " + this_count)
|
||||
last_elem_count = Math.max(this_count, last_elem_count);
|
||||
}
|
||||
});
|
||||
|
||||
if(stop) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(!elem_id.length && !last_elem_count.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var new_tr = $("#tr-" + id).clone();
|
||||
console.log(new_tr);
|
||||
|
||||
var new_count = parseInt(last_elem_count) + 1;
|
||||
new_tr.prop("id", "tr-itemvalues_" + elem_id + "_" + new_count);
|
||||
|
||||
new_tr.find("td input[type=text]").prop("id", "itemvalues_" + elem_id + "_" + new_count);
|
||||
new_tr.find("td input[type=text]").val("");
|
||||
new_tr.find("td input[type=text]").change(function() {
|
||||
addMultipleValueField($(this).prop("id"));
|
||||
});
|
||||
new_tr.find("span.array_counter").text(" (" + (parseInt(new_count) + 1) + ")");
|
||||
$(new_tr).insertAfter($("#tr-" + id));
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control" name="name" placeholder="Gruppenname..." />
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-plus"></i> Gruppe hinzufügen</button>
|
||||
<button type="submit" class="btn btn-purple"><i class="fas fa-plus"></i> Gruppe hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -45,163 +45,196 @@
|
||||
</div>
|
||||
|
||||
<?php if(is_array($configgroups) && count($configgroups)): ?>
|
||||
<div class="row">
|
||||
<?php foreach($configgroups as $group): ?>
|
||||
<h4>Gruppe <?=$group->name?> <small><a href="#" onclick="$('#item-form-<?=$group->id?>').toggle()"><i class="fas fa-plus"></i> Neues Element erstellen</a></small></h4>
|
||||
|
||||
<div class="card hidden" id="item-form-<?=$group->id?>">
|
||||
<div class="card-body">
|
||||
<form method="post" action="<?=self::getUrl("ContractconfigItem", "save")?>">
|
||||
<input type="hidden" name="group_id" value="<?=$group->id?>" />
|
||||
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
|
||||
<div class="row col">
|
||||
<h5>Neues Config Element</h5>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_new_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
|
||||
<input type="text" class="form-control" id="item_new_name" name="name" value="" />
|
||||
|
||||
<div class="col-6 border pb-1">
|
||||
|
||||
<h4><?=$group->name?> <small><a href="#" onclick="$('#item-form-<?=$group->id?>').toggle(); return false;"><i class="fas fa-plus"></i> Neues Element erstellen</a></small></h4>
|
||||
|
||||
<div class="card hidden" id="item-form-<?=$group->id?>">
|
||||
<div class="card-body">
|
||||
<form method="post" action="<?=self::getUrl("ContractconfigItem", "save")?>">
|
||||
<input type="hidden" name="group_id" value="<?=$group->id?>" />
|
||||
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
|
||||
<div class="row col">
|
||||
<h5>Neues Config Element</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_new_type">Datentyp</label>
|
||||
<select class="form-control" id="item_new_type" name="type" onchange='toggleTypedata("new")'>
|
||||
<option value="string">String</option>
|
||||
<option value="int">Ganzzahl</option>
|
||||
<option value="decimal">Dezimalzahl</option>
|
||||
<option value="enum">Auswahl</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group" id="typedata_new">
|
||||
<div class="enum hidden">
|
||||
<label for="item_new_data">Auswahldaten (1 Element pro Zeile)</label>
|
||||
<textarea class="form-control" style="height: 128px" id="item_new_data" name="data"></textarea>
|
||||
</div>
|
||||
<div class="pattern">
|
||||
<label for="item_new_pattern">Regex Pattern</label>
|
||||
<input type="text" class="form-control" id="item_new_pattern" name="pattern" value="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_new_displayname">Anzeigename</label>
|
||||
<input type="text" class="form-control" id="item_new_displayname" name="displayname" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_new_description">Beschreibung</label>
|
||||
<input type="text" class="form-control" id="item_new_description" name="description" value="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col">
|
||||
<input type="submit" class="btn btn-primary" value="Speichern" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(is_array($group->items) && count($group->items)): ?>
|
||||
<?php $i = 0; foreach($group->items as $item): ?>
|
||||
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-action" onclick="$('#item-edit-<?=$item->id?>').toggle()"><span class="text-monospace text-pink"><?=$item->name?></span> - <?=$item->displayname?> [<?=$item->type?>]</a>
|
||||
|
||||
|
||||
<div class="card hidden" id="item-edit-<?=$item->id?>">
|
||||
<div class="card-body">
|
||||
|
||||
<form method="post" action="<?=self::getUrl("ContractconfigItem", "save")?>">
|
||||
<input type="hidden" name="item_id" value="<?=$item->id?>" />
|
||||
<input type="hidden" name="group_id" value="<?=$group->id?>" />
|
||||
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_<?=$item->id?>_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
|
||||
<input type="text" class="form-control" id="item_<?=$item->id?>_name" name="name" value="<?=$item->name?>" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<div class="form-group">
|
||||
<label for="item_new_<?=$item->id?>_order">Sort</label>
|
||||
<input type="text" class="form-control" id="item_new_<?=$item->id?>_order" name="order" value="" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_<?=$item->id?>_type">Datentyp</label>
|
||||
<select class="form-control" id="item_<?=$item->id?>_type" name="type" onchange="toggleTypedata(<?=$item->id?>)">
|
||||
<option value="string" <?=($item->type == "string") ? "selected='selected'" : ""?>>String</option>
|
||||
<option value="int" <?=($item->type == "int") ? "selected='selected'" : ""?>>Ganzzahl</option>
|
||||
<option value="decimal" <?=($item->type == "decimal") ? "selected='selected'" : ""?>>Dezimalzahl</option>
|
||||
<option value="enum" <?=($item->type == "enum") ? "selected='selected'" : ""?>>Auswahl</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group" id="typedata_<?=$item->id?>">
|
||||
<div class="enum <?=($item->type != "enum") ? "hidden" : ""?>">
|
||||
<label for="item_<?=$item->id?>_data">Auswahldaten (1 Element pro Zeile)</label>
|
||||
<textarea class="form-control" style="height: 128px" id="item_<?=$item->id?>_data" name="data"><?=$item->typedata?></textarea>
|
||||
</div>
|
||||
<div class="pattern <?=($item->type != "string") ? "hidden" : ""?>">
|
||||
<label for="item_<?=$item->id?>_pattern">Regex Pattern</label>
|
||||
<input type="text" class="form-control" id="item_<?=$item->id?>_pattern" name="pattern" value="<?=$item->pattern?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_<?=$item->id?>_displayname">Anzeigename</label>
|
||||
<input type="text" class="form-control" id="item_<?=$item->id?>_displayname" name="displayname" value="<?=$item->displayname?>" />
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="item_new_<?=$group->id?>_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
|
||||
<input type="text" class="form-control" id="item_new_<?=$group->id?>_name" name="name" value="" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_<?=$item->id?>_description">Beschreibung</label>
|
||||
<input type="text" class="form-control" id="item_<?=$item->id?>_description" name="description" value="<?=$item->description?>" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_new_<?=$group->id?>_type">Datentyp</label>
|
||||
<select class="form-control" id="item_new_<?=$group->id?>_type" name="type" onchange='toggleTypedata("new_<?=$group->id?>"); return false;'>
|
||||
<option value="string">String</option>
|
||||
<option value="int">Ganzzahl</option>
|
||||
<option value="decimal">Dezimalzahl</option>
|
||||
<option value="enum">Auswahl</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group" id="typedata_new_<?=$group->id?>">
|
||||
<div class="enum hidden">
|
||||
<label for="item_new_<?=$group->id?>_data">Auswahldaten (1 Element pro Zeile)</label>
|
||||
<textarea class="form-control" style="height: 128px" id="item_new_<?=$group->id?>_data" name="data"></textarea>
|
||||
</div>
|
||||
<div class="pattern">
|
||||
<label for="item_new_pattern">Regex Pattern</label>
|
||||
<input type="text" class="form-control" id="item_new_<?=$group->id?>_pattern" name="pattern" value="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-11 float-left">
|
||||
<input type="submit" class="btn btn-primary" value="Speichern" />
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_new_<?=$group->id?>_displayname">Anzeigename</label>
|
||||
<input type="text" class="form-control" id="item_new_<?=$group->id?>_displayname" name="displayname" value="" />
|
||||
</div>
|
||||
<div class="col-md-1 float-right">
|
||||
<small><a class="text-danger" href="<?=self::getUrl("Contractconfig", "deleteItem", ['id' => $item->id])?>" onclick="if(!confirm('Attribut wirklich löschen?')) return false;"><i class="fas fa-trash-alt"></i> löschen</a></small>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_new_<?=$group->id?>_description">Beschreibung</label>
|
||||
<input type="text" class="form-control" id="item_new_<?=$group->id?>_description" name="description" value="" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group text-center">
|
||||
<label for="item_<?=$item->id?>_multiple">Mehrfach eintragbar</label>
|
||||
<input type="checkbox" class="form-control" id="item_<?=$item->id?>_multiple" name="multiple" value="1" <?=($item->multiple) ? "checked='checked'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col">
|
||||
<input type="submit" class="btn btn-purple" value="Speichern" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php $i++; endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $i++; endforeach; ?>
|
||||
|
||||
<?php if(is_array($group->items) && count($group->items)): ?>
|
||||
<?php $i = 0; foreach($group->items as $item): ?>
|
||||
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-action bg-soft-warning" onclick="$('#item-edit-<?=$item->id?>').toggle(); return false;"><i class="fas fa-caret-right pr-1"></i> <span class="text-monospace"><?=($item->order) ? str_pad($item->order, 2, "0", STR_PAD_LEFT) : ""?></span> <span class="text-monospace bg-purple text-white ml-1 p-1"><?=$item->name?></span> - <?=$item->displayname?> [<?=$item->type?>]</a>
|
||||
|
||||
<div class="card hidden" id="item-edit-<?=$item->id?>">
|
||||
<div class="card-body">
|
||||
|
||||
<form method="post" action="<?=self::getUrl("ContractconfigItem", "save")?>">
|
||||
<input type="hidden" name="item_id" value="<?=$item->id?>" />
|
||||
<input type="hidden" name="group_id" value="<?=$group->id?>" />
|
||||
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<div class="form-group">
|
||||
<label for="item_<?=$item->id?>_order">Sort</label>
|
||||
<input type="text" class="form-control" id="item_<?=$item->id?>_order" name="order" value="<?=$item->order?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="item_<?=$item->id?>_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
|
||||
<input type="text" class="form-control" id="item_<?=$item->id?>_name" name="name" value="<?=$item->name?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_<?=$item->id?>_type">Datentyp</label>
|
||||
<select class="form-control" id="item_<?=$item->id?>_type" name="type" onchange="toggleTypedata(<?=$item->id?>)">
|
||||
<option value="string" <?=($item->type == "string") ? "selected='selected'" : ""?>>String</option>
|
||||
<option value="int" <?=($item->type == "int") ? "selected='selected'" : ""?>>Ganzzahl</option>
|
||||
<option value="decimal" <?=($item->type == "decimal") ? "selected='selected'" : ""?>>Dezimalzahl</option>
|
||||
<option value="enum" <?=($item->type == "enum") ? "selected='selected'" : ""?>>Auswahl</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group" id="typedata_<?=$item->id?>">
|
||||
<div class="enum <?=($item->type != "enum") ? "hidden" : ""?>">
|
||||
<label for="item_<?=$item->id?>_data">Auswahldaten (1 Element pro Zeile)</label>
|
||||
<textarea class="form-control" style="height: 128px" id="item_<?=$item->id?>_data" name="data"><?=$item->typedata?></textarea>
|
||||
</div>
|
||||
<div class="pattern <?=($item->type != "string") ? "hidden" : ""?>">
|
||||
<label for="item_<?=$item->id?>_pattern">Regex Pattern</label>
|
||||
<input type="text" class="form-control" id="item_<?=$item->id?>_pattern" name="pattern" value="<?=$item->pattern?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_<?=$item->id?>_displayname">Anzeigename</label>
|
||||
<input type="text" class="form-control" id="item_<?=$item->id?>_displayname" name="displayname" value="<?=htmlentities($item->displayname)?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="item_<?=$item->id?>_description">Beschreibung</label>
|
||||
<input type="text" class="form-control" id="item_<?=$item->id?>_description" name="description" value="<?=$item->description?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group text-center">
|
||||
<label for="item_<?=$item->id?>_multiple">Mehrfach eintragbar</label>
|
||||
<input type="checkbox" class="form-control" id="item_<?=$item->id?>_multiple" name="multiple" value="1" <?=($item->multiple) ? "checked='checked'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-10 float-left">
|
||||
<input type="submit" class="btn btn-purple" value="Speichern" />
|
||||
</div>
|
||||
<div class="col-md-2 float-right text-right">
|
||||
<small><a class="text-danger" href="<?=self::getUrl("ContractconfigItem", "delete", ['id' => $item->id])?>" onclick="if(!confirm('Attribut wirklich löschen?')) return false;"><i class="fas fa-trash-alt"></i> löschen</a></small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $i++; endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php $i++; endforeach; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<i>Keine Configgruppen gefunden</i>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
<li class="breadcrumb-item active">Device Detail</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Device: <span class="font-weight-normal ml-1"><?= $devices->data->name ?></span>
|
||||
<span class="ml-2">
|
||||
<h4 class="page-title">Device: <span class="font-weight-normal ml-1"><?= $devices->data->name ?></span> <span class="ml-2">
|
||||
<a href="<?= self::getUrl("Device", "edit", ["id" => $devices->id, 'returnto' => "device-detail"]) ?>">
|
||||
<button class="btn btn-primary">Bearbeiten</button>
|
||||
</a>
|
||||
|
||||
@@ -1,25 +1,11 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<?php
|
||||
foreach ($devicetypes as $devicetype) {
|
||||
$deviceTypes[$devicetype->id] = $devicetype->devicemanufactor->name . " " . $devicetype->name;
|
||||
$deviceTypes[$devicetype->id]=$devicetype->devicemanufactor->name . " " . $devicetype->name;
|
||||
}
|
||||
asort($deviceTypes);
|
||||
|
||||
if ($device->price == "0.00") {
|
||||
$price = "";
|
||||
} else {
|
||||
$price = $device->price;
|
||||
}
|
||||
if ($device->power == "0.0") {
|
||||
$power = "";
|
||||
} else {
|
||||
$power = $device->power;
|
||||
}
|
||||
if (isset($_GET['returnto']) && $_GET['returnto'] == "device-detail") {
|
||||
$cancelUrl = self::getUrl("Device", "Detail", ["id" => $device->id]);
|
||||
} else {
|
||||
$cancelUrl = self::getUrl("Device");
|
||||
}
|
||||
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- start page title -->
|
||||
|
||||
@@ -4,7 +4,7 @@ $pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Device";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="<?=self::getResourcePath()?>assets/css/datatables-std.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -129,13 +129,13 @@ $pagination_entity_name = "Device";
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [9];
|
||||
var hidesearch=[9];
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="<?= self::getResourcePath() ?>assets/js/datatables-std.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/datatables-std.js"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
$term_id = $order->terminations[0]->id;
|
||||
$op = OrderProductModel::getFirst(['order_id' => $order->id, 'termination_id' => $term_id]);
|
||||
|
||||
if($order->finish_date) {
|
||||
$billing_start = $order->finish_date;
|
||||
} else {
|
||||
$billing_start = date('U');
|
||||
}
|
||||
|
||||
if($op->billing_delay) {
|
||||
$billing_start = strtotime("+".$op->billing_delay." months");
|
||||
}
|
||||
|
||||
$subject = "";
|
||||
if($order->upgrade) {
|
||||
$subject .= "[UPGRADE] ";
|
||||
}
|
||||
/*$subject .= $order->terminations[0]->building->network->name." - "
|
||||
."Verr. ab ".date("m", $billing_start)."/".date("Y", $billing_start)." - "
|
||||
.$order->owner->customer_number." - "
|
||||
.str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName()));
|
||||
*/
|
||||
|
||||
$subject .= "[".str_replace(["\r","\n"], " ", $op->product->owner->getCompanyOrName())."] Produkt fertiggestellt - ";
|
||||
|
||||
if(is_array($order->terminations) && count($order->terminations)) {
|
||||
$subject .= $order->terminations[0]->building->network->name;
|
||||
}
|
||||
|
||||
$this->setReturnValue([
|
||||
'subject' => $subject,
|
||||
|
||||
'from_email' => "workspace.admin@xinon.at",
|
||||
'from_email_name' => "thetool"
|
||||
]);
|
||||
|
||||
$nbe_total = 0;
|
||||
?>
|
||||
<?php if($order->upgrade): ?>
|
||||
Achtung: UPGRADE
|
||||
<?php endif; ?>
|
||||
project: verrechnung
|
||||
type: Verrechnung
|
||||
status: Neu
|
||||
priority: Standard
|
||||
start date: <?=date("Y-m-01", $billing_start)?>
|
||||
|
||||
due date: <?=date("Y-m-01", $billing_start)?>
|
||||
|
||||
Kundennummer: <?=($op->product->owner->customer_number) ? $op->product->owner->customer_number : "null"?>
|
||||
|
||||
Kundenname: <?=str_replace("\n", "", str_replace("\r\n", " ", $op->product->owner->getCompanyOrName()))?>
|
||||
|
||||
Telefon: <?=($op->product->owner->phone) ? $op->product->owner->phone : "null"?>
|
||||
|
||||
Netzgebiet: <?=$order->terminations[0]->building->network->name?>
|
||||
|
||||
Bauabschnitt: <?=(($order->terminations[0]->building->networksection_id) ? $order->terminations[0]->building->networksection->name : "<kein Bauabschnitt>")?>
|
||||
|
||||
Verrechungsstart: <?=date("m", $billing_start)?>/<?=date("Y", $billing_start)?>
|
||||
|
||||
|
||||
### Rechnungspositionen
|
||||
|
||||
| Anzahl | Produktname | Verrechungsperiode | Preis periodisch | Preis Herstellung | NBE |
|
||||
|--------|-------------|--------------------|-------------------|-------------------|-----|
|
||||
<?php foreach($order->products as $op): ?>
|
||||
<?php if($op->price_nbe > 0.0) $nbe_total += ($op->price_nbe / $op->billing_period); ?>
|
||||
| <?=$op->amount?> | <?=$op->product->name?> | <?=($op->billing_period == 12) ? "Jährlich " : (($op->billing_period == 1) ? "Monatlich" : $op->billing_period."-monatlich")?> | ~~EUR <?=$op->price?>~~ | ~~EUR <?=$op->price_setup?>~~ | EUR <?=$op->price_nbe?> |
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
**Monatliches NBE:** EUR <?=sprintf("%.04f",$nbe_total)?>
|
||||
@@ -2,16 +2,29 @@
|
||||
|
||||
$customer_string = str_replace(["\r","\n"], " ", $order->owner->getCompanyOrName())." [".$order->owner->customer_number."]";
|
||||
|
||||
$subject = "Neue Rufnummerportierung ($customer_string)";
|
||||
$subject = "Rufnummernmitnahme $customer_string";
|
||||
|
||||
$this->setReturnValue([
|
||||
'subject' => $subject,
|
||||
'to' => "portierung@xinon.at",
|
||||
'from_email' => TT_OUTGOING_EMAIL,
|
||||
'from_email_name' => TT_OUTGOING_EMAIL_NAME
|
||||
'to' => "workspace@xinon.at",
|
||||
'from_email' => "workspace.admin@xinon.at",
|
||||
'from_email_name' => "thetool"
|
||||
]);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
project: portierung
|
||||
type: Portierung
|
||||
status: Neu
|
||||
priority: Standard
|
||||
Kundennummer: <?=$order->owner->customer_number?>
|
||||
|
||||
Kundenname: <?=str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName()))?>
|
||||
|
||||
Telefon: <?=($order->owner->phone) ? $order->owner->phone : "null"?>
|
||||
|
||||
|
||||
<?=str_replace(["\r","\n"], " ", $file->creator->name)?> hat soeben eine Rufnummerportierung für den Kunden <?=$customer_string?> angelegt - siehe Dokument im Anhang. Bitte um Prüfung des Herstellungstermins und Einreichung.
|
||||
|
||||
TheTool OrderROBOT (-;
|
||||
|
||||
@@ -12,20 +12,30 @@
|
||||
$billing_start = strtotime("+".$op->billing_delay." months");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$subject = "";
|
||||
if($order->upgrade) {
|
||||
$subject .= "[UPGRADE] ";
|
||||
}
|
||||
$subject .= $order->terminations[0]->building->network->name." - "
|
||||
/*$subject .= $order->terminations[0]->building->network->name." - "
|
||||
."Verr. ab ".date("m", $billing_start)."/".date("Y", $billing_start)." - "
|
||||
.$order->owner->customer_number." - "
|
||||
.str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName()));
|
||||
*/
|
||||
|
||||
if(is_array($order->terminations) && count($order->terminations)) {
|
||||
$subject .= $order->terminations[0]->building->network->name." - ";
|
||||
}
|
||||
|
||||
$subject .= $order->owner->customer_number." - "
|
||||
.str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName()));
|
||||
|
||||
$this->setReturnValue([
|
||||
'subject' => $subject,
|
||||
|
||||
'from_email' => TT_OUTGOING_EMAIL,
|
||||
'from_email_name' => TT_OUTGOING_EMAIL_NAME
|
||||
'from_email' => "workspace.admin@xinon.at",
|
||||
'from_email_name' => "thetool"
|
||||
]);
|
||||
|
||||
$nne_products = [];
|
||||
@@ -34,44 +44,50 @@
|
||||
Achtung: UPGRADE
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
project: verrechnung
|
||||
type: Verrechnung
|
||||
status: Neu
|
||||
priority: Standard
|
||||
start date: <?=date("Y-m-01", $billing_start)?>
|
||||
|
||||
due date: <?=date("Y-m-01", $billing_start)?>
|
||||
|
||||
Kundennummer: <?=$order->owner->customer_number?>
|
||||
|
||||
Kundenname: <?=str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName()))?>
|
||||
|
||||
Telefon: <?=($order->owner->phone) ? $order->owner->phone : "null"?>
|
||||
|
||||
Netzgebiet: <?=$order->terminations[0]->building->network->name?>
|
||||
|
||||
Bauabschnitt: <?=(($order->terminations[0]->building->networksection_id) ? $order->terminations[0]->building->networksection->name : "<kein Bauabschnitt>")?>
|
||||
|
||||
Kundennummer: <?=$order->owner->customer_number?>
|
||||
|
||||
Kunde: <?=str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName()))?>
|
||||
|
||||
Verrechungsstart: <?=date("m", $billing_start)?>/<?=date("Y", $billing_start)?>
|
||||
|
||||
|
||||
Rechnungspositionen
|
||||
====================
|
||||
### Rechnungspositionen
|
||||
|
||||
Anzahl | Produktname | Verrechungsperiode | Preis periodisch | Preis Herstellung
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
| Anzahl | Produktname | Verrechungsperiode | Preis periodisch | Preis Herstellung |
|
||||
|--------|-------------|--------------------|-------------------|-------------------|
|
||||
<?php foreach($order->products as $op): ?>
|
||||
<?php if($op->price_nne > 0.0) $nne_products[] = $op; ?>
|
||||
<?=sprintf("%-12s", substr($op->amount,0,12))?> | <?=utf8_encode(sprintf("%-42s", utf8_decode(substr($op->product->name,0,42))))?> | <?=utf8_encode(sprintf("%-18s", utf8_decode(($op->billing_period == 12) ? "Jährlich " : (($op->billing_period == 1) ? "Monatlich" : $op->billing_period."-monatlich")) ))?> | <?=sprintf("EUR %-12s", substr($op->price,0,12))?> | EUR <?=$op->price_setup?>
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
| <?=$op->amount?> | <?=$op->product->name?> | <?=($op->billing_period == 12) ? "Jährlich " : (($op->billing_period == 1) ? "Monatlich" : $op->billing_period."-monatlich")?> | EUR <?=$op->price?> | EUR <?=$op->price_setup?> |
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if(count($nne_products)): ?>
|
||||
|
||||
Gutschriften
|
||||
=============
|
||||
### Gutschriften
|
||||
|
||||
<?php if($order->terminations[0]->building->network->owner): ?>
|
||||
Netzeigentümer: <?=$order->terminations[0]->building->network->owner->getCompanyOrName()?>
|
||||
<?php endif; ?>
|
||||
|
||||
Anzahl | Produktname | Verrechungsperiode | Bauabschnitt | NNE
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
<?php endif; ?>
|
||||
|
||||
| Anzahl | Produktname | Verrechungsperiode | Bauabschnitt | NNE |
|
||||
|--------|-------------|--------------------|--------------|-----|
|
||||
<?php foreach($nne_products as $op): ?>
|
||||
<?=sprintf("%-12s", substr($op->amount,0,12))?> | <?=utf8_encode(sprintf("%-42s", utf8_decode(substr($op->product->name,0,42))))?> | <?=utf8_encode(sprintf("%-18s", utf8_decode(($op->billing_period == 12) ? "Jährlich " : (($op->billing_period == 1) ? "Monatlich" : $op->billing_period."-monatlich")) ))?> | <?=sprintf("%-24s", substr(($op->termination->building->networksection_id) ? $op->termination->building->networksection->name : "<Kein Bauabschnitt>",0,24))?> | EUR <?=$op->price_nne?>
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
<?=$op->amount?> | <?=$op->product->name?> | <?=($op->billing_period == 12) ? "Jährlich " : (($op->billing_period == 1) ? "Monatlich" : $op->billing_period."-monatlich")?> | <?=($op->termination->building->networksection_id) ? $op->termination->building->networksection->name : "<Kein Bauabschnitt>"?> | EUR <?=$op->price_nne?> |
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php endif; // (count($nne_products))?>
|
||||
|
||||
@@ -746,7 +746,7 @@
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="price_nbe-<?=$i?>">Preis NBE</label>
|
||||
<input type="text" class="form-control" name="products[<?=$i?>][price_nbe]" id="price_nne-<?=$i?>" value="" placeholder="NBE" />
|
||||
<input type="text" class="form-control" name="products[<?=$i?>][price_nbe]" id="price_nbe-<?=$i?>" value="" placeholder="NBE" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -1527,7 +1527,7 @@
|
||||
</div> \
|
||||
<div class="col-1"> \
|
||||
<label class="form-label" for="price_nbe-' + i +'">Preis NBE</label> \
|
||||
<input type="text" class="form-control" name="products[' + i +'][price_nbe]" id="price_nne-' + i +'" value="" placeholder="NBE" /> \
|
||||
<input type="text" class="form-control" name="products[' + i +'][price_nbe]" id="price_nbe-' + i +'" value="" placeholder="NBE" /> \
|
||||
</div> \
|
||||
<?php endif; ?>
|
||||
\
|
||||
|
||||
@@ -31,7 +31,23 @@
|
||||
|
||||
<form method="get" action="<?=self::getUrl("Preorder")?>">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if($me->is("preorderfront")): ?>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_kunde">Kunde (Name oder Adresse)</label>
|
||||
<input type="text" class="form-control" name="filter[kunde]" id="filter_kunde" value="<?=$filter['kunde']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_address">Anschlussadresse</label>
|
||||
<input type="text" class="form-control" name="filter[address]" id="filter_address" value="<?=$filter['address']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_hausnummer">Hausnummer</label>
|
||||
<input type="text" class="form-control" name="filter[hausnummer]" id="filter_hausnummer" value="<?=$filter['hausnummer']?>" />
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_preordercampaign_id">Kampagne</label>
|
||||
<select name="filter[preordercampaign_id]" id="filter_preordercampaign_id" class="form-control">
|
||||
@@ -91,7 +107,10 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary">Filter anwenden</button>
|
||||
@@ -100,12 +119,34 @@
|
||||
<?php else: ?>
|
||||
<a class="btn btn-secondary" href="<?=self::getUrl("Preorder")?>">Filter zurücksetzen</a>
|
||||
<?php endif; ?>
|
||||
<?php if(!$me->is("Preorderfront")): ?>
|
||||
<button type="submit" formaction="<?=self::getUrl("Preorder", "export")?>" id="export-button" class="btn btn-outline-success ml-2"><i class="fas fa-download"></i> CSV-Export</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row col" id="map-link">
|
||||
<a href="#" class="btn btn-success" onclick="refreshMap()"><i class="far fa-map"></i> Übersichtskarte einblenden</a>
|
||||
</div>
|
||||
<div class="row hidden" id="map-row">
|
||||
<div id="preorder-map" style="height:70vh; width: 100%"></div>
|
||||
<div class="row mt-1">
|
||||
<div class="col">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" onclick="centerMap()"><i class="far fa-dot-circle fa-fw"></i> Zentrieren</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-success" onclick="toggleTileset()" title="Zwischen Karte und Satellitenbild umschalten"><i class="far fa-arrow-right-arrow-left fa-fw"></i> Karte/Satellit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div class="card">
|
||||
@@ -129,7 +170,7 @@
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>Kampagne</th>
|
||||
<?php if(!$me->is("preorderfront")): ?><th>Kampagne</th><?php endif; ?>
|
||||
<th>Bestelltyp</th>
|
||||
<th>Status</th>
|
||||
<th>Anschlussadresse</th>
|
||||
@@ -137,20 +178,20 @@
|
||||
<th>Kunde</th>
|
||||
<th>Kontakt</th>
|
||||
<th>Partner</th>
|
||||
<th>Anschluss</th>
|
||||
<th>Attribute</th>
|
||||
<th>Erstellt</th>
|
||||
<th>Zuletzt bearbeitet</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($preorders as $preorder): ?>
|
||||
<tr>
|
||||
<td><?=$preorder->campaign->name?></td>
|
||||
<?php if(!$me->is("preorderfront")): ?><td><?=$preorder->campaign->name?></td><?php endif; ?>
|
||||
<td><?=__($preorder->type, "preorder")?></td>
|
||||
<td>Aufgenommen</td>
|
||||
<?php if($preorder->building_id): ?>
|
||||
<td><?=$preorder->building->street?><br /><?=$preorder->building->zip?> <?=$preorder->building->city?></td>
|
||||
<?php elseif($preorder->adb_hausnummer_id): ?>
|
||||
<td <?=($preorder->address_created) ? "class='alert-warning' title='Manuell angelegt'" : ""?>">
|
||||
<td <?=($preorder->address_created) ? "class='alert-warning' title='Adresse manuell angelegt'" : ""?>">
|
||||
<?=$preorder->adb_hausnummer->strasse->name?>
|
||||
<?=$preorder->adb_hausnummer->hausnummer?><br />
|
||||
<?=($preorder->adb_wohneinheit_id) ? ((string)$preorder->adb_wohneinheit ? $preorder->adb_wohneinheit."<br />" : "") : "<i class='text-pink'><keine Wohneinheit></i><br />"?>
|
||||
@@ -173,12 +214,17 @@
|
||||
</td>
|
||||
|
||||
<td><?=($preorder->partner_id) ? $preorder->partner->getCompanyOrName() : ""?></td>
|
||||
<td><?=($preorder->termination) ? $preorder->termination->code : ""?></td>
|
||||
<td>
|
||||
<label><input type="checkbox" name="attributes_bep_specified" id="attributes_bep_specified-<?=$preorder->id?>" data-preorder-id="<?=$preorder->id?>" value="1" <?=(is_array($preorder->attribute) && array_key_exists("bep_specified", $preorder->attribute) && $preorder->attribute["bep_specified"]) ? "checked='checked'" : ""?> /> Borderpoint festgelegt</label><br />
|
||||
<label><input type="checkbox" name="attributes_inhouse_cabling_supplied" id="attributes_inhouse_cabling_supplied-<?=$preorder->id?>" data-preorder-id="<?=$preorder->id?>" value="1" <?=(is_array($preorder->attribute) && array_key_exists("inhouse_cabling_supplied", $preorder->attribute) && $preorder->attribute["inhouse_cabling_supplied"]) ? "checked='checked'" : ""?> /> Starterpaket erhalten</label>
|
||||
</td>
|
||||
<td><?=date('d.m.Y H:i', $preorder->create)?></td>
|
||||
<td><?=date('d.m.Y H:i', $preorder->edit)?></td>
|
||||
<td id="update-<?=$preorder->id?>"><?=date('d.m.Y H:i', $preorder->edit)?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<?php if(!$me->is("preorderfront")): ?>
|
||||
<a href="<?=self::getUrl("Preorder", "edit", ["id" => $preorder->id])?>"><i class="far fa-edit" title="Vorbestellkampagne Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Preorder", "delete", ["id" => $preorder->id, "filter" => $filter])?>" class="text-danger" onclick="if(!confirm('Vorbestellung wirklich löschen?')) return false;" title="Vorbestellung Löschen"><i class="fas fa-trash"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@@ -195,7 +241,246 @@
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#filter_type").select2({closeOnSelect: false});
|
||||
$("#filter_status").select2({closeOnSelect: false});
|
||||
$(document).ready(function() {
|
||||
$("#filter_type").select2({closeOnSelect: false});
|
||||
$("#filter_status").select2({closeOnSelect: false});
|
||||
|
||||
var attributes = ["bep_specified", "inhouse_cabling_supplied"];
|
||||
|
||||
|
||||
|
||||
attributes.forEach(function(attrib) {
|
||||
$("input[name=attributes_" + attrib + "]").change(function(ev) {
|
||||
// save new value
|
||||
var cb = $("#" + ev.currentTarget.id);
|
||||
var value = $(cb).is(":checked") ? 1 : 0;
|
||||
var preorder_id = $(cb).data("preorder-id");
|
||||
|
||||
$.post("<?=self::getUrl("Preorder", "Api")?>", {
|
||||
do: "saveAttribute",
|
||||
id: preorder_id,
|
||||
attribute: attrib,
|
||||
value: value
|
||||
},
|
||||
function(success) {
|
||||
if(success.status == "OK") {
|
||||
attributeSuccess(success.result);
|
||||
} else {
|
||||
attributeError(success.result.id, success.result.attribute);
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function attributeSuccess(result) {
|
||||
var id = result.id
|
||||
var attribute = result.attribute
|
||||
var update = result.update
|
||||
|
||||
$("#attributes_" + attribute + "-" + id).parent().removeClass("text-danger");
|
||||
$("#attributes_" + attribute + "-" + id).parent().addClass("text-success");
|
||||
if(update) {
|
||||
$("#update-" + id).text(update);
|
||||
$("#update-" + id).addClass("text-success")
|
||||
}
|
||||
setTimeout(function() {
|
||||
$("#attributes_" + attribute + "-" + id).parent().removeClass("text-success");
|
||||
$("#update-" + id).removeClass("text-success")
|
||||
}, 2000, id, attribute);
|
||||
}
|
||||
|
||||
function attributeError(id, attribute) {
|
||||
$("#attributes_" + attribute + "-" + id).parent().addClass("text-danger");
|
||||
$("#attributes_" + attribute + "-" + id).prop("checked", !$("#attributes_" + attribute + "-" + id).is(":checked"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Globals for map display
|
||||
*/
|
||||
|
||||
var preorderMap;
|
||||
var preorders = [];
|
||||
var markers = [];
|
||||
var markerState = true;
|
||||
var mapCenterPos = [<?=TT_PLACEHOLDER_GPS_LAT?>, <?=TT_PLACEHOLDER_GPS_LONG?>];
|
||||
var tileLayers = [];
|
||||
var tilesets = ["mapbox/streets-v12", "mapbox/satellite-streets-v12"];
|
||||
var currentTileset = "mapbox/streets-v12";
|
||||
|
||||
function toggleTileset() {
|
||||
if(currentTileset == "mapbox/streets-v12") {
|
||||
currentTileset = "mapbox/satellite-streets-v12";
|
||||
} else {
|
||||
currentTileset = "mapbox/streets-v12";
|
||||
}
|
||||
|
||||
console.log("renderMap");
|
||||
renderMap(true);
|
||||
}
|
||||
|
||||
function refreshMap() {
|
||||
// get Preorders and render map
|
||||
$('#map-link').hide();
|
||||
$('#map-row').show();
|
||||
getMapdata();
|
||||
$([document.documentElement, document.body]).animate({
|
||||
scrollTop: $("#preorder-map").offset().top - 150
|
||||
}, 500);
|
||||
}
|
||||
|
||||
function renderMap(tilesetChangeOnly = false) {
|
||||
if(preorderMap) {
|
||||
if(!tilesetChangeOnly) {
|
||||
markers.forEach(function(m) {
|
||||
preorderMap.removeLayer(m);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
preorderMap = L.map('preorder-map').setView([<?=TT_PLACEHOLDER_GPS_LAT?>, <?=TT_PLACEHOLDER_GPS_LONG?>], 12);
|
||||
}
|
||||
|
||||
if(!(currentTileset in tileLayers)) {
|
||||
tileLayers[currentTileset] = L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
minZoom: 6,
|
||||
maxZoom: 22,
|
||||
id: currentTileset,
|
||||
accessToken: '<?=TT_MAPBOX_TILE_API_TOKEN?>'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
tileLayers[currentTileset].addTo(preorderMap);
|
||||
// remove all tilesets not currently wanted
|
||||
tilesets.forEach(function(t) {
|
||||
if(t != currentTileset && preorderMap.hasLayer(tileLayers[t])) {
|
||||
preorderMap.removeLayer(tileLayers[t]);
|
||||
}
|
||||
});
|
||||
|
||||
L.MakiMarkers.accessToken = '<?=TT_MAPBOX_TILE_API_TOKEN?>';
|
||||
|
||||
if(!tilesetChangeOnly) {
|
||||
addMarkers();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function addMarkers() {
|
||||
if(!Array.isArray(preorders) | !preorders.length) {
|
||||
return false;
|
||||
}
|
||||
// draw markers and calculate center position
|
||||
var all_coords = [];
|
||||
preorders.forEach(function(preorder) {
|
||||
if(!preorder.gps_lat || !preorder.gps_long) {
|
||||
return;
|
||||
}
|
||||
var gps = [preorder.gps_lat, preorder.gps_long];
|
||||
all_coords.push(gps);
|
||||
|
||||
var icon_color = "#acf0ab";
|
||||
var icon_name = "home";
|
||||
|
||||
if(preorder.type == "interest") {
|
||||
icon_color = "#ec98a2";
|
||||
} else if(preorder.type == "provision") {
|
||||
icon_color = "#ffcd8b";
|
||||
}
|
||||
|
||||
if(preorder.connection_type.match(/^multi/i) || preorder.count > 1) {
|
||||
icon_name = "town";
|
||||
} else if(preorder.connection_type.match(/^apartment-building/i)) {
|
||||
icon_name = "city";
|
||||
} else if(preorder.connection_type.match(/^business/i)) {
|
||||
icon_name = "industry";
|
||||
}
|
||||
|
||||
var marker_popup_content = '<?php include(realpath(dirname(__FILE__))."/include/preorder_popup.php");?>';
|
||||
|
||||
// popup fields
|
||||
[
|
||||
["street", preorder.adb_strasse],
|
||||
["hausnummer", preorder.adb_hausnummer],
|
||||
["zip", preorder.adb_plz],
|
||||
["city", preorder.adb_ort],
|
||||
["type", preorder.type_label],
|
||||
["typestyle", "color: #000; background-color: " + icon_color],
|
||||
["adrcd", preorder.adrcd],
|
||||
["extref", preorder.extref ? preorder.extref : ""],
|
||||
["gps", (preorder.gps_lat && preorder.gps_long) ? preorder.gps_lat + ", " + preorder.gps_long : ""],
|
||||
["contact", (preorder.company ? preorder.company + " " : preorder.firstname + " " + preorder.lastname)],
|
||||
["phone", preorder.phone ? preorder.phone : ""],
|
||||
["email", preorder.email ? preorder.email : ""],
|
||||
["connectiontype", preorder.connection_type_label],
|
||||
["count", preorder.connection_count]
|
||||
].forEach(function(item) {
|
||||
marker_popup_content = marker_popup_content.replaceAll("{{" + item[0].toUpperCase() + "}}", item[1]);
|
||||
});
|
||||
|
||||
var icon = L.MakiMarkers.icon({icon: icon_name, color: icon_color, size: "l"});
|
||||
var marker = L.marker(gps, {icon: icon}).addTo(preorderMap).bindPopup(marker_popup_content);
|
||||
markers[preorder.id] = marker;
|
||||
});
|
||||
|
||||
|
||||
// calculate center position
|
||||
mapCenterPos = GetCenterFromDegrees(all_coords);
|
||||
preorderMap.setView(mapCenterPos, 12);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function centerMap() {
|
||||
preorderMap.setView(mapCenterPos, 12);
|
||||
}
|
||||
|
||||
// gets preorders and calls renderMap()
|
||||
function getMapdata() {
|
||||
filter = getFilter();
|
||||
|
||||
$.post('<?=self::getUrl("Preorder", "Api")?>', {
|
||||
'do': "getFilteredPreorders",
|
||||
filter: filter
|
||||
},function(success) {
|
||||
if(success.status == "OK") {
|
||||
|
||||
if(Array.isArray(success.result.preorders)) {
|
||||
preorders = success.result.preorders;
|
||||
renderMap();
|
||||
}
|
||||
}
|
||||
},
|
||||
'json'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function getFilter() {
|
||||
var fields = ['preordercampaign_id', 'status', 'type', 'address', 'kunde', 'address_source'];
|
||||
var filter = {};
|
||||
fields.forEach(function(field) {
|
||||
if(!field) {
|
||||
return;
|
||||
}
|
||||
let val = $('#filter_' + field).val();
|
||||
if(val.length) {
|
||||
filter[field] = val;
|
||||
}
|
||||
});
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
<?php if(is_array($filter) && count($filter)): ?>
|
||||
//refreshMap();
|
||||
<?php endif; ?>
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
ob_end_flush();
|
||||
header("Content-type: text/csv");
|
||||
header('Content-disposition: attachment; filename="preorder-export-'.date('Y-m-d_H-i-s').'.csv"');
|
||||
?>
|
||||
Kampagne;Bestelltyp;Status;Anschlusstyp;Anschluss Strasse;Anschluss Hausnummer;Anschluss PLZ;Anschluss Ort;Anschluss Wohneinheit;Anzahl Anschlüsse;Kunde Firma;Kunde UID;Kunde Vorname;Kunde Nachname;Kunde Strasse;Kunde PLZ;Kunde Ort;Kunde Telefon;Kunde Email;Partner;BEP festgelegt;Starterpaket erhalten;
|
||||
<?php
|
||||
$line = 0;
|
||||
|
||||
while($data = mysqli_fetch_object($res)):
|
||||
$campaign = Layout::getMfValuecacheObject("Preordercampaign", $data->preordercampaign_id);
|
||||
$status = Layout::getMfValuecacheObject("Preorderstatus", $data->status_id);
|
||||
$hausnummer = Layout::getMfValuecacheObject("ADBHausnummer", $data->adb_hausnummer_id);
|
||||
$wohneinheit = Layout::getMfValuecacheObject("ADBWohneinheit", $data->adb_wohneinheit_id);
|
||||
$strasse = Layout::getMfValuecacheObject("ADBStrasse", $hausnummer->strasse_id);
|
||||
$gemeinde = Layout::getMfValuecacheObject("ADBGemeinde",$strasse->gemeinde_id);
|
||||
$ortschaft = Layout::getMfValuecacheObject("ADBOrtschaft", $hausnummer->ortschaft_id);
|
||||
$plz = Layout::getMfValuecacheObject("ADBPlz", $hausnummer->plz_id);
|
||||
$partner = Layout::getMfValuecacheObject("Address", $hausnummer->partner_id);
|
||||
|
||||
$unit_data = "";
|
||||
if($wohneinheit->block) $unit_data .= "Block ".$wohneinheit->block;
|
||||
if($wohneinheit->stiege) $unit_data .= "Stiege ".$wohneinheit->stiege;
|
||||
if($wohneinheit->stock) $unit_data .= "Stock ".$wohneinheit->stock;
|
||||
if($wohneinheit->tuer) $unit_data .= "Tür ".$wohneinheit->tuer;
|
||||
|
||||
if($wohneinheit->unit_string) {
|
||||
$unit_data = $wohneinheit->unit_string;
|
||||
}
|
||||
|
||||
$bep = false;
|
||||
$inhouse = false;
|
||||
|
||||
if($data->attributes) {
|
||||
$attribs = json_decode($data->attributes, true);
|
||||
if($attribs['bep_specified']) $bep = true;
|
||||
if($attribs['inhouse_cabling_supplied']) $inhouse = true;
|
||||
}
|
||||
|
||||
?>
|
||||
"<?=$campaign->name?>";"<?=__($data->type,"preorder")?>";"<?=$status->name?>";"<?=__($data->connection_type,"preorder")?>";"<?=$strasse->name?>";"<?=$hausnummer->hausnummer?>";"<?=$plz->plz?>";"<?=$ortschaft->name?>";"<?=$unit_data?>";<?=$data->connection_count?>;"<?=$data->company?>";"<?=$data->uid?>";"<?=$data->firstname?>";"<?=$data->lastname?>";"<?=$data->street?>";"<?=$data->zip?>";"<?=$data->city?>";"<?=$data->phone?>";"<?=$data->email?>";"<?=$partner->getCompanyOrName()?>";<?=($bep) ? "1" : "0"?>;<?=($inhouse) ? "1" : "0"?>;
|
||||
<?php
|
||||
$i++;
|
||||
if($line % 1000 === 0) {
|
||||
flush();
|
||||
}
|
||||
|
||||
endwhile;
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
ob_start();
|
||||
?>
|
||||
<div class="font-weight-bold">
|
||||
{{STREET}} {{HAUSNUMMER}}<br />
|
||||
{{ZIP}} {{CITY}}
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<table class="table table-sm table-striped">
|
||||
<tr>
|
||||
<th class="font-weight-bold">Bestelltyp:</th>
|
||||
<td style="{{TYPESTYLE}}">{{TYPE}}</td>
|
||||
</tr><tr>
|
||||
<th class="font-weight-bold">Gebäudetyp:</th>
|
||||
<td>{{CONNECTIONTYPE}}</td>
|
||||
</tr><tr>
|
||||
<th class="font-weight-bold">Anschlüsse:</th>
|
||||
<td>{{COUNT}}</td>
|
||||
</tr><tr>
|
||||
<th class="font-weight-bold">GPS:</th>
|
||||
<td><a href="https://maps.google.com/maps?t=k&q=loc:{{GPS}}" target="_blank">{{GPS}}</a></td>
|
||||
</tr><tr>
|
||||
<th class="font-weight-bold">GWR Adrcd:</th>
|
||||
<td>{{ADRCD}}</td>
|
||||
</tr><tr>
|
||||
<th class="font-weight-bold">Extref:</th>
|
||||
<td>{{EXTREF}}</td>
|
||||
</tr><tr>
|
||||
<th class="font-weight-bold">Kontakt:</th>
|
||||
<td>{{CONTACT}}</td>
|
||||
</tr><tr>
|
||||
<th class="font-weight-bold">Telefon:</th>
|
||||
<td>{{PHONE}}</td>
|
||||
</tr><tr>
|
||||
<th class="font-weight-bold">Email:</th>
|
||||
<td>{{EMAIL}}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<?=str_replace("\n"," ",ob_get_clean())?>
|
||||
@@ -95,7 +95,7 @@
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($campaigns as $camp): ?>
|
||||
<tr style="<?=(date('U') >= $camp->from && date('U') <= $camp->to) ? "background-color: #f0fff0" : ""?>">
|
||||
<tr <?=(date('U') >= $camp->from && date('U') <= $camp->to) ? "class='active'" : ""?>>
|
||||
<td class="text-right">
|
||||
<?php if(date('U') >= $camp->from && date('U') <= $camp->to): ?>
|
||||
<span class="fa-stack" title="Vorbestellkampagne aktiv">
|
||||
|
||||
@@ -37,6 +37,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="active">Aktiv *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="active" id="active">
|
||||
<option value="1" <?=($product->active == 1) ? "selected='selected'" : ""?>>Aktiv</option>
|
||||
<option value="0" <?=($product->active != 1) ? "selected='selected'" : ""?>>Deaktiviert</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="description">Beschreibung</label>
|
||||
<div class="col-lg-10">
|
||||
@@ -237,7 +247,8 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2"></label>
|
||||
<div class="col-lg-10">
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
<button type="submit" name="return" value="form" class="btn btn-primary mr-1">Speichern</button>
|
||||
<button type="submit" name="return" value="index" class="btn btn-primary">Speichern und zur Übersicht</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -62,20 +62,16 @@
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_name">Name</label>
|
||||
<input type="text" class="form-control" name="filter[name]" id="filter_name" value="<?=$filter['name']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_customer_type">Kundentyp</label>
|
||||
<select name="filter[customer_type]" id="filter_customer_type" class="form-control">
|
||||
<label class="form-label" for="filter_external_id">Produktbesitzer</label>
|
||||
<select class="select2 form-control" name="filter[external_id]" id="filter_external_id">
|
||||
<option></option>
|
||||
<option value="business" <?=(is_array($filter) && array_key_exists('customer_type', $filter) && $filter['customer_type'] == "business") ? "selected='selected'" : ""?>>Business</option>
|
||||
<option value="residential" <?=(is_array($filter) && array_key_exists('customer_type', $filter) && $filter['customer_type'] == "residential") ? "selected='selected'" : ""?>>Residential</option>
|
||||
<?php foreach(AddressModel::search(['addresstype' => ['productowner']]) as $owner): ?>
|
||||
<option value="<?=$owner->id?>" <?=(is_array($filter) && array_key_exists('external_id', $filter) && $filter['external_id'] == $owner->id) ? "selected='selected'" : ""?>><?=$owner->getCompanyOrName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_external">Externe Produkte</label>
|
||||
<select name="filter[external]" id="filter_external" class="form-control">
|
||||
<option></option>
|
||||
@@ -84,11 +80,35 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_name">Name</label>
|
||||
<input type="text" class="form-control" name="filter[name]" id="filter_name" value="<?=$filter['name']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_customer_type">Kundentyp</label>
|
||||
<select name="filter[customer_type]" id="filter_customer_type" class="form-control">
|
||||
<option></option>
|
||||
<option value="business" <?=(is_array($filter) && array_key_exists('customer_type', $filter) && $filter['customer_type'] == "business") ? "selected='selected'" : ""?>>Business</option>
|
||||
<option value="residential" <?=(is_array($filter) && array_key_exists('customer_type', $filter) && $filter['customer_type'] == "residential") ? "selected='selected'" : ""?>>Residential</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_active">Status</label>
|
||||
<select name="filter[active]" id="filter_active" class="form-control">
|
||||
<option value="1" <?=(is_array($filter) && array_key_exists('active', $filter) && $filter['active']) ? "selected='selected'" : ""?>>Aktiviert</option>
|
||||
<option value="0" <?=(is_array($filter) && array_key_exists('active', $filter) && !$filter['active']) ? "selected='selected'" : ""?>>Deaktiviert</option>
|
||||
<option value="all" <?=(is_array($filter) && array_key_exists('active', $filter) && $filter['active'] == "all") ? "selected='selected'" : ""?>>Alle anzeigen</option>
|
||||
</select>
|
||||
</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("Product")?>">Filter zurücksetzen</a>
|
||||
<a class="btn btn-secondary" href="<?=self::getUrl("Product", "", ["resetFilter" => 1])?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
<!--<div class="col">
|
||||
<button class="btn btn-info" type="button" onclick="refreshMap()"><i class="far fa-map"></i> Auf Karte anzeigen</button>
|
||||
@@ -155,6 +175,13 @@
|
||||
<script type="text/javascript">
|
||||
$("#filter_productgroup_id").select2({closeOnSelect: false});
|
||||
$("#filter_producttech_id").select2({closeOnSelect: false});
|
||||
|
||||
$("#filter_external_id").change(function() {
|
||||
console.log($("#filter_external_id").val());
|
||||
if($("#filter_external_id").val()) {
|
||||
$("#filter_external").val(1);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
|
||||
@@ -64,6 +64,34 @@
|
||||
<option value="true" <?=(isset($user) && $user->is("Technician")) ? "selected='selected'" : ""?>>Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="preorderfront">Preorder Frontdesk:</label>
|
||||
<select name="preorderfront" class="form-control">
|
||||
<option value="false" <?=(isset($user) && !$user->is("preorderfront")) ? "selected='selected'" : ""?>>No</option>
|
||||
<option value="true" <?=(isset($user) && $user->is("preorderfront")) ? "selected='selected'" : ""?>>Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="preorder-network-container">
|
||||
<label for="preorder_networks">Preorder Netzgebiete:</label>
|
||||
<?php
|
||||
$pns = [];
|
||||
if($user->id) {
|
||||
$pns = json_decode((new WorkerFlag($user->id,"preorder_networks"))->value());
|
||||
if(!$pns) {
|
||||
$pns = [];
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<select name="preorder_networks[]" id="preorder_networks" class="form-control" multiple="multiple">
|
||||
<?php foreach(NetworkModel::getAll() as $network): ?>
|
||||
<option value="<?=$network->id?>" <?=(in_array($network->id, $pns)) ? "selected='selected'" : ""?>><?=$network->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<small>Überschreibt Netzgebiete der Firma. Wenn leer werden Netzgebiete der Firma angezeigt</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" id="password" name="password" class="form-control" value="" />
|
||||
@@ -113,9 +141,30 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#address_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#address_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#preorder_networks").select2({
|
||||
allowClear: true,
|
||||
placeholder: "",
|
||||
closeOnSelect: false
|
||||
});
|
||||
|
||||
<?php if(!$user || !$user->is("preorderfront")): ?>
|
||||
$("#preorder-network-container").hide();
|
||||
<?php endif; ?>
|
||||
|
||||
$("select[name=preorderfront]").change(function() {
|
||||
if($("select[name=preorderfront]").val() == "true") {
|
||||
$("#preorder-network-container").show();
|
||||
} else {
|
||||
$("#preorder-network-container").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Voicenumberblock")?>">Rufnummernblöcke</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Voicenumberblock")?>#block_id=<?=$number->block->id?>"><?=$number->block->number_first?> - <?=$number->block->number_last?></a></li>
|
||||
<li class="breadcrumb-item active"><?=$number->getFullNumber()?> bearbeiten</li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Voicenumberblock")?>#block_id=<?=$number->block->id?>"><?=$number->block->first?> - <?=$number->block->last?></a></li>
|
||||
<li class="breadcrumb-item active"><?=$number->number?> bearbeiten</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Rufnummer <?=$number->getFullNumber()?></h4>
|
||||
<h4 class="page-title">Rufnummer <?=$number->number?></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -116,10 +116,10 @@
|
||||
<select name="disabled_reason" class="form-control">
|
||||
<option></option>
|
||||
<option value="ported_out" <?=($number->disabled_reason == "ported_out") ? "selected='selected'" : ""?>>Zu neuem Provider portiert</option>
|
||||
<option value="ported_back">Zum Anker zurückportiert</option>
|
||||
<option value="reserved">Reserviert</option>
|
||||
<option value="legacy">Legacy</option>
|
||||
<option value="damaged">Kaputt</option>
|
||||
<option value="ported_back" <?=($number->disabled_reason == "ported_back") ? "selected='selected'" : ""?>>Zum Anker zurückportiert</option>
|
||||
<option value="reserved" <?=($number->disabled_reason == "reserved") ? "selected='selected'" : ""?>>Reserviert</option>
|
||||
<option value="legacy" <?=($number->disabled_reason == "legacy") ? "selected='selected'" : ""?>>Legacy</option>
|
||||
<option value="damaged" <?=($number->disabled_reason == "damaged") ? "selected='selected'" : ""?>>Kaputt</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -110,9 +110,9 @@
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->name?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->countrycode?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->areacode?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->base?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->getFirst()?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->getLast()?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->short_prefix?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->first?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->last?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->comment?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Voicenumberblock", "edit", ["id" => $block->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
|
||||
@@ -3,21 +3,22 @@
|
||||
?>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Rufnummern <?=$block->countrycode?><?=$block->areacode?><?=$block->getFirst()?> - <?=$block->countrycode?><?=$block->areacode?><?=$block->getLast()?></h4>
|
||||
<h4 class="header-title">Rufnummern <?=$block->countrycode?> <?=$block->areacode?> <?=$block->short_first?> - <?=$block->countrycode?> <?=$block->areacode?> <?=$block->short_last?></h4>
|
||||
<table class="table table-striped table-sm">
|
||||
<tr>
|
||||
<th>Nummer</th>
|
||||
<th>Aktiv</th>
|
||||
<th>Contract ID</th>
|
||||
<th>Routing</th>
|
||||
<th>Portierungsstatus</th>
|
||||
<th>Sperre</th>
|
||||
<th>Entsperrung</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php $i = 0; foreach(range($block->getFirst(), $block->getLast()) as $number): ?>
|
||||
<?php $num = null; $num = VoicenumberModel::getFirst(['voicenumberblock_id' => $block_id, 'number' => ($block->number_prepend_zero) ? "0$number" : $number]) ?>
|
||||
<?php $i = 0; foreach(range($block->first, $block->last) as $number): ?>
|
||||
<?php $num = VoicenumberModel::getFirst(['voicenumberblock_id' => $block_id, 'number' => $number]) ?>
|
||||
<tr>
|
||||
<td><?=$block->countrycode?> <?=$block->areacode?> <?=($block->number_prepend_zero) ? "0" : ""?><?=$number?></td>
|
||||
<td><?=$number?></td>
|
||||
<td>
|
||||
<?php if($num->active): ?>
|
||||
<span class="text-success"><i class="fas fa-check"></i></span>
|
||||
@@ -26,6 +27,7 @@
|
||||
<span class="text-danger"><i class="fas fa-times"></i></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><a href="<?=self::getUrl("Contract", "view", ["id" => $num->contract_id])?>"><?=$num->contract_id?></a></td>
|
||||
<td><?=__($num->routing)?></td>
|
||||
<td>
|
||||
<?php if($num->ported_out): ?>
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/bootstrap-select.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap-autocomplete.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>datatables/datatables.min.js"></script>
|
||||
|
||||
|
||||
<?php if(MFAPPNAME == "devthetool"): ?>
|
||||
<style type="text/css">
|
||||
|
||||
+128
-115
@@ -4,122 +4,135 @@
|
||||
<!-- Navigation Menu-->
|
||||
<ul class="navigation-menu">
|
||||
|
||||
<?php if(!$me->is("Admin")): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="<?=self::getUrl("Dashboard")?>"><i class="fe-airplay"></i> Dashboard</a>
|
||||
</li>
|
||||
<?php if($me->is("preorderfront")): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fal fa-money-bill-wave"></i>Verkauf <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Preorder")?>"><i class="far fa-calendar-lines text-info"></i> Vorbestellung</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<?php if(!$me->is("Admin")): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="<?=self::getUrl("Dashboard")?>"><i class="fe-airplay"></i> Dashboard</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="<?=self::getUrl("Dashboard")?>"><i class="fe-airplay"></i> Dashboard <div class="arrow-down"></div></a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("News")?>"><i class="far fa-th-list text-info"></i> News</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin", "netowner"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="far fa-database"></i>Stammdaten <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-sub-submenu font-weight-bold"><a>Betriebsstammdaten</a></li>
|
||||
<li><a href="<?=self::getUrl("Address")?>"><i class="fad fa-user text-info"></i> Personen & Firmen</a></li>
|
||||
<li><a href="<?=self::getUrl("Product")?>"><i class="far fa-rectangle-list text-info"></i> Produkte</a></li>
|
||||
<li><a href="<?=self::getUrl("Productgroup")?>"><i class="far fa-list-tree text-info"></i> Produktgruppen</a></li>
|
||||
|
||||
<li><a href="<?=self::getUrl("Network")?>"><i class="fad fa-network-wired text-info"></i> Netzgebiete</a></li>
|
||||
|
||||
<li class="has-sub-submenu" ><a href="<?=self::getUrl("Pop")?>"><i class="fad fa-house text-info"></i> Pops</a></li>
|
||||
<li ><a href="<?=self::getUrl("Devicemanufactor")?>"><i class="fad fa-router text-info"></i> Geräte Hersteller</a></li>
|
||||
<li><a href="<?=self::getUrl("Devicetype")?>"><i class="fad fa-router text-info"></i> Geräte Typen</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("Device")?>"><i class="fad fa-router text-info "></i> Devices</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("User")?>"><i class="fad fa-users text-info"></i> Benutzer</a></li>
|
||||
<li class="has-sub-submenu font-weight-bold mt-1"><a>Grundstammdaten</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin", "netowner"])): ?>
|
||||
<li><a href="<?=self::getUrl("AddressDB")?>"><i class="fas fa-city text-info"></i> GWR / AddressDB</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li><a href="<?=self::getUrl("Producttech")?>"><i class="fad fa-microchip text-info"></i> Technologien</a></li>
|
||||
<!--<li><a href="<?=self::getUrl("Contractconfig")?>"><i class="fad fa-gear text-info"></i> ContractConfig</a></li>-->
|
||||
<?php endif; ?>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","pipeplanner","pipeworker","lineworker"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fas fa-hard-hat"></i>Netzbau <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner"])): ?><li><a href="<?=self::getUrl("Building")?>"><i class="fas fa-city text-info"></i> Objekte & Anschlüsse</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeworker","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Pipework")?>"><i class="fad fa-wrench text-info"></i> Tiefbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Linework")?>"><i class="fas fa-ethernet text-info"></i> Leitungsbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin", "netowner", "netoperator", "lineworker"])): ?><li class="has-sub-submenu"><a href="<?=self::getUrl("Patching")?>"><i class="fas fa-plug text-info"></i> Patchungen</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin", "netowner","pipeplanner","lineplanner","pipeworker", "netoperator", "lineworker"])): ?><li><a href="<?=self::getUrl("Filestore")?>"><i class="fas fa-file text-info"></i> Dateiablage</a></li><?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fad fa-running"></i>Netzbetrieb <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Cpeprovisioning")?>"><i class="fad fa-hdd text-info"></i> CPE Provisioning</a></li>
|
||||
<li><a href="<?=self::getUrl("Cpeshipping")?>"><i class="fad fa-shipping-fast text-info"></i> CPE Versand</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fad fa-phone"></i>Telefonie <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Voicenumberblock")?>"><i class="fad fa-blender-phone text-info"></i> Rufnummernblöcke</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin","netowner","salespartner"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fal fa-money-bill-wave"></i>Verkauf <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<?php if($me->is(["Admin","netowner","salespartner"])): ?>
|
||||
<li><a href="<?=self::getUrl("Preordercampaign")?>"><i class="far fa-calendar-lines text-info"></i> Vorbestellung</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin","salespartner"])): ?>
|
||||
<li><a href="<?=self::getUrl("Order")?>"><i class="far fa-file-signature text-info"></i> Bestellungen</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<!--
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fas fa-shopping-basket"></i>Verträge<div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Contract")?>"><i class="fas fa-file-contract"></i> Verträge</a></li>
|
||||
<li><hr /></li>
|
||||
<li><a href="<?=self::getUrl("Contractconfiggroup")?>"><i class="fas fa-wrench"></i> Vertragsconfig</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
-->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="<?=self::getUrl("Dashboard")?>"><i class="fe-airplay"></i> Dashboard <div class="arrow-down"></div></a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("News")?>"><i class="far fa-th-list text-info"></i> News</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin", "netowner"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="far fa-database"></i>Stammdaten <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-sub-submenu font-weight-bold"><a>Betriebsstammdaten</a></li>
|
||||
<li><a href="<?=self::getUrl("Address")?>"><i class="fad fa-user text-info"></i> Personen & Firmen</a></li>
|
||||
<li><a href="<?=self::getUrl("Product")?>"><i class="far fa-rectangle-list text-info"></i> Produkte</a></li>
|
||||
<li><a href="<?=self::getUrl("Productgroup")?>"><i class="far fa-list-tree text-info"></i> Produktgruppen</a></li>
|
||||
|
||||
<li><a href="<?=self::getUrl("Network")?>"><i class="fad fa-network-wired text-info"></i> Netzgebiete</a></li>
|
||||
|
||||
<li class="has-sub-submenu" ><a href="<?=self::getUrl("Pop")?>"><i class="fad fa-house text-info"></i> Pops</a></li>
|
||||
<li ><a href="<?=self::getUrl("Devicemanufactor")?>"><i class="fad fa-router text-info"></i> Geräte Hersteller</a></li>
|
||||
<li><a href="<?=self::getUrl("Devicetype")?>"><i class="fad fa-router text-info"></i> Geräte Typen</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("Device")?>"><i class="fad fa-router text-info "></i> Devices</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("User")?>"><i class="fad fa-users text-info"></i> Benutzer</a></li>
|
||||
<li class="has-sub-submenu font-weight-bold mt-1"><a>Grundstammdaten</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin", "netowner"])): ?>
|
||||
<li><a href="<?=self::getUrl("AddressDB")?>"><i class="fas fa-city text-info"></i> GWR / AddressDB</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li><a href="<?=self::getUrl("Producttech")?>"><i class="fad fa-microchip text-info"></i> Technologien</a></li>
|
||||
<!--<li><a href="<?=self::getUrl("Contractconfig")?>"><i class="fad fa-gear text-info"></i> ContractConfig</a></li>-->
|
||||
<?php endif; ?>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","pipeplanner","pipeworker","lineworker"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fas fa-hard-hat"></i>Netzbau <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner"])): ?><li><a href="<?=self::getUrl("Building")?>"><i class="fas fa-city text-info"></i> Objekte & Anschlüsse</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeworker","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Pipework")?>"><i class="fad fa-wrench text-info"></i> Tiefbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Linework")?>"><i class="fas fa-ethernet text-info"></i> Leitungsbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin", "netowner", "netoperator", "lineworker"])): ?><li class="has-sub-submenu"><a href="<?=self::getUrl("Patching")?>"><i class="fas fa-plug text-info"></i> Patchungen</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin", "netowner","pipeplanner","lineplanner","pipeworker", "netoperator", "lineworker"])): ?><li><a href="<?=self::getUrl("Filestore")?>"><i class="fas fa-file text-info"></i> Dateiablage</a></li><?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fad fa-running"></i>Netzbetrieb <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Cpeprovisioning")?>"><i class="fad fa-hdd text-info"></i> CPE Provisioning</a></li>
|
||||
<li><a href="<?=self::getUrl("Cpeshipping")?>"><i class="fad fa-shipping-fast text-info"></i> CPE Versand</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fad fa-phone"></i>Telefonie <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Voicenumberblock")?>"><i class="fad fa-blender-phone text-info"></i> Rufnummernblöcke</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","salespartner"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fal fa-money-bill-wave"></i>Verkauf <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<?php if($me->is(["Admin","netowner","salespartner"])): ?>
|
||||
<li><a href="<?=self::getUrl("Preordercampaign")?>"><i class="far fa-calendar-lines text-info"></i> Vorbestellung</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin","salespartner"])): ?>
|
||||
<li><a href="<?=self::getUrl("Order")?>"><i class="far fa-file-signature text-info"></i> Bestellungen</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<!--
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fas fa-shopping-basket"></i>Verträge<div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Contract")?>"><i class="fas fa-file-contract"></i> Verträge</a></li>
|
||||
<li><hr /></li>
|
||||
<li><a href="<?=self::getUrl("Contractconfiggroup")?>"><i class="fas fa-wrench"></i> Vertragsconfig</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
-->
|
||||
</ul>
|
||||
<!-- End navigation menu -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user