A shop says how its food travels - #891
Merged
Merged
Conversation
Owner: "so table order, take away (people who visited, pick up, delivery these kind of methods are there. so order should have these for restaurant. for retails shops may have pickup, delivery options." The model was already right and there was no way to use it. Every shop ran on one hard-coded default - dine in and takeaway - because nothing in the settings page ever wrote `fulfilment`. A shop that delivered could not say so, and a counter that did not was being described as having tables. Three boxes on the Online Ordering form: eat here, collected at the counter, delivered to an address. Saved through the same endpoint the rest of that form uses, into the same field the customer's page already reads. NOTHING TICKED MEANS THE DEFAULT, not "offers nothing". A shop that has never been asked is drawn unticked rather than pre-filled: a default shown as a tick reads as a decision somebody made, and the next person to look would have no way to tell the two apart. The help text under the boxes says what nothing ticked means. The table box is hidden for a shop with the Restaurant module off. Ticking it there would do nothing - the server strips dine_in from a retail shop's list whatever the document says - and a control that cannot take effect is worse than no control. Read tolerantly, because the console caches that switch as the string 'enable'. The form only posts the list when the boxes are on screen, so a screen that never drew them cannot wipe what a shop chose. Five lang_ keys, translated into all seventeen packs.
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
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.
The model was already right and there was no way to use it. Every shop ran on one hard-coded default - dine in and takeaway - because nothing in the settings page has ever written
fulfilment. A shop that delivered could not say so, and a counter that did not was being described as having tables.This is the screen I said was missing when I answered your question in #888.
Three boxes
Eat here, collected at the counter, delivered to an address. On the Online Ordering form, saved through the same endpoint the rest of it uses, into the same field the customer's page already reads. The plumbing was all there; only the control was absent.
Nothing ticked means the default, not "offers nothing"
A shop that has never been asked is drawn unticked rather than pre-filled with its default. A default shown as a tick reads as a decision somebody made, and the next person to look would have no way to tell the two apart. The help text under the boxes says what nothing ticked means.
The table box hides itself for a retail shop
Ticking it there would do nothing - the server strips
dine_infrom a retail shop's list whatever the document says - and a control that cannot take effect is worse than no control. Read tolerantly, because the console caches that switch as the string'enable'rather than a boolean.The form also only posts the list when the boxes are on screen, so a screen that never drew them cannot wipe what a shop chose.
One thing worth telling you about how this was built
I branched this off the voice branch by mistake instead of
develop, so #888's test file was not there and my>>append silently created a new file with only the new tests - the eleven from #888 would have been deleted by the merge.I caught it because the run reported 5 tests where it should have reported 16. Saved the work aside, re-cut the branch from
develop, reapplied, and the file now has all 16. Worth saying out loud because a silent test deletion is exactly the kind of thing that passes CI.Checks
idandname, the screen saves them and only when they are drawn, it reads them back unticked for a shop never asked, the table box hides for retail, and all seventeen packs carry the five wordscheck-locally.jsall 7 pass