ordering-ui-react-native 0.23.15-test2 → 0.23.15-test4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.23.15-test2",
3
+ "version": "0.23.15-test4",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -316,18 +316,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
316
316
  const printAction = async (printerSettings: any, commands: any, showAlert: boolean = true) => {
317
317
  try {
318
318
  var printResult = await StarPRNT.print(printerSettings?.emulation, commands, printerSettings?.portName);
319
- Alert.alert(
320
- 'Print Result',
321
- JSON.stringify(printResult),
322
- [{ text: t('OK', 'Ok')}]
323
- )
324
319
  showAlert && showToast(ToastType.Info, t('ORDER_PRINTED_SUCCESS', 'Order printed'), 1000)
325
320
  } catch (e) {
326
- Alert.alert(
327
- 'Print Result',
328
- JSON.stringify(e),
329
- [{ text: t('OK', 'Ok')}]
330
- )
331
321
  showAlert && showToast(ToastType.Error, t('ORDER_PRINTED_FAILED', 'Order not printed, connection failed'), 1000)
332
322
  }
333
323
  }
@@ -340,11 +330,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
340
330
  orderStatus: getOrderStatus(order?.status, t)?.value
341
331
  }, printer?.printMode)
342
332
  commands.push({ appendCutPaper: StarPRNT.CutPaperAction.PartialCutWithFeed })
343
- Alert.alert(
344
- `Printer: ${printer?.model}`,
345
- `Port name: ${printer?.portName}`,
346
- [{ text: t('OK', 'Ok')}]
347
- )
348
333
  printAction(printer, commands, idx === printerSettings.length - 1)
349
334
  })
350
335
  return
@@ -154,7 +154,7 @@ export const usePrinterCommands = () => {
154
154
  const jumpLine = isAppendMode ? '\n' : ' '
155
155
  const endLine = isAppendMode ? '\n' : ''
156
156
 
157
- const textProps = { fontSize: 12 }
157
+ const textProps = { fontSize: 14 }
158
158
 
159
159
  const appends: any = [
160
160
  { text: `${t('ORDER_NO', 'Order No.')} ${order.id}${endLine}`, props: { fontSize: 16 } },
@@ -204,7 +204,7 @@ export const usePrinterCommands = () => {
204
204
  ...commands,
205
205
  ...appends.map((append: any) => {
206
206
  return append === '_separator_'
207
- ? { [printMode]: `---------------------------------------${endLine}` }
207
+ ? { [printMode]: `-------------------------------------${endLine}` }
208
208
  : {
209
209
  [printMode]: replaceChars(append?.text ?? append),
210
210
  ...textProps,