Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/wataxi.picotech.app/public_html/public/custom/js/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
var orderContent=null;
var showFinishedOrders="false";
function getAllOrders(){
axios.get('/api/v2/kds/orders/'+showFinishedOrders+'?api_token='+TOKEN).then(function (response) {
console.log("Data received");
orderContent.items=response.data.data;
})
.catch(function (error) {
console.log(error);
});
}
function doFinishItem(orderID,itemID,isFromDbOrder,call="finishItem"){
console.log(call+itemID);
axios.get('/api/v2/kds/orders/'+call+'/'+orderID+'/'+itemID+'/'+(isFromDbOrder?"true":"false")+'?api_token='+TOKEN).then(function (response) {
console.log("Item finished");
getAllOrders();
})
.catch(function (error) {
console.log(error);
});
}
function doFinishUnfinishOrder(orderID,isFromDbOrder,call="finishOrder"){
console.log(call+orderID);
axios.get('/api/v2/kds/orders/'+call+'/'+orderID+'/'+(isFromDbOrder?"true":"false")+'?api_token='+TOKEN).then(function (response) {
console.log("Order finished");
getAllOrders();
})
.catch(function (error) {
console.log(error);
});
}
function showActive(){
showFinishedOrders="false";
$('#activeOrders').hide();
$('#finishedOrders').show();
getAllOrders();
}
function showFinished(){
showFinishedOrders="true";
$('#activeOrders').show();
$('#finishedOrders').hide();
getAllOrders();
}
window.onload = function () {
orderContent = new Vue({
el: '#orderList',
data: {
items: [],
},
methods:
{
finishItem: function (orderID,itemID,isFromDbOrder) {
doFinishItem(orderID,itemID,isFromDbOrder);
},
unfinishItem: function (orderID,itemID,isFromDbOrder) {
doFinishItem(orderID,itemID,isFromDbOrder,"unfinishItem");
},
finishOrUnfinishOrder: function (orderID,isFromDbOrder,isFinished) {
doFinishUnfinishOrder(orderID,isFromDbOrder,isFinished=="1"?"unfinishOrder":"finishOrder");
},
}
})
setTimeout(() => {
getAllOrders();
}, 1000);
}; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0053 ]-- |