ordering-ui-react-native 0.16.42 → 0.16.43

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.16.42",
3
+ "version": "0.16.43",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -182,7 +182,7 @@ export const PreviousOrders = (props: any) => {
182
182
  <Timestatus style={{ backgroundColor: getStatusClassName(getDelayMinutes(order)) === 'in_time' ? '#00D27A' : getStatusClassName(getDelayMinutes(order)) === 'at_risk' ? '#FFC700' : getStatusClassName(getDelayMinutes(order)) === 'delayed' ? '#E63757' : '' }} />
183
183
  )}
184
184
  {
185
- order.business?.logo && (
185
+ !!order.business?.logo && (
186
186
  <Logo style={styles.logo}>
187
187
  <OIcon
188
188
  url={optimizeImage(
@@ -194,17 +194,17 @@ export const PreviousOrders = (props: any) => {
194
194
  </Logo>
195
195
  )}
196
196
  <Information>
197
- {order?.order_group_id && (
197
+ {!!order?.order_group_id && (
198
198
  <OText>
199
199
  <OText>{(t('INVOICE_GROUP_NO', 'Group No.') + order?.order_group_id)}</OText>
200
200
  </OText>
201
201
  )}
202
- {order.business?.name && (
202
+ {!!order.business?.name && (
203
203
  <OText numberOfLines={1} style={styles.title}>
204
204
  {order.business?.name}
205
205
  </OText>
206
206
  )}
207
- {order?.showNotification && (
207
+ {!!order?.showNotification && (
208
208
  <NotificationIcon>
209
209
  <EntypoIcon
210
210
  name="dot-single"
@@ -258,7 +258,7 @@ export const PreviousOrders = (props: any) => {
258
258
  </TouchableOpacity>
259
259
  {isLogisticOrder && (
260
260
  <AcceptOrRejectOrder>
261
- {order?.order_group_id && order?.order_group ? (
261
+ {!!order?.order_group_id && !!order?.order_group ? (
262
262
  <OButton
263
263
  text={t('VIEW_ORDER', 'View order')}
264
264
  onClick={() => handlePressOrder({ ...order, logistic_order_id: _order?.id })}
@@ -178,7 +178,7 @@ const CheckoutUI = (props: any) => {
178
178
  }
179
179
  }
180
180
 
181
- const handlePlaceOrder = (confirmPayment) => {
181
+ const handlePlaceOrder = (confirmPayment : any) => {
182
182
  if (!userErrors.length && !requiredFields?.length) {
183
183
  handlerClickPlaceOrder && handlerClickPlaceOrder(null, null, confirmPayment)
184
184
  return
@@ -741,7 +741,7 @@ const CheckoutUI = (props: any) => {
741
741
  </Container>
742
742
  {!cartState.loading && cart && cart?.status !== 2 && (
743
743
  <FloatingButton
744
- handleClick={() => handlePlaceOrder()}
744
+ handleClick={() => handlePlaceOrder(null)}
745
745
  isSecondaryBtn={isDisabledButtonPlace}
746
746
  disabled={isDisabledButtonPlace}
747
747
  btnText={cart?.subtotal >= cart?.minimum
@@ -755,7 +755,7 @@ const CheckoutUI = (props: any) => {
755
755
  : (`${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`)
756
756
  }
757
757
  btnRightValueShow
758
- btnRightValue={parsePrice(cart?.total)}
758
+ btnRightValue={parsePrice(cart?.balance)}
759
759
  iosBottom={30}
760
760
  />
761
761
  )}