ordering-ui-react-native 0.23.15-test5 → 0.23.16
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 +1 -1
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +2 -2
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +7 -2
- package/themes/business/src/components/PrinterSettings/index.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -330,6 +330,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
330
330
|
orderStatus: getOrderStatus(order?.status, t)?.value
|
|
331
331
|
}, printer?.printMode)
|
|
332
332
|
commands.push({ appendCutPaper: StarPRNT.CutPaperAction.PartialCutWithFeed })
|
|
333
|
+
|
|
333
334
|
printAction(printer, commands, idx === printerSettings.length - 1)
|
|
334
335
|
})
|
|
335
336
|
return
|
|
@@ -422,7 +423,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
422
423
|
const autoPrint = await _retrieveStoreData('auto_print_after_accept_order')
|
|
423
424
|
setPrinterSettings(printers?.length && printers)
|
|
424
425
|
setAutoPrintEnabled(!!autoPrint)
|
|
425
|
-
console.log('printers after', printers);
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
getStorageData()
|
|
@@ -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:
|
|
157
|
+
const textProps = { fontSize: 12 }
|
|
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]:
|
|
207
|
+
? { [printMode]: `---------------------------------------${endLine}` }
|
|
208
208
|
: {
|
|
209
209
|
[printMode]: replaceChars(append?.text ?? append),
|
|
210
210
|
...textProps,
|
|
@@ -61,9 +61,14 @@ export const OrderItem = React.memo((props: any) => {
|
|
|
61
61
|
const styles = StyleSheet.create({
|
|
62
62
|
cardButton: {
|
|
63
63
|
flex: 1,
|
|
64
|
-
paddingVertical: (isIpad || isTablet) ? 20 :
|
|
64
|
+
paddingVertical: (isIpad || isTablet) ? 20 : 5,
|
|
65
65
|
marginBottom: IS_PORTRAIT ? 25 : 0,
|
|
66
66
|
marginLeft: 3,
|
|
67
|
+
backgroundColor: order?.time_status === 'delayed'
|
|
68
|
+
? theme.colors.danger100
|
|
69
|
+
: order?.time_status === 'at_risk'
|
|
70
|
+
? theme.colors.warning100
|
|
71
|
+
: theme.colors.primaryContrast
|
|
67
72
|
},
|
|
68
73
|
icon: {
|
|
69
74
|
borderRadius: 7.6,
|
|
@@ -239,7 +244,7 @@ export const OrderItem = React.memo((props: any) => {
|
|
|
239
244
|
: parseDate(order?.delivery_datetime, { utc: false })}`)}
|
|
240
245
|
</OText>
|
|
241
246
|
)}
|
|
242
|
-
{((currentTabSelected === 'pending' || currentTabSelected === 'inProgress') && allowColumns?.timer) && (
|
|
247
|
+
{((currentTabSelected === 'pending' || currentTabSelected === 'inProgress' || currentTabSelected === 'active') && allowColumns?.timer) && (
|
|
243
248
|
<>
|
|
244
249
|
<OText
|
|
245
250
|
style={styles.date}
|
|
@@ -102,7 +102,7 @@ export const PrinterSettings = (props: any) => {
|
|
|
102
102
|
type: type ?? _currentPrinter?.type ?? 1,
|
|
103
103
|
ip: ip ?? _currentPrinter?.ip ?? '',
|
|
104
104
|
portName: (type ?? _currentPrinter?.type) === 1 || !ip
|
|
105
|
-
? item
|
|
105
|
+
? item.portName1 ?? _currentPrinter?.portName1
|
|
106
106
|
: `TCP:${ip}`
|
|
107
107
|
}
|
|
108
108
|
edit ? (_printers[idx] = _item) : _printers.push(_item)
|
|
@@ -321,7 +321,7 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
321
321
|
}
|
|
322
322
|
}))
|
|
323
323
|
}
|
|
324
|
-
}, [dateSelected, JSON.stringify(hoursList), JSON.stringify(datesWhitelist),
|
|
324
|
+
}, [dateSelected, JSON.stringify(hoursList), JSON.stringify(datesWhitelist), JSON.stringify(business)])
|
|
325
325
|
|
|
326
326
|
useEffect(() => {
|
|
327
327
|
setLocalMoment(moment, t)
|