272 lines
11 KiB
HTML
272 lines
11 KiB
HTML
<html>
|
|
<head>
|
|
<title>Ansicht Abholung</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
<meta name="author" content="Stefan Pichel">
|
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.20">
|
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
|
|
|
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
|
|
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
|
|
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
|
|
|
|
<script src="utilities.js?v=1.5.20"></script>
|
|
|
|
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
|
|
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>
|
|
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui-i18n.min.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
<script>
|
|
|
|
var PICK_PICKUP_TITLE = ["Abholung","Pickup","Recogido"];
|
|
var PICK_INCOMPLETE_TITLE = ["In Arbeit","In progress","Procesando"];
|
|
var PICK_COMPLETE_TITLE = ["Abholbereit","Finished","Completado"];
|
|
var PICK_HELP_TITLE = ["Hilfe","Help","Informatión"];
|
|
var PICK_DEL_BTN = ["Alle abholbereiten Jobs löschen","Remove all completed jobs","Eliminar todos los trabajos completados"];
|
|
|
|
var lang = 0;
|
|
var modus = 0;
|
|
var showpickupdelbtn = 1;
|
|
var showpickhelp = 1;
|
|
|
|
function setLanguage(language) {
|
|
lang = language;
|
|
|
|
$("#timetitletxt").html(PICK_PICKUP_TITLE[lang]);
|
|
$("#incompletetitle").html(PICK_INCOMPLETE_TITLE[lang]);
|
|
$("#completetitle").html(PICK_COMPLETE_TITLE[lang]);
|
|
|
|
if (lang == 0) {
|
|
$("#help_en").html("");
|
|
$("#help_esp").html("");
|
|
} else if (lang == 1) {
|
|
$("#help_de").html("");
|
|
$("#help_esp").html("");
|
|
} else {
|
|
$("#help_de").html("");
|
|
$("#help_en").html("");
|
|
}
|
|
$("#helptitle").html(PICK_HELP_TITLE[lang]);
|
|
$("#delalljobsbtntxt").html(PICK_DEL_BTN[lang]);
|
|
}
|
|
|
|
function getGeneralConfigItems() {
|
|
doAjax("GET", "php/contenthandler.php?module=admin&command=getGeneralConfigItemsAndUsers", null, insertGenConfigStartRest, "Fehler Konfigurationsdaten");
|
|
}
|
|
|
|
function insertGenConfigStartRest(configResult) {
|
|
if (configResult.status == "OK") {
|
|
var values = configResult.msg;
|
|
showpickupdelbtn = values.showpickupdelbtn;
|
|
showpickhelp = values.showpickhelp;
|
|
setLanguage(values.userlanguage);
|
|
requestModus();
|
|
} else {
|
|
setTimeout(function(){document.location.href = "index.html";},250); // not logged in
|
|
}
|
|
}
|
|
|
|
function requestModus() {
|
|
doAjax("GET", "php/contenthandler.php?module=pickup&command=getmodus", null, insertModus, "Fehler Modus");
|
|
}
|
|
function insertModus(answer) {
|
|
if (answer.status == "OK") {
|
|
modus = answer.msg;
|
|
if (modus == 2) {
|
|
$("#incompleteregion").show();
|
|
if (showpickhelp == 1) {
|
|
$("#helparea").show();
|
|
}
|
|
if (showpickupdelbtn == 1) {
|
|
$("#deletearea").show();
|
|
}
|
|
bindDelJobsBtn();
|
|
}
|
|
}
|
|
startUpdates();
|
|
}
|
|
|
|
function bindDelJobsBtn() {
|
|
$("#deletecompletejobs").off("click").on("click", function (e) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
doAjax("POST", "php/contenthandler.php?module=pickup&command=deleteallcompletedjobs", null, insertJobs, null);
|
|
});
|
|
}
|
|
|
|
function requestUpdateFromServer() {
|
|
doAjax("GET", "php/contenthandler.php?module=pickup&command=getjobs", null, insertJobs, null);
|
|
}
|
|
|
|
function insertJobs(answer) {
|
|
if (answer.status != "OK") {
|
|
return;
|
|
}
|
|
|
|
var completes = createItems(answer.msg.completes,"pickupitemcomplete");
|
|
$("#completeitemarea").html(completes);
|
|
|
|
if (modus == 2) {
|
|
var txt = createItems(answer.msg.incompletes,"pickupitemincomplete");
|
|
$("#incompleteitemarea").html(txt);
|
|
binding();
|
|
}
|
|
}
|
|
|
|
function createItems(numbers,theclass) {
|
|
var txt = "";
|
|
for (var i=0;i<numbers.length;i++) {
|
|
var item = numbers[i];
|
|
var id = item.id;
|
|
var workid = item.workid;
|
|
txt += createItem("item_" + id,workid,100,70,theclass);
|
|
}
|
|
return txt;
|
|
}
|
|
|
|
function startUpdates() {
|
|
requestUpdateFromServer();
|
|
var refreshId = setInterval(function() {
|
|
requestUpdateFromServer();
|
|
}, 5000);
|
|
$.ajaxSetup({ cache: false });
|
|
}
|
|
|
|
|
|
function createItem(id,title,sizew, sizeh, itemclass) {
|
|
var txt = "";
|
|
|
|
txt += "<div id='" + id + "' class='" + itemclass + " pickitemfont' style='width:" + sizew + "px;height:" + sizeh + "px;'>" + title + "</div>";
|
|
return txt;
|
|
}
|
|
|
|
function binding() {
|
|
$(".pickupitemincomplete").off("click").on("click", function (e) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
var id = this.id.split("_")[1];
|
|
doAjax("POST", "php/contenthandler.php?module=pickup&command=declarepickready", {id:id}, insertJobs, null);
|
|
});
|
|
|
|
$(".pickupitemcomplete").off("click").on("click", function (e) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
var id = this.id.split("_")[1];
|
|
doAjax("POST", "php/contenthandler.php?module=pickup&command=declarepicknotready", {id:id}, insertJobs, null);
|
|
});
|
|
}
|
|
$(document).on("pageinit", "#time-page", function () {
|
|
initializeMainMenu("#modulemenu");
|
|
hideMenu();
|
|
$.ajaxSetup({ cache: false });
|
|
getGeneralConfigItems();
|
|
});
|
|
|
|
|
|
</script>
|
|
<div data-role="page" id="time-page" data-theme="c">
|
|
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
|
|
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
|
|
<li data-theme="b" data-role="heading">Hauptmenü</li>
|
|
</ul>
|
|
</div><!-- /panel -->
|
|
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" style="background-color:black;">
|
|
<h1><span id="timetitletxt">Abholung</span> <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /> <img src="img/tasksstatus.png" class="tasksstatus" style="display:none;" /></h1>
|
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Hauptmenü</span></a>
|
|
</div>
|
|
</div>
|
|
<div data-role="content" id="fullcontent">
|
|
|
|
<div id="incompleteregion" class="pickuparea pickuparea_incomplete" style="display:none;">
|
|
<div><span id="incompletetitle" class="picksections">Unfertig</span></div>
|
|
<div id="incompleteitemarea" class="incompleteitemarea"></div>
|
|
</div>
|
|
|
|
<div class="pickuparea pickuparea_complete">
|
|
<div><span id="completetitle" class="picksections">Abholbereit</span></div>
|
|
<div id="completeitemarea" class="completeitemarea"></div>
|
|
</div>
|
|
|
|
<div id="deletearea" style="display:none;">
|
|
<button type="submit" data-theme="d" data-icon="delete" id="deletecompletejobs"><span id="delalljobsbtntxt">Alle fertigen Abholjobs entfernen</span></button>
|
|
</div>
|
|
|
|
<div id="helparea" data-role="collapsible" data-content-theme="c" data-collapsed="true" data-theme="e" style="display:none;">
|
|
<h2><span id="helptitle">Hilfe</span></h2>
|
|
<div id="help_de">
|
|
|
|
<p>Abholjobs können nur im Arbeitsablauf mit Arbeitsbons erzeugt werden. In der Konfiguration innerhalb der Verwaltungsansicht muss die
|
|
Erstellung von Abholjobs eingeschaltet werden.
|
|
<p>Für die Anzeige der Abholansicht muss der Benutzer grundsätzlich das Recht für die Abholansicht besitzen.
|
|
Die Abholansicht präsentiert sich jedoch unterschiedlich in Abhängigkeit von weiteren Rechten, die der angemeldete Benutzer besitzt:
|
|
Hat er auch das Recht für die Küche und/oder Bar, so sieht er zusätzlich zu den abholbereiten Jobs auch den Bereich mit den Jobs,
|
|
die noch zubereitet werden müssen und
|
|
kann Jobs sowohl als abholbereit kennzeichnen als auch versehentlich als solche gekennzeichnete Jobs wieder in der Bereich der
|
|
zuzubereitenden Jobs zurückschieben.
|
|
<p>Daraus ergibt sich, dass man für die Anzeige der Abholansicht im Gastraum einen Benutzer einrichten sollte,
|
|
der ausschließloch das Recht für Anzeige der Abholansicht besitzt.
|
|
|
|
<p>In der Konfiguration kann festgelegt werden, wie viele der zuletzt georderten Jobs maximal im Bereich der abholbereiten Jobs angezeigt werden sollen.
|
|
Durch die Erstellung einer Tageserfassung wird die Abholansicht wieder geleert.
|
|
Es ist aber auch möglich, mit einem Klick auf den entsprechenden Button alle abholbereiten Jobs aus der Anzeige zu entfernen.
|
|
|
|
</div>
|
|
<div id="help_en">
|
|
|
|
<p>Pickup jobs can only be created in the workflow with work receipts. In the configuration within the administration view, the
|
|
creation of pickup jobs can be activated.
|
|
|
|
<p>To display the pickup view, the user must have the right to display the pickup view.
|
|
However, the collection view presents itself differently depending on other rights that the logged on user has:
|
|
If he also has the right for the kitchen and/or bar, he sees the area with the completed jobs in addition to the jobs,
|
|
which still have to be prepared and can flag jobs as ready for pickup as well as moving jobs back to the incomplete jobs area.
|
|
|
|
<p>This means that a certain user should be set up to display the pickup view in the guest room, with the exclusive right to display the pickup view.
|
|
|
|
<p>In the configuration, you can define the maximum number of recently ordered jobs to be displayed in the area of the jobs ready for pickup.
|
|
By creating a closing, the pickup view is emptied again.
|
|
However, it is also possible to remove all jobs that are ready for pickup from the display by clicking on the corresponding button.
|
|
</div>
|
|
<div id="help_esp">
|
|
|
|
<p>Los tickets de pickup sólo se pueden crear en el workflow con recibos de trabajo. En la configuración dentro de la vista de
|
|
administración, se puede activar la creación de trabajos de cobranza.
|
|
|
|
<p>Para mostrar la vista <i>Recogido</i>, el usuario debe tener derecho a mostrar la vista de recogidos.
|
|
Sin embargo, la vista se presenta de forma diferente en función de otros derechos que tenga el usuario conectado:
|
|
Si también tiene derecho a la cocina y/o bar, ve el área con los trabajos completos además de los trabajos,
|
|
que todavía tienen que ser preparados y puede marcar jobs como listos para la recogida, así como jobs marcados accidentalmente
|
|
como tales en el área de la trabajos por preparar.
|
|
|
|
<p>Esto significa que se debe configurar un usuario para que muestre la vista de la colección en la habitación de invitados,
|
|
el agujero exclusivo tiene derecho a mostrar la vista de la colección.
|
|
|
|
<p>En la configuración, puede definir el número máximo de trabajos pedidos recientemente que se mostrarán en el área de trabajos listos
|
|
para su recogida. Al crear un cerramiento del dia, se vuelve a vaciar la vista de agrupación.
|
|
Sin embargo, también es posible eliminar de la pantalla todos los trabajos que están listos para su recogida haciendo clic en el
|
|
botón correspondiente.
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div data-role="footer" data-theme="b" id="thefooterr" style="background-color:black;">
|
|
<div class="ui-grid-a">
|
|
<div class="ui-block-a userinfo" id="loggedinuser"></div>
|
|
<div class="ui-block-b grid_right" id="versioninfo"></div>
|
|
</div><!-- /grid-a -->
|
|
</div> <!-- footer -->
|
|
|
|
</div> <!-- first page -->
|
|
|
|
</body>
|
|
</html> |