diff --git a/wwwroot/languages/english/main.json b/wwwroot/languages/english/main.json index 1a6444b..1ab8e7b 100644 --- a/wwwroot/languages/english/main.json +++ b/wwwroot/languages/english/main.json @@ -39,7 +39,8 @@ "void":"Void", "pay_function":"Pay", "print_function":"Save & Print", - "freetext_button":"Keyboard", + "freetext_button":"Custom Instruction", + "custom_item_button":"Custom Item", "numpad_button":"Numpad", "select_covers":"Cover #", "how_many_covers":"How many people are on this table?", diff --git a/wwwroot/scripts/ts/dredgepos.orderScreen.ts b/wwwroot/scripts/ts/dredgepos.orderScreen.ts index 19b057e..26bd96e 100644 --- a/wwwroot/scripts/ts/dredgepos.orderScreen.ts +++ b/wwwroot/scripts/ts/dredgepos.orderScreen.ts @@ -61,7 +61,7 @@ const setupOrderScreen = (data: OrderScreenData) => { doc.on('click', '.loadPageGroup', loadPageGroup) doc.on('click', '[data-primary-action=item]', itemButtonClicked) doc.on('click', '.freetextButton', freetext) - doc.on('click', '.openItemButton', openItem) + doc.on('click', '.openItemButton', customItem) doc.on('click', '.orderBoxTable tbody tr', itemRowClicked) doc.on('click', '.voidButton', voidButtonClicked) doc.on('dblclick', '.voidButton', voidLastItem) @@ -405,7 +405,7 @@ const freetextSubmitted = (text: string) => { posAlert(lang('freetext_no_order')) } - const item = OrderScreen.custom_item + const item = Object.assign({}, OrderScreen.custom_item) item.item_type = 'instruction' item.item_name = text @@ -413,15 +413,16 @@ const freetextSubmitted = (text: string) => { } -const openItem = () => showVirtualKeyboard(lang('enter_item_name'), 32,false, openItemTextSubmitted) +const customItem = () => showVirtualKeyboard(lang('enter_item_name'), 32,false, customItemTextSubmitted) -const openItemTextSubmitted = (text: string) => { +const customItemTextSubmitted = (text: string) => { const submitFunction = (priceString: string) => { - const price = currency(priceString) - const item = OrderScreen.custom_item + const price = currency(priceString, {fromCents: false}) + + const item = Object.assign({}, OrderScreen.custom_item) item.item_type = 'item' item.item_name = text - item.price1 = price.value + item.price1 = price.intValue addNewItem(item) } diff --git a/wwwroot/styles/sass/dredgepos.core.sass b/wwwroot/styles/sass/dredgepos.core.sass index 4496e22..9019fda 100644 --- a/wwwroot/styles/sass/dredgepos.core.sass +++ b/wwwroot/styles/sass/dredgepos.core.sass @@ -19,7 +19,8 @@ box-sizing: border-box font-family: 'manrope', sans-serif scroll-behavior: smooth - cursor: pointer + +*:not(input, textarea) -webkit-touch-callout: none -webkit-user-select: none -khtml-user-select: none diff --git a/wwwroot/styles/sass/dredgepos.orderScreen.sass b/wwwroot/styles/sass/dredgepos.orderScreen.sass index 53d695c..dae2a0b 100644 --- a/wwwroot/styles/sass/dredgepos.orderScreen.sass +++ b/wwwroot/styles/sass/dredgepos.orderScreen.sass @@ -75,13 +75,23 @@ @include flex flex-basis: 100% - > * + > .functionColumn @include flex-item @include flex-column - + flex-basis: 25% > * @include flex-column-item + > .printGroupButtons + flex-basis: 25% + height: 100% + display: grid + grid-template-columns: repeat(2, 1fr) + grid-auto-rows: auto + + > * + padding: 0.5em + #pageList @include flex diff --git a/wwwroot/themes/restaurant/orderScreen.tpl.htm b/wwwroot/themes/restaurant/orderScreen.tpl.htm index 41a2942..49d7165 100644 --- a/wwwroot/themes/restaurant/orderScreen.tpl.htm +++ b/wwwroot/themes/restaurant/orderScreen.tpl.htm @@ -41,19 +41,19 @@