ordering-ui-react-native 0.23.92 → 0.23.94
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
|
@@ -40,6 +40,8 @@ function BusinessControllerPropsAreEqual(prevProps: any, nextProps: any) {
|
|
|
40
40
|
prevProps.isBusinessOpen === nextProps.isBusinessOpen
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
const deliveryTypes = [1, 7]
|
|
44
|
+
|
|
43
45
|
export const BusinessControllerUI = React.memo((props: BusinessControllerParams) => {
|
|
44
46
|
const {
|
|
45
47
|
business,
|
|
@@ -321,14 +323,14 @@ export const BusinessControllerUI = React.memo((props: BusinessControllerParams)
|
|
|
321
323
|
</View>
|
|
322
324
|
) : (
|
|
323
325
|
<View style={styles.bullet}>
|
|
324
|
-
{orderState?.options?.type
|
|
326
|
+
{deliveryTypes.includes(orderState?.options?.type) && !hideBusinessFee && (
|
|
325
327
|
<OText size={textSize} color={theme.colors.textSecondary}>
|
|
326
328
|
{`${t('DELIVERY_FEE', 'Delivery fee')} ${parsePrice(businessDeliveryPrice ?? business?.delivery_price) + ' \u2022 '}`}
|
|
327
329
|
</OText>
|
|
328
330
|
)}
|
|
329
331
|
{!hideBusinessTime && (
|
|
330
332
|
<OText size={textSize} color={theme.colors.textSecondary}>{`${convertHoursToMinutes(
|
|
331
|
-
orderState?.options?.type
|
|
333
|
+
deliveryTypes.includes(orderState?.options?.type)
|
|
332
334
|
? (businessDeliveryTime ?? business?.delivery_time)
|
|
333
335
|
: (businessPickupTime ?? business?.pickup_time),
|
|
334
336
|
)} \u2022 `}</OText>
|
|
@@ -129,7 +129,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
129
129
|
const [showTitle, setShowTitle] = useState(false)
|
|
130
130
|
|
|
131
131
|
const { order, businessData } = props.order;
|
|
132
|
-
const mapValidStatuses = [9, 19, 23, 26]
|
|
132
|
+
const mapValidStatuses = [9, 18, 19, 23, 26]
|
|
133
133
|
const placeSpotTypes = [3, 4, 5]
|
|
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]
|
|
@@ -474,7 +474,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
474
474
|
{activeStatus.includes(order?.status) ? (
|
|
475
475
|
<>
|
|
476
476
|
{cateringTypes.includes(order?.delivery_type) ? `${t('CREATED_AT', 'Created at')}: ${parseDate(order?.created_at)}\n` : ''}
|
|
477
|
-
{cateringTypes.includes(order?.delivery_type) ? `${t('PLACED_TO', 'Placed to')}:` : ''} <OrderEta order={order} outputFormat={`YYYY-MM-DD ${configs?.general_hour_format?.value}`}
|
|
477
|
+
{cateringTypes.includes(order?.delivery_type) ? `${t('PLACED_TO', 'Placed to')}:` : ''} <OrderEta order={order} outputFormat={`YYYY-MM-DD ${configs?.general_hour_format?.value}`} />
|
|
478
478
|
</>
|
|
479
479
|
) : (
|
|
480
480
|
parseDate(order?.reporting_data?.at[`status:${order.status}`], { outputFormat: `YYYY-MM-DD ${configs?.general_hour_format?.value}` })
|