540 lines
19 KiB
Smarty
540 lines
19 KiB
Smarty
<link rel="stylesheet" href="template/css/planung.css">
|
|
<!-- <link rel="stylesheet" href="../lib/css/select2.min.css"> -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.full.min.js"></script>
|
|
<!-- ********** -->
|
|
<body style="background-color:#333333">
|
|
<!-- ********** -->
|
|
|
|
<section class="col-md-9" style="background-color:#333333">
|
|
<div class="row sortable" style="background-color:#333333">
|
|
<!-- Main Section -- mittlere Spalte -->
|
|
<div class="col-md-2">
|
|
<div class="panel panel-tbox">
|
|
<table class="no-style full">
|
|
<tbody>
|
|
<td nowrap style="align:center;width:320px;font-size:14pt">
|
|
<a class="fa fa-arrow-left" href="?s=pnacht&wahl=1&jahr={$jahr}&monat={$monat}"></a>
|
|
<strong>{$monat}/{$jahr} </strong>
|
|
<a class="fa fa-arrow-right" href="?s=pnacht&wahl=2&jahr={$jahr}&monat={$monat}"></a></td>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="panel panel-tbox">
|
|
<div class="panel-heading" style="background-color:orange;">
|
|
<spawn style="width:5px;height:20px;font-size:16pt;">{$datum_unix|date_format:"%d.%m.%y"}</spawn>
|
|
</div>
|
|
<div class="panel-body">
|
|
|
|
<table class="table-hover" style="font-size:11pt;line-height: 14pt">
|
|
<tbody>
|
|
{foreach from=$tage item=kt}
|
|
<tr>
|
|
{if $kt.tagt==1}
|
|
</tr>
|
|
<td> </td>
|
|
<td nowrap style="width:5px;font-size:4pt;line-height: 5pt" > </td>
|
|
</tr>
|
|
<td style="width:5px"> </td>
|
|
<td nowrap style="width:70px;font-size:8pt">--- {$kt.kw}.KW ---</td>
|
|
<tr>
|
|
{/if}
|
|
<td style="font-size:8pt;color:{$kt.color}" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$kt.tag}&anz={$anz}'">{$kt.wt}
|
|
</td>
|
|
<td style="font-size:13pt;color:{$kt.color}" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$kt.tag}&anz={$anz}'">{$kt.datum}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- mitte seite -->
|
|
|
|
|
|
|
|
<!-- <div id="phelp" style="text-align:center;"></div> -->
|
|
{if $old>0}
|
|
<div class="col-md-10">
|
|
<div class="panel-heading" style="background-color:darkred;">
|
|
<spawn style='font-size:16pt;color:white;'><strong>Achtung!</strong> Diese Planung liegt in der Vergangenheit...</spawn>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{if $fttest!=0}
|
|
<div class="col-md-10">
|
|
<div class="panel-heading" style="background-color:orangered;">
|
|
<spawn style='font-size:16pt;color:white;'>{$ftrow.tag} {$ftrow.bez}</spawn>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<div class="col-md-10" >
|
|
<div class="panel panel-tbox">
|
|
<div class="panel-body">
|
|
<table class="no-style hover">
|
|
<tbody>
|
|
{foreach from=$tag_tour2 item=tour}
|
|
{if $tour.test==99}
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-tbox">
|
|
<div class="panel-body">
|
|
<table class="no-style full">
|
|
<tbody>
|
|
|
|
|
|
{/if}
|
|
<tr>
|
|
<form action="" method="post">
|
|
{if $tour.aktiv==0}
|
|
<td nowrap style="width:110px;color:bisque">{$tour.tour}</td>
|
|
{else}
|
|
<td nowrap style="width:110px;">{$tour.tour}</td>
|
|
{/if}
|
|
<!-- --------------------------- fahrer hinweis -->
|
|
{if $tour.stamm_info==0} <td style="width:20px"> </td> {/if}
|
|
{if $tour.stamm_info==1} <td align="left" data-toggle="tooltip" title={$tour.stamminfo}><i class="fad fa-info" style="color:red;font-size: 14px"</i> </td> {/if}
|
|
{if $tour.stamm_info==2} <td align="left" data-toggle="tooltip" title={$tour.stamminfo}><i class="far fa-info" style="color:orange"></i></td> {/if}
|
|
|
|
<!-- ------------------------------------------
|
|
<td style="width:20px"> {$tour.fahrer_id} </td>
|
|
-->
|
|
{if $tour.fahrer_id==0}
|
|
<td style="width:20px"><i class="fad fa-times-square" style="background-color:red;color:#fff"></i></td>
|
|
|
|
{elseif $tour.fahrer_ok==0}
|
|
<td style="width:20px"><i class="fad fa-info-square" style="background-color:#FF2222;color:#fff"></i></td>
|
|
{elseif $tour.fahrer_ok==2}
|
|
<td style="width:20px"><i class="fad fa-question-square" style="background-color:#FF9900;color:#fff"></i></td>
|
|
{elseif $tour.fahrer_ok==3}
|
|
<td style="width:20px"><i class="fad fa-check" style="background-color:#99FF00;color:#fff"></i></td>
|
|
|
|
{else} <td style="width:20px"> </td>
|
|
{/if}
|
|
|
|
<!-- --------------------------- fahrer mit anwesenheitsprüfung
|
|
|
|
<td nowrap id="ma_wahl{$tour.id},{$tour.typ},{$tour.fahrer_id}" style="width:165px;font-size:10pt;"></td> -->
|
|
|
|
<!-- --------------------------- fahrer mit anwesenheitsprüfung -->
|
|
<td nowrap style="width:195px;">
|
|
<!-- --------------------------- -->
|
|
|
|
<!-- --------------------------- -->
|
|
<select name="Fahrer[{$tour.id}]" id="user_{$tour.id}"
|
|
|
|
onChange="save_user({$tour.id})";>
|
|
|
|
{if $tour.typ== 3}
|
|
{foreach from=$fahrer_array3 item=allfahrer}
|
|
{html_options values=$allfahrer.id selected=$tour.fahrer_id output=$allfahrer.name options2=$allfahrer.name}
|
|
{/foreach}
|
|
{/if}
|
|
{if $tour.typ== 4}
|
|
{foreach from=$fahrer_array4 item=allfahrer}
|
|
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if} style="color: darkgray">{$allfahrer.name}</option>{/foreach}
|
|
{/if}
|
|
{if $tour.typ== 5}
|
|
{foreach from=$fahrer_array5 item=allfahrer}
|
|
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if} style="color: darkgray">{$allfahrer.name}</option>{/foreach}
|
|
{/if}
|
|
{if $tour.typ== 17}
|
|
{foreach from=$fahrer_array17 item=allfahrer}
|
|
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if} style="color: darkgray">{$allfahrer.name}</option>{/foreach}
|
|
{/if}
|
|
<!-- --------------------------- -->
|
|
|
|
</select>
|
|
</td>
|
|
|
|
|
|
|
|
<!-- --------------------------- Fahrzeug -->
|
|
<td nowrap style="width:110px;">
|
|
<select name="Fahrzeug[{$tour.id}]" id="car_{$tour.id}" data-width="100px"
|
|
{if $tour.auto_id!=0} style="width:90px;border:none;border-bottom: 1px solid "
|
|
{else} style="color: red"
|
|
{/if}
|
|
onChange="save_car({$tour.id})" data-hight="10px">
|
|
{foreach from=$auto_array item=allauto}
|
|
{html_options values=$allauto.id selected=$tour.auto_id output=$allauto.kz options2=$allauto.kz }
|
|
{/foreach}
|
|
</select>
|
|
|
|
{literal}
|
|
|
|
</script>
|
|
{/literal}
|
|
|
|
</td>
|
|
|
|
<!-- --------------------------- Zusatzinfo neu -->
|
|
|
|
<td nowrap id="ma_gh{$tour.id}" style="width:160px; font-size:8pt;background-color:#222222;color: #dcdcdc">
|
|
<input type="text" value="{$tour.infotext}" id="info_{$tour.id}"
|
|
style="width:155px;height:22px;background-color:#222222;border:none;border-bottom: 1px solid #444444" name="infotext[{$tour.id}]"
|
|
onChange="save_info({$tour.id})">
|
|
</td>
|
|
<!--
|
|
<td nowrap id="ma_gh{$tour.id}" style="width:117px;font-size:7pt;">
|
|
{if $tour.stamm_info==1}
|
|
<div style="text-align: right; width:115px;font-size:8pt;color:#FF2222">{$tour.stamminfo}</div>
|
|
{/if}
|
|
{if $tour.stamm_info==2}
|
|
<div style="text-align: right; width:115px;font-size:8pt;color:#FF9900">{$tour.stamminfo}</div>
|
|
{/if}
|
|
</td>
|
|
-->
|
|
|
|
<!-- SMS Status !!!!! ------------------------------------- -->
|
|
<td nowrap align="center" style="width:30px" id="smscheck{$tour.tourid}">
|
|
{if $tour.smsstatus==0 } <i class='fal fa-comment-alt fa-1x' style='color:gray' ></i> {/if}
|
|
{if $tour.smsstatus==1 } <i class='fas fa-comment-alt-exclamation fa-1x' style='color:orange' ></i> {/if}
|
|
{if $tour.smsstatus==2 } <i class='fas fa-comment-alt-check fa-1x' style='color:green' ></i> {/if}
|
|
{if $tour.smsstatus==8 } <i class='fas fa-comment-alt-dots fa-1x' style='color:gray' ></i> {/if}
|
|
{if $tour.smsstatus==20} <i class='fas fa-spinner fa-spin fa-1x' style='color:gray' ></i> {/if}
|
|
{if $tour.smsstatus==3 } <i class='fas fa-comment-alt-times fa-1x' style='color:red' ></i> {/if}
|
|
{if $tour.smsstatus==4 } <i class='fas fa-comment-alt-times fa-1x' style='color:red' ></i> {/if}
|
|
{if $tour.smsstatus==5 } <i class='fas fa-comment-alt-times fa-1x' style='color:red' ></i> {/if}
|
|
|
|
|
|
|
|
<!-- <i class="fal fa-comment-alt fa-1x" style="color:#999" ></i> -->
|
|
|
|
</td>
|
|
<!-- Infobereich !!!!! ------------------------------------- -->
|
|
<td nowrap align="center" style="width:20px">
|
|
<i class="fad fa-info fa-1x" style="color:cornflowerblue;font-size: 14px" onclick="tinfo({$tour.tourid})"></i>
|
|
</td>
|
|
<!-- SMS senden Änderung ------------------------------------- -->
|
|
<td nowrap align="center" style="width:20px; font-size:13pt;"
|
|
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tag}&sms={$tour.id}'";>
|
|
<i class="fal fa-sms" style="color:#999" >
|
|
</td>
|
|
{if $tour.zusatz==0}
|
|
<!-- 2. Tour hinzufügen ------------------------------------- -->
|
|
<td nowrap align="center" style="width:30px; font-size:13pt;"
|
|
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tag}&dazu={$tour.tid}&kw={$tour.kw}'";>
|
|
<i class="fal fa-plus" style="color:#999" >
|
|
</td>
|
|
{/if}
|
|
{if $tour.zusatz==1}
|
|
<!-- 2. Tour löschen ------------------------------------- -->
|
|
<td nowrap align="center" style="width:30px; font-size:13pt;"
|
|
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tag}&daweg={$tour.id}&kw={$tour.kw}'";>
|
|
<i class="fas fa-times" style="color:#444" >
|
|
</td>
|
|
{/if}
|
|
{if $tour.zusatz==2}
|
|
<!-- 2. Tour hinzufügen ------------------------------------- -->
|
|
<td nowrap align="center" style="width:30px; font-size:13pt;">
|
|
<i class="fal fa-minus" style="color:#444" >
|
|
</td>
|
|
{/if}
|
|
|
|
|
|
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- -------------------------------------->
|
|
</section>
|
|
|
|
|
|
<!-- rechte seite -->
|
|
<!-- -------------------------------------->
|
|
|
|
<!-- Sidebar -->
|
|
<aside class="col-md-3" style="background-color:#333333">
|
|
<div id="rightmenu" class="panel panel-tbox">
|
|
<div class="panel-body">
|
|
<table class="no-style full" style="margin:-20px">
|
|
<thead>
|
|
<tr>
|
|
<td nowrap align="center" style="width:150px;font-size: 40pt">
|
|
<form action="" method="post">
|
|
<input type="hidden" name="smst" value="{$tag}"/>
|
|
<input type="hidden" name="smsm" value="{$monat}"/>
|
|
<input type="hidden" name="smsj" value="{$jahr}"/>
|
|
<button type="submit" class="btn btn" id="notifyBtn" value="SMS senden" name="smspower" value="kompl. Liste per SMS senden" onclick="return confirm('Möchten sie wirklich alle SMS senden ?')" style="background-color: #222222;color:gray">
|
|
<i style="font-size: 40pt" class="far fa-sms fa-lg"></i>
|
|
</form>
|
|
</td>
|
|
<td></td>
|
|
<td nowrap align="center" style="width:100px;font-size: 40pt">
|
|
<form action="" method="post">
|
|
<button type="submit" class="btn btn" id="notifyBtn" name="vortag" value="vortag übernehmen" value="kompl. Liste per SMS senden" onclick="return confirm('Möchten sie wirklich den Vortag kopieren ??')"style="background-color: #222222;color:gray">
|
|
<i style="font-size: 40pt" class="far fa-copy fa-lg"></i>
|
|
</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</br>
|
|
</div>
|
|
</div>
|
|
|
|
<!--
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<table class="no-style full">
|
|
<tbody>
|
|
<td>
|
|
<form action="" method="post">
|
|
<input type="hidden" name="smst" value="{$tag}"/>
|
|
<input type="hidden" name="smsm" value="{$monat}"/>
|
|
<input type="hidden" name="smsj" value="{$jahr}"/>
|
|
<input type="submit" id="notifyBtn" value="SMS senden" name="smspower" value="kompl. Liste per SMS senden" onclick="return confirm('Möchten sie wirklich alle SMS senden ?')">
|
|
</form>
|
|
</td>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
-->
|
|
<!-- ------------------------------------ -->
|
|
<!-- --------------------------------------------------------------------------------- -->
|
|
<!-- -------------------------------- History -->
|
|
<div id="tinfo"></div>
|
|
<!-- -------------------------------- fehlende Mitarbeiter heute / Calender -->
|
|
<div id="rightmenu" class="panel panel-tbox">
|
|
<header class="panel-heading" style="font-size: 16pt;line-height:80%"><span class="fad fa-calendar-alt pull-left"></span><div class="panel-title"> Kalender - {$tag}.{$monat}.{$jahr}</div></header>
|
|
<div class="panel-body">
|
|
<table class="no-style full" style="margin:-8px">
|
|
<tbody>
|
|
{foreach from=$maf1 item=maf}
|
|
<tr align="left" >
|
|
<td align="center" nowrap style="width:15px;font-size:11pt;">
|
|
{if $maf.na!=0}
|
|
<i class='{$maf.icon}' style="color:#b50000"></i>
|
|
{else}
|
|
<i class='{$maf.icon}' style="color: orange"></i>
|
|
{/if}
|
|
</td>
|
|
<td align="left" nowrap style="width:130px;font-size:10pt"> {$maf.fahrer}</td>
|
|
<td align="right" nowrap style="width:100px;font-size:10pt">{$maf.bez} </td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- --------------------------------------------------------------------------------- -->
|
|
<!-- -------------------------------- verfügbare Mitarbeiter -->
|
|
<div id="freema"></div>
|
|
<!-- -------------------------------- verfügbare Fahrzeuge -->
|
|
<div id="freecar"></div>
|
|
<!-- --------------------------------------------------------------------------------- -->
|
|
|
|
</aside>
|
|
<!-- --------------------------------------------------------------------------------- -->
|
|
<!-- Sidebar End -->
|
|
|
|
</body>
|
|
<!-- <script> var tagheute = '{$datum_unix|date_format:"%Y-%m-%d"}';</script> -->
|
|
<script> var tag = '{$tag}';</script>
|
|
<script> var monat = '{$monat}';</script>
|
|
<script> var monat2 = '7';</script>
|
|
<script> var jahr = '{$jahr}';</script>
|
|
|
|
|
|
{literal}
|
|
<script>
|
|
function tinfo(tid) {
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=tinfo&tpl",
|
|
dataType: 'html',
|
|
data: 'tid=' + tid,
|
|
success: function (data) {
|
|
$("#tinfo").html(data);
|
|
}
|
|
});
|
|
}
|
|
function load_free_cars(tag,monat,jahr) {
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=free_car&tpl",
|
|
dataType: 'html',
|
|
data: 'tag=' + tag + "&monat=" + monat + "&jahr=" + jahr,
|
|
success: function (data) {
|
|
$("#freecar").html(data);
|
|
}
|
|
});
|
|
}
|
|
function load_free_ma(tag,monat,jahr) {
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=free_ma&tpl",
|
|
dataType: 'html',
|
|
data: 'tag=' + tag + "&monat=" + monat + "&jahr=" + jahr,
|
|
success: function (data) {
|
|
$("#freema").html(data);
|
|
}
|
|
});
|
|
}
|
|
function save_car(tourID) {
|
|
//alert($("#car_"+tourID).val());
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=pnacht&a=car_save",
|
|
dataType: 'json',
|
|
data: 'tourID=' + tourID + "&car=" + $("#car_"+tourID).val(),
|
|
success: function (data) {
|
|
if(data.success == true) {
|
|
$.notify({
|
|
icon: 'glyphicon glyphicon-warning-ok',
|
|
message: data.lastnote
|
|
},{
|
|
type: 'success',
|
|
showProgressbar: true,
|
|
delay: 300,
|
|
newest_on_top: false,
|
|
element: 'body',
|
|
placement: {
|
|
from: "bottom",
|
|
align: "right"
|
|
},
|
|
animate: {
|
|
enter: 'animated fadeInDown',
|
|
exit: 'animated fadeOutUp'
|
|
}
|
|
});
|
|
}
|
|
load_free_cars(tag,monat,jahr);
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function save_info(tourID) {
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=pnacht&a=info_save",
|
|
dataType: 'json',
|
|
data: 'tourID=' + tourID + "&info=" + $("#info_"+tourID).val(),
|
|
success: function (data) {
|
|
$.notify({
|
|
icon: 'glyphicon glyphicon-warning-ok',
|
|
message: data.lastnote
|
|
},{
|
|
type: 'info',
|
|
showProgressbar: true,
|
|
delay: 300,
|
|
newest_on_top: false,
|
|
element: 'body',
|
|
placement: {
|
|
from: "bottom",
|
|
align: "right"
|
|
},
|
|
animate: {
|
|
enter: 'animated fadeInDown',
|
|
exit: 'animated fadeOutUp'
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
function save_user(tourID) {
|
|
//alert($("#car_"+tourID).val());
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=pnacht&a=user_save",
|
|
dataType: 'json',
|
|
data: 'tourID=' + tourID + "&user=" + $("#user_"+tourID).val(),
|
|
success: function (data) {
|
|
if(data.success == true) {
|
|
$.notify({
|
|
icon: 'glyphicon glyphicon-warning-ok',
|
|
message: data.lastnote
|
|
},{
|
|
type: 'success',
|
|
showProgressbar: true,
|
|
delay: 300,
|
|
newest_on_top: false,
|
|
element: 'body',
|
|
placement: {
|
|
from: "bottom",
|
|
align: "right"
|
|
},
|
|
animate: {
|
|
enter: 'animated fadeInDown',
|
|
exit: 'animated fadeOutUp'
|
|
}
|
|
});
|
|
}
|
|
load_free_ma(tag,monat,jahr);
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
load_free_ma(tag,monat,jahr);
|
|
load_free_cars(tag,monat,jahr);
|
|
|
|
var refreshId = setInterval(function() {
|
|
$.ajax({
|
|
type : "POST",
|
|
url : 'ajax.php?s=pnacht&a=smscheck&tpl',
|
|
cache : false,
|
|
data: 'tag=' + tag + "&monat=" + monat + "&jahr=" + jahr,
|
|
dataType : "json",
|
|
success : function (back) {
|
|
/*
|
|
$.each(back.s, function(t,s) {
|
|
console.log(back.s)
|
|
$("#smscheck"+back.t).html(back.s);
|
|
})
|
|
*/
|
|
for (var i = 0; i < back.length; i++) {
|
|
console.log (back.t[i]);
|
|
$("#smscheck"+back.t[i]).html(back.s[i]);
|
|
//$("#smscheck"+back.i.tour).html(back.i.status);
|
|
}
|
|
|
|
},
|
|
})
|
|
}, 60000);
|
|
|
|
$(function () {
|
|
$("select").select2();
|
|
});
|
|
</script>
|
|
{/literal}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|