Merge branch 'master' into fronkdev
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<style>
|
||||
|
||||
.card-border {
|
||||
|
||||
border-left: 1px solid #428bca;
|
||||
@@ -180,7 +181,7 @@ if ($devices->power != "0.0") {
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-5 card-border">
|
||||
<div class="col-12 col-lg-5 card-border">
|
||||
<div>
|
||||
<h4>Allgemeine Informationen </h4>
|
||||
|
||||
@@ -262,7 +263,7 @@ if ($devices->power != "0.0") {
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="col-4 card-border">
|
||||
<div class="col-12 col-lg-4 card-border">
|
||||
<div>
|
||||
<h4><?= $StdHeader ?></h4>
|
||||
</div>
|
||||
@@ -325,7 +326,7 @@ if ($devices->power != "0.0") {
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="col-3 card-border">
|
||||
<div class="col-12 col-lg-3 card-border">
|
||||
<div class="overflow-auto">
|
||||
<h4 class="float-left">Config Backups</h4>
|
||||
<?php if ($devices->devicetype->devicemanufactor->config_backup > count()): ?>
|
||||
@@ -390,7 +391,7 @@ if ($devices->power != "0.0") {
|
||||
<?php
|
||||
if ($devices->devicetype->olt && TT_MBI_API_ENABLE) :
|
||||
?>
|
||||
<button id="olt-info-button" class="btn btn-success">OLT/ONT Infos</button>
|
||||
<button id="olt-info-button" class="btn btn-success d-none d-lg-block">OLT/ONT Infos</button>
|
||||
<div class="spinner-big text-info" style="display:none">
|
||||
<i class="fas fa-spinner fa-spin spinner-ico font-24 "></i>
|
||||
</div>
|
||||
@@ -1062,8 +1063,10 @@ if ($devices->power != "0.0") {
|
||||
var portid = button.closest('table').data('portid');
|
||||
if (typeof customers[button.data('snr')] !== "undefined") {
|
||||
customerid = customers[button.data('snr')]['customer_number'];
|
||||
if (customers[button.data('snr')]['lastname'] != "") {
|
||||
if (customers[button.data('snr')]['lastname'] != "" && customers[button.data('snr')]['lastname'] != null) {
|
||||
customername = customerid + " / " + customers[button.data('snr')]['lastname'] + " " + customers[button.data('snr')]['firstname'];
|
||||
} else if (customers[button.data('snr')]['lastname'] == null) {
|
||||
customername = customers[button.data('snr')]['street'] + ", " + customers[button.data('snr')]['zip'] + " " + customers[button.data('snr')]['city'];
|
||||
} else {
|
||||
customername = customerid + " / " + customers[button.data('snr')]['company'] + " (C)";
|
||||
}
|
||||
@@ -1083,6 +1086,7 @@ if ($devices->power != "0.0") {
|
||||
$('#ont-detail-refresh').data('portid', button.data('portid'));
|
||||
$('#ont-detail-refresh').data('port', button.data('port'));
|
||||
$('#ont-detail-refresh').data('ontid', button.data('ontid'));
|
||||
$('#ont-detail-refresh').data('snr', button.data('snr'));
|
||||
$('#ont-detail-mac-refresh').data('snr', button.data('snr'));
|
||||
$('#ont-detail-mac-refresh').data('portid', button.data('portid'));
|
||||
$('#ont-detail-mac-refresh').data('port', button.data('port'));
|
||||
@@ -1179,8 +1183,10 @@ if ($devices->power != "0.0") {
|
||||
var portid = button.closest('table').data('portid');
|
||||
if (typeof customers[button.data('snr')] !== "undefined") {
|
||||
customerid = customers[button.data('snr')]['customer_number'];
|
||||
if (customers[button.data('snr')]['lastname'] != "") {
|
||||
if (customers[button.data('snr')]['lastname'] != "" && customers[button.data('snr')]['lastname'] != null) {
|
||||
customername = customerid + " / " + customers[button.data('snr')]['lastname'] + " " + customers[button.data('snr')]['firstname'];
|
||||
} else if (customers[button.data('snr')]['lastname'] == null) {
|
||||
customername = customers[button.data('snr')]['street'] + ", " + customers[button.data('snr')]['zip'] + " " + customers[button.data('snr')]['city'];
|
||||
} else {
|
||||
customername = customerid + " / " + customers[button.data('snr')]['company'] + " (C)";
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?=self::getResourcePath()?>assets/css/select2-cstm.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet" type="text/css"/>
|
||||
<?php
|
||||
foreach ($devicetypes as $devicetype) {
|
||||
$deviceTypes[$devicetype->id] = $devicetype->devicemanufactor->name . " " . $devicetype->name;
|
||||
@@ -21,8 +23,11 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "device-detail") {
|
||||
$cancelUrl = self::getUrl("Device");
|
||||
}
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
@@ -7,9 +7,8 @@ $pagination_entity_name = "Device";
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<style>
|
||||
table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
@@ -36,20 +35,21 @@ $pagination_entity_name = "Device";
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Devices</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<div class="float-right ">
|
||||
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Device", "add") ?>"><i
|
||||
class="fas fa-plus"></i> Neues Device anlegen</a>
|
||||
class="fas fa-plus"></i><span
|
||||
class="d-none d-lg-inline"> Neues Device anlegen</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable" class="table table-striped table-hover table-sm font-13">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="min-width: 250px;">Device Name</th>
|
||||
<th class="text-center">Geräte Typ</th>
|
||||
<th class="text-center">Hersteller</th>
|
||||
<th class="text-center">Pop/Adresse</th>
|
||||
<th class="text-center">IP-Adresse</th>
|
||||
<th class="all">Device Name</th>
|
||||
<th class="text-center ">Geräte Typ</th>
|
||||
<th class="text-center ">Hersteller</th>
|
||||
<th class="text-center ">Pop/Adresse</th>
|
||||
<th class="text-center all">IP-Adresse</th>
|
||||
<th class="text-center">Mac-Adresse</th>
|
||||
<th class="text-center">Seriennummer</th>
|
||||
<th class="text-center">Preis</th>
|
||||
@@ -112,8 +112,9 @@ $pagination_entity_name = "Device";
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?= self::getUrl("Device", "Detail", ["id" => $device->id]) ?>"><?= $device->name ?></a>
|
||||
<td class="text-nowrap">
|
||||
<a class=" text-nowrap"
|
||||
href="<?= self::getUrl("Device", "Detail", ["id" => $device->id]) ?>"><?= $device->name ?></a>
|
||||
</td>
|
||||
<td class="text-center"><?= $device->devicetype->name ?></td>
|
||||
<td class="text-center"><?= $device->devicetype->devicemanufactor->name ?></td>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?=self::getResourcePath()?>assets/css/select2-cstm.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet" type="text/css"/>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
@@ -31,7 +31,8 @@ $pagination_entity_name = "Devicemanufactor";
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Devicemanufactor", "add") ?>"><i
|
||||
class="fas fa-plus"></i> Neuen Gerätehersteller anlegen</a>
|
||||
class="fas fa-plus"></i><span
|
||||
class="d-none d-lg-inline"> Neuen Gerätehersteller anlegen</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,8 +57,8 @@ $pagination_entity_name = "Devicemanufactor";
|
||||
<?php foreach ($devicemanufactors as $devicemanufactor): ?>
|
||||
|
||||
<tr>
|
||||
<td><?= $devicemanufactor->name ?></td>
|
||||
<td><?= $devicemanufactor->creator->name ?>
|
||||
<td class="text-nowrap"><?= $devicemanufactor->name ?></td>
|
||||
<td class="text-nowrap"><?= $devicemanufactor->creator->name ?>
|
||||
(<?= date("d.m.Y , H:i", $devicemanufactor->create) ?>)
|
||||
</td>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?=self::getResourcePath()?>assets/css/select2-cstm.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet" type="text/css"/>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
@@ -4,7 +4,8 @@ $pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Devicetype";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?=self::getResourcePath()?>assets/css/datatables-std.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -32,14 +33,11 @@ $pagination_entity_name = "Devicetype";
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Devicetype", "add") ?>"><i
|
||||
class="fas fa-plus"></i> Neuen Gerätetyp anlegen</a>
|
||||
class="fas fa-plus"></i><span
|
||||
class="d-none d-lg-inline"> Neuen Gerätetyp anlegen</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination.php"); ?>
|
||||
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination-summary.php"); ?>
|
||||
|
||||
<table id="datatable" class="table table-striped table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -65,7 +63,7 @@ $pagination_entity_name = "Devicetype";
|
||||
<?php foreach ($devicetypes as $devicetype): ?>
|
||||
|
||||
<tr>
|
||||
<td><?= $devicetype->name ?></td>
|
||||
<td class="text-nowrap"><?= $devicetype->name ?></td>
|
||||
<td class="text-center"><?= $devicetype->devicemanufactor->name ?></td>
|
||||
|
||||
<td class="text-right"><?= $devicetype->price ?> €</td>
|
||||
@@ -98,15 +96,15 @@ $pagination_entity_name = "Devicetype";
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch=[5];
|
||||
var hidesearch = [5];
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/datatables-std.js?<?=date('U')?>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -106,13 +106,13 @@
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($network->pops as $pop): ?>
|
||||
<tr>
|
||||
<td><?=$pop->name?></td>
|
||||
<td><?=$pop->gps_lat?>, <?=$pop->gps_long?></td>
|
||||
<td><?=nl2br($pop->location)?></td>
|
||||
<tr>
|
||||
<td><?=$pop->pop->name?></td>
|
||||
<td><?=$pop->pop->gps_lat?>, <?=$pop->pop->gps_long?></td>
|
||||
<td><?=nl2br($pop->pop->location)?></td>
|
||||
<td class="controls" style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Pop", "edit", ["id" => $pop->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Pop", "delete", ["id" => $pop->id])?>" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
<a href="<?=self::getUrl("Pop", "edit", ["id" => $pop->pop->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Pop", "delete", ["id" => $pop->pop->id])?>" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?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?<?= date('U') ?>" rel="stylesheet" type="text/css"/>
|
||||
<style>
|
||||
.card-border {
|
||||
|
||||
@@ -134,18 +134,18 @@ $plugs[3] = "E2000";
|
||||
$vlans = "";
|
||||
|
||||
if (!empty(trim($pops->vlan_public)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">Public: <span class="font-weight-500">' . $pops->vlan_public . '</span class="font-weight-500"></span>';
|
||||
$vlans .= '<span class="order-date-pill active mb-0 d-inline-block d-lg-inline">Public: <span class="font-weight-500">' . $pops->vlan_public . '</span class="font-weight-500"></span>';
|
||||
if (!empty(trim($pops->vlan_nat)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">Nat: <span class="font-weight-500">' . $pops->vlan_nat . '</span></span>';
|
||||
$vlans .= '<span class="order-date-pill active mb-0 d-inline-block d-lg-inline">Nat: <span class="font-weight-500">' . $pops->vlan_nat . '</span></span>';
|
||||
if (!empty(trim($pops->vlan_ipv6)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">IPv6: <span class="font-weight-500">' . $pops->vlan_ipv6 . '</span></span>';
|
||||
$vlans .= '<span class="order-date-pill active mb-0 d-inline-block d-lg-inline">IPv6: <span class="font-weight-500">' . $pops->vlan_ipv6 . '</span></span>';
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-5 card-border">
|
||||
<div class="col-12 col-lg-5 card-border">
|
||||
<div>
|
||||
<h4>Allgemeine Informationen </h4>
|
||||
|
||||
@@ -154,8 +154,8 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="min-width: 250px; width: 300px;">Netzgebiet</th>
|
||||
<td><?= $pops->network->name ?> </td>
|
||||
<th class="w-30">Netzgebiet</th>
|
||||
<td><?= $popnetwork ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
@@ -171,15 +171,15 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
, <?= rtrim($pops->gps_long, 0) ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Standort Info</th>
|
||||
<th class="text-nowrap">Standort Info</th>
|
||||
<td><?= nl2br($pops->location) ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Access VLANs</th>
|
||||
<th class="text-nowrap">Access VLANs</th>
|
||||
<td><?= $vlans ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Interne Notiz</th>
|
||||
<th class="text-nowrap">Interne Notiz</th>
|
||||
<td><?= nl2br($pops->note) ?> </td>
|
||||
</tr>
|
||||
|
||||
@@ -189,7 +189,7 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-7 card-border">
|
||||
<div class="col-12 col-lg-7 card-border">
|
||||
<div>
|
||||
<h4>Pop Devices</h4>
|
||||
</div>
|
||||
@@ -197,18 +197,18 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
if (!empty($devices)) {
|
||||
?>
|
||||
<div>
|
||||
<table id="datatable" class="table table-striped table-hover">
|
||||
<table id="datatable" class="table table-striped table-hover" style="width: 100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Geräte Name</th>
|
||||
<th class="text-center">Geräte Typ</th>
|
||||
<th class="text-center">Hersteller</th>
|
||||
<th class="text-center">IP-Adresse</th>
|
||||
<th class="text-center">Seriennummer</th>
|
||||
<th class="text-center">Preis</th>
|
||||
<th class="all">Geräte Name</th>
|
||||
<th class="text-center ">Geräte Typ</th>
|
||||
<th class="text-center ">Hersteller</th>
|
||||
<th class="text-center all">IP-Adresse</th>
|
||||
<th class="text-center " >Seriennummer</th>
|
||||
<th class="text-center ">Preis</th>
|
||||
<th title="maximale Leistung" class="text-center text-nowrap">max. P.</th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
<tr id="filterrow" class="d-none d-lg-table-row">
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
@@ -309,6 +309,15 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($popracks) : ?>
|
||||
<div class="modal fade bd-example-modal-xl" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal fade " id="rackModuleModal" tabindex="-1" role="dialog" aria-labelledby="rackModuleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
@@ -498,7 +507,7 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
$extTextspan = "";
|
||||
foreach ($module['slots'] as $slots) {
|
||||
$extText = "";
|
||||
$title=$slots['modulname'];
|
||||
$title = $slots['modulname'];
|
||||
if ($slots['type'] == '0') {
|
||||
$color = '#9fff6e';
|
||||
$colorclass = "rack-color-lwl";
|
||||
@@ -507,7 +516,7 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
$extTextspan = "<span style='font-size: 12px;font-weight: 400'>" . $extText . "</span>";
|
||||
}
|
||||
} else if ($slots['type'] == '1') {
|
||||
$slots['modulname']='<a style="color: #000000;text-decoration: underline;" target="_self" href="'.self::getUrl("Device", "detail", ["id" => $slots['device_id']]).'">'.$slots['modulname'].'</a>';
|
||||
$slots['modulname'] = '<a style="color: #000000;text-decoration: underline;" target="_self" href="' . self::getUrl("Device", "detail", ["id" => $slots['device_id']]) . '">' . $slots['modulname'] . '</a>';
|
||||
?>
|
||||
<script>
|
||||
$("#module-device-id option[value='<?= $slots['device_id'] ?>']").remove();
|
||||
@@ -605,542 +614,17 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
<script type="text/javascript" src="<?= self::getResourcePath() ?>assets/js/Sortable.js"></script>
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [5, 6];
|
||||
var trigger;
|
||||
$(document).ready(function () {
|
||||
if ($('#sortracklist').length > 0) {
|
||||
Sortable.create(sortracklist, {
|
||||
handle: '.move-handle',
|
||||
onEnd: function () {
|
||||
|
||||
var popid = $('#sortracklist').data('popid');
|
||||
var racksortids = [];
|
||||
|
||||
$('#sortracklist').find('th').each(function (index, value) {
|
||||
|
||||
racksortids.push($(this).data('rackid'));
|
||||
});
|
||||
$.post("<?= self::getUrl("Poprack", "api", ['do' => 'sortRack']) ?>&pop_id=" + popid, {
|
||||
racksortids: racksortids
|
||||
}, function (data) {
|
||||
if (data.success === true) {
|
||||
|
||||
}
|
||||
}, "json");
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
$('#pop-rack-div').show();
|
||||
$('#rackModal').on('show.bs.modal', function (event) {
|
||||
var thisclick = $(event.relatedTarget);
|
||||
var rackhe = thisclick.closest('table').find('th').data('rackhe');
|
||||
var rackid = thisclick.closest('table').find('th').data('rackid');
|
||||
var rackname = $.trim(thisclick.closest('table').find('th').text());
|
||||
var minhe = 1;
|
||||
var modal = $(this);
|
||||
var edit = 0;
|
||||
modal.find('.alert').text('');
|
||||
modal.find('.alert').hide();
|
||||
if (rackid === undefined) {
|
||||
$('#rack-name').val('');
|
||||
$('#rack-he').val('');
|
||||
var popid = thisclick.data('popid');
|
||||
$('#rack-add').data('popid', popid);
|
||||
$('#rack-update').hide();
|
||||
$('#rack-remove').hide();
|
||||
$('#rack-add').show();
|
||||
} else {
|
||||
edit = 1;
|
||||
$('#rack-remove').hide();
|
||||
$('#rack-add').hide();
|
||||
$('#rack-update').show();
|
||||
$('#rack-he').val(rackhe);
|
||||
$('#rack-name').val(rackname);
|
||||
for (let i = 1; i <= rackhe; i++) {
|
||||
if (!thisclick.closest('table').find('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
|
||||
minhe = i;
|
||||
}
|
||||
}
|
||||
if (minhe === 1) {
|
||||
|
||||
$('#rack-remove').data('rackid', rackid);
|
||||
$('#rack-remove').show();
|
||||
}
|
||||
$('#rack-update').data('rackid', rackid);
|
||||
$('#rack-update').data('rackminhe', minhe);
|
||||
}
|
||||
}
|
||||
)
|
||||
;
|
||||
$('#rackModuleModal').on('show.bs.modal', function (event) {
|
||||
|
||||
trigger = $(event.relatedTarget);
|
||||
var destinationname = trigger.closest('table').find('th').text();
|
||||
var rackhe = trigger.closest('table').find('th').data('rackhe');
|
||||
var modal = $(this);
|
||||
modal.find('.modal-title').html('<span id="module-info">Modul (' + destinationname + ')</span>');
|
||||
modal.find('.alert').text('');
|
||||
modal.find('.alert').hide();
|
||||
var options;
|
||||
var selected;
|
||||
var hemaxcount = 1;
|
||||
var hemaxcountactive = 1;
|
||||
var edit = 0;
|
||||
|
||||
var parent = trigger.closest('tr');
|
||||
if (trigger.closest('tr').find('td').eq(1).html() === undefined) {
|
||||
edit = 1;
|
||||
parent = trigger.closest('tr').prev();
|
||||
for (let i = 1; i <= rackhe; i++) {
|
||||
if (parent.find('td').eq(1).html() !== undefined) {
|
||||
break;
|
||||
} else {
|
||||
parent = parent.prev();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (parent.find('td').eq(1).data('id') || parent.find('td').eq(2).data('id') || parent.find('td').eq(3).data('id') || parent.find('td').eq(4).data('id')) {
|
||||
var counttd = parent.find('td').length - 1;
|
||||
var newmodule = false;
|
||||
if (counttd > 1) {
|
||||
var options;
|
||||
for (let i = 1; i <= counttd; i++) {
|
||||
options = options + '<option value="' + i + '">' + i + '</option>';
|
||||
}
|
||||
$('#module-slot').html(options);
|
||||
$('#module-position').html(options);
|
||||
$('#module-slot-div').show();
|
||||
}
|
||||
$('#module-width').attr('disabled', 'disabled');
|
||||
$('#he-count-div').html(`<select required="required" id="module-he-count" name="module-he-count" class="form-control" disabled="disabled"><option value="` + parent.find('td').eq(1).attr('rowspan') + `">` + parent.find('td').eq(1).attr('rowspan') + `</option><select>`);
|
||||
$('#he-start-div').html(`<select required="required" id="module-he-start" name="module-he-start" class="form-control" disabled="disabled"><option value="` + parent.find('td').eq(0).data('he') + `">` + parent.find('td').eq(0).data('he') + `</option></select>`);
|
||||
if (parent.find('td').eq(1).data('id') === undefined) {
|
||||
newmodule = true;
|
||||
}
|
||||
var modwidth = 12 / counttd;
|
||||
$('#module-width').val(modwidth);
|
||||
|
||||
if (!newmodule) {
|
||||
$('#module-remove').show();
|
||||
$('#module-update').show();
|
||||
$('#module-add').hide();
|
||||
|
||||
|
||||
$('#module-type').val(parent.find('td').eq(1).data('type')).change();
|
||||
if ($('#module-type').val() == "1") {
|
||||
$('#module-device-id').hide();
|
||||
$('#module-device-text').text(parent.find('td').eq(1).data('name'));
|
||||
$('#module-device-text').show();
|
||||
}
|
||||
if (parent.find('td').eq(1).data('ports') != "") {
|
||||
$('#module-ports').val(parent.find('td').eq(1).data('ports')).change();
|
||||
$('#module-plug').val(parent.find('td').eq(1).data('plug'));
|
||||
}
|
||||
$('#module-type').attr('disabled', 'disabled');
|
||||
$('#module-name').val(parent.find('td').eq(1).data('name'));
|
||||
// $('#module-name').attr('disabled', 'disabled');
|
||||
|
||||
|
||||
$('#module-remove').data('moduleid', parent.find('td').eq(1).data('id'));
|
||||
$('#module-update').data('moduleid', parent.find('td').eq(1).data('id'));
|
||||
} else {
|
||||
$('#module-remove').hide();
|
||||
$('#module-update').hide();
|
||||
$('#module-add').show();
|
||||
$('#module-name-div').show();
|
||||
$('#module-name').removeAttr('disabled');
|
||||
$('#module-device-div').hide();
|
||||
$('#module-device-id').show();
|
||||
$('#module-device-id').attr('disabled', 'disabled');
|
||||
$('#module-type').val('0').change();
|
||||
$('#module-type').removeAttr('disabled');
|
||||
$('#module-plug').removeAttr('disabled');
|
||||
$('#module-ports').removeAttr('disabled');
|
||||
$('#module-name').val('');
|
||||
$('#module-ports').val('48');
|
||||
$('#module-ports').trigger("change");
|
||||
$('#module-position-div').hide();
|
||||
$('#module-update').hide();
|
||||
$('#module-device-text').hide();
|
||||
}
|
||||
} else {
|
||||
$('#module-remove').hide();
|
||||
$('#module-update').hide();
|
||||
$('#module-add').show();
|
||||
for (let i = 1; i <= rackhe; i++) {
|
||||
if (i == trigger.data('he')) {
|
||||
selected = 'selected="selected"';
|
||||
} else {
|
||||
selected = '';
|
||||
}
|
||||
if (trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
|
||||
options = options + '<option ' + selected + ' value="' + i + '">' + i + '</option>';
|
||||
}
|
||||
if (hemaxcountactive == 1 && i > trigger.data('he') && !trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
|
||||
hemaxcountactive = 0;
|
||||
}
|
||||
if (hemaxcountactive == 1 && i > trigger.data('he') && trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
|
||||
hemaxcount++;
|
||||
}
|
||||
}
|
||||
$('#he-start-div').html(`<select required="required" id="module-he-start" name="module-he-start" class="form-control">` + options + `</select>`);
|
||||
options = "";
|
||||
selected = "";
|
||||
for (let i = 1; i <= hemaxcount; i++) {
|
||||
options = options + '<option ' + selected + ' value="' + i + '">' + i + '</option>';
|
||||
}
|
||||
$('#he-count-div').html(`<select required="required" id="module-he-count" name="module-he-count" class="form-control">` + options + `</select>`);
|
||||
if (edit == 0) {
|
||||
$('#module-name-div').show();
|
||||
$('#module-name').removeAttr('disabled');
|
||||
$('#module-device-div').hide();
|
||||
$('#module-device-id').attr('disabled', 'disabled');
|
||||
$('#module-type').val('0').change();
|
||||
$('#module-type').removeAttr('disabled');
|
||||
$('#module-width').removeAttr('disabled');
|
||||
$('#module-plug').removeAttr('disabled');
|
||||
$('#module-ports').removeAttr('disabled');
|
||||
$('#module-name').val('');
|
||||
$('#module-width').val('12');
|
||||
$('#module-ports').val('48');
|
||||
$('#module-ports').trigger("change");
|
||||
$('#module-position').empty();
|
||||
$('#module-position-div').hide();
|
||||
$('#module-device-text').hide();
|
||||
$('#module-device-id').show();
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("change", "#module-type", function () {
|
||||
if (parseInt($(this).val()) === 1) {
|
||||
$('#module-name-div').hide();
|
||||
$('#module-name').attr('disabled', 'disabled');
|
||||
$('#module-device-div').show();
|
||||
|
||||
$('#module-device-id').removeAttr('disabled');
|
||||
$('#module-ports-div').hide();
|
||||
$('#module-plug-div').hide();
|
||||
} else if (parseInt($(this).val()) === 0) {
|
||||
$('#module-name-div').show();
|
||||
$('#module-name').removeAttr('disabled');
|
||||
$('#module-device-div').hide();
|
||||
$('#module-device-id').attr('disabled', 'disabled');
|
||||
$('#module-ports-div').show();
|
||||
$('#module-plug-div').show();
|
||||
} else {
|
||||
$('#module-name-div').show();
|
||||
$('#module-name').removeAttr('disabled');
|
||||
$('#module-device-div').hide();
|
||||
$('#module-device-id').attr('disabled', 'disabled');
|
||||
$('#module-ports-div').hide();
|
||||
$('#module-plug-div').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("change", "#module-he-start", function () {
|
||||
var rackhe = trigger.closest('table').find('th').data('rackhe');
|
||||
var hemaxcount = 1;
|
||||
var hemaxcountactive = 1
|
||||
var options;
|
||||
var selected;
|
||||
for (let i = 1; i <= rackhe; i++) {
|
||||
if (hemaxcountactive == 1 && i > $(this).val() && !trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
|
||||
hemaxcountactive = 0;
|
||||
}
|
||||
|
||||
if (hemaxcountactive == 1 && i > $(this).val() && trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
|
||||
hemaxcount++;
|
||||
}
|
||||
}
|
||||
for (let i = 1; i <= hemaxcount; i++) {
|
||||
options = options + '<option ' + selected + ' value="' + i + '">' + i + '</option>';
|
||||
}
|
||||
$('#he-count-div').html(`<select required="required" id="module-he-count" name="module-he-count" class="form-control">` + options + `</select>`);
|
||||
});
|
||||
|
||||
$("body").on("click", "#module-add", function () {
|
||||
var error;
|
||||
var rackid = trigger.closest('table').find('th').data('rackid');
|
||||
var endhe = parseInt($.trim($('#module-he-start').val())) + parseInt($.trim($('#module-he-count').val())) - 1;
|
||||
|
||||
|
||||
if (!$.trim($('#module-name').val()) && $.trim($('#module-type').val()) != "1") {
|
||||
error = "Modul Name darf nicht leer sein";
|
||||
}
|
||||
if ($.trim($('#module-type').val()) == "1" && !$.trim($('#module-device-id').val())) {
|
||||
error = "Kein Device ausgewählt";
|
||||
}
|
||||
|
||||
|
||||
if (!error) {
|
||||
$.post("<?= self::getUrl("Poprackmodule", "api", ['do' => 'addModule']) ?>&poprack_id=" + rackid, {
|
||||
type: $.trim($('#module-type').val()),
|
||||
device_id: $.trim($('#module-device-id').val()),
|
||||
name: $.trim($('#module-name').val()),
|
||||
start_he: $.trim($('#module-he-start').val()),
|
||||
end_he: endhe,
|
||||
ports: $.trim($('#module-ports').val()),
|
||||
plug: $.trim($('#module-plug').val()),
|
||||
width: $.trim($('#module-width').val()),
|
||||
position: $.trim($('#module-position').val())
|
||||
|
||||
}, function (data) {
|
||||
if (data.success === true) {
|
||||
$('#rackModuleModal').modal('toggle');
|
||||
$.get("<?= self::getUrl("Poprack", "api", ['do' => 'generateRack']) ?>&id=" + rackid, function (data, status) {
|
||||
trigger.closest('tbody').html(data);
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
} else {
|
||||
$(this).closest('.modal').find('.alert').text(error);
|
||||
$(this).closest('.modal').find('.alert').show();
|
||||
}
|
||||
});
|
||||
$("body").on("click", "#module-remove", function () {
|
||||
var moduleid = $(this).data('moduleid');
|
||||
var rackid = trigger.closest('table').find('th').data('rackid');
|
||||
if (confirm("Modul entfernen?")) {
|
||||
$.post("<?= self::getUrl("Poprackmodule", "api", ['do' => 'removeModule']) ?>", {
|
||||
id: moduleid
|
||||
}, function (data) {
|
||||
if (data.success === true) {
|
||||
$('#rackModuleModal').modal('toggle');
|
||||
$.get("<?= self::getUrl("Poprack", "api", ['do' => 'generateRack']) ?>&id=" + rackid, function (data, status) {
|
||||
trigger.closest('tbody').html(data);
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
$("body").on("click", "#module-update", function () {
|
||||
var moduleid = $(this).data('moduleid');
|
||||
var rackid = trigger.closest('table').find('th').data('rackid');
|
||||
var error;
|
||||
if (!$.trim($('#module-name').val())) {
|
||||
error = "Modul Name darf nicht leer sein";
|
||||
}
|
||||
if (!error) {
|
||||
$.post("<?= self::getUrl("Poprackmodule", "api", ['do' => 'updateModule']) ?>", {
|
||||
id: moduleid,
|
||||
name: $.trim($('#module-name').val()),
|
||||
ports: $.trim($('#module-ports').val()),
|
||||
plug: $.trim($('#module-plug').val())
|
||||
}, function (data) {
|
||||
if (data.success === true) {
|
||||
$('#rackModuleModal').modal('toggle');
|
||||
$.get("<?= self::getUrl("Poprack", "api", ['do' => 'generateRack']) ?>&id=" + rackid, function (data, status) {
|
||||
trigger.closest('tbody').html(data);
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
} else {
|
||||
$(this).closest('.modal').find('.alert').text(error);
|
||||
$(this).closest('.modal').find('.alert').show();
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("click", "#rack-update", function () {
|
||||
var rackid = $(this).data('rackid');
|
||||
var rackmin = $(this).data('rackminhe');
|
||||
var error;
|
||||
|
||||
if ($('#rack-he').val() < rackmin) {
|
||||
error = "Minimale Höheneinheiten: " + rackmin;
|
||||
}
|
||||
if ($('#rack-he').val() > 60) {
|
||||
error = "Maximale Höheneinheiten: 60";
|
||||
}
|
||||
|
||||
if (!$.isNumeric($('#rack-he').val())) {
|
||||
error = "Bitte Zahl bei Höheneinheiten eingeben";
|
||||
}
|
||||
|
||||
if (!$.trim($('#rack-he').val())) {
|
||||
error = "Höheneinheiten darf nicht leer sein";
|
||||
}
|
||||
if (!$.trim($('#rack-name').val())) {
|
||||
error = "Schrank Name darf nicht leer sein";
|
||||
}
|
||||
if (!error) {
|
||||
$.post("<?= self::getUrl("Poprack", "api", ['do' => 'editRack']) ?>&poprack_id=" + rackid, {
|
||||
name: $.trim($('#rack-name').val()),
|
||||
he: $.trim($('#rack-he').val())
|
||||
|
||||
}, function (data) {
|
||||
if (data.success === true) {
|
||||
$('#rackModal').modal('toggle');
|
||||
location.reload();
|
||||
}
|
||||
}, "json");
|
||||
} else {
|
||||
$(this).closest('.modal').find('.alert').text(error);
|
||||
$(this).closest('.modal').find('.alert').show();
|
||||
}
|
||||
});
|
||||
$("body").on("click", "#rack-add", function () {
|
||||
var popid = $(this).data('popid');
|
||||
var error;
|
||||
|
||||
if ($('#rack-he').val() < 1) {
|
||||
error = "Minimale Höheneinheiten: " + 1;
|
||||
}
|
||||
if ($('#rack-he').val() > 60) {
|
||||
error = error = "Maximale Höheneinheiten: 60";
|
||||
}
|
||||
|
||||
if (!$.isNumeric($('#rack-he').val())) {
|
||||
error = "Bitte Zahl bei Höheneinheiten eingeben";
|
||||
}
|
||||
|
||||
if (!$.trim($('#rack-he').val())) {
|
||||
error = "Höheneinheiten darf nicht leer sein";
|
||||
}
|
||||
if (!$.trim($('#rack-name').val())) {
|
||||
error = "Schrank Name darf nicht leer sein";
|
||||
}
|
||||
if (!error) {
|
||||
$.post("<?= self::getUrl("Poprack", "api", ['do' => 'addRack']) ?>&pop_id=" + popid, {
|
||||
name: $.trim($('#rack-name').val()),
|
||||
he: $.trim($('#rack-he').val())
|
||||
|
||||
}, function (data) {
|
||||
if (data.success === true) {
|
||||
$('#rackModal').modal('toggle');
|
||||
location.reload();
|
||||
}
|
||||
}, "json");
|
||||
} else {
|
||||
$(this).closest('.modal').find('.alert').text(error);
|
||||
$(this).closest('.modal').find('.alert').show();
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("click", "#rack-remove", function () {
|
||||
var rackid = $(this).data('rackid');
|
||||
|
||||
$.post("<?= self::getUrl("Poprack", "api", ['do' => 'removeRack']) ?>", {
|
||||
id: rackid
|
||||
}, function (data) {
|
||||
if (data.success === true) {
|
||||
$('#rackModal').modal('toggle');
|
||||
location.reload();
|
||||
}
|
||||
}, "json");
|
||||
|
||||
});
|
||||
$("body").on("change", "#module-width", function () {
|
||||
if ($(this).val() == "12") {
|
||||
$('#module-position-div').hide();
|
||||
} else if ($(this).val() == "6") {
|
||||
$('#module-position').html(`<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
`);
|
||||
$('#module-position-div').show();
|
||||
} else if ($(this).val() == "4") {
|
||||
$('#module-position').html(`<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
`);
|
||||
$('#module-position-div').show();
|
||||
} else if ($(this).val() == "3") {
|
||||
$('#module-position').html(`<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
`);
|
||||
$('#module-position-div').show();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("body").on("change", "#module-ports", function () {
|
||||
var plugs = [];
|
||||
if ($(this).find(':selected').data('plugs') !== undefined) {
|
||||
plugs = $(this).find(':selected').data('plugs').split(';');
|
||||
$("#module-plug option").each(function () {
|
||||
if (plugs.includes($(this).val())) {
|
||||
$(this).show();
|
||||
} else {
|
||||
if ($(this).val() == $('#module-plug').val()) {
|
||||
$('#module-plug').val(plugs[0]);
|
||||
}
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("change", "#module-slot", function () {
|
||||
$('#module-position').val($(this).val());
|
||||
var parent = trigger.closest('tr');
|
||||
if (trigger.closest('tr').find('td').eq(1).html() === undefined) {
|
||||
parent = trigger.closest('tr').prev();
|
||||
for (let i = 1; i <= rackhe; i++) {
|
||||
if (parent.find('td').eq(1).html() !== undefined) {
|
||||
break;
|
||||
} else {
|
||||
parent = parent.prev();
|
||||
}
|
||||
}
|
||||
}
|
||||
var newmodule = false;
|
||||
var tdnumber = parseInt($(this).val())
|
||||
if (parent.find('td').eq(tdnumber).data('id') === undefined) {
|
||||
newmodule = true;
|
||||
}
|
||||
if (!newmodule) {
|
||||
$('#module-remove').show();
|
||||
$('#module-update').show();
|
||||
$('#module-add').hide();
|
||||
|
||||
|
||||
$('#module-type').val(parent.find('td').eq(tdnumber).data('type')).change();
|
||||
if ($('#module-type').val() == "1") {
|
||||
$('#module-device-id').hide();
|
||||
$('#module-device-text').text(parent.find('td').eq(tdnumber).data('name'));
|
||||
$('#module-device-text').show();
|
||||
}
|
||||
if (parent.find('td').eq(tdnumber).data('ports') != "") {
|
||||
$('#module-ports').val(parent.find('td').eq(tdnumber).data('ports')).change();
|
||||
$('#module-plug').val(parent.find('td').eq(tdnumber).data('plug'));
|
||||
}
|
||||
$('#module-type').attr('disabled', 'disabled');
|
||||
$('#module-name').val(parent.find('td').eq(tdnumber).data('name'));
|
||||
// $('#module-name').attr('disabled', 'disabled');
|
||||
|
||||
|
||||
$('#module-remove').data('moduleid', parent.find('td').eq(tdnumber).data('id'));
|
||||
$('#module-update').data('moduleid', parent.find('td').eq(tdnumber).data('id'));
|
||||
} else {
|
||||
$('#module-remove').hide();
|
||||
$('#module-update').hide();
|
||||
$('#module-add').show();
|
||||
$('#module-name-div').show();
|
||||
$('#module-name').removeAttr('disabled');
|
||||
$('#module-device-div').hide();
|
||||
$('#module-device-id').show();
|
||||
$('#module-device-id').attr('disabled', 'disabled');
|
||||
$('#module-type').val('0').change();
|
||||
$('#module-type').removeAttr('disabled');
|
||||
$('#module-plug').removeAttr('disabled');
|
||||
$('#module-ports').removeAttr('disabled');
|
||||
$('#module-name').val('');
|
||||
$('#module-ports').val('48');
|
||||
$('#module-ports').trigger("change");
|
||||
$('#module-position-div').hide();
|
||||
$('#module-update').hide();
|
||||
$('#module-device-text').hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
let trigger;
|
||||
let linkSorTracklist = "<?= self::getUrl("Poprack", "api", ['do' => 'sortRack']) ?>";
|
||||
let linkAddModule = "<?= self::getUrl("Poprackmodule", "api", ['do' => 'addModule']) ?>";
|
||||
let linkRemoveModule = "<?= self::getUrl("Poprackmodule", "api", ['do' => 'removeModule']) ?>";
|
||||
let linkGenerateRack = "<?= self::getUrl("Poprack", "api", ['do' => 'generateRack']) ?>";
|
||||
let linkUpdateModule = "<?= self::getUrl("Poprackmodule", "api", ['do' => 'updateModule']) ?>";
|
||||
let linkEditRack = "<?= self::getUrl("Poprack", "api", ['do' => 'editRack']) ?>";
|
||||
let linkAddRack = "<?= self::getUrl("Poprack", "api", ['do' => 'addRack']) ?>";
|
||||
let linkRemoveRack = "<?= self::getUrl("Poprack", "api", ['do' => 'removeRack']) ?>";
|
||||
</script>
|
||||
<script type="text/javascript" src="<?= self::getResourcePath() ?>js/pages/pop/detail.js"></script>
|
||||
<script type="text/javascript" src="<?= self::getResourcePath() ?>assets/js/datatables-std.js"></script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
|
||||
if (isset($_GET['returnto']) && $_GET['returnto'] == "pop-detail") {
|
||||
$cancelUrl = self::getUrl("Pop", "Detail", ["id" => $pop->id]);
|
||||
$cancelText="Pop Detail";
|
||||
$cancelText = "Pop Detail";
|
||||
} else if (isset($_GET['returnto'])) {
|
||||
$cancelUrl = self::getUrl("Pop");
|
||||
$cancelText="Pops";
|
||||
} else
|
||||
{
|
||||
$cancelText = "Pops";
|
||||
} else {
|
||||
$cancelUrl = self::getUrl("Network");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -31,7 +30,7 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "pop-detail") {
|
||||
|
||||
<li class="breadcrumb-item"><a
|
||||
href="<?= $cancelUrl ?>"><?= ucfirst($cancelText) ?>
|
||||
</a></li>
|
||||
</a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -62,10 +61,11 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "pop-detail") {
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="network_id">Netzgebiet</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="network_id" id="owner_id">
|
||||
<select class="select2 form-control " multiple="multiple" name="network_id[]"
|
||||
id="owner_id">
|
||||
<option></option>
|
||||
<?php foreach ($networks as $network): ?>
|
||||
<option value="<?= $network->id ?>" <?= ($pop->network_id == $network->id) ? "selected='selected'" : "" ?>><?= ($network->name) ?></option>
|
||||
<option value="<?= $network->id ?>" <?= (in_array($network->id, $popnetwork)) ? "selected='selected'" : "" ?>><?= ($network->name) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -183,6 +183,7 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "pop-detail") {
|
||||
$('form').on('blur', 'input[type=number]', function (e) {
|
||||
$(this).off('wheel.disableScroll')
|
||||
});
|
||||
$(".select2").select2();
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -4,7 +4,8 @@ $pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Pops";
|
||||
?>
|
||||
<?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?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -32,16 +33,12 @@ $pagination_entity_name = "Pops";
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Pop", "add", ['returnto' => "pop"]) ?>"><i
|
||||
class="fas fa-plus"></i> Neuen Pop anlegen</a>
|
||||
class="fas fa-plus"></i><span
|
||||
class="d-none d-lg-inline"> Neuen Pop anlegen</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination.php"); ?>
|
||||
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination-summary.php"); ?>
|
||||
|
||||
<table id="datatable" class="table table-striped table-hover table-sm font-13">
|
||||
<table id="datatable" class="table table-striped table-hover table-sm font-13" style="width: 100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
@@ -75,9 +72,10 @@ $pagination_entity_name = "Pops";
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="<?= self::getUrl("Pop", "Detail", ["id" => $pop->id]) ?>"><?= $pop->name ?></a>
|
||||
<td class="text-nowrap"><a
|
||||
href="<?= self::getUrl("Pop", "Detail", ["id" => $pop->id]) ?>"><?= $pop->name ?></a>
|
||||
</td>
|
||||
<td><?= $pop->network->name ?></td>
|
||||
<td><?= $pop->networks ?></td>
|
||||
<td><?= $pop->location ?></td>
|
||||
<td class="text-center"><?= trim($vlans) ?></td>
|
||||
<td class="text-center"><a
|
||||
@@ -109,7 +107,7 @@ $pagination_entity_name = "Pops";
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/responsive/2.5.0/js/dataTables.responsive.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function toggleBuilding(id) {
|
||||
|
||||
336
Layout/default/Timerecording/Index.php
Normal file
336
Layout/default/Timerecording/Index.php
Normal file
@@ -0,0 +1,336 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||||
$daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<style>
|
||||
.edit-button {
|
||||
color: #007bff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.approved-open {
|
||||
background-color: #fdb751 !important;
|
||||
color: #000;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.approved-closed {
|
||||
background-color: #96ff68 !important;
|
||||
color: #000;
|
||||
border-radius: 5px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.fa-clock {
|
||||
color: #ff9b00;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.edit-placeholder {
|
||||
height: 15px;
|
||||
width: 19px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<!-- 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") ?>"><?= MFAPPNAME_SLUG ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Buchungen</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Buchungen</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("Timerecording", "save") ?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<input id="id" type="hidden" name="id" value=""/>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-lg-2">
|
||||
<label class="col-form-label" for="timerecordingCategory_id">Buchungsart</label>
|
||||
|
||||
<select id="timerecordingCategory_id" name="timerecordingCategory_id"
|
||||
class="select2 form-control" required="required">
|
||||
<?php foreach ($timerecordingCategoriess as $timerecordingCategories): ?>
|
||||
<option value="<?= $timerecordingCategories->id ?>"
|
||||
data-approval="<?= $timerecordingCategories->approval ?>"
|
||||
data-comment="<?= $timerecordingCategories->require_comment ?>"
|
||||
data-hourday="<?= $timerecordingCategories->hourday ?>"><?= $timerecordingCategories->name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-lg-1">
|
||||
<label class="col-form-label" for="date">Datum</label>
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<input type="date" id="date" name="date" class="form-control "
|
||||
value="<?= date("Y-m-d", time()) ?>"
|
||||
placeholder="<?= date("d.m.Y", time()); ?>" required="required"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="enddate-div" class="form-group col-lg-1" style="display:none">
|
||||
<label class="col-form-label" for="enddate">bis Datum</label>
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<input type="date" id="enddate" name="enddate" class="form-control "
|
||||
value=""
|
||||
placeholder=""/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="endtime-div" class="col-lg-2">
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class=" col-form-label" for="start">Von</label>
|
||||
|
||||
<input type="time" id="start" name="start" class="form-control "
|
||||
value="08:00" placeholder="07:00" required="required"/>
|
||||
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
<label class=" col-form-label" for="end">Bis</label>
|
||||
<input type="time" id="end" name="end" class="form-control "
|
||||
value="15:00" min="08:00" placeholder="15:00" required="required"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-lg-2">
|
||||
<label class="col-form-label" for="commend">Anmerkung</label>
|
||||
<input type="text" id="commend" name="commend" class="form-control"
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class=" row mt-2">
|
||||
<div class="col-lg-2 ">
|
||||
<button id="submit-button" type="submit" class="btn btn-primary">Speichern</button>
|
||||
<button id="cancel-button" type="button" class="btn btn-secondary" style="display:none">Abbrechen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Buchungen</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable" class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 200px;" class="text-center text-nowrap ">Datum</th>
|
||||
<th class="text-nowrap edit-width text-center">Von</th>
|
||||
<th class="text-nowrap edit-width text-center">Bis</th>
|
||||
<th class="text-nowrap edit-width text-center">Summe</th>
|
||||
<th class="text-center text-nowrap">Buchungsart</th>
|
||||
<th class="text-center">Anmerkung</th>
|
||||
<th class="edit-width"></th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($timerecordings as $timerecording):
|
||||
$state = "";
|
||||
$enddate = "";
|
||||
$sum = "-";
|
||||
$day = "";
|
||||
$orderdate = $timerecording->start;
|
||||
if ($timerecording->timerecordingCategory->hourday == 1) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$start = date("H:i", $timerecording->start);
|
||||
$end = date("H:i", $timerecording->end);
|
||||
$seconds = $timerecording->end - $timerecording->start;
|
||||
$minutes = floor(($seconds % 3600) / 60);
|
||||
$hours = floor($seconds / 3600);
|
||||
$sum = sprintf("%02d", $hours) . ":" . sprintf("%02d", $minutes);
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 2) {
|
||||
$date = date("d.m.", $timerecording->start) . " - " . $daysgerm[date("w", $timerecording->end)] . " " . date("d.m.Y", $timerecording->end);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$enddate = date("Y-m-d", $timerecording->end);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$day=$daysgerm[date("w", $timerecording->start)];
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 3 || $timerecording->timerecordingCategory->hourday == 4) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
}
|
||||
|
||||
if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 0) {
|
||||
$state = '<i class="fa-regular fa-clock mr-1"></i>';
|
||||
} else if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 1) {
|
||||
$state = '<i class="fa-regular fa-circle-check mr-1"></i>';
|
||||
}
|
||||
?>
|
||||
<tr class="">
|
||||
<td data-order="<?= $orderdate ?>" class="text-nowrap "><?= $state ?><?= $day . " " . $date ?></td>
|
||||
<td class="text-nowrap text-center"><?= $start ?></td>
|
||||
<td class="text-nowrap text-center"><?= $end ?></td>
|
||||
<td class="text-nowrap text-center"><?= $sum ?></td>
|
||||
<td class="text-nowrap"><?= $timerecording->timerecordingCategory->name ?></td>
|
||||
<td><?= $timerecording->commend ?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<?php if ($timerecording->completed == 0):
|
||||
if ($timerecording->approved == 0) : ?>
|
||||
<i class="far fa-edit edit-button" data-id="<?= $timerecording->id ?>"
|
||||
data-date="<?= $datadate ?>"
|
||||
data-category="<?= $timerecording->timerecordingCategory->id ?>"
|
||||
data-start="<?= $start ?>"
|
||||
data-end="<?= $end ?>"
|
||||
data-enddate="<?= $enddate ?>"
|
||||
data-commend="<?= $timerecording->commend ?>"
|
||||
title="Bearbeiten"></i>
|
||||
<?php else : ?>
|
||||
<div class="edit-placeholder"></div>
|
||||
<?php endif; ?>
|
||||
<a href="<?= self::getUrl("Timerecording", "delete", ["id" => $timerecording->id]) ?>"
|
||||
onclick="if(!confirm('Buchung wirklich löschen?')) return false;" class="text-danger"
|
||||
title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [1, 2, 3, 6];
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".select2").select2();
|
||||
|
||||
$("body").on("change", "#timerecordingCategory_id", function () {
|
||||
if (parseInt($(this).find(':selected').data('hourday')) === 2) {
|
||||
$("#endtime-div").hide();
|
||||
$("#endtime-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
});
|
||||
$("#enddate-div").show();
|
||||
$("#enddate-div").find('input').each(function () {
|
||||
$(this).prop("required", true);
|
||||
$(this).prop("min", $('#date').val());
|
||||
$(this).val($('#date').val());
|
||||
})
|
||||
} else if (parseInt($(this).find(':selected').data('hourday')) === 1) {
|
||||
$("#endtime-div").show();
|
||||
$("#endtime-div").find('input').each(function () {
|
||||
$(this).prop("required", true);
|
||||
$(this).prop("disabled", false);
|
||||
});
|
||||
$("#enddate-div").hide();
|
||||
$("#enddate-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
$(this).prop("min", '');
|
||||
$(this).val('');
|
||||
})
|
||||
} else if (parseInt($(this).find(':selected').data('hourday')) === 3 || parseInt($(this).find(':selected').data('hourday')) === 4) {
|
||||
$("#endtime-div").hide();
|
||||
$("#endtime-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
});
|
||||
$("#enddate-div").hide();
|
||||
$("#enddate-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
$(this).prop("min", '');
|
||||
$(this).val('');
|
||||
})
|
||||
}
|
||||
if (parseInt($(this).find(':selected').data('comment')) === 1) {
|
||||
$('#commend').prop("required", true);
|
||||
} else {
|
||||
$('#commend').prop("required", false);
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#date", function () {
|
||||
if ($('#enddate-div').css('display') === "block") {
|
||||
if ($('#date').val() > $('#enddate').val()) {
|
||||
$('#enddate').prop("min", $('#date').val());
|
||||
$('#enddate').val($('#date').val());
|
||||
}
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#date", function () {
|
||||
if ($('#endtime').css('display') === "block") {
|
||||
if ($('#start').val() > $('#end').val()) {
|
||||
console.log('größer');
|
||||
$('#end').prop("min", $('#start').val());
|
||||
$('#end').val($('#start').val());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("click", ".edit-button", function () {
|
||||
$('#submit-button').hide().removeClass('btn-primary').addClass('btn-danger').show();
|
||||
$('#submit-button').text('Ändern');
|
||||
$('#cancel-button').show();
|
||||
$('#timerecordingCategory_id').val($(this).data('category')).change();
|
||||
$('#id').val($(this).data('id'));
|
||||
$('#date').val($(this).data('date'));
|
||||
$('#start').val($(this).data('start'));
|
||||
$('#end').val($(this).data('end'));
|
||||
$('#enddate').val($(this).data('enddate'));
|
||||
$('#commend').val($(this).data('commend'));
|
||||
$('.alert-success').remove();
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
$("body").on("click", "#cancel-button", function () {
|
||||
$('#submit-button').hide().removeClass('btn-danger').addClass('btn-primary').show();
|
||||
$('#submit-button').text('Speichern');
|
||||
$('#cancel-button').hide();
|
||||
$('#id').val('');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
117
Layout/default/TimerecordingCategories/Form.php
Normal file
117
Layout/default/TimerecordingCategories/Form.php
Normal file
@@ -0,0 +1,117 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- 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") ?>"><?= MFAPPNAME_SLUG ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item"><a
|
||||
href="<?= self::getUrl("TimerecordingCategory") ?>">Zeiterfassung
|
||||
Buchungsarten</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active"><?= ($timerecordingcategoriess->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title"><?= ($timerecordingcategoriess->id) ? "Zeiterfassung Buchungsart bearbeiten" : "Neue Zeiterfassung Buchungsart" ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mb-2"><?= ($timerecordingcategoriess->id) ? "Zeiterfassung Buchungsart bearbeiten" : "Neue Zeiterfassung Buchungsart" ?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("TimerecordingCategory", "save") ?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="id" value="<?= $timerecordingcategoriess->id ?>"/>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="name">Beizeichnung</label>
|
||||
<div class="col-lg-3">
|
||||
<input type="text" id="name" name="name" class="form-control"
|
||||
value="<?= $timerecordingcategoriess->name ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="short">BMD KZ</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" id="short" name="short" class="form-control"
|
||||
value="<?= $timerecordingcategoriess->short ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="hourday">Buchungszeitraum</label>
|
||||
<div class="col-lg-2">
|
||||
<select id="hourday" name="hourday" class="select2 form-control">
|
||||
<?php foreach ($timerecordingcategorieshourday as $key => $value) : ?>
|
||||
<option value="<?= $key ?>" <?= ($key == $timerecordingcategoriess->hourday) ? "selected='selected'" : "" ?>><?= $value ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="approval">Genehmigungspflichtig</label>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" <?php if ($timerecordingcategoriess->approval) echo 'checked="checked"'; ?>
|
||||
type="checkbox" name="approval" value="1" id="olt">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="require_comment">Anmerkung
|
||||
Pflichtfeld</label>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" <?php if ($timerecordingcategoriess->require_comment) echo 'checked="checked"'; ?>
|
||||
type="checkbox" name="require_comment" value="1" id="olt">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<a href="<?= self::getUrl("TimerecordingCategory") ?>">
|
||||
<button type="button" class="btn btn-secondary">Abbrechen</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(".select2").select2({placeholder: ""});
|
||||
|
||||
// disable mousewheel on a input number field when in focus
|
||||
$('form').on('focus', 'input[type=number]', function (e) {
|
||||
$(this).on('wheel.disableScroll', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
});
|
||||
$('form').on('blur', 'input[type=number]', function (e) {
|
||||
$(this).off('wheel.disableScroll')
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
93
Layout/default/TimerecordingCategories/Index.php
Normal file
93
Layout/default/TimerecordingCategories/Index.php
Normal file
@@ -0,0 +1,93 @@
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- 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") ?>"><?= MFAPPNAME_SLUG ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Zeiterfassung Buchungsarten</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Zeiterfassung Buchungsarten</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Zeiterfassung Buchungsarten</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?= self::getUrl("TimerecordingCategory", "add") ?>"><i
|
||||
class="fas fa-plus"></i> <span class="d-none d-lg-inline-block"> Neuen Buchungsart anlegen</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable" class="table table-striped table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Beizeichnung</th>
|
||||
<th class="text-center">BMD KZ</th>
|
||||
<th class="text-center">Buchungszeitraum</th>
|
||||
<th class="text-center">Genehmigungspflichtig</th>
|
||||
<th class="text-center">Anmerkung Pflichtfeld</th>
|
||||
<th class="edit-width"></th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($timerecordingcategoriess as $timerecordingcategories): ?>
|
||||
<tr>
|
||||
<td><?= $timerecordingcategories->name ?></td>
|
||||
<td><?= $timerecordingcategories->short ?></td>
|
||||
<td><?= $timerecordingcategorieshourday[$timerecordingcategories->hourday] ?></td>
|
||||
<td><?= $timerecordingcategoriesapproval[$timerecordingcategories->approval] ?></td>
|
||||
<td><?= $timerecordingcategoriesrequire_comment[$timerecordingcategories->require_comment] ?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?= self::getUrl("TimerecordingCategory", "edit", ["id" => $timerecordingcategories->id]) ?>"><i
|
||||
class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?= self::getUrl("TimerecordingCategory", "delete", ["id" => $timerecordingcategories->id]) ?>"
|
||||
onclick="if(!confirm('Zeiterfassung Kategorie wirklich löschen?')) return false;" class="text-danger"
|
||||
title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [5];
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
290
Layout/default/TimerecordingPermit/Index.php
Normal file
290
Layout/default/TimerecordingPermit/Index.php
Normal file
@@ -0,0 +1,290 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||||
$daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
|
||||
<style>
|
||||
.edit-button {
|
||||
color: #007bff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.approved-open {
|
||||
background-color: #fdb751 !important;
|
||||
color: #000;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.approved-closed {
|
||||
background-color: #96ff68 !important;
|
||||
color: #000;
|
||||
border-radius: 5px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.fa-clock {
|
||||
color: #ff9b00;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.edit-placeholder {
|
||||
height: 15px;
|
||||
width: 22px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.fa-square-check {
|
||||
color: #23b900;
|
||||
font-size: 17px;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 2px;
|
||||
margin-right: 3px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- 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") ?>"><?= MFAPPNAME_SLUG ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Buchungen</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Buchungen</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Buchungen</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable" class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 200px;" class="text-center text-nowrap ">Datum</th>
|
||||
<th style="width: 200px;" class="text-nowrap">Mitarbeiter</th>
|
||||
<th class="text-nowrap text-center edit-width">Von</th>
|
||||
<th class="text-nowrap text-center edit-width">Bis</th>
|
||||
<th class="text-nowrap edit-width text-center">Summe</th>
|
||||
<th class="text-center text-nowrap">Buchungsart</th>
|
||||
<th class="text-center">Anmerkung</th>
|
||||
<th class="text-center edit-width-large">Freigabe</th>
|
||||
<th class="edit-width text-center"></th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($timerecordings as $timerecording):
|
||||
$state = "";
|
||||
$enddate = "";
|
||||
$sum = "-";
|
||||
$day = "";
|
||||
$orderdate = $timerecording->start;
|
||||
if ($timerecording->timerecordingCategory->hourday == 1) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$start = date("H:i", $timerecording->start);
|
||||
$end = date("H:i", $timerecording->end);
|
||||
$seconds = $timerecording->end - $timerecording->start;
|
||||
$minutes = floor(($seconds % 3600) / 60);
|
||||
$hours = floor($seconds / 3600);
|
||||
$sum = sprintf("%02d", $hours) . ":" . sprintf("%02d", $minutes);
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 2) {
|
||||
$date = date("d.m.", $timerecording->start) . " - " . $daysgerm[date("w", $timerecording->end)] . " " . date("d.m.Y", $timerecording->end);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$enddate = date("Y-m-d", $timerecording->end);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$day=$daysgerm[date("w", $timerecording->start)];
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 3 || $timerecording->timerecordingCategory->hourday == 4) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
}
|
||||
|
||||
if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 0) {
|
||||
$state = '<i class="fa-regular fa-clock mr-1"></i>';
|
||||
} else if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 1) {
|
||||
$state = '<i class="fa-regular fa-circle-check mr-1"></i>';
|
||||
}
|
||||
$approved = 'Offen';
|
||||
if ($timerecording->approved == 1) $approved = 'Genehmigt';
|
||||
$completed = 'Genehmigt';
|
||||
// if ($timerecording->completed == 1) $completed = 'Genehmigt';
|
||||
?>
|
||||
<tr class="">
|
||||
<td data-order="<?= $orderdate ?>" class="text-nowrap "><?= $state ?><?= $day . " " . $date ?></td>
|
||||
<td class="text-nowrap "><?= $timerecording->user->name ?></td>
|
||||
<td class="text-nowrap text-center"><?= $start ?></td>
|
||||
<td class="text-nowrap text-center"><?= $end ?></td>
|
||||
<td class="text-nowrap text-center"><?= $sum ?></td>
|
||||
<td class="text-nowrap"><?= $timerecording->timerecordingCategory->name ?></td>
|
||||
<td><?= $timerecording->commend ?></td>
|
||||
<td class="text-center"><?= $approved ?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<?php if ($timerecording->completed == 0):
|
||||
if ($timerecording->approved == 0) : ?>
|
||||
<a href="<?= self::getUrl("TimerecordingPermit", "approve", ["id" => $timerecording->id]) ?>"
|
||||
onclick="if(!confirm('Buchung genehmigen?')) return false;"> <i
|
||||
class="fa-regular fa-square-check permit-button" title="genehmigen"
|
||||
data-id="<?= $timerecording->id ?>"></i></a>
|
||||
<a href="<?php self::getUrl("TimerecordingPermit", "deny", ["id" => $timerecording->id]) ?>"
|
||||
onclick="if(!confirm('Buchung wirklich ablehnen?')) return false;"
|
||||
class="text-danger"
|
||||
title="Ablehnen"><i class="fas fa-ban deny-button"></i></a>
|
||||
<?php else : ?>
|
||||
<div class="edit-placeholder"></div>
|
||||
<?php endif; ?>
|
||||
<!-- <i class="far fa-edit edit-button" data-id="--><?php //= $timerecording->id
|
||||
?><!--"-->
|
||||
<!-- data-date="--><?php //= $datadate
|
||||
?><!--"-->
|
||||
<!-- data-category="--><?php //= $timerecording->timerecordingCategory->id
|
||||
?><!--"-->
|
||||
<!-- data-start="--><?php //= $start
|
||||
?><!--"-->
|
||||
<!-- data-end="--><?php //= $end
|
||||
?><!--"-->
|
||||
<!-- data-enddate="--><?php //= $enddate
|
||||
?><!--"-->
|
||||
<!-- title="Bearbeiten"></i>-->
|
||||
<!-- <a href="--><?php //= self::getUrl("Timerecording", "delete", ["id" => $timerecording->id])
|
||||
?><!--"-->
|
||||
<!-- onclick="if(!confirm('Buchung wirklich löschen?')) return false;" class="text-danger"-->
|
||||
<!-- title="Löschen"><i class="fas fa-trash"></i></a>-->
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [2, 3, 4, 8];
|
||||
var columnfilter = [7];
|
||||
var columnoptions = '<option value=""></option><option value="Offen">Offen</option><option value="Genehmigt">Genehmigt</option><option value="Abgelehnt">Abgelehnt</option>';
|
||||
$(document).ready(function () {
|
||||
$(".select2").select2();
|
||||
|
||||
$("body").on("change", "#timerecordingCategory_id", function () {
|
||||
if (parseInt($(this).find(':selected').data('hourday')) === 2) {
|
||||
$("#endtime-div").hide();
|
||||
$("#endtime-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
});
|
||||
$("#enddate-div").show();
|
||||
$("#enddate-div").find('input').each(function () {
|
||||
$(this).prop("required", true);
|
||||
$(this).prop("min", $('#date').val());
|
||||
$(this).val($('#date').val());
|
||||
})
|
||||
} else if (parseInt($(this).find(':selected').data('hourday')) === 1) {
|
||||
$("#endtime-div").show();
|
||||
$("#endtime-div").find('input').each(function () {
|
||||
$(this).prop("required", true);
|
||||
$(this).prop("disabled", false);
|
||||
});
|
||||
$("#enddate-div").hide();
|
||||
$("#enddate-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
$(this).prop("min", '');
|
||||
$(this).val('');
|
||||
})
|
||||
} else if (parseInt($(this).find(':selected').data('hourday')) === 3 || parseInt($(this).find(':selected').data('hourday')) === 4) {
|
||||
$("#endtime-div").hide();
|
||||
$("#endtime-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
});
|
||||
$("#enddate-div").hide();
|
||||
$("#enddate-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
$(this).prop("min", '');
|
||||
$(this).val('');
|
||||
})
|
||||
}
|
||||
if (parseInt($(this).find(':selected').data('comment')) === 1) {
|
||||
$('#commend').prop("required", true);
|
||||
} else {
|
||||
$('#commend').prop("required", false);
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#date", function () {
|
||||
if ($('#enddate-div').css('display') === "block") {
|
||||
if ($('#date').val() > $('#enddate').val()) {
|
||||
$('#enddate').prop("min", $('#date').val());
|
||||
$('#enddate').val($('#date').val());
|
||||
}
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#date", function () {
|
||||
if ($('#endtime').css('display') === "block") {
|
||||
if ($('#start').val() > $('#end').val()) {
|
||||
console.log('größer');
|
||||
$('#end').prop("min", $('#start').val());
|
||||
$('#end').val($('#start').val());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("click", ".edit-button", function () {
|
||||
$('#submit-button').hide().removeClass('btn-primary').addClass('btn-danger').show();
|
||||
$('#submit-button').text('Ändern');
|
||||
$('#cancel-button').show();
|
||||
$('#timerecordingCategory_id').val($(this).data('category')).change();
|
||||
$('#id').val($(this).data('id'));
|
||||
$('#date').val($(this).data('date'));
|
||||
$('#start').val($(this).data('start'));
|
||||
$('#end').val($(this).data('end'));
|
||||
$('#enddate').val($(this).data('enddate'));
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
$("body").on("click", "#cancel-button", function () {
|
||||
$('#submit-button').hide().removeClass('btn-danger').addClass('btn-primary').show();
|
||||
$('#submit-button').text('Speichern');
|
||||
$('#cancel-button').hide();
|
||||
$('#id').val('');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
264
Layout/default/TimerecordingReport/Index.php
Normal file
264
Layout/default/TimerecordingReport/Index.php
Normal file
@@ -0,0 +1,264 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||||
$daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<style>
|
||||
.edit-button {
|
||||
color: #007bff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.approved-open {
|
||||
background-color: #fdb751 !important;
|
||||
color: #000;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.approved-closed {
|
||||
background-color: #96ff68 !important;
|
||||
color: #000;
|
||||
border-radius: 5px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.fa-clock {
|
||||
color: #ff9b00;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.edit-placeholder {
|
||||
height: 15px;
|
||||
width: 19px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<!-- 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") ?>"><?= MFAPPNAME_SLUG ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Buchungen</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Buchungen</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Buchungen</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable" class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 200px;" class="text-center text-nowrap ">Datum</th>
|
||||
<th style="width: 200px;" class="text-nowrap">Mitarbeiter</th>
|
||||
<th class="text-nowrap text-center edit-width">Von</th>
|
||||
<th class="text-nowrap text-center edit-width">Bis</th>
|
||||
<th class="text-nowrap edit-width text-center">Summe</th>
|
||||
<th class="text-center text-nowrap">Buchungsart</th>
|
||||
<th class="text-center">Anmerkung</th>
|
||||
<th class="text-center edit-width">Verbucht</th>
|
||||
<!-- <th class="edit-width"></th>-->
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<!-- <th></th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($timerecordings as $timerecording):
|
||||
$state = "";
|
||||
$enddate = "";
|
||||
$sum = "-";
|
||||
$day = "";
|
||||
$orderdate = $timerecording->start;
|
||||
if ($timerecording->timerecordingCategory->hourday == 1) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$start = date("H:i", $timerecording->start);
|
||||
$end = date("H:i", $timerecording->end);
|
||||
$seconds = $timerecording->end - $timerecording->start;
|
||||
$minutes = floor(($seconds % 3600) / 60);
|
||||
$hours = floor($seconds / 3600);
|
||||
$sum = sprintf("%02d", $hours) . ":" . sprintf("%02d", $minutes);
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 2) {
|
||||
$date = date("d.m.", $timerecording->start) . " - " . $daysgerm[date("w", $timerecording->end)] . " " . date("d.m.Y", $timerecording->end);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$enddate = date("Y-m-d", $timerecording->end);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 3 || $timerecording->timerecordingCategory->hourday == 4) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
}
|
||||
|
||||
if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 0) {
|
||||
$state = '<i class="fa-regular fa-clock mr-1"></i>';
|
||||
} else if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 1) {
|
||||
$state = '<i class="fa-regular fa-circle-check mr-1"></i>';
|
||||
}
|
||||
$completed = 'Nein';
|
||||
if ($timerecording->completed == 1) $completed = 'Ja';
|
||||
|
||||
?>
|
||||
<tr class="">
|
||||
<td data-order="<?= $orderdate ?>" class="text-nowrap "><?= $state ?><?= $day . " " . $date ?></td>
|
||||
<td class="text-nowrap "><?= $timerecording->user->name ?></td>
|
||||
<td class="text-nowrap text-center"><?= $start ?></td>
|
||||
<td class="text-nowrap text-center"><?= $end ?></td>
|
||||
<td class="text-nowrap text-center"><?= $sum ?></td>
|
||||
<td class="text-nowrap"><?= $timerecording->timerecordingCategory->name ?></td>
|
||||
<td><?= $timerecording->commend ?></td>
|
||||
<td><?= $completed ?></td>
|
||||
<!-- <td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">-->
|
||||
<!-- --><?php //if ($timerecording->completed == 0):
|
||||
// if ($timerecording->approved == 0) : ?>
|
||||
<!-- <i class="far fa-edit edit-button" data-id="--><?php //= $timerecording->id ?><!--"-->
|
||||
<!-- data-date="--><?php //= $datadate ?><!--"-->
|
||||
<!-- data-category="--><?php //= $timerecording->timerecordingCategory->id ?><!--"-->
|
||||
<!-- data-start="--><?php //= $start ?><!--"-->
|
||||
<!-- data-end="--><?php //= $end ?><!--"-->
|
||||
<!-- data-enddate="--><?php //= $enddate ?><!--"-->
|
||||
<!-- title="Bearbeiten"></i>-->
|
||||
<!-- --><?php //else : ?>
|
||||
<!-- <div class="edit-placeholder"></div>-->
|
||||
<!-- --><?php //endif; ?>
|
||||
<!-- <a href="--><?php //= self::getUrl("Timerecording", "delete", ["id" => $timerecording->id]) ?><!--"-->
|
||||
<!-- onclick="if(!confirm('Buchung wirklich löschen?')) return false;" class="text-danger"-->
|
||||
<!-- title="Löschen"><i class="fas fa-trash"></i></a>-->
|
||||
<!-- --><?php //endif; ?>
|
||||
<!-- </td>-->
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [2, 3, 4, 8];
|
||||
var columnfilter = [7];
|
||||
var columnoptions = '<option value=""></option><option value="Ja">Ja</option><option value="Nein">Nein</option>';
|
||||
$(document).ready(function () {
|
||||
$(".select2").select2();
|
||||
|
||||
$("body").on("change", "#timerecordingCategory_id", function () {
|
||||
if (parseInt($(this).find(':selected').data('hourday')) === 2) {
|
||||
$("#endtime-div").hide();
|
||||
$("#endtime-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
});
|
||||
$("#enddate-div").show();
|
||||
$("#enddate-div").find('input').each(function () {
|
||||
$(this).prop("required", true);
|
||||
$(this).prop("min", $('#date').val());
|
||||
$(this).val($('#date').val());
|
||||
})
|
||||
} else if (parseInt($(this).find(':selected').data('hourday')) === 1) {
|
||||
$("#endtime-div").show();
|
||||
$("#endtime-div").find('input').each(function () {
|
||||
$(this).prop("required", true);
|
||||
$(this).prop("disabled", false);
|
||||
});
|
||||
$("#enddate-div").hide();
|
||||
$("#enddate-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
$(this).prop("min", '');
|
||||
$(this).val('');
|
||||
})
|
||||
} else if (parseInt($(this).find(':selected').data('hourday')) === 3 || parseInt($(this).find(':selected').data('hourday')) === 4) {
|
||||
$("#endtime-div").hide();
|
||||
$("#endtime-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
});
|
||||
$("#enddate-div").hide();
|
||||
$("#enddate-div").find('input').each(function () {
|
||||
$(this).prop("required", false);
|
||||
$(this).prop("min", '');
|
||||
$(this).val('');
|
||||
})
|
||||
}
|
||||
if (parseInt($(this).find(':selected').data('comment')) === 1) {
|
||||
$('#commend').prop("required", true);
|
||||
} else {
|
||||
$('#commend').prop("required", false);
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#date", function () {
|
||||
if ($('#enddate-div').css('display') === "block") {
|
||||
if ($('#date').val() > $('#enddate').val()) {
|
||||
$('#enddate').prop("min", $('#date').val());
|
||||
$('#enddate').val($('#date').val());
|
||||
}
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#date", function () {
|
||||
if ($('#endtime').css('display') === "block") {
|
||||
if ($('#start').val() > $('#end').val()) {
|
||||
console.log('größer');
|
||||
$('#end').prop("min", $('#start').val());
|
||||
$('#end').val($('#start').val());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("click", ".edit-button", function () {
|
||||
$('#submit-button').hide().removeClass('btn-primary').addClass('btn-danger').show();
|
||||
$('#submit-button').text('Ändern');
|
||||
$('#cancel-button').show();
|
||||
$('#timerecordingCategory_id').val($(this).data('category')).change();
|
||||
$('#id').val($(this).data('id'));
|
||||
$('#date').val($(this).data('date'));
|
||||
$('#start').val($(this).data('start'));
|
||||
$('#end').val($(this).data('end'));
|
||||
$('#enddate').val($(this).data('enddate'));
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
$("body").on("click", "#cancel-button", function () {
|
||||
$('#submit-button').hide().removeClass('btn-danger').addClass('btn-primary').show();
|
||||
$('#submit-button').text('Speichern');
|
||||
$('#cancel-button').hide();
|
||||
$('#id').val('');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -59,10 +59,10 @@ $pagination_entity_name = "Benutzer";
|
||||
<?php if (is_array($filter) && count($filter) && is_numeric($filter['address_id'])): ?>
|
||||
<a class="btn btn-primary"
|
||||
href="<?= self::getUrl("User", "add", ['address_id' => $filter['address_id']]) ?>"><i
|
||||
class="fas fa-plus"></i> Neuen Benutzer anlegen</a>
|
||||
class="fas fa-plus"></i><span class="d-none d-lg-inline"> Neuen Benutzer anlegen</span></a>
|
||||
<?php else: ?>
|
||||
<a class="btn btn-primary" href="<?= self::getUrl("User", "add") ?>"><i
|
||||
class="fas fa-plus"></i> Neuen Benutzer anlegen</a>
|
||||
class="fas fa-plus"></i><span class="d-none d-lg-inline"> Neuen Benutzer anlegen</span></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,7 +105,7 @@ $pagination_entity_name = "Benutzer";
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $user->username ?></td>
|
||||
<td class="text-nowrap"><?= $user->username ?></td>
|
||||
<td><?= $user->name ?></td>
|
||||
<td><?= ($user->address->company) ? $user->address->company : $user->address->getFullName() ?></td>
|
||||
<td><?= $user->email ?></td>
|
||||
@@ -121,7 +121,7 @@ $pagination_entity_name = "Benutzer";
|
||||
<a href="<?= self::getUrl("User", "delete", ['id' => $user->id]) ?>"
|
||||
class="text-danger" title="User löschen"
|
||||
onclick="if(!confirm('Benutzer wirklich löschen?')) return false;"><i
|
||||
class="far fa-trash-alt"></i></a>
|
||||
class="fas fa-trash"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- start page title -->
|
||||
<style>
|
||||
|
||||
@@ -8,6 +10,11 @@
|
||||
font-size: 16px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.alert {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -67,9 +74,11 @@ if ($twofa == 0) {
|
||||
value="<?= $userprofile->email ?>" <?php if ($twofa == 1) : ?> disabled="disabled" <?php endif; ?> />
|
||||
</div>
|
||||
<?php if ($twofa == 1) : ?>
|
||||
<div class="col-lg-4 col-form-label">
|
||||
<div class="col-lg-4 ">
|
||||
|
||||
<span class="info-span alert alert-info"> Um die Email Adresse zu ändern bitte 2FA auf SMS umschalten.</span>
|
||||
<div class="info-span alert alert-info"> Um die Email Adresse zu ändern
|
||||
bitte 2FA auf SMS umschalten.
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -84,7 +93,7 @@ if ($twofa == 0) {
|
||||
value="<?= $userprofile->mobile ?>" <?php if ($twofa == 2) : ?> disabled="disabled" <?php endif; ?>/>
|
||||
</div>
|
||||
<?php if ($twofa == 2) : ?>
|
||||
<div class="col-lg-4 col-form-label">
|
||||
<div class="col-lg-4 ">
|
||||
<span class="info-span alert alert-info"> Um die Mobilnummer zu ändern bitte 2FA auf Email umschalten.</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -1,29 +1,8 @@
|
||||
<?php
|
||||
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<?php var_dump($userprofile); ?>
|
||||
<!-- start page title -->
|
||||
<style>
|
||||
.fa-exclamation-triangle {
|
||||
font-size: 19px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.fa-new-code {
|
||||
cursor: pointer;
|
||||
color: #007bff;
|
||||
font-size: 16px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.fa-envelope, .fa-mobile-retro {
|
||||
font-size: 25px;
|
||||
vertical-align: sub;
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
@@ -31,151 +10,187 @@
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Gerätetyp</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Benutzerprofil</h4>
|
||||
<h4 class="page-title">Gerätetyp</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<?php
|
||||
if ($userprofile->twofactor == 0) {
|
||||
$twoFactorsym = '<i class="fa fa-exclamation-triangle mr-1"></i>';
|
||||
$twoFactorbtn = '<button class="btn btn-success mb-3 ">Aktivieren</button>';
|
||||
$twoFactortype = '<div class="col-lg-2">
|
||||
<select class="select2 form-control" name="twofactor" id="twofactor">
|
||||
<option value="1">Email</option>
|
||||
<option value="2">SMS</option>
|
||||
</select></div>';
|
||||
$twoFactorFormaction = "code2faaction";
|
||||
} else if ($userprofile->twofactor == 1) {
|
||||
$twoFactorsym = '<i class="fa-regular fa-circle-check mr-1"></i>';
|
||||
$twoFactorbtn = '<button class="btn btn-success mb-3 ">Ändern zu SMS</button>';
|
||||
$twoFactortype = '<label class="col-lg-2 col-form-label"><input type="hidden" name="twofactor" value="2"/><i class="fa-light fa-envelope"></i> Email</label>';
|
||||
$twoFactorFormaction = "change2faaction";
|
||||
} else if ($userprofile->twofactor == 2) {
|
||||
$twoFactorsym = '<i class="fa-regular fa-circle-check mr-1"></i>';
|
||||
$twoFactorbtn = '<button class="btn btn-success mb-3 ">Ändern zu Email</button>';
|
||||
$twoFactortype = '<label class="col-lg-2 col-form-label"><input type="hidden" name="twofactor" value="1"/><i class="fa-light fa-mobile-retro"></i> Mobiltelefon (SMS)</label>';
|
||||
$twoFactorFormaction = "change2faaction";
|
||||
}
|
||||
|
||||
?>
|
||||
<i class="bi bi-exclamation-triangle"></i>
|
||||
<div class="row">
|
||||
<div class="col-lg">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class=" mb-2">Allgemeine Daten</h4>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-2 font-weight-500">Name</div>
|
||||
<div class="col-lg-10">
|
||||
<?= $userprofile->name ?>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Gerätetypen</h4>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-2 font-weight-500">Email</div>
|
||||
<div class="col-lg-10">
|
||||
<?= $userprofile->email ?>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Devicetype", "add") ?>"><i
|
||||
class="fas fa-plus"></i> Neuen Gerätetyp anlegen</a>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-2 font-weight-500">Mobiltelefon</div>
|
||||
<div class="col-lg-10">
|
||||
<?= $userprofile->mobile ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-10">
|
||||
<a class="btn btn-primary mb-2"
|
||||
href="<?= self::getUrl("UserProfile", "edit") ?>">Bearbeiten</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-100 border-bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class=" mb-2 mt-3">Passwort ändern</h4>
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("UserProfile", "changepwd") ?>">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="oldpwd">altes Passwort</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="password" class="form-control" name="oldpwd" id="oldpwd"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="newpwd">neues Passwort</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="password" class="form-control" name="newpwd" id="newpwd"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="checkpwd">Passwort bestätigen</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="password" class="form-control" name="checkpwd" id="checkpwd"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-10">
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="w-100 border-bottom"></div>
|
||||
<h4 class="form-group mb-2 mt-3">2FA</h4>
|
||||
<?php if (!$verification || $verification == 0): ?>
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("UserProfile", $twoFactorFormaction) ?>">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="twofactor"><?= $twoFactorsym ?>
|
||||
Zwei-Faktor-Authentifizierung</label>
|
||||
<?= $twoFactortype ?>
|
||||
<div class="col-lg-7">
|
||||
<?= $twoFactorbtn ?>
|
||||
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination.php"); ?>
|
||||
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination-summary.php"); ?>
|
||||
|
||||
<table id="datatable" class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th class="text-center">Hersteller</th>
|
||||
<th class="text-right">Preis</th>
|
||||
<th class="text-right">max. Leistung</th>
|
||||
<th class="text-right">erstellt von</th>
|
||||
<th class="edit-weight"></th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
<th>Name</th>
|
||||
<th>Hersteller</th>
|
||||
<th>Preis</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($devicetypes as $devicetype): ?>
|
||||
|
||||
<tr>
|
||||
<td><?= $devicetype->name ?></td>
|
||||
<td class="text-center"><?= $devicetype->devicemanufactor->name ?></td>
|
||||
|
||||
<td class="text-right"><?= $devicetype->price ?> €</td>
|
||||
<td class="text-right"><?= $devicetype->power ?> Watt</td>
|
||||
<td class="text-right"><?= $devicetype->creator->name ?>
|
||||
(<?= date("d.m.Y , H:i", $devicetype->create) ?>)
|
||||
</td>
|
||||
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?= self::getUrl("Devicetype", "edit", ["id" => $devicetype->id]) ?>"><i
|
||||
class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?= self::getUrl("Devicetype", "delete", ["id" => $devicetype->id]) ?>"
|
||||
onclick="if(!confirm('Gerätetyp wirklich löschen?')) return false;" class="text-danger"
|
||||
title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch=[5];
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?> <div class="col-lg-10">
|
||||
<a class="btn btn-primary mb-2"
|
||||
href="<?= self::getUrl("UserProfile", "edit") ?>">Bearbeiten</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php elseif ($verification == 1 || $verification == 2) :
|
||||
if ($verification == 1) {
|
||||
$verificationType = "Email";
|
||||
} elseif ($verification == 2) {
|
||||
$verificationType = "SMS";
|
||||
}
|
||||
?>
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("UserProfile", "activate2faaction") ?>">
|
||||
<div class="row">
|
||||
<div class="col-lg-2"></div>
|
||||
<label class="col-lg-3 col-form-label"
|
||||
style="vertical-align: top;font-size: 15px;color: #000;"> Code wurde
|
||||
per <?php echo $verificationType; ?> verschickt (5 Minuten gültig)</label>
|
||||
<div class="w-100 border-bottom"></div>
|
||||
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="code">Verifizierungscode: <i
|
||||
data-codetype="<?= $verification ?>"
|
||||
class="fa-solid fa-arrows-rotate fa-new-code" id="new-authcode"
|
||||
title="Neuen Code anfordern."></i></label>
|
||||
<div class="col-lg-2">
|
||||
<input type="number" required min="0" max="99999" class="form-control" name="code"
|
||||
id="code"
|
||||
value="">
|
||||
<input type="hidden" name="twofactor" value="<?php echo $verification; ?>"/>
|
||||
<h4 class=" mb-2 mt-3">Passwort ändern</h4>
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("UserProfile", "changepwd") ?>">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="oldpwd">altes Passwort</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="password" class="form-control" name="oldpwd" id="oldpwd"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-7">
|
||||
<?= $twoFactorbtn ?>
|
||||
<a href="<?= self::getUrl("UserProfile") ?>">
|
||||
<button type="button" class="btn btn-secondary mb-3">Abbrechen</button>
|
||||
</a>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="newpwd">neues Passwort</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="password" class="form-control" name="newpwd" id="newpwd"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="checkpwd">Passwort bestätigen</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="password" class="form-control" name="checkpwd" id="checkpwd"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-10">
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="w-100 border-bottom"></div>
|
||||
<h4 class="form-group mb-2 mt-3">2FA</h4>
|
||||
<?php if (!$verification || $verification == 0): ?>
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("UserProfile", $twoFactorFormaction) ?>">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="twofactor"><?= $twoFactorsym ?>
|
||||
Zwei-Faktor-Authentifizierung</label>
|
||||
<?= $twoFactortype ?>
|
||||
<div class="col-lg-7">
|
||||
<?= $twoFactorbtn ?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php elseif ($verification == 1 || $verification == 2) :
|
||||
if ($verification == 1) {
|
||||
$verificationType = "Email";
|
||||
} elseif ($verification == 2) {
|
||||
$verificationType = "SMS";
|
||||
}
|
||||
?>
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("UserProfile", "activate2faaction") ?>">
|
||||
<div class="row">
|
||||
<div class="col-lg-2"></div>
|
||||
<label class="col-lg-3 col-form-label"
|
||||
style="vertical-align: top;font-size: 15px;color: #000;"> Code wurde
|
||||
per <?php echo $verificationType; ?> verschickt (5 Minuten gültig)</label>
|
||||
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="code">Verifizierungscode: <i
|
||||
data-codetype="<?= $verification ?>"
|
||||
class="fa-solid fa-arrows-rotate fa-new-code" id="new-authcode"
|
||||
title="Neuen Code anfordern."></i></label>
|
||||
<div class="col-lg-2">
|
||||
<input type="number" required min="0" max="99999" class="form-control"
|
||||
name="code"
|
||||
id="code"
|
||||
value="">
|
||||
<input type="hidden" name="twofactor" value="<?php echo $verification; ?>"/>
|
||||
</div>
|
||||
<div class="col-lg-7 check-button">
|
||||
<?= $twoFactorbtn ?>
|
||||
<a href="<?= self::getUrl("UserProfile") ?>">
|
||||
<button type="button" class="btn btn-secondary mb-3">Abbrechen</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,6 +22,20 @@
|
||||
tickIcon: "check",
|
||||
sanitize: false
|
||||
});
|
||||
$('.navbar-toggle').on('click', function (event) {
|
||||
console.log('cracy');
|
||||
$(this).toggleClass('open');
|
||||
$('#navigation').slideToggle(400);
|
||||
});
|
||||
|
||||
$('.navigation-menu>li').slice(-2).addClass('last-elements');
|
||||
|
||||
$('.navigation-menu li.has-submenu a[href="#"]').on('click', function (e) {
|
||||
if ($(window).width() < 992) {
|
||||
e.preventDefault();
|
||||
$(this).parent('li').toggleClass('open').find('.submenu:first').toggleClass('open');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -19,7 +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" />
|
||||
<link href="<?=self::getResourcePath()?>datatables/datatables.min.css?<?=date('U')?>" 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.full.min.js"></script>
|
||||
@@ -32,7 +32,7 @@
|
||||
<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>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>datatables/datatables.min.js?<?=date('U')?>"></script>
|
||||
|
||||
<?php if(MFAPPNAME == "devthetool"): ?>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -29,7 +29,18 @@
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is("employee")): ?>
|
||||
<li class="has-submenu"><a href="#"><i class="far fa-fw fa-calendar-clock"></i>Zeiterfassung <div class="arrow-down"></div></a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Timerecording")?>"><i class="far fa-fw fa-calendar text-info"></i> Buchungen</a></li>
|
||||
<?php if ($me->can('Fibu')): ?>
|
||||
<li><a href="<?=self::getUrl("TimerecordingCategory")?>"><i class="far fa-fw fa-list text-info"></i> Buchungsarten</a></li>
|
||||
<li><a href="<?=self::getUrl("TimerecordingPermit")?>"><i class="far fa-fw fa-calendar-check text-info"></i> Freigaben</a></li>
|
||||
<li><a href="<?=self::getUrl("TimerecordingReport")?>"><i class="far fa-fw fa-chart-pie text-info"></i> Auswertungen</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin"]) || ($me->is("netowner") && $me->hasGwrNetworks())): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
@@ -38,36 +49,36 @@
|
||||
<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-fw fa-user text-info"></i> Personen & Firmen</a></li>
|
||||
<li><a href="<?=self::getUrl("Product")?>"><i class="far fa-fw fa-rectangle-list text-info"></i> Produkte</a></li>
|
||||
<li><a href="<?=self::getUrl("Productgroup")?>"><i class="far fa-fw fa-list-tree text-info"></i> Produktgruppen</a></li>
|
||||
<li class="mobile-hide"><a href="<?=self::getUrl("Address")?>"><i class="fad fa-fw fa-user text-info"></i> Personen & Firmen</a></li>
|
||||
<li class="mobile-hide"><a href="<?=self::getUrl("Product")?>"><i class="far fa-fw fa-rectangle-list text-info"></i> Produkte</a></li>
|
||||
<li class="mobile-hide"><a href="<?=self::getUrl("Productgroup")?>"><i class="far fa-fw fa-list-tree text-info"></i> Produktgruppen</a></li>
|
||||
|
||||
<li><a href="<?=self::getUrl("Network")?>"><i class="fad fa-fw fa-network-wired text-info"></i> Netzgebiete</a></li>
|
||||
<li class="mobile-hide"><a href="<?=self::getUrl("Network")?>"><i class="fad fa-fw fa-network-wired text-info"></i> Netzgebiete</a></li>
|
||||
|
||||
<li class="has-sub-submenu" ><a href="<?=self::getUrl("Pop")?>"><i class="fad fa-fw fa-house text-info"></i> Pops</a></li>
|
||||
<li ><a href="<?=self::getUrl("Devicemanufactor")?>"><i class="fad fa-fw fa-router text-info"></i> Geräte Hersteller</a></li>
|
||||
<li><a href="<?=self::getUrl("Devicetype")?>"><i class="fad fa-fw fa-router text-info"></i> Geräte Typen</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("Device")?>"><i class="fad fa-fw fa-router text-info "></i> Devices</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("User")?>"><i class="fad fa-fw fa-users text-info"></i> Benutzer</a></li>
|
||||
<li class="has-sub-submenu font-weight-bold mt-1"><a>Grundstammdaten</a></li>
|
||||
<li class="has-sub-submenu font-weight-bold mt-1 mobile-hide"><a>Grundstammdaten</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin"]) || ($me->is("netowner") && $me->hasGwrNetworks())): ?>
|
||||
<li><a href="<?=self::getUrl("AddressDB")?>"><i class="fas fa-fw fa-city text-info"></i> GWR / AddressDB</a></li>
|
||||
<li class="mobile-hide"><a href="<?=self::getUrl("AddressDB")?>"><i class="fas fa-fw fa-city text-info "></i> GWR / AddressDB</a></li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li><a href="<?=self::getUrl("OpenAccessId")?>"><i class="fad fa-fw fa-link-simple text-info"></i> Open Access IDs</a></li>
|
||||
<li><a href="<?=self::getUrl("Producttech")?>"><i class="fad fa-fw fa-microchip text-info"></i> Technologien</a></li>
|
||||
<li class="mobile-hide"><a href="<?=self::getUrl("OpenAccessId")?>"><i class="fad fa-fw fa-link-simple text-info"></i> Open Access IDs</a></li>
|
||||
<li class="mobile-hide"><a href="<?=self::getUrl("Producttech")?>"><i class="fad fa-fw 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">
|
||||
<li class="has-submenu mobile-hide">
|
||||
<a href="#">
|
||||
<i class="fas fa-fw fa-hard-hat"></i>Netzbau <div class="arrow-down"></div>
|
||||
</a>
|
||||
@@ -82,7 +93,7 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin"]) || $me->can(["Cpeprovisioning", "Cpeshipping"])): ?>
|
||||
<li class="has-submenu">
|
||||
<li class="has-submenu mobile-hide">
|
||||
<a href="#">
|
||||
<i class="fad fa-fw fa-running"></i>Netzbetrieb <div class="arrow-down"></div>
|
||||
</a>
|
||||
@@ -94,7 +105,7 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin"]) || $me->can("Voipnumbering")): ?>
|
||||
<li class="has-submenu">
|
||||
<li class="has-submenu mobile-hide">
|
||||
<a href="#">
|
||||
<i class="fad fa-fw fa-phone"></i>Telefonie <div class="arrow-down"></div>
|
||||
</a>
|
||||
@@ -104,9 +115,9 @@
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($me->is(["Admin","netowner","salespartner"]) || $me->can(["Order", "Preorder"])): ?>
|
||||
<li class="has-submenu">
|
||||
<li class="has-submenu mobile-hide">
|
||||
<a href="#">
|
||||
<i class="fal fa-fw fa-money-bill-wave"></i>Verkauf <div class="arrow-down"></div>
|
||||
</a>
|
||||
@@ -134,7 +145,7 @@
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
-->
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<!-- End navigation menu -->
|
||||
|
||||
@@ -31,8 +31,8 @@ if ($requesttype == "2fa" || $requesttype == "false2fa") {
|
||||
<div class="row justify-content-center mb-3 mt-1">
|
||||
|
||||
<div class="form-check">
|
||||
<input type="checkbox" value="true" name="Remember" class="form-check-input">
|
||||
<label class="form-check-label text-bold" for="Remember">
|
||||
<input type="checkbox" value="true" name="Remember" id="Remember" class="form-check-input">
|
||||
<label class="form-check-label text-bold noselect" for="Remember">
|
||||
angemeldet bleiben
|
||||
</label>
|
||||
|
||||
@@ -87,6 +87,16 @@ if ($requesttype == "2fa" || $requesttype == "false2fa") {
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.noselect {
|
||||
-webkit-touch-callout: none; /* iOS Safari */
|
||||
-webkit-user-select: none; /* Safari */
|
||||
-khtml-user-select: none; /* Konqueror HTML */
|
||||
-moz-user-select: none; /* Old versions of Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none; /* Non-prefixed version, currently
|
||||
supported by Chrome, Edge, Opera and Firefox */
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="hold-transition login-page" onload="setFocus()">
|
||||
@@ -144,6 +154,14 @@ if ($requesttype == "2fa" || $requesttype == "false2fa") {
|
||||
document.getElementById('mfUsername').focus();
|
||||
}
|
||||
|
||||
$('body').on('click', '.form-check-label', function (event) {
|
||||
if ($('Remember').prop("checked")) {
|
||||
$('Remember').prop("checked", false);
|
||||
} else {
|
||||
$('Remember').prop("checked", true);
|
||||
}
|
||||
});
|
||||
|
||||
$('body').on('click', '#new-authcode', function (event) {
|
||||
$('#TwofactorCode').remove();
|
||||
$('form').submit();
|
||||
|
||||
Reference in New Issue
Block a user