Release: a table can call somebody over - #798
Merged
Merged
Conversation
Owner: "he is in table 7 and wants to call waiter or captain. he should simple button to make it... this biggest option i love. coz everytime its annoying people see waiters to turn back." He is describing the most common failure of table service, and it is not a staffing problem. A table needs something, nobody is looking, and the customer spends two minutes waving and half-standing before giving up. The restaurant never learns it happened, because the only evidence is a person feeling ignored and saying nothing about it. One tap on the first page, and it carries the table. A call that cannot say WHERE is worse than no call, so the button is drawn only where the shop runs table service and the printed code named a table. No reasons to choose from. The obvious next feature is a menu - water, the bill, a spoon - and it is the wrong one: it turns one tap into a form, and the waiter is walking over anyway and will find out faster than anybody can pick from a list. Three taps are one call. Somebody who taps again has not asked twice, they have doubted the button, so the second tap is answered with the call already standing and the page says a person is coming rather than pretending to have sent another. The button stays said for a minute for the same reason: one that springs back reads as nothing having happened, which is exactly what makes somebody stand up and go looking anyway. The calls ride to the staff queue in their own key rather than mixed into the orders. A screen that has not been taught the word reads `data` and is unaffected; merging them would have an older handset draw a table's call as a NEW ORDER with an accept button that means nothing - a regression shipped to a client by a change on the server. There is nothing to refuse, so the card has one button. The table wants a person; the only answer is that one is coming.
One conflict, one hunk, and both sides were right about different things. The branch adds a new kind of request - a table calling somebody over - with its translation key written out in full, because the coverage scanner only sees keys in the two-argument form and a key reached through a variable is never gathered or translated. develop changed the same line so a change or cancel card says WHAT was asked for - "Remove an item" rather than a generic word - and wrapped the result in safe() so it is escaped. Both are kept: waiter gets its spelled-out key, change and cancel get what was asked, everything else reads the table as before, and the whole expression is escaped. Proved by running both sides' own tests against the result: tests/request-dock and tests/the-request-card-says-what-changed, 35 between them, and the translation coverage ratchet.
A table can call somebody over
| ? { $or: [{ _id: new ObjectId(String(branch)) }, { 'online_ordering.store_id': branch }] } | ||
| : { 'online_ordering.store_id': branch }; | ||
| if (BaseModel.license) selector.license = BaseModel.license; | ||
| const branchDoc = await db.collection('branches').findOne(selector); |
|
|
||
| const rows = await db | ||
| .collection('waitercalls') | ||
| .find(filter) |
| if (ObjectId.isValid(String(branchId))) filter.branch_id = new ObjectId(String(branchId)); | ||
| if (BaseModel.license) filter.license = BaseModel.license; | ||
|
|
||
| const done = await db.collection('waitercalls').updateOne(filter, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes develop to main. One merged pull request.
Merge with a merge commit, never a squash. The repository ruleset enforces that, so the button should only offer it.
#797 - a table can call somebody over
The most common failure of table service, and not a staffing problem: a table needs something, nobody is looking, and the customer spends two minutes waving before giving up. The restaurant never learns it happened.
One tap on the first page of
/order, carrying the table the printed code named. The button is drawn only where the shop runs table service and a table is known - a call that cannot say where is worse than no call.Three taps are one call: a second tap is answered with the call already standing, and the button stays said for a minute, because one that springs back reads as nothing having happened.
The call reaches the till's requests dock with one button, because there is nothing to refuse - the table wants a person, and the only answer is that one is coming.
What it does to an existing shop
Nothing, until a customer taps it. The button appears on the ordering page of restaurants that run tables; no existing screen changes, and a shop with no table service sees no difference at all.
New collection
waitercalls, classified as branch-scoped and synced inapi/src/sync/collections.json- a call made against the cloud has to reach the till where the dock is.Not in this release
Captain does not show calls yet. The handset got its requests panel today (captain#97, merged) but has not been taught this new kind, and the mute switch you asked for lives with it. Both are the next piece of work.
Verified before opening
Root suite 2,661 of 2,664 on the develop tip; the three remaining are the release-artifact tests that need
frontend/publicbuilt, which CI does. API suite 10,787 of 10,787. Develop's own CI is green again after the channels fix landed.