ordering-ui-react-native 0.23.60 → 0.23.62

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.60",
3
+ "version": "0.23.62",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -643,8 +643,13 @@ export const OrderContentComponent = (props: OrderContent) => {
643
643
  </Total>
644
644
 
645
645
  {order?.payment_events?.length > 0 && (
646
- <View>
647
- <OText size={14} color={theme.colors.textNormal}>{t('PAYMENTS', 'Payments')}</OText>
646
+ <View
647
+ style={{
648
+ backgroundColor: theme?.colors?.primary,
649
+ padding: 10
650
+ }}
651
+ >
652
+ <OText size={14} color={theme?.colors?.white}>{t('PAYMENTS', 'Payments')}</OText>
648
653
  <View
649
654
  style={{
650
655
  width: '100%',
@@ -668,7 +673,9 @@ export const OrderContentComponent = (props: OrderContent) => {
668
673
  flexDirection: 'column',
669
674
  }}
670
675
  >
671
- <OText>
676
+ <OText
677
+ color={theme?.colors?.white}
678
+ >
672
679
  {event?.wallet_event
673
680
  ? walletName[event?.wallet_event?.wallet?.type]?.name
674
681
  : event?.paymethod?.gateway
@@ -678,7 +685,9 @@ export const OrderContentComponent = (props: OrderContent) => {
678
685
  : ''}
679
686
  </OText>
680
687
  </View>
681
- <OText>
688
+ <OText
689
+ color={theme?.colors?.white}
690
+ >
682
691
  {(event?.paymethod?.gateway === 'cash' && order?.cash)
683
692
  ? parsePrice(order?.cash, { currency: getCurrenySymbol(order?.currency) })
684
693
  : `-${parsePrice(event?.amount, { currency: getCurrenySymbol(order?.currency) })}`}
@@ -689,7 +698,7 @@ export const OrderContentComponent = (props: OrderContent) => {
689
698
  </View>
690
699
  )}
691
700
 
692
- </OrderBill >
701
+ </OrderBill>
693
702
 
694
703
  {!!order?.spot_number && (
695
704
  <OrderSpot vehicleExists={!!order?.vehicle}>
@@ -177,8 +177,8 @@ const ProfileUI = (props: ProfileParams) => {
177
177
  if (userState?.result?.error) {
178
178
  const messageError =
179
179
  userState.result.error || userState.result.error[0];
180
- showToast(ToastType.Error, getTraduction(messageError, t));
181
- } else {
180
+ showToast(ToastType.Error, typeof messageError === 'string' ? getTraduction(messageError, t) : t('CANNOT_UPDATE_AVAILABLE_STATE', 'Cannot update available state'));
181
+ } else {
182
182
  showToast(
183
183
  ToastType.Success,
184
184
  t('AVAILABLE_STATE_IS_UPDATED', 'Available state is updated'),
@@ -291,10 +291,10 @@ export const ProductItemAccordionUI = (props: ProductItemAccordionParams) => {
291
291
  )}
292
292
  {productInfo.options.length > 0 && (
293
293
  <ProductOptionsList>
294
- {productInfo.options.sort((a: any, b: any) => a.rank - b.rank).map((option: any) => (
294
+ {productInfo.options.map((option: any) => (
295
295
  <ProductOption key={option.id}>
296
296
  <OText size={10} color={theme.colors.textSecondary}>{option.name}</OText>
297
- {option.suboptions.map((suboption: any) => (
297
+ {option.suboptions.sort((a: any, b: any) => a.rank - b.rank).map((suboption: any) => (
298
298
  <ProductSubOption key={suboption.id}>
299
299
  <OText size={10} color={theme.colors.textThird}>
300
300
  {getFormattedSubOptionName({