ordering-ui-react-native 0.23.5 → 0.23.6

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.5",
3
+ "version": "0.23.6",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -159,7 +159,7 @@ export const OrderSummary = ({ order, navigation, orderStatus, askBluetoothPermi
159
159
 
160
160
  ${t('DELIVERY_DATE', 'Delivery Date')}: ${deliveryDate(order)}
161
161
  </br>
162
- ${t(paymethodsLength > 1 ? 'PAYMENT_METHODS' : 'PAYMENT_METHOD', paymethodsLength > 1 ? 'Payment methods' : 'Payment method')}: ${handlePaymethodsListString()}
162
+ ${t(paymethodsLength > 1 ? 'PAYMENT_METHODS' : 'PAYMENT_METHOD', paymethodsLength > 1 ? 'Payment methods' : 'Payment method')}: ${order?.payment_events?.length > 0 ? handlePaymethodsListString() : t(order?.paymethod?.gateway?.toUpperCase(), order?.paymethod?.name)}
163
163
  </p>
164
164
 
165
165
  <h1>${t('CUSTOMER_DETAILS', 'Customer details')}</h1>
@@ -488,7 +488,9 @@ export const OrderSummary = ({ order, navigation, orderStatus, askBluetoothPermi
488
488
  {`${t('DELIVERY_DATE', 'Delivery Date')}: ${deliveryDate(order)}`}
489
489
  </OText>
490
490
 
491
- <OText style={{ marginBottom: 5 }}>{`${t(`${paymethodsLength > 1 ? 'PAYMENT_METHODS' : 'PAYMENT_METHOD'}`, `${paymethodsLength > 1 ? 'Payment methods' : 'Payment method'}`)}: ${handlePaymethodsListString()}`}</OText>
491
+ <OText style={{ marginBottom: 5 }}>
492
+ {`${t(`${paymethodsLength > 1? 'PAYMENT_METHODS' : 'PAYMENT_METHOD'}`, `${paymethodsLength > 1 ? 'Payment methods' : 'Payment method'}`)}: ${order?.payment_events?.length > 0 ? handlePaymethodsListString() : t(order?.paymethod?.gateway?.toUpperCase(), order?.paymethod?.name)}`}
493
+ </OText>
492
494
 
493
495
  </OrderHeader>
494
496