Waiter Screen / Ready Orders


#21

Do you know what part is giving you trouble? You can show all of them if you like yes.


#22

sure sir i will give


#23

Start by showing the waiters entity screen and the widget settings.


#24

here is the widget sir



#25

Hi sir here is action and rules and the script also

function getTaskbyIdentifier(taskType,ident,field) {
// getTaskbyIdentifier(‘KD Task GUI - Food’,‘27751-Qure Burger.Burger-12837-j9tXI2XMRkq7Q446SFfroQ’)
taskType = typeof taskType===‘undefined’ ? ‘’ : taskType;
ident = typeof ident===‘undefined’ ? ‘’ : ident;
field = typeof field===‘undefined’ ? ‘name’ : field;

if (taskType==’’ || ident==’’) {
return false;
}

var qry = ‘{task:getTask(taskType:"’+taskType+’",identifier:"’+ident+’"){id,name,identifier,content}}’;
var r = gql.Exec(qry);
r = JSON.parse®;
var task = r.data.task;

//dlg.ShowMessage("tt:"+taskType+"\rid:"+ident+"\rname:"+task.name);

return task[field];
}

function addTask(taskType,name,content,ident,color,taskTypeOld) {
// addTask(‘KD Waiter - Food’,’’,‘blah’,‘27751-Qure Burger.Burger-12837-j9tXI2XMRkq7Q446SFfroQ’,’#FFFFFF00’)
taskType = typeof taskType===‘undefined’ ? ‘’ : taskType;
taskTypeOld = typeof taskTypeOld===‘undefined’ ? ‘’ : taskTypeOld;
taskTypeOld = taskTypeOld==’’ ? ‘KD Task GUI - Food’ : taskTypeOld;
ident = typeof ident===‘undefined’ ? ‘’ : ident;
name = typeof name===‘undefined’ || name==’’ ? getTaskbyIdentifier(taskTypeOld,ident,‘name’) : name;
color = typeof color===‘undefined’ ? ‘’ : color;

var oldContent = getTaskbyIdentifier(taskTypeOld,ident,‘content’);
oldContent = oldContent.replace(/"/g,"’");
oldContent = oldContent.replace(/\r\n/g,’<!rn>’);
content = oldContent + ‘<!rn>’ + content;

//dlg.ShowMessage("tt:"+taskType+"\rid:"+ident+"\rname:"+name+"\rcontent:"+content);

if (taskType==’’ || name==’’) {
return false;
}

var qry=‘mutation m {addTask (task:{taskType:"’+taskType+’",name:"’+name+’",content:"’+content+’",isCompleted:false,identifier:"’+ident+’",customData:[{name:“Color”,value:"’+color+’"}]}){id,name,isCompleted,content,identifier,customData{name,value}}}’;
var r = gql.Exec(qry);
r = JSON.parse®;
var task = r.data.addTask;

return task.name;
}

function updateTask(taskType,name,ident,color,content) {
// updateTask(‘KD Waiter - Food’,’’,‘27755-Poutine-12841-swifCxkYVk6UDrmcd0JUmg’,’#FFFFFF00’)
taskType = typeof taskType===‘undefined’ ? ‘’ : taskType;
ident = typeof ident===‘undefined’ ? ‘’ : ident;
name = typeof name===‘undefined’ || name==’’ ? getTaskbyIdentifier(taskType,ident,‘name’) : name;
color = typeof color===‘undefined’ ? ‘’ : color;
content = typeof content===‘undefined’ ? ‘’ : content;

//dlg.ShowMessage("tt:"+taskType+"\rid:"+ident+"\rname:"+name+"\rcontent:"+content);

if (taskType==’’ || name==’’) {
return false;
}

var qry=‘mutation m {updateTask (taskType:"’+taskType+’",identifier:"’+ident+’",task:{taskType:"’+taskType+’",isCompleted:false,identifier:"’+ident+’",customData:[{name:“Color”,value:"’+color+’"}]}){id,name,isCompleted,content,identifier,customData{name,value}}}’;
var r = gql.Exec(qry);
r = JSON.parse®;
var task = r.data.updateTask;

return task.name;
}







#26

You have several mistakes that I can seee right off the bat for example Task complete commands you have a less than sign? What did you expect that to do? Also in your template you have [Content] I am fairly sure that is not accurate as well.


#27

ok sir can u help me how to do this please


#28

No I wont do it for you but didnt you follow a guide?


#29

i mean help me sir please


#30

What exactly are you wanting me to do?


#31

sir i want ur help sir when we complete the order from kitchen screen then next it shuld appear on waiter screen same then waiter will check and mark complete this this i want sir


#32

Ok so first go back to the tutoriaal you used and fix all your typos and mistakes. I wont build this just to help you I dont have the time or desire for this. You need to do the work. I am not trying to be mean but it sounds like you may need to hire some paid help.


#33

ok sir i will check again tutorial


#34

Hi sir i check everything of tutorial it is same


#35

Kendash suggested at least one mistake in your command on entity screen widget…


#36

i removed the content from widget and check sir but that did not work


#37

Hi sir i have follow the setup again for this tutorial and it is working for food screen i mean food display products fire to waiter display when i mark complete but drink display product dont fire to waiter display please help sir and i have attach gif file of this sir


#38

Hi sir i did the screen and i have uploaded gif file u can see that but there is one more thing has to be done sir waiter display is not same as kitchen display product is single single in waiter display not in one table like kitchen display