changes linework to openable list

This commit is contained in:
Frank Schubert
2022-02-15 20:41:59 +01:00
parent a7ed80f6b9
commit 9f908e56db
17 changed files with 729 additions and 11 deletions
+118
View File
@@ -0,0 +1,118 @@
<?php
$siteTitle = "Benutzer";
?>
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>">the-tool</a></li>
<li class="breadcrumb-item"><a href="<?=self::getUrl("Contract")?>">Verträge</a></li>
<li class="breadcrumb-item">Vertragsconfig</li>
</ol>
</div>
<h4 class="page-title">Vertragsconfig</h4>
</div>
</div>
</div>
<!-- end page title -->
<!-- Main content -->
<div class="row">
<div class="col-lg">
<div class="card">
<div class="card-body">
<?php if(is_array($groups) && count($groups)): ?>
<?php foreach($groups as $group): ?>
<h4>Gruppe <?=$group->name?></h4>
<form method="post" action="<?=$this->getUrl("User","save")?>">
<?php if(is_array($group->items) && count($group->items)): ?>
<?php foreach($group->items as $item): ?>
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
<div class="row">
<div class="col-md-11 float-left">
<h4 class="header-title">Attribut <span class="text-monospace text-pink"><?=$item->name?></span></h4>
</div>
<div class="col-md-1 float-right">
<small><a class="text-danger" href="<?=self::getUrl("ProducttechAttribute", "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 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="item[<?=$item->id?>][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="item[<?=$item->id?>][type]">
<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="ddata_<?=$item->id?>">
<label for="item_<?=$item->id?>_data">Auswahldaten (1 Element pro Zeile)</label>
<textarea class="form-control" id="item_<?=$item->id?>_data" name="item[<?=$item->id?>][data]"><?=$item->typedata?></textarea>
<input type="text" class="form-control" id="item_<?=$item->id?>_pattern" name="item[<?=$item->id?>][pattern]" value="<?=$item->pattern?>" />
</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="item[<?=$item->id?>][displayname]" value="<?=$item->displayname?>" />
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="item_<?=$item->id?>_value">Standardwert</label>
<input type="text" class="form-control" id="item_<?=$item->id?>_value" name="item[<?=$item->id?>][value]" value="<?=$item->value?>">
</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="item[<?=$item->id?>][description]" value="<?=$item->description?>" />
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php else: ?>
<i>Keine Vertragsconfig Gruppen gefunden</i>
<?php endif; ?>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$("#address_id").select2({
allowClear: true,
placeholder: ""
});
</script>
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?><?php
+75 -2
View File
@@ -137,6 +137,17 @@
<?php if(!count($terminations)) continue; ?>
<h4><?=$networkname?></h4>
<table class="table workflow-table mb-2">
<tr>
<th>Anschluss</th>
<th>Baustatus</th>
<th>Patchstatus</th>
<th>BB hergestellt</th>
<th>BEP montiert</th>
<th>K-Kabel eingeblasen</th>
<th>Spleiß Netz</th>
<th>Spleiß Kunde</th>
<th>Fertig</th>
</tr>
<?php $bcount = 0; foreach($terminations as $term): ?>
<?php
$rowspan = 1;
@@ -146,7 +157,48 @@
}
}
?>
<tr id="termination-<?=$term->id?>" class="table-bg-<?=($bcount % 2 == 0) ? "even" : "odd"?>">
<?php if($bcount > 0): ?>
<tr id="termination-<?=$term->id?>-top-header" class="hidden">
<th>Anschluss</th>
<th>Baustatus</th>
<th>Patchstatus</th>
<th>BB hergestellt</th>
<th>BEP montiert</th>
<th>K-Kabel eingeblasen</th>
<th>Spleiß Netz</th>
<th>Spleiß Kunde</th>
<th>Fertig</th>
</tr>
<?php endif ?>
<tr id="termination-<?=$term->id?>-summary" class="pointer table-bg-<?=($bcount % 2 == 0) ? "even" : "odd"?>">
<td onclick="togglePipework(<?=$term->id?>)">
<div class="name">
<?php if($term->building->gps_lat && $term->building->gps_long): ?>
<a href="https://maps.google.com/maps?t=k&q=loc:<?=$term->building->gps_lat?>+<?=$term->building->gps_long?>" target="_blank">
<i class='fas fa-globe-europe'></i> <strong style="white-space: nowrap;"><?=$term->building->street?></strong>
</a>
<?php else: ?>
<strong style="white-space: nowrap;"><?=$term->building->street?></strong>
<?php endif; ?>
<br />
<span class="text-monospace">[<?=__($term->building->status->name."-b")?>]</span>
<br />
<a href="<?=self::getUrl("Pipework", "Index", ["filter" => ["code" => $term->building->code]])?>" target="_blank"><span class="text-success"><?=$term->code?></span></a>
</div>
<div class="up-arrow hidden">
<i class="fas fa-angle-up"></i>
</div>
</td>
<td onclick="togglePipework(<?=$term->id?>)"><?=(empty($term->building->getWorkflowvalue('pipework_finished') && empty($term->building->getWorkflowvalue('ist_pipework_finished')))) ? "<i class='fas fa-times text-danger'></i>" : "<i class='fas fa-check text-success'></i>"?></td>
<td onclick="togglePipework(<?=$term->id?>)"><?=($term->isWorkflowPatchingDone()) ? "<i class='fas fa-check text-success'></i>" : "<i class='fas fa-times text-danger'></i>" ?></td>
<td onclick="togglePipework(<?=$term->id?>)"><?=($term->getWorkflowvalue('backbone_finished') != "1") ? "<i class='fas fa-times text-danger'></i>" : "<i class='fas fa-check text-success'></i>" ?></td>
<td onclick="togglePipework(<?=$term->id?>)"><?=($term->getWorkflowvalue('bep_deployed') != "1") ? "<i class='fas fa-times text-danger'></i>" : "<i class='fas fa-check text-success'></i>" ?></td>
<td onclick="togglePipework(<?=$term->id?>)"><?=($term->getWorkflowvalue('customer_cable_injected') != "1") ? "<i class='fas fa-times text-danger'></i>" : "<i class='fas fa-check text-success'></i>" ?></td>
<td onclick="togglePipework(<?=$term->id?>)"><?=($term->getWorkflowvalue('spliced_network') != "1") ? "<i class='fas fa-times text-danger'></i>" : "<i class='fas fa-check text-success'></i>" ?></td>
<td onclick="togglePipework(<?=$term->id?>)"><?=($term->getWorkflowvalue('spliced_customer') != "1") ? "<i class='fas fa-times text-danger'></i>" : "<i class='fas fa-check text-success'></i>" ?></td>
<td onclick="togglePipework(<?=$term->id?>)"><?=($term->getWorkflowvalue('customer_passive_finished') != "1") ? "<i class='fas fa-times text-danger'></i>" : "<i class='fas fa-check text-success'></i>" ?></td>
</tr>
<tr id="termination-<?=$term->id?>" class="table-bg-<?=($bcount % 2 == 0) ? "even" : "odd"?> hidden">
<td>
<div>
<div>
@@ -196,7 +248,7 @@
Nicht fertiggestellt.
</div>
</td>
<td>
<td colspan="8">
<table class="table workflow-table table-bordered table-sm table-bg-<?=($bcount % 2 == 0) ? "odd" : "even"?>">
<tr>
<th>AP-Typ</th>
@@ -321,6 +373,19 @@
</form>
</td>
</tr>
<?php if($bcount < count($terminations) - 1): ?>
<tr id="termination-<?=$term->id?>-bottom-header" class="hidden">
<th>Anschluss</th>
<th>Baustatus</th>
<th>Patchstatus</th>
<th>BB hergestellt</th>
<th>BEP montiert</th>
<th>K-Kabel eingeblasen</th>
<th>Spleiß Netz</th>
<th>Spleiß Kunde</th>
<th>Fertig</th>
</tr>
<?php endif; ?>
<?php $bcount++; endforeach; ?>
</table>
<?php endforeach; ?>
@@ -482,6 +547,14 @@ $(document).ready(function() {
});
function togglePipework(id) {
$("#termination-" + id).toggle(200);
$("#termination-" + id + "-summary td .name").toggle();
$("#termination-" + id + "-summary td .up-arrow").toggle();
$("#termination-" + id + "-bottom-header").toggle();
$("#termination-" + id + "-top-header").toggle();
}
function validateWorkflowItem(id) {
var required_fields = {
pop_id: "int",
@@ -0,0 +1,3 @@
<?php
/** @var Terminatino $term */
?>
+2 -2
View File
@@ -53,8 +53,8 @@
<label class="col-lg-2 col-form-label" for="routing">Routing</label>
<div class="col-lg-10">
<select name="routing" class="form-control">
<option value="kolmisoft" <?=($number->routing == "kolmisoft") ? "selected='selected'" : ""?>>kolmisoft</option>
<option value="sipit" <?=($number->routing == "sipit") ? "selected='selected'" : ""?>>sipit</option>
<option value="kolmisoft" <?=($number->routing == "kolmisoft") ? "selected='selected'" : ""?>><?=__("kolmisoft")?></option>
<option value="sipit" <?=($number->routing == "sipit") ? "selected='selected'" : ""?>><?=__("sipit")?></option>
</select>
</div>
</div>
@@ -26,7 +26,7 @@
<span class="text-danger"><i class="fas fa-times"></i></span>
<?php endif; ?>
</td>
<td><?=$num->routing?></td>
<td><?=__($num->routing)?></td>
<td>
<?php if($num->ported_out): ?>
Exportiert
+14 -1
View File
@@ -87,7 +87,20 @@
</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("Contractconfig")?>"><i class="fas fa-wrench"></i> Vertragsconfig</a></li>
</ul>
</li>
<?php endif; ?>
-->
</ul>
<!-- End navigation menu -->