ordering-ui-react-native 0.22.6 → 0.22.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -132,7 +132,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
132
132
|
if (props.handleChangeOrderStatus) {
|
|
133
133
|
const order: any = await props.handleChangeOrderStatus(status, isAcceptOrReject)
|
|
134
134
|
|
|
135
|
-
if (order?.status
|
|
135
|
+
if (order?.status === 7 && autoPrintEnabled && printerSettings) {
|
|
136
136
|
handleViewSummaryOrder()
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -312,23 +312,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
312
312
|
const printAction = async (printerSettings: any, commands: any) => {
|
|
313
313
|
try {
|
|
314
314
|
var printResult = await StarPRNT.print(printerSettings?.emulation, commands, printerSettings?.portName);
|
|
315
|
-
|
|
316
|
-
t('PRINT_SUCCESS_TITLE', 'Print Success'),
|
|
317
|
-
t('PRINT_SUCCESS_SUBTITLE', `Go check your _printer_ printer!`).replace('_printer_', printerSettings?.model),
|
|
318
|
-
[
|
|
319
|
-
{text: 'OK', onPress: () => null},
|
|
320
|
-
],
|
|
321
|
-
{ cancelable: false }
|
|
322
|
-
)
|
|
315
|
+
showToast(ToastType.Info, t('ORDER_PRINTED_SUCCESS', 'Order printed'), 1000)
|
|
323
316
|
} catch (e) {
|
|
324
|
-
|
|
325
|
-
t('PRINT_FAIL_TITLE', 'Connection Failed'),
|
|
326
|
-
t('PRINT_FAIL_SUBTITLE', 'Make sure your Star Printer is turned on and have thermal paper in it.'),
|
|
327
|
-
[
|
|
328
|
-
{text: 'OK', onPress: () => null},
|
|
329
|
-
],
|
|
330
|
-
{ cancelable: false }
|
|
331
|
-
)
|
|
317
|
+
showToast(ToastType.Error, t('ORDER_PRINTED_FAILED', 'Order not printed, connection failed'), 1000)
|
|
332
318
|
}
|
|
333
319
|
}
|
|
334
320
|
|