ordering-ui-react-native 0.15.93 → 0.15.96

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.15.93",
3
+ "version": "0.15.96",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -73,6 +73,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
73
73
  key?: string | null;
74
74
  }>({ open: false, content: [], key: null });
75
75
 
76
+ const validStatusComplete = [9, 19, 23]
77
+
76
78
  const logisticOrderStatus = [4, 6, 7]
77
79
 
78
80
  const showFloatButtonsPickUp: any = {
@@ -393,7 +395,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
393
395
  widthButton={'45%'}
394
396
  />
395
397
  )}
396
- {(order?.status === 9 || order?.status === 19) && (
398
+ {(validStatusComplete.includes(order?.status)) && (
397
399
  <>
398
400
  <FloatingButton
399
401
  disabled={props.order?.loading}
@@ -23,8 +23,8 @@ export const PaymentOptionCash = (props: any) => {
23
23
  borderRadius: 7.6,
24
24
  marginTop: 10,
25
25
  width: '100%',
26
- height: 44,
27
- maxHeight: 44
26
+ height: 50,
27
+ maxHeight: 50
28
28
  },
29
29
  errorMsg: {
30
30
  marginTop: 10,
@@ -40,7 +40,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
40
40
 
41
41
  const pickerStyle = StyleSheet.create({
42
42
  inputAndroid: {
43
- width: 27,
43
+ width: 34,
44
44
  textAlign: 'center',
45
45
  overflow: 'visible',
46
46
  fontSize: 12,
@@ -140,7 +140,7 @@ const PromotionsUI = (props: PromotionParams) => {
140
140
  <SingleOfferContainer key={offer.id}>
141
141
  <OfferInformation>
142
142
  <OText style={styles.offerTitle} numberOfLines={2}>{offer?.name}</OText>
143
- {offer?.description && (
143
+ {!!offer?.description && (
144
144
  <OText style={styles.offerDescription} numberOfLines={2}>{offer?.description}</OText>
145
145
  )}
146
146
  <OText style={styles.offerExtraInfo}>
@@ -186,13 +186,13 @@ const PromotionsUI = (props: PromotionParams) => {
186
186
  {offerSelected?.auto && (
187
187
  <OText>{t('OFFER_AUTOMATIC', 'This offer applies automatic')}</OText>
188
188
  )}
189
- {offerSelected?.minimum && (
189
+ {!!offerSelected?.minimum && (
190
190
  <OText>{t('MINIMUM_PURCHASE_FOR_OFFER', 'Minimum purchase for use this offer')}: {parsePrice(offerSelected?.minimum)}</OText>
191
191
  )}
192
- {offerSelected?.max_discount && (
192
+ {!!offerSelected?.max_discount && (
193
193
  <OText>{t('MAX_DISCOUNT_ALLOWED', 'Max discount allowed')}: {parsePrice(offerSelected?.max_discount)}</OText>
194
194
  )}
195
- {offerSelected?.description && (
195
+ {!!offerSelected?.description && (
196
196
  <OText>{offerSelected?.description}</OText>
197
197
  )}
198
198
  </OfferData>
@@ -140,7 +140,7 @@ const WalletsUI = (props: any) => {
140
140
  </OTabs>
141
141
 
142
142
  <SectionContent>
143
- {!!loyaltyLevel && (
143
+ {!!loyaltyLevel && tabSelected === 'credit_point' && (
144
144
  <LoyaltyContent>
145
145
  <LoyaltyWrapp>
146
146
  <OText size={20}>
@@ -601,6 +601,7 @@ export interface PromotionParams {
601
601
  searchValue: string,
602
602
  offerSelected: any,
603
603
  setOfferSelected: any,
604
+ loadOffers: any
604
605
  }
605
606
  export interface SessionsParams {
606
607
  navigation: any,