From cd9a2fda8d27f354164067ec329c4056b107ebdc Mon Sep 17 00:00:00 2001 From: Damian <37555910+DCRepublic@users.noreply.github.com> Date: Mon, 1 Apr 2024 21:51:15 -0400 Subject: [PATCH] printer things --- src/app/(header)/point_of_sale/page.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/app/(header)/point_of_sale/page.tsx b/src/app/(header)/point_of_sale/page.tsx index 711bbc8..72aae34 100644 --- a/src/app/(header)/point_of_sale/page.tsx +++ b/src/app/(header)/point_of_sale/page.tsx @@ -353,6 +353,9 @@ export default function App() { total: runningTotal, hidden: false, notes: '', + oc: oneCard, + payment: paymentType, + receipt: true, dishes: currentOrder.filter((item: any) => item.tag == 'food'), }; const drinkies = { @@ -360,6 +363,9 @@ export default function App() { total: runningTotal, hidden: false, notes: '', + oc: oneCard, + payment: paymentType, + receipt: true, dishes: currentOrder.filter((item: any) => item.tag == 'drink'), }; @@ -402,7 +408,17 @@ export default function App() { } //Send order to print server/tablet - await axios.post('/api/print', toPrintServer).then((response) => { + await axios.post('/api/print', foodies).then((response) => { + if (response.status == 200) { + setSuccess(true); + setTimeout(handleSuccess, 3000); + } else { + setFailure(true); + setTimeout(handleFailure, 3000); + } + }); + + await axios.post('/api/print', drinkies).then((response) => { if (response.status == 200) { setSuccess(true); setTimeout(handleSuccess, 3000);