V1.6.0: Shipping hinzugefügt, Erlaube Pachscheintermine als Packtermine, Feature: Shipping abgeschlossen kann nun als CheckOut Bedingung genommen werden (vorher: Fertig gepackt)
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
<?php
|
||||
|
||||
require('config.php');
|
||||
require('EpiApi.php');
|
||||
require('vendor/autoload.php');
|
||||
|
||||
$Epi = new Epirent();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -21,155 +19,193 @@ $Epi = new Epirent();
|
||||
<!-- Bootstrap -->
|
||||
<link rel="stylesheet" href="vendor/twbs/bootstrap/dist/css/bootstrap.min.css" >
|
||||
<script src="scripts/jquery-3.5.1.min.js"></script>
|
||||
<link href="css/sticky-footer.css" rel="stylesheet">
|
||||
<link href="css/sticky-footer.css" rel="stylesheet">
|
||||
<script src="https://kit.fontawesome.com/93d71de8bc.js" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script type="text/javascript">
|
||||
// Dynamische Höhe: Wrapper exakt bis Viewport-Unterkante
|
||||
function sizeScrollContainers() {
|
||||
$('.tableFixHead').each(function () {
|
||||
const rect = this.getBoundingClientRect();
|
||||
const bottomMargin = 16; // kleiner Abstand zum Rand
|
||||
const available = window.innerHeight - rect.top - bottomMargin;
|
||||
this.style.maxHeight = (available > 120 ? available : 120) + 'px';
|
||||
});
|
||||
}
|
||||
|
||||
// Lädt tbody via AJAX und erhält die Scrollposition relativ zum unteren Rand
|
||||
function smartLoad($scroller, $target, url, intervalMs) {
|
||||
const scroller = $scroller.get(0);
|
||||
// Abstand vom unteren Rand merken (wichtiger als absolute scrollTop)
|
||||
const fromBottomBefore = scroller.scrollHeight - scroller.clientHeight - scroller.scrollTop;
|
||||
<script type="text/javascript">
|
||||
// Dynamische Höhe: Wrapper exakt bis Viewport-Unterkante
|
||||
function sizeScrollContainers() {
|
||||
$('.tableFixHead').each(function () {
|
||||
const rect = this.getBoundingClientRect();
|
||||
const bottomMargin = 16; // kleiner Abstand zum Rand
|
||||
const available = window.innerHeight - rect.top - bottomMargin;
|
||||
this.style.maxHeight = (available > 120 ? available : 120) + 'px';
|
||||
});
|
||||
}
|
||||
|
||||
$target.load(url, function () {
|
||||
// Nach dem Ersetzen: dieselbe Distanz zum unteren Rand wiederherstellen
|
||||
const newScrollTop = scroller.scrollHeight - scroller.clientHeight - fromBottomBefore;
|
||||
// Begrenzen, falls weniger Inhalt
|
||||
scroller.scrollTop = Math.max(0, newScrollTop);
|
||||
// Lädt tbody via AJAX und erhält die Scrollposition relativ zum unteren Rand
|
||||
function smartLoad($scroller, $target, url, intervalMs) {
|
||||
const scroller = $scroller.get(0);
|
||||
// Abstand vom unteren Rand merken (wichtiger als absolute scrollTop)
|
||||
const fromBottomBefore = scroller.scrollHeight - scroller.clientHeight - scroller.scrollTop;
|
||||
|
||||
// Nächstes Update planen
|
||||
setTimeout(function () {
|
||||
smartLoad($scroller, $target, url, intervalMs);
|
||||
}, intervalMs);
|
||||
});
|
||||
}
|
||||
$target.load(url, function () {
|
||||
// Nach dem Ersetzen: dieselbe Distanz zum unteren Rand wiederherstellen
|
||||
const newScrollTop = scroller.scrollHeight - scroller.clientHeight - fromBottomBefore;
|
||||
// Begrenzen, falls weniger Inhalt
|
||||
scroller.scrollTop = Math.max(0, newScrollTop);
|
||||
|
||||
$(document).ready(function () {
|
||||
sizeScrollContainers();
|
||||
$(window).on('resize', sizeScrollContainers);
|
||||
// Nächstes Update planen
|
||||
setTimeout(function () {
|
||||
smartLoad($scroller, $target, url, intervalMs);
|
||||
}, intervalMs);
|
||||
});
|
||||
}
|
||||
|
||||
// Initial laden + Auto-Refresh, jeweils eigener Scroller
|
||||
smartLoad($('#checkout-scroll'), $('#getCheckOutTableHolder'), 'sources/getCheckOutTable.php', 5000);
|
||||
smartLoad($('#checkin-scroll'), $('#getCheckInTableHolder'), 'sources/getCheckInTable.php', 5000);
|
||||
smartLoad($('#aufgaben-scroll'), $('#AufgabenTableHolder'), 'sources/getAufgabenTable.php', 30000);
|
||||
});
|
||||
</script>
|
||||
$(document).ready(function () {
|
||||
sizeScrollContainers();
|
||||
$(window).on('resize', sizeScrollContainers);
|
||||
|
||||
// Initial laden + Auto-Refresh, jeweils eigener Scroller
|
||||
smartLoad($('#checkout-scroll'), $('#getCheckOutTableHolder'), 'sources/getCheckOutTable.php', 5000);
|
||||
smartLoad($('#checkin-scroll'), $('#getCheckInTableHolder'), 'sources/getCheckInTable.php', 5000);
|
||||
smartLoad($('#aufgaben-scroll'), $('#AufgabenTableHolder'), 'sources/getAufgabenTable.php', 30000);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* Scroll-Wrapper je Tabelle */
|
||||
.tableFixHead {
|
||||
overflow-y: auto;
|
||||
/* Höhe wird per JS dynamisch gesetzt, damit genau bis zum Viewport-Ende gescrollt wird */
|
||||
max-height: 60vh; /* Fallback */
|
||||
border: 1px solid rgba(255,255,255,.1);
|
||||
border-radius: .25rem;
|
||||
}
|
||||
/* Scroll-Wrapper je Tabelle */
|
||||
.tableFixHead {
|
||||
overflow-y: auto;
|
||||
/* Höhe wird per JS dynamisch gesetzt, damit genau bis zum Viewport-Ende gescrollt wird */
|
||||
max-height: 60vh; /* Fallback */
|
||||
border: 1px solid rgba(255,255,255,.1);
|
||||
border-radius: .25rem;
|
||||
}
|
||||
|
||||
/* Sticky Header */
|
||||
.tableFixHead thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2; /* über Body-Zellen */
|
||||
}
|
||||
/* Sticky Header */
|
||||
.tableFixHead thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2; /* über Body-Zellen */
|
||||
}
|
||||
|
||||
/* Saubere Hintergrundfarbe für sticky Header (Bootstrap .table-dark) */
|
||||
.table-dark thead th {
|
||||
background-color: #212529; /* gleiche Farbe wie .table-dark header */
|
||||
}
|
||||
/* Saubere Hintergrundfarbe für sticky Header (Bootstrap .table-dark) */
|
||||
.table-dark thead th {
|
||||
background-color: #212529; /* gleiche Farbe wie .table-dark header */
|
||||
}
|
||||
|
||||
/* Optional: dünne Trennlinien */
|
||||
.table-dark tbody tr + tr td {
|
||||
border-top: 1px solid rgba(255,255,255,.08);
|
||||
}
|
||||
</style>
|
||||
/* Optional: dünne Trennlinien */
|
||||
.table-dark tbody tr + tr td {
|
||||
border-top: 1px solid rgba(255,255,255,.08);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="background-color: black;">
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<h2 class="text-light">Check-Out</h2>
|
||||
<div class="tableFixHead" id="checkout-scroll">
|
||||
<table class="table table-dark mb-0" id="checkout-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Kunde</th>
|
||||
<th scope="col">Event</th>
|
||||
<th scope="col">Dispo-Start<br><i>VB-Start</i></th>
|
||||
<?php
|
||||
|
||||
if(!HideCheckInTimeOnCheckout){
|
||||
echo "<th scope='col'>Dispo-Ende<br><i>VB-Ende</i></th>";
|
||||
}
|
||||
?>
|
||||
<th scope="col">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="getCheckOutTableHolder"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm">
|
||||
<h2 class="text-light">Check-In</h2>
|
||||
<div class="tableFixHead" id="checkin-scroll">
|
||||
<table class="table table-dark mb-0" id="checkin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Kunde</th>
|
||||
<th scope="col">Event</th>
|
||||
<?php
|
||||
|
||||
if(!HideCheckOutTimeOnCheckin){
|
||||
echo "<th scope='col'>Dispo-Start<br><i>RP-Start</i></th>";
|
||||
}
|
||||
?>
|
||||
<th scope="col">Dispo-Ende<br><i>RP-Ende</i></th>
|
||||
<th scope="col">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="getCheckInTableHolder"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm">
|
||||
<h2 class="text-light">Aufgaben</h2>
|
||||
<div class="tableFixHead" id="aufgaben-scroll">
|
||||
<table class="table table-dark mb-0" id="aufgaben-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Bearbeiter</th>
|
||||
<th scope="col">Aufgabe</th>
|
||||
<th scope="col">Zieldatum</th>
|
||||
<th scope="col">Priorität</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="AufgabenTableHolder"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<h2 class="text-light">Check-Out</h2>
|
||||
<div class="tableFixHead" id="checkout-scroll">
|
||||
<table class="table table-dark mb-0" id="checkout-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Kunde</th>
|
||||
<th scope="col">Event</th>
|
||||
<th scope="col">
|
||||
<?php
|
||||
if (!HideDispoTimes) {
|
||||
echo "Dispo-Start";
|
||||
}
|
||||
if (UsePackingNoteDateForCheckout) {
|
||||
echo "<br><i>Packen-Start</i></th>";
|
||||
} else {
|
||||
echo "<br><i>VB-Start</i></th>";
|
||||
}
|
||||
if (!HideCheckInTimeOnCheckout) {
|
||||
if(!HideDispoTimes){
|
||||
echo "<th scope='col'>Dispo-Ende<br><i>VB-Ende</i></th>";
|
||||
}else{
|
||||
echo "<th scope='col'><i>VB-Ende</i></th>";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<th scope="col">Status</th>
|
||||
<?php
|
||||
if(ShowShippingIcons){
|
||||
echo "<th scope='col'>Shipping</th>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="getCheckOutTableHolder"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm">
|
||||
<h2 class="text-light">Check-In</h2>
|
||||
<div class="tableFixHead" id="checkin-scroll">
|
||||
<table class="table table-dark mb-0" id="checkin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Kunde</th>
|
||||
<th scope="col">Event</th>
|
||||
|
||||
<?php
|
||||
if (!HideCheckOutTimeOnCheckin) {
|
||||
echo "<th scope='col'>Dispo-Start<br><i>RP-Start</i></th>";
|
||||
}
|
||||
|
||||
if(!HideDispoTimes){
|
||||
echo "<th scope='col'>Dispo-Ende";
|
||||
}else{
|
||||
echo "<th scope='col'>";
|
||||
}
|
||||
if (UsePackingNoteDateForCheckin) {
|
||||
echo "<br><i>Rücklieferung</i></th>";
|
||||
} else {
|
||||
echo "<br><i>RP-Ende</i></th>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<th scope="col">Status</th>
|
||||
<?php
|
||||
if(ShowShippingIcons){
|
||||
echo "<th scope='col'>Shipping</th>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="getCheckInTableHolder"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm">
|
||||
<h2 class="text-light">Aufgaben</h2>
|
||||
<div class="tableFixHead" id="aufgaben-scroll">
|
||||
<table class="table table-dark mb-0" id="aufgaben-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Bearbeiter</th>
|
||||
<th scope="col">Aufgabe</th>
|
||||
<th scope="col">Zieldatum</th>
|
||||
<th scope="col">Priorität</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="AufgabenTableHolder"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user