ordersprinter/webapp/waiterdesktop.php

172 lines
59 KiB
PHP
Raw Normal View History

2020-11-19 23:00:09 +01:00
<html>
<head>
<title>Ansicht Kellner</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={VERSION}">
<link rel="stylesheet" href="css/ospage.css" />
<link rel="stylesheet" href="css/tablepanel.css" />
<link rel="stylesheet" href="css/productpanel.css" />
<link rel="stylesheet" href="css/grouppanel.css" />
<link rel="stylesheet" href="css/groupitem.css" />
<link rel="stylesheet" href="css/ordereditem.css" />
<link rel="stylesheet" href="css/roompanel.css" />
<link rel="stylesheet" href="css/extraspanel.css" />
<link rel="stylesheet" href="css/actpanel.css" />
<link rel="stylesheet" href="css/paypanel.css" />
<link rel="stylesheet" href="php/3rdparty/jqueryui1-12-0/jquery-ui.min.css" />
<script src="php/3rdparty/jquery-2.2.4.min.js"></script>
<script src="php/3rdparty/jqueryui1-12-0/jquery-ui.min.js"></script>
<script src="elements/grouping.js"></script>
<script src="utilities.js"></script>
<script src="receiptutils.js"></script>
<script>
2020-11-19 23:00:35 +01:00
function sendNewOrders(b){var a=getTableid();if(neworders.length!=0){var c={tableid:a,prods:neworders,print:(b?1:0),payprinttype:"s"};doAjax("POST","php/contenthandler.php?module=queue&command=addProductListToQueue",c,handleSentNewOrders,"Fehler bei Produktversand",false)}else{alert("Es sind keine Produkte ausgewählt worden.")}}function handleSentNewOrders(a){if(a.status!="OK"){alert("Es ist ein Fehler beim Versenden der Bestellung aufgetreten")}else{neworders=[];$("#search").val("");refreshGui()}}function refreshGui(){requestRoomInformation();clearProductsSelection();requestProdInformation();requestOrderedInformation();displayPanels()}function getTableid(){if(selectedroomindex!==null){if(selectedroomindex<0){return 0}else{if(selectedtableindex!==null){var a=roominfo.roomstables[selectedroomindex].tables[selectedtableindex];return a.id}else{return 0}}}}function enableSendButton(){}function disableSendButton(){}function moveItems(){$("#selectiondialog").dialog({autoOpen:false,modal:true,height:400,buttons:{Abbrechen:function(){$(this).dialog("close")}}});var a=getRoomsForDialog();$("#selectiondialog").html(a);$("#selectiondialog").dialog("open");$(".ui-dialog-buttonset .ui-button").css("background-color","#44ff44");$(".ui-widget-header").css("background-color","#ff4400");bindMoveItemsRoom()}function bindMoveItemsRoom(){$(".roomchangeitem").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();var b=parseInt(this.id.split("_")[1]);var a=getTablesForDialog(b);$("#selectiondialog").dialog("open");$("#selectiondialog").html(a);bindMoveItemsTable(b)})}function bindRightButtons(){$("#sendNewOrders").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();sendNewOrders(false)});$("#paydeskbtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();if(neworders.length>0){if(waitergopayprint==1){sendNewOrders(true)}else{sendNewOrders(false)}}goPayDesk()});$("#workbtn").off("click").on("click",function(a){if(neworders.length>0){sendNewOrders(true)}});$("#goorderbtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();goOrderDesk()});$("#mainmenudlg").dialog({autoOpen:false,modal:true});$("#changetablebtn").off("click").on("click",function(a){a.stopImmediatePropagation();a.preventDefault();moveItems()})}function bindMoveItemsTable(a){$(".tablechangeitem").off("click").on("click",function(c){c.stopImmediatePropagation();c.preventDefault();moveToRoomIndex=a;var b=parseInt(this.id.split("_")[1]);var d=roominfo.roomstables[a].tables[b];moveToTableId=d.id;if(selectedroomindex!="-1"){var d=roominfo.roomstables[selectedroomindex].tables[selectedtableindex];moveFromTableId=d.id;$("#selectiondialog").dialog("close");doAjax("GET","php/contenthandler.php?module=queue&command=getProdsForTableChange",{tableId:moveFromTableId},insertProductsToChangeTableDlg,null,true)}else{$("#selectiondialog").dialog("close")}})}function insertProductsToChangeTableDlg(a){if(a.status!="OK"){alert("Fehler");return}prodsToMove=a.msg;allselected=1;updateProdToMoveList();$("#selectallnothing").off("click").on("click",function(d){d.stopImmediatePropagation();d.preventDefault();allselected=1-allselected;for(var c=0;c<prodsToMove.length;c++){var b=prodsToMove[c];if(allselected===1){b["class"]="selecteditem"}else{b["class"]="unselecteditem"}}updateProdToMoveList()})}function updateProdToMoveList(){if(allselected===1){$("#selectallnothing_txt").val(W_UNSELALL[lang])}else{$("#selectallnothing_txt").val(W_SELALL[lang])}var a="";for(var e=0;e<prodsToMove.length;e++){var c=prodsToMove[e];var h="prodToMove_"+e;var b=" (unbezahlt)";var g="proditemselected";if(c["class"]===undefined){c["class"]="selecteditem"}var d=c["class"];if(d=="unselecteditem"){g="proditemunselected"}if(c.status==="unpaid_undelivered"){b=" (unbezahlt, nicht serviert)"}if((workflowconfig==WORKFLOW_WORK)||(workflowconfig==WORKFLOW_WORK_TRANSFER)){b=""}var f="<span class='"+d+"'>"+c.productname+b+"</span>";a+="<li class='prodToMoveEl "+g+"' id='"+h+"' >"+f+"</li>"}$("#productsToMoveList").
2020-11-19 23:00:09 +01:00
</head>
<style>
</style>
<body>
<div class="ospage">
2020-11-19 23:00:18 +01:00
<header class="header">Kellneransicht (<span id="panelmodetxt">Bestellung</span>) <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></header>
2020-11-19 23:00:09 +01:00
<aside class="aside aside1">
<div class="tablepanel">
<header id="location" class="tablepanelheader">Raum: Raum xyz</header>
<div id="roompanel" class="roompanel"></div>
<div id="tablepanelcontent" class="tablepanelcontent"></div>
<div id="receiptpanel" style="display:none;"></div>
</div>
</aside>
<article class="main">
<div id="groupchain" class="grouppanel"></div>
<div id="groupchoice" class="grouppanel"></div>
<div id="paybuttonpanel" style="display:none;">
<input id="payall" class="input50 inputwhite" type="submit" value="Alles" />
<div class="infoarea"><span id="priceinreceipt"></span></div>
</div>
<div id="oben" class="paypanel" style="display:none;"></div>
<hr>
<div id="unten" class="paypanel" style="display:none;"></div>
<!-- a hack: info-page is for compatibility to mobile view at which data is stored -->
<div id="info-page" style='display:none;'></div>
<div id="searchpanel" style="display:none;"><input id="search" class="input100 inputwhite" type="text" placeholder="Suchen..." /></div>
<div id="productspanel" class="productspanel" style="display:none;"></div>
<div id="remarkpanel" style="display:none;"><input id="remark" class="input100 inputwhite" type="text" placeholder="Produktbemerkung" /></div>
</article>
<aside class="aside aside2">
<div class="buttonarea">
<input id="mainmenubtn" class="input100 inputwhite"type="submit" value="Hautmenü" />
<input id="paydeskbtn" class="input100 inputwhite"type="submit" value="Kasse" style="display:none;"/><br>
2020-11-19 23:00:18 +01:00
<input id="cashbutton" class="input100 inputwhite"type="submit" style="display:none;" value="Ein-/Auslage" />
2020-11-19 23:00:09 +01:00
<input id="hostbutton" class="input100 inputwhite btnswitchoff"type="submit" style="display:none;" value="Bewirtungsbeleg" />
<input id="paydeskcash" class="input100 inputwhite"type="submit" style="display:none;" value="Zahlung" />
<input id="paydeskprint" class="input100 inputwhite"type="submit" style="display:none;" value="Bondruck" />
<input id="goorderbtn" class="input100 inputwhite"type="submit" value="Bestellung" style="display:none;"/>
<input id="workbtn" class="input100 inputwhite" type="submit" value="Arbeitsbon" style="display:none;" />
<input id="sendNewOrders" class="input100 inputwhite" type="submit" value="Bestellung abschließen" style="display:none;" />
2020-11-19 23:00:14 +01:00
<input id="changetablebtn" class="input100 inputwhite" type="submit" value="Tischwechsel" style="display:none;" />
2020-11-19 23:00:09 +01:00
</div>
<div id="neworders" class="ordereditem-container"></div>
</aside>
<div id="ordered" class="ordereditem-sentcontainer"></div>
<footer class="footer">
<div id="loggedinuser" style="color:white;"></div>
<div id="versioninfo"></div>
</footer>
</div>
<div id="selectiondialog" title="Auswahl">Extras to select...</div>
<div id="unsentorderdlg" title="Achtung">
Die Bestellung würde noch nicht abgeschlossen. Wollen Sie die Bestellung verwerfen?
</div>
<div id="mainmenudlg" title="Hauptmenü">Hauptmenü</div>
<div id="actmenudlg" title="Aktion auswählen">
<header id="actprodinfo"><span id=actcountno>3x</span> <span id="actname">Warsteiner</span> (<span id="actpriceinfo">(1,00 Euro)</span>)</header>
<div id="actcounttogo">
<div id="actminusbtn" class="actbtn">-1</div>
<div id="actplusbtn" class="actbtn">+1</div>
<div id="acttogobtn" class="actbtn_notclickable"><input type="checkbox" id="acttogocheckbox" /> To-Go</div>
</div>
<div id="actremark">
<div>Bemerkung:&nbsp;</div>
<div>
<input id="actremarkfield" class="input100 inputwhite" type="text" placeholder="Notiz" />
</div>
</div>
<div id="actdiscount">
<div id="actdiscount1btn" class="actbtn">-1</div>
<div id="actdiscount2btn" class="actbtn">-1</div>
<div id="actdiscount3btn" class="actbtn">-1</div>
</div>
<div id="actprice">
<div>Neuer Preis:&nbsp;</div>
<div>
<input id="actpricefield" class="input100 inputwhite" type="text" placeholder="Neuer Preis" />
</div>
</div>
</div>
<div id="ordereditemdlg" title="Aktion">
<div id="ordereditem-info"></div>
<div id="orderedcancelpanel">
<input id="cancelcode" class="input100 inputwhite" type="text" placeholder="Stornierungscode" />
</div>
<div id="ordereditemremove" class="actbtn">Entfernen</div>
<div id="ordereditemreorder" class="actbtn">Nachbestellen</div>
<div id="ordereditemcancel" class="actbtn">Abbrechen</div>
</div>
2020-11-19 23:00:14 +01:00
<div id="moveItemdslg" title="Auswahl der Orderelemente">
<div>Welche Orderelemente sollen dem neuen Tisch zugewiesen werden?</div>
<div id="selectallnothing">
<input id="selectallnothing_txt" class="input100 inputblue" type="submit" />
</div>
<ul id="productsToMoveList" class="extraschoice"></ul>
</div>
2020-11-19 23:00:18 +01:00
<div id="cashdlg" title="Ein-/Auslage" style="display:none;">
<h3><span id="cashoverviewtxt">Übersicht Kellnerkasse</span></h3>
<p><span id="overviewdetails">Diese Übersicht enthält die Bewirtungseinnahme durch den Kellner seit der letzten Tageslosung sowie
als weiteren Wert den Kassenstand unter Berücksichtigung der eigenen Eingaben und Entnahmen.</span><p>
<p><i><span id="cashsum">Bewirtungseinnahmen:</span></i> <b><span id=cashbyguests></span></b></p>
<p><i><span id="includeowncash">inkl. eigener Kassen-Eingaben/Entnahmen:</span></i> <b><span id=cashtotal></span></b><p>
<div>
<input id="cashmoney" class="input100 inputblue" type="text" placeholder="0,00"/>
</div>
<div>
<input id="cashremark" class="input100 inputblue" type="text" placeholder="Bemerkung"/>
</div>
</div>
2020-11-19 23:00:09 +01:00
</body>
</html>