ordering-ui-react-native 0.23.29 → 0.23.30

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.29",
3
+ "version": "0.23.30",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -85,7 +85,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
85
85
  key?: string | null;
86
86
  }>({ open: false, content: [], key: null });
87
87
 
88
- const disabledActionsByInternet = isNetConnected !== null && !isNetConnected && canSaveChangesOffline === false
88
+ const disabledActionsByInternet = isNetConnected !== null && !isNetConnected && canSaveChangesOffline === false
89
89
 
90
90
  const validStatusComplete = [9, 19, 23, 26]
91
91
 
@@ -470,6 +470,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
470
470
  let isBusinessMarker = false;
471
471
  const customerStatusses = [3, 9, 19, 23, 26]
472
472
  const businessStatusses = [7, 8, 18]
473
+ const arrivedCustomerStatusses = [19, 23]
473
474
  if (businessStatusses?.includes(order?.status)) {
474
475
  const markerBusiness = 'Business';
475
476
  isBusinessMarker = true;
@@ -522,8 +523,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
522
523
  />
523
524
  </Pickup>
524
525
  )}
525
-
526
- {(order?.status === 9 || order?.status === 19) && deliveryTypes?.includes(order?.delivery_type) && !props.order?.loading && (
526
+ {arrivedCustomerStatusses.includes(order?.status) && deliveryTypes?.includes(order?.delivery_type) && !props.order?.loading && (
527
527
  <View style={{ paddingVertical: 20, marginBottom: 20 }}>
528
528
  <OButton
529
529
  style={styles.btnPickUp}
@@ -59,7 +59,7 @@ const OrderSummaryUI = (props: any) => {
59
59
  const [{ parsePrice, parseNumber }] = useUtils();
60
60
  const commentRef = useRef()
61
61
  const [openTaxModal, setOpenTaxModal] = useState<any>({ open: false, data: null, type: '' })
62
- const isCouponEnabled = hideCouponByValidationCheckout
62
+ const hideCartDiscount = hideCouponByValidationCheckout
63
63
  const hideCartComments = hideCommentsByValidationCheckout
64
64
 
65
65
  const cart = orderState?.carts?.[`businessId:${props.cart.business_id}`]
@@ -314,7 +314,7 @@ const OrderSummaryUI = (props: any) => {
314
314
  <OText size={12}>-{parsePrice(event.amount, { isTruncable: true })}</OText>
315
315
  </OSTable>
316
316
  ))}
317
- {isCouponEnabled && !isCartPending && cart?.business_id && (
317
+ {!hideCartDiscount && !isCartPending && cart?.business_id && (
318
318
  <View>
319
319
  <View style={{ paddingVertical: 5 }}>
320
320
  <CouponControl