Added Terminations to buildings
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -183,9 +180,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#parent_id").select2({
|
$("#parent_id").select2({
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -86,8 +83,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -292,10 +288,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#network_id").select2({placeholder: ""});
|
$("#network_id").select2({placeholder: ""});
|
||||||
$("#pop_id").select2({placeholder: "", allowClear: true,});
|
$("#pop_id").select2({placeholder: "", allowClear: true,});
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -43,22 +42,128 @@
|
|||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php foreach($buildings as $building): ?>
|
<?php foreach($buildings as $building): ?>
|
||||||
<tr>
|
<tr class="building-list-tr" id="building-<?=$building->id?>">
|
||||||
<td><?=$building->network->name?></td>
|
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->network->name?></td>
|
||||||
<td><?=$building->pop->name?></td>
|
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->pop->name?></td>
|
||||||
<td><?=$building->type->name?></td>
|
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->type->name?></td>
|
||||||
<td><?=$building->code?></td>
|
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->code?></td>
|
||||||
<td><?=$building->oan_id?></td>
|
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->oan_id?></td>
|
||||||
<td>
|
<td onclick="toggleBuilding(<?=$building->id?>)">
|
||||||
<?=$building->street?><br />
|
<?=$building->street?><br />
|
||||||
<?=$building->zip?> <?=$building->city?>
|
<?=$building->zip?> <?=$building->city?>
|
||||||
</td>
|
</td>
|
||||||
<td><?=$building->units?></td>
|
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->units?></td>
|
||||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||||
<a href="<?=self::getUrl("Building", "edit", ["id" => $building->id])?>"><i class="far fa-edit" title="Objekt Bearbeiten"></i></a>
|
<a href="<?=self::getUrl("Building", "edit", ["id" => $building->id])?>"><i class="far fa-edit" title="Objekt Bearbeiten"></i></a>
|
||||||
<a href="<?=self::getUrl("Building", "delete", ["id" => $building->id])?>" class="text-danger" onclick="if(!confirm('Objekt wirklich löschen?')) return false;" title="Objekt Löschen"><i class="fas fa-trash"></i></a>
|
<a href="<?=self::getUrl("Building", "delete", ["id" => $building->id])?>" class="text-danger" onclick="if(!confirm('Objekt wirklich löschen?')) return false;" title="Objekt Löschen"><i class="fas fa-trash"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr id="building-detail-<?=$building->id?>" style="display:none; background-color:#fff">
|
||||||
|
<td colspan="8">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4 class="card-title">Anschlüsse im Objekt <strong><?=$building->code?></strong></h4>
|
||||||
|
<p>
|
||||||
|
<?=$building->street?><br />
|
||||||
|
<?=$building->zip?> <?=$building->city?>
|
||||||
|
</p>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<?php if(is_array($building->terminations) && count($building->terminations)): ?>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<th>Code</th>
|
||||||
|
<th>Bezeichung</th>
|
||||||
|
<th>Kontakt</th>
|
||||||
|
<th>Telefon</th>
|
||||||
|
<th>Email</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<?php foreach($building->terminations as $term): ?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><?=$term->code?></td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<span id="term-name-<?=$term->id?>-text"><?=$term->name?></span>
|
||||||
|
<div class="input-group" id="term-name-<?=$term->id?>-input" style="display:none">
|
||||||
|
<input type="text" class="form-control" id="term-name-<?=$term->id?>-input" value="<?=$term->name?>" />
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'name')"><i class="fas fa-check"></i></button>
|
||||||
|
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'name')"><i class="fas fa-times"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="float-right" id="term-name-<?=$term->id?>-edit">
|
||||||
|
<i class="far fa-edit text-pink" style="cursor:pointer" title="Bezeichnung Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'name')"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<span id="term-contact-<?=$term->id?>-text"><?=$term->contact?></span>
|
||||||
|
<div class="input-group" id="term-contact-<?=$term->id?>-input" style="display:none">
|
||||||
|
<input type="text" class="form-control" value="<?=$term->contact?>" />
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'contact')"><i class="fas fa-check"></i></button>
|
||||||
|
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'contact')"><i class="fas fa-times"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="float-right" id="term-contact-<?=$term->id?>-edit">
|
||||||
|
<i class="far fa-edit text-pink" style="cursor:pointer" title="Kontakt Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'contact')"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<span id="term-phone-<?=$term->id?>-text"><?=$term->phone?></span>
|
||||||
|
<div class="input-group" id="term-phone-<?=$term->id?>-input" style="display:none">
|
||||||
|
<input type="text" class="form-control" value="<?=$term->phone?>" />
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'phone')"><i class="fas fa-check"></i></button>
|
||||||
|
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'phone')"><i class="fas fa-times"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="float-right" id="term-phone-<?=$term->id?>-edit">
|
||||||
|
<i class="far fa-edit text-pink" style="cursor:pointer" title="Telefon Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'phone')"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<span id="term-email-<?=$term->id?>-text"><?=$term->email?></span>
|
||||||
|
<div class="input-group" id="term-email-<?=$term->id?>-input" style="display:none">
|
||||||
|
<input type="text" class="form-control" value="<?=$term->email?>" />
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'email')"><i class="fas fa-check"></i></button>
|
||||||
|
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'email')"><i class="fas fa-times"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="float-right" id="term-email-<?=$term->id?>-edit">
|
||||||
|
<i class="far fa-edit text-pink" style="cursor:pointer" title="Email Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'email')"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||||
|
<a href="<?=self::getUrl("Building", "delete", ["id" => $term->id])?>" class="text-danger" onclick="if(!confirm('Objekt wirklich löschen?')) return false;" title="Objekt Löschen"><i class="fas fa-trash"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="display:none;">
|
||||||
|
<td colspan="3"></td>
|
||||||
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,8 +172,56 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
<script type="text/javascript">
|
||||||
|
function toggleBuilding(id) {
|
||||||
|
$('#building-detail-' + id).toggle();
|
||||||
|
if($('#building-detail-' + id).is(":hidden")) {
|
||||||
|
$('#building-' + id).removeClass("table-info");
|
||||||
|
$('#building-' + id).removeClass("text-info");
|
||||||
|
} else {
|
||||||
|
$('#building-' + id).addClass("text-info");
|
||||||
|
$('#building-' + id).addClass("table-info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleTerminationControl(id, type) {
|
||||||
|
$("#term-" + type + "-" + id + "-text").toggle();
|
||||||
|
$("#term-" + type + "-" + id + "-input").toggle();
|
||||||
|
$("#term-" + type + "-" + id + "-edit").toggle();
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveTerminationControl(id, type) {
|
||||||
|
if(!Number.isInteger(id) || id < 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var value = $("#term-" + type + "-" + id + "-input input[type=text]").val();
|
||||||
|
|
||||||
|
$.post("<?=self::getUrl("Termination","Api")?>",
|
||||||
|
{
|
||||||
|
'do': "setValue",
|
||||||
|
id: id,
|
||||||
|
type: type,
|
||||||
|
value: value
|
||||||
|
},
|
||||||
|
function(success) {
|
||||||
|
if(success.status == "OK") {
|
||||||
|
$("#term-" + type + "-" + id + "-text").text(value);
|
||||||
|
} else {
|
||||||
|
console.log("error saving (" + type + ", '" + value + "')");
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleTerminationControl(id, type);
|
||||||
|
},
|
||||||
|
'json');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -20,8 +17,4 @@
|
|||||||
<!-- end page title -->
|
<!-- end page title -->
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -82,10 +79,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#parent_id").select2({
|
$("#parent_id").select2({
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -260,10 +257,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function toggleNetwork(id) {
|
function toggleNetwork(id) {
|
||||||
$('#network-detail-' + id).toggle();
|
$('#network-detail-' + id).toggle();
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -132,10 +129,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#parent_id").select2({
|
$("#parent_id").select2({
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -239,9 +236,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#productgroup_id").select2({
|
$("#productgroup_id").select2({
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -68,8 +65,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -183,9 +179,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#productgroup_id").select2({
|
$("#productgroup_id").select2({
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -55,8 +52,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- end container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- end wrapper -->
|
|
||||||
|
|
||||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||||
@@ -3,9 +3,6 @@
|
|||||||
?>
|
?>
|
||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -78,10 +75,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<!-- /.container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- /.content -->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#address_id").select2({
|
$("#address_id").select2({
|
||||||
|
|||||||
@@ -3,9 +3,6 @@
|
|||||||
?>
|
?>
|
||||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -74,11 +71,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- /.container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- /.content -->
|
|
||||||
|
|
||||||
<!-- Control Sidebar -->
|
<!-- Control Sidebar -->
|
||||||
<aside class="control-sidebar control-sidebar-dark">
|
<aside class="control-sidebar control-sidebar-dark">
|
||||||
<!-- Control sidebar content goes here -->
|
<!-- Control sidebar content goes here -->
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
</div> <!-- end container-fluid -->
|
||||||
|
</div>
|
||||||
|
<!-- end wrapper -->
|
||||||
|
|
||||||
<!-- Footer Start -->
|
<!-- Footer Start -->
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|||||||
@@ -36,4 +36,55 @@
|
|||||||
<?php include(realpath(dirname(__FILE__)."/")."/topbar.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/")."/topbar.php"); ?>
|
||||||
<?php include(realpath(dirname(__FILE__)."/")."/menu.php"); ?>
|
<?php include(realpath(dirname(__FILE__)."/")."/menu.php"); ?>
|
||||||
</header>
|
</header>
|
||||||
<!-- End Navigation Bar-->
|
<!-- End Navigation Bar-->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="wrapper">
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<?php if(isset($_flash_set) && $_flash_set == true): ?>
|
||||||
|
<?php if(isset($mfError) && !empty($mfError)): ?>
|
||||||
|
<div class="row mr-1">
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
<div class="col-md-10 alert alert-danger alert-dismissible">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h5><i class="icon fas fa-ban"></i> Fehler</h5>
|
||||||
|
<?=$mfError?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if(isset($mfWarning) && !empty($mfWarning)): ?>
|
||||||
|
<div class="row mr-1">
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
<div class="col-md-10 alert alert-warning alert-dismissible">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h5><i class="icon fas fa-exclamation-triangle"></i> Warnung</h5>
|
||||||
|
<?=$mfWarning?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if(isset($mfInfo) && !empty($mfInfo)): ?>
|
||||||
|
<div class="row mr-1">
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
<div class="col-md-10 alert alert-info alert-dismissible">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h5><i class="icon fas fa-info"></i> Info</h5>
|
||||||
|
<?=$mfInfo?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if(isset($mfSuccess) && !empty($mfSuccess)): ?>
|
||||||
|
<div class="row mr-1">
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
<div class="col-md-10 alert alert-success alert-dismissible">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h5><i class="icon fas fa-check"></i> Erfolgreich</h5>
|
||||||
|
<?=$mfSuccess?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
@@ -8,38 +8,7 @@ class Building extends mfBaseModel {
|
|||||||
private $type;
|
private $type;
|
||||||
private $status;
|
private $status;
|
||||||
private $pipeworker;
|
private $pipeworker;
|
||||||
|
private $terminations;
|
||||||
public function getProperty($name) {
|
|
||||||
if($this->$name == null) {
|
|
||||||
|
|
||||||
if($name == "type") {
|
|
||||||
$this->type = new Buildingtype($this->type_id);
|
|
||||||
return $this->type;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($name == "status") {
|
|
||||||
$this->status = new Buildingstatus($this->status_id);
|
|
||||||
return $this->status;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($name == "pipeworker") {
|
|
||||||
$this->pipeworker = new Address($this->pipeworker_id);
|
|
||||||
return $this->pipeworker;
|
|
||||||
}
|
|
||||||
|
|
||||||
$classname = ucfirst($name);
|
|
||||||
$idfield = $name."_id";
|
|
||||||
$this->$name = new $classname($this->$idfield);
|
|
||||||
|
|
||||||
if($this->$name->id) {
|
|
||||||
return $this->$name;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->$name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getNewObjectCode() {
|
public function getNewObjectCode() {
|
||||||
if(!$this->zip) {
|
if(!$this->zip) {
|
||||||
@@ -116,4 +85,41 @@ class Building extends mfBaseModel {
|
|||||||
return $Gridcell;
|
return $Gridcell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getProperty($name) {
|
||||||
|
if($this->$name == null) {
|
||||||
|
|
||||||
|
if($name == "type") {
|
||||||
|
$this->type = new Buildingtype($this->type_id);
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($name == "status") {
|
||||||
|
$this->status = new Buildingstatus($this->status_id);
|
||||||
|
return $this->status;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($name == "pipeworker") {
|
||||||
|
$this->pipeworker = new Address($this->pipeworker_id);
|
||||||
|
return $this->pipeworker;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($name == "terminations") {
|
||||||
|
$this->terminations = TerminationModel::search(['building_id' => $this->id]);
|
||||||
|
return $this->terminations;
|
||||||
|
}
|
||||||
|
|
||||||
|
$classname = ucfirst($name);
|
||||||
|
$idfield = $name."_id";
|
||||||
|
$this->$name = new $classname($this->$idfield);
|
||||||
|
|
||||||
|
if($this->$name->id) {
|
||||||
|
return $this->$name;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->$name;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -140,6 +140,31 @@ class BuildingController extends mfBaseController {
|
|||||||
$building->save();
|
$building->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Anschlüsse anlegen
|
||||||
|
if($building->units > 0) {
|
||||||
|
for($i = 1; $i <= $building->units; $i++) {
|
||||||
|
$data = [];
|
||||||
|
$data['building_id'] = $building->id;
|
||||||
|
$data['code'] = $building->code . "." . sprintf("%03d", $i);
|
||||||
|
|
||||||
|
if($building->units == 1) {
|
||||||
|
$data['contact'] = $building->contact;
|
||||||
|
$data['phone'] = $building->phone;
|
||||||
|
$data['email'] = $building->email;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($building->lineworker_id) {
|
||||||
|
$data['lineworker_id'] = $building->lineworker_id;
|
||||||
|
}
|
||||||
|
if($building->oan_id) {
|
||||||
|
$data['oan_id'] = $building->oan_id. "." . sprintf("%03d", $i);
|
||||||
|
}
|
||||||
|
|
||||||
|
$term = TerminationModel::create($data);
|
||||||
|
$term->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->layout()->setFlash("Objekt erfolgreich gespeichert.", "success");
|
$this->layout()->setFlash("Objekt erfolgreich gespeichert.", "success");
|
||||||
$this->redirect("Building", "Edit", ['id' => $new_id]);
|
$this->redirect("Building", "Edit", ['id' => $new_id]);
|
||||||
|
|||||||
29
application/Termination/Termination.php
Normal file
29
application/Termination/Termination.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class Termination extends mfBaseModel {
|
||||||
|
protected $forcestr = ['phone','email','note'];
|
||||||
|
|
||||||
|
private $building;
|
||||||
|
private $status;
|
||||||
|
private $lineworker;
|
||||||
|
private $creator;
|
||||||
|
private $editor;
|
||||||
|
|
||||||
|
public function getProperty($name) {
|
||||||
|
if($this->$name == null) {
|
||||||
|
|
||||||
|
$classname = ucfirst($name);
|
||||||
|
$idfield = $name."_id";
|
||||||
|
$this->$name = new $classname($this->$idfield);
|
||||||
|
|
||||||
|
if($this->$name->id) {
|
||||||
|
return $this->$name;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->$name;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
69
application/Termination/TerminationController.php
Normal file
69
application/Termination/TerminationController.php
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class TerminationController extends mfBaseController {
|
||||||
|
|
||||||
|
protected function init() {
|
||||||
|
$this->needlogin=true;
|
||||||
|
$me = new User();
|
||||||
|
$me->loadMe();
|
||||||
|
$this->me = $me;
|
||||||
|
$this->layout()->set("me",$me);
|
||||||
|
|
||||||
|
if(!$me->isAdmin() && !$me->is("netowner") && !$me->is("lineplanner") && !$me->is("lineworker")) {
|
||||||
|
$this->redirect("Dashboard");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected function apiAction() {
|
||||||
|
$do = $this->request->do;
|
||||||
|
$data = [];
|
||||||
|
|
||||||
|
switch($do) {
|
||||||
|
case "setValue":
|
||||||
|
$return = $this->setValueApi();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$return = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!is_array($return) || !count($return)) {
|
||||||
|
$data = ["status" => "error"];
|
||||||
|
$this->returnJson($data);
|
||||||
|
}
|
||||||
|
$data['status'] = "OK";
|
||||||
|
$data['result'] = $return;
|
||||||
|
$this->returnJson($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function setValueApi() {
|
||||||
|
$term_id = $this->request->id;
|
||||||
|
$field = $this->request->type;
|
||||||
|
$value = $this->db->escape($this->request->value);
|
||||||
|
|
||||||
|
if(!is_numeric($term_id) || $term_id < 1) {
|
||||||
|
$this->log->debug(__FILE__.": id not a number");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!in_array($field, ["name","contact","phone","email"])) {
|
||||||
|
$this->log->debug(__FILE__.": invalid field");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$term = new Termination($term_id);
|
||||||
|
if(!$term->id) {
|
||||||
|
$this->log->debug(__FILE__.": no termination");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$term->$field = $value;
|
||||||
|
|
||||||
|
if(!$term->save()) {
|
||||||
|
$this->log->debug(__FILE__.": error saving");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ["msg" => "Saved successfully"];
|
||||||
|
}
|
||||||
|
}
|
||||||
139
application/Termination/TerminationModel.php
Normal file
139
application/Termination/TerminationModel.php
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class TerminationModel {
|
||||||
|
public $building_id = null;
|
||||||
|
public $status_id = null;
|
||||||
|
public $lineworker_id = null;
|
||||||
|
public $name = null;
|
||||||
|
public $code = null;
|
||||||
|
public $oan_id = null;
|
||||||
|
public $rimo_id = null;
|
||||||
|
public $contact = null;
|
||||||
|
public $phone = null;
|
||||||
|
public $email = null;
|
||||||
|
|
||||||
|
public $create_by = null;
|
||||||
|
public $edit_by = null;
|
||||||
|
public $create = null;
|
||||||
|
public $edit = null;
|
||||||
|
|
||||||
|
public static function create(Array $data) {
|
||||||
|
$model = new Termination();
|
||||||
|
|
||||||
|
foreach($data as $field => $value) {
|
||||||
|
if(property_exists(get_called_class(), $field)) {
|
||||||
|
$model->$field = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$model->status_id) {
|
||||||
|
$model->status_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$me = new User();
|
||||||
|
$me->loadMe();
|
||||||
|
|
||||||
|
if($model->create_by === null) {
|
||||||
|
$model->create_by = $me->id;
|
||||||
|
}
|
||||||
|
if($model->edit_by === null) {
|
||||||
|
$model->edit_by = $me->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getOne($id) {
|
||||||
|
if(!is_numeric($id) || !$id) {
|
||||||
|
throw new Exception("Invalid number", 400);
|
||||||
|
}
|
||||||
|
$item = [];
|
||||||
|
$db = FronkDB::singleton();
|
||||||
|
|
||||||
|
$res = $db->select("Termination", "*", "id=$id LIMIT 1");
|
||||||
|
if($db->num_rows($res)) {
|
||||||
|
$data = $db->fetch_object($res);
|
||||||
|
$item = new Termination($data);
|
||||||
|
}
|
||||||
|
return $item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getAll() {
|
||||||
|
$items = [];
|
||||||
|
|
||||||
|
$db = FronkDB::singleton();
|
||||||
|
|
||||||
|
$res = $db->select("Termination", "*", "1=1 ORDER BY code");
|
||||||
|
if($db->num_rows($res)) {
|
||||||
|
while($data = $db->fetch_object($res)) {
|
||||||
|
$items[] = new Termination($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $items;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function search($filter) {
|
||||||
|
$items = [];
|
||||||
|
$db = FronkDB::singleton();
|
||||||
|
|
||||||
|
$where = self::getSqlFilter($filter);
|
||||||
|
$sql = "SELECT Termination.* FROM Termination
|
||||||
|
LEFT JOIN Building ON (Building.id = Termination.building_id)
|
||||||
|
LEFT JOIN Terminationstatus ON (Terminationstatus.id = Termination.status_id)
|
||||||
|
WHERE $where
|
||||||
|
ORDER BY code
|
||||||
|
";
|
||||||
|
|
||||||
|
$res = $db->query($sql);
|
||||||
|
if($db->num_rows($res)) {
|
||||||
|
while($data = $db->fetch_object($res)) {
|
||||||
|
$items[] = new Termination($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $items;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getSqlFilter($filter) {
|
||||||
|
$where = "1=1 ";
|
||||||
|
|
||||||
|
if(array_key_exists("building_id", $filter)) {
|
||||||
|
$building_id = $filter['building_id'];
|
||||||
|
|
||||||
|
if(is_numeric($building_id) && $building_id > 0) {
|
||||||
|
$where .= " AND building_id = $building_id";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(array_key_exists("status", $filter)) {
|
||||||
|
if(in_array(substr($filter['status'], 1, 2), ["<=", ">="])) {
|
||||||
|
$op = substr($filter['status'], 1, 2);
|
||||||
|
$status = substr($filter['status'], 3);
|
||||||
|
} elseif(in_array(substr($filter['status'], 1, 1), ["<", ">"])) {
|
||||||
|
$op = substr($filter['status'], 1, 1);
|
||||||
|
$status = substr($filter['status'], 2);
|
||||||
|
} else {
|
||||||
|
$op = "=";
|
||||||
|
$status = $filter['status'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_numeric($status)) {
|
||||||
|
$where .= " AND Terminationstatus.code $op $status";
|
||||||
|
} else {
|
||||||
|
// get code of statusname
|
||||||
|
$code = Terminationstatus::getOne(["name" => $status]);
|
||||||
|
if($code) {
|
||||||
|
$status = FronkDB::singleton()->escape($status);
|
||||||
|
$where .= " AND Terminationstatus.code $op '$status'";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $where;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
5
application/Terminationstatus/Terminationstatus.php
Normal file
5
application/Terminationstatus/Terminationstatus.php
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class Terminationstatus extends mfBaseModel {
|
||||||
|
|
||||||
|
}
|
||||||
95
application/Terminationstatus/TerminationstatusModel.php
Normal file
95
application/Terminationstatus/TerminationstatusModel.php
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class TerminationstatusModel {
|
||||||
|
public $code = null;
|
||||||
|
public $name = null;
|
||||||
|
|
||||||
|
public $create_by = null;
|
||||||
|
public $edit_by = null;
|
||||||
|
public $create = null;
|
||||||
|
public $edit = null;
|
||||||
|
|
||||||
|
public static function create(Array $data) {
|
||||||
|
$model = new Terminationstatus();
|
||||||
|
|
||||||
|
foreach($data as $field => $value) {
|
||||||
|
if(property_exists(get_called_class(), $field)) {
|
||||||
|
$model ->$field = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$me = new User();
|
||||||
|
$me->loadMe();
|
||||||
|
|
||||||
|
if($model->create_by === null) {
|
||||||
|
$model->create_by = $me->id;
|
||||||
|
}
|
||||||
|
if($model->edit_by === null) {
|
||||||
|
$model->edit_by = $me->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getOne($id) {
|
||||||
|
if(!is_numeric($id) || !$id) {
|
||||||
|
throw new Exception("Invalid number", 400);
|
||||||
|
}
|
||||||
|
$item = [];
|
||||||
|
$db = FronkDB::singleton();
|
||||||
|
|
||||||
|
$res = $db->select("Terminationstatus", "*", "id=$id LIMIT 1");
|
||||||
|
if($db->num_rows($res)) {
|
||||||
|
$data = $db->fetch_object($res);
|
||||||
|
$item = new Terminationstatus($data);
|
||||||
|
}
|
||||||
|
return $item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getAll() {
|
||||||
|
$items = [];
|
||||||
|
|
||||||
|
$db = FronkDB::singleton();
|
||||||
|
|
||||||
|
$res = $db->select("Terminationstatus", "*", "1=1 ORDER BY code,name");
|
||||||
|
if($db->num_rows($res)) {
|
||||||
|
while($data = $db->fetch_object($res)) {
|
||||||
|
$items[] = new Terminationstatus($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $items;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function search($filter) {
|
||||||
|
$items = [];
|
||||||
|
$db = FronkDB::singleton();
|
||||||
|
|
||||||
|
$where = self::getSqlFilter($filter);
|
||||||
|
$res = $db->select("Terminationstatus", "*", $where);
|
||||||
|
if($db->num_rows($res)) {
|
||||||
|
while($data = $db->fetch_object($res)) {
|
||||||
|
$items[] = new Terminationstatus($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $items;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getSqlFilter($filter) {
|
||||||
|
$where = "1=1 ";
|
||||||
|
|
||||||
|
if(array_key_exists("code", $filter)) {
|
||||||
|
$code = FronkDB::singleton()->escape($filter['code']);
|
||||||
|
$where .= " AND code='$code'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(array_key_exists("name", $filter)) {
|
||||||
|
$name = FronkDB::singleton()->escape($filter['name']);
|
||||||
|
$where .= " AND name='$name'";
|
||||||
|
}
|
||||||
|
|
||||||
|
//var_dump($filter, $where);exit;
|
||||||
|
return $where;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
29
contrib/migrations/2021-07-22-termination
Normal file
29
contrib/migrations/2021-07-22-termination
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
CREATE TABLE `Termination` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`building_id` int(11) NOT NULL,
|
||||||
|
`status_id` int(11) NOT NULL,
|
||||||
|
`lineworker_id` int(11) DEFAULT NULL,
|
||||||
|
`name` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
|
||||||
|
`code` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
||||||
|
`oan_id` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
|
||||||
|
`rimo_id` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
|
||||||
|
`contact` varchar(1024) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
|
||||||
|
`phone` varchar(1024) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
|
||||||
|
`email` varchar(1024) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
|
||||||
|
`create_by` int(11) NOT NULL,
|
||||||
|
`edit_by` int(11) NOT NULL,
|
||||||
|
`create` int(11) NOT NULL,
|
||||||
|
`edit` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
||||||
|
|
||||||
|
CREATE TABLE `Terminationstatus` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` int(11) NOT NULL,
|
||||||
|
`name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
||||||
|
`create_by` int(11) NOT NULL,
|
||||||
|
`edit_by` int(11) NOT NULL,
|
||||||
|
`create` int(11) NOT NULL,
|
||||||
|
`edit` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
.hidden {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
.has-sub-submenu {
|
.has-sub-submenu {
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user