GQL Modules - GraphQL Modules for Remote Client Browsers

Yes, I edited my last post.

Yep ok I dont know how i didn’t think of that LOL. that did the trick. However I first did try your initial method changing the setting from Application section in chrome and that also worked. They both work! haha.

I had to remove the “Customers” entity because I think the last time I checked you said it checks entity screen name called “Customers” doesn’t it? It was throwing an error that I could not find the entity screen called “Customers”.

You should not need to do that. There is a new var in config_modules.js that is for Entity Screens, in addition to the old Entity Types.

The var is an Array of Objects …

// Entity Screens
var POS_EntityScreens = [];
    POS_EntityScreens.push({name:"All Tables",entityType:"Tables"});
    POS_EntityScreens.push({name:"Customers",entityType:"Customers"});

Using this format:

POS_EntityScreens.push({name:"<entityScreenName",entityType:"<entityTypeName>"});

You should not need to do that. There is a new var in config_modules.js that is for Entity Screens, in addition to the old Entity Types.

The var is an Array of Objects …

// Entity Screens
var POS_EntityScreens = [];
    POS_EntityScreens.push({name:"All Tables",entityType:"Tables"});
    POS_EntityScreens.push({name:"Customers",entityType:"Customers"});

Using this format:

POS_EntityScreens.push({name:"<entityScreenName>",entityType:"<entityTypeName>"});

I know I saw that, but when I have it on it still gives me an error that It cannot find the entity screen name “Customers”
I do have an entity called “Customers” but in the screen I have “Customer Search” and “Customer Tickets”, I don’t have an entity screen called “Customers”
So I had to turn the “POS_EntityScreens.push({name:"Customers",entityType:"Customers"});” into a comment using //

Search-mode Screens do no work. View Modes of Custom, Layout, and Automatic will usually work fine.

This should work for you without error:

// Entity Screens
var POS_EntityScreens = [];
    POS_EntityScreens.push({name:"All Tables",entityType:"Tables"});
    POS_EntityScreens.push({name:"Customer Tickets",entityType:"Customers"});
// Entity Types
var POS_EntityTypes = ['Tables','Customers'];
var POS_EntityTypesAuto = false; // override static Entity Types above with automatic Ticket Type Entity Types

I just tried that ^ myself. That particular Screen “Customer Tickets”, while it works, does not work very well, LOL … at least, it does not work as configured in SambaPOS to filter “New Orders” Status.

This is because getEntityScreenItems has the Status filter set to *… that is done because we don’t have any information on how Entity Screens are configured as far as States or Display, etc. We could probably do that with yet again, another Special Report.

So then it would be best to create a “Custom” entity screen that has like a customer search and create function there. I wonder if that will work :stuck_out_tongue:

EDIT Also I just realized that now, when you go to Print Bill, it locks the ticket and everything, but it stays on that screen and doesn’t update the status until you exit that screen and press “Close” at top right. ONLY then it actually updates the screen on SambaPOS and GQL POS. I’m guessing you designed it this way, which is fine, but usually in a restaurant table service case by default when you “Print Bill” it locks the ticket, changes states and closes the ticket and returns to “Tables” entity.

LOL, in my system, it does not do that because I didn’t like it, so I took out the Lock and Close.

That said, there is probably a message being broadcast to indicate that “default” behavior. I will see if I can locate it in the HUB code in core.js

EDIT: let me know if you are using a specific Print Job or if you are using an Automation Command instead. I have not really tried the Print Job vars much (the list is blank in my config). …

// Automation Commands that appear at the Ticket-level
var POS_TicketCommands = ['Print Bill','Print Order','WIFI Show Password'];
// Automation Commands that appear at the Order-level
var POS_OrderCommands  = ['Gift','Cancel Gift','Void','Cancel Void','DITA Dine In','DITA Take Away','MO Unlock Order','KD Reprint Tasks','Print Order Lines'];
// you can specify Print Jobs here, but in general, Automation Commands will handle firing Print Jobs
var POS_PrintJobs   = []; // ['Print Bill','Print Orders to Kitchen Printer'];

EDIT2: no message is being broadcast for “Print Bill” Automation Command, not even “TICKET_CLOSED”. So I can’t trap it. The code on the Ticket Info Detail is made to reload the Ticket Information and re-display it. It does not Close…

I personally don’t like it too much either but many clients love using the default rules.

I will try this when I attach a printer to my laptop to see if for one, printing actually works because as of now I do not get any indication from SambaPOS that a print has been sent through. I’ve set up sambapos so that if a print occurs, it will throw an error saying printer is incorrect, and this will indicate to me that printing is working.

Also as of now this does almost everything a person would do using sambapos application. However only thing I can think of that is missing is the settling of the ticket. Been able to settle the ticket using the PMPOS would allow fast food owners and some restaurant owners to be able to take payments straight from the table using a tablet or in a fast food environment when it gets very busy and 1 till could not catch up, an employee could take orders and money if they are using “card” services right from the tablet.
What do you think of adding a way of processing payments like a settle screen? Doesn’t have to be as full on as SambaPOS settle screen but something similar would be good. Of course only if you are up for it… As of now I’m still testing all the features out to see if there are any more minor things we could change to make it better.

I think there is WAY too much going on in the Payment Screen in SambaPOS behind the scenes, like Calculations, etc.

TBH, I am not interested in taking payment from the Tablet. But I can look into it. I think there are some mutations in GraqphQL for that… I need to look at them to see what we have there.

You can see @Luis_Varsan has apparently integrated it in some way.

Yeah I agree, that Is why I don’t expect it to happen anytime too, I was thinking, what about the fast cash buttons? Could we some how add them on the POS screen instead?

They are Automation Commands, like anything else, they can be defined to appear in the Ticket Detail Screen. But I don’t know what the normal “flow” is for them, because I don’t have them.

Show me a video of using Fast Cash in SambaPOS so I can see how it operates from beginning to end.

Ok I’ll have to show you that possibly tomorrow as right now I don’t have access to that particular test database for that purpose.

I created a Website with some information on Setup / Config / etc.

Let me know what you think…

http://gqlmodules.pastmidnight.com/

3 Likes

Even better you can listen to Q sing for you too.

2 Likes

I am always glad to share how this is being handled. Essentially my payment flow for cash already works with a few custom automated commands I made for fast cash buttons. What I have done is used the Automation Command Execution function to fire the existing rule and then inside GraphQL also fire the close ticket rule.

This correct handles all of the “backend” stuff and closes the ticket.

The CC setup I am using is far more complicated and involves more custom code, middleware, etc.

1 Like

All we have is payTerminalTicket(). We can’t get Payment Types, Calculation Types, Calculation Selectors, etc. We can’t get information about Calculation(s) that have been applied (ie. Tip, Rounding, Ticket-level Discount, etc).

mutation m {
payTerminalTicket
(
   terminalId:""
  ,paymentTypeName:""
  ,amount:0
  ,executePaymentProcessors:true
  ,description:""
)
{
  ticketId,amount,remainingAmount,errorMessage
}
}

Using Special Reports, we could get things like:

  • Payment Types
  • Automation Commands linked to Update Ticket Calculation action
  • Calculation Types and Selectors
  • other stuff, etc

However, I don’t know how we would determine what to display on a Payment Screen, especially when the Ticket Total becomes different than the total of the Orders for some “unknown” reason (ie. calculation(s) and/or payment processors(s), etc)…

TerminalTicket does not carry this information. In fact, the only mutation I found was addTicket mutation which has a calculations parameter, but we don’t (can’t) use that mutation in this scenario.

Maybe we don’t care about all that info being displayed… but we would still want to use Calc Selectors, but there is NO WAY to invoke them. Only way to invoke Calcs would be by going the route of Automation Commands.

@QMcKay - I downloaded the latest source code from git, put it in my directory… updated the main hub script + reports ones with the ones you posted.

Reloaded everything including messaging server-- now I get a blank menu – same if I try to load any module?!

No errors. Any ideas?

You need the GQLM User Module Permissions report. You need to create it yourself; it defines the permissions that each individual User has to each Module.

You will have a comma-separated list of modules for each User. If you want to give permissions to All Modules for a User, you can use key word ALL … it looks like this:

##GQLM User Module Permissions##

[User Module Permissions:0.6,2]
>>userName|allowedModules

Administrator|ALL
Admin|customer display,kitchen display,ticket explorer,pos,chat,timeclock,timeclock policies,task editor,reports

Q|customer display,kitchen display,ticket explorer,pos,chat,timeclock,timeclock policies,task editor,reports
Wy|customer display,kitchen display,ticket explorer,pos,chat,timeclock,reports

Jordani|customer display,kitchen display,ticket explorer,pos,chat,timeclock
Merlin|customer display,kitchen display,ticket explorer,pos,chat,timeclock
Myrna|customer display,kitchen display,ticket explorer,pos,chat,timeclock
Ovania|customer display,kitchen display,ticket explorer,pos,chat,timeclock


P.S. that Report is part of the DB Tools import file:

!GQLM_SpecialReports.zip (2.8 KB)

:warning: IMPORTANT: Even though the Report is included in the DB Tools ZIP, you will need to edit it to include your Users. Those are your Users that Login via their PIN, not via a Password.

:bulb: TIP: You can LOGOUT a Regular User by clicking on the header bar where it indicates Terminal/Department/User. That will show a Screen where you can Logout, switch Terminals, and Switch Departments.


P.P.S I notice you are logged in via PIN with the GQLModulesAppUser. That is not what that user is for. That User is for Authenticating the APP in SambaPOS to enable use of GraphQL, via it’s PASSWORD.

Your REGULAR Users do not need Passwords, because they only Login with their PIN, after the APP is Authenticated with GQLModulesAppUser (which again, uses a PASSWORD, not a PIN).


Meh, I just found a bug with the Department Menu I need to fix. Grrr…

EDIT: and with the Module Menu (top-left) that has to do with User Permissions.

BAHH!