ordering-ui-react-native 0.23.13 → 0.23.14
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
|
@@ -65,6 +65,7 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
65
65
|
const messagesReadIds = messagesReadList?.map((message: any) => message?.order_message_id)
|
|
66
66
|
|
|
67
67
|
const filteredMessages = messagesReadList?.length > 0 ? messages?.messages?.filter((message: any) => !messagesReadIds?.includes(message?.id)) : messages?.messages
|
|
68
|
+
const cateringTypes = [7, 8]
|
|
68
69
|
|
|
69
70
|
const styles = StyleSheet.create({
|
|
70
71
|
icons: {
|
|
@@ -228,12 +229,18 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
228
229
|
<OrderHeader>
|
|
229
230
|
{!props.isCustomView ? (
|
|
230
231
|
<OText size={13} style={{ marginBottom: 5 }}>
|
|
231
|
-
|
|
232
|
+
<>
|
|
233
|
+
{cateringTypes.includes(order?.delivery_type) ? `${t('CREATED_AT', 'Created at')}: ${parseDate(order?.created_at)}\n` : ''}
|
|
234
|
+
{cateringTypes.includes(order?.delivery_type) ? `${t('PLACED_TO', 'Placed to')}: ` : ''}{deliveryDate()}
|
|
235
|
+
</>
|
|
232
236
|
</OText>
|
|
233
237
|
) : (
|
|
234
238
|
<Header style={{ alignItems: 'center' }}>
|
|
235
239
|
<OText size={13} style={{ marginBottom: 5 }}>
|
|
236
|
-
|
|
240
|
+
<>
|
|
241
|
+
{cateringTypes.includes(order?.delivery_type) ? `${t('CREATED_AT', 'Created at')}: ${parseDate(order?.created_at)}\n` : ''}
|
|
242
|
+
{cateringTypes.includes(order?.delivery_type) ? `${t('PLACED_TO', 'Placed to')}: ` : ''}{deliveryDate()}
|
|
243
|
+
</>
|
|
237
244
|
</OText>
|
|
238
245
|
|
|
239
246
|
{(!order?.isLogistic || (!logisticOrderStatus?.includes(order?.status) && !order?.order_group)) && (
|
|
@@ -134,6 +134,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
134
134
|
const directionTypes = [2, 3, 4, 5]
|
|
135
135
|
const activeStatus = [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26]
|
|
136
136
|
const reorderStatus = [1, 2, 5, 6, 10, 11, 12]
|
|
137
|
+
const cateringTypes = [7, 8]
|
|
137
138
|
const [isPickup, setIsPickup] = useState(order?.delivery_type === 2)
|
|
138
139
|
const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
|
|
139
140
|
const isGiftCardOrder = !order?.business_id
|
|
@@ -361,7 +362,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
361
362
|
}
|
|
362
363
|
}, [props?.order?.error, props?.order?.loading])
|
|
363
364
|
|
|
364
|
-
|
|
365
365
|
useEffect(() => {
|
|
366
366
|
if (!order?.delivery_type) return
|
|
367
367
|
setIsPickup(order?.delivery_type === 2)
|
|
@@ -461,15 +461,18 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
461
461
|
<NavBar
|
|
462
462
|
hideArrowLeft
|
|
463
463
|
title={`${t('ORDER', 'Order')} #${order?.id}`}
|
|
464
|
-
titleAlign={'
|
|
464
|
+
titleAlign={'left'}
|
|
465
465
|
showCall={false}
|
|
466
466
|
btnStyle={{ paddingLeft: 0 }}
|
|
467
467
|
style={{ marginTop: Platform.OS === 'ios' ? 0 : 20 }}
|
|
468
468
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
469
|
-
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
469
|
+
titleStyle={{ marginRight: 0, marginLeft: 0, paddingHorizontal: 0 }}
|
|
470
470
|
subTitle={!hideDeliveryDate && <OText size={12} lineHeight={18} color={theme.colors.textNormal}>
|
|
471
471
|
{activeStatus.includes(order?.status) ? (
|
|
472
|
-
|
|
472
|
+
<>
|
|
473
|
+
{cateringTypes.includes(order?.delivery_type) ? `${t('CREATED_AT', 'Created at')}: ${parseDate(order?.created_at)}\n` : ''}
|
|
474
|
+
{cateringTypes.includes(order?.delivery_type) ? `${t('PLACED_TO', 'Placed to')}:` : ''} <OrderEta order={order} />
|
|
475
|
+
</>
|
|
473
476
|
) : (
|
|
474
477
|
parseDate(order?.reporting_data?.at[`status:${order.status}`])
|
|
475
478
|
)}
|