ordering-ui-react-native 0.12.99 → 0.13.0

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.12.99",
3
+ "version": "0.13.00",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -67,7 +67,7 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
67
67
  <NavBar
68
68
  title={t('REVIEW_PRODUCT', 'Review product')}
69
69
  titleAlign={'center'}
70
- onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
70
+ onActionLeft={() => onNavigationRedirect('MyOrders')}
71
71
  showCall={false}
72
72
  btnStyle={{ paddingLeft: 0 }}
73
73
  paddingTop={0}
@@ -60,7 +60,7 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
60
60
  }
61
61
 
62
62
  const handleClickOrderReview = (order: any) => {
63
- onNavigationRedirect && onNavigationRedirect('ReviewOrder', { order: { id: order?.id, business_id: order?.business_id, logo: order.business?.logo } })
63
+ onNavigationRedirect && onNavigationRedirect('ReviewOrder', { order: { id: order?.id, business_id: order?.business_id, logo: order.business?.logo, products: order?.products } })
64
64
  }
65
65
 
66
66
  const handleReorderClick = (id: number) => {
@@ -8,7 +8,7 @@ import {
8
8
  } from 'ordering-components/native'
9
9
  import { ProductIngredient } from '../ProductIngredient'
10
10
  import { ProductOption } from '../ProductOption'
11
- import { View, TouchableOpacity, StyleSheet, Dimensions, ScrollView, I18nManager, TextStyle, Platform } from 'react-native'
11
+ import { View, TouchableOpacity, StyleSheet, Dimensions, ScrollView, I18nManager, TextStyle, Platform, KeyboardAvoidingView } from 'react-native'
12
12
  import {
13
13
  ProductHeader,
14
14
  WrapHeader,
@@ -137,7 +137,11 @@ export const ProductOptionsUI = (props: any) => {
137
137
  const saveErrors = orderState.loading || maxProductQuantity === 0 || Object.keys(errors).length > 0
138
138
 
139
139
  return (
140
- <>
140
+ <KeyboardAvoidingView
141
+ style={{ flex: 1 }}
142
+ behavior={'height'}
143
+ enabled={Platform.OS === 'ios'}
144
+ >
141
145
  <ScrollView style={styles.mainContainer}>
142
146
  {!error && (
143
147
  <View style={{ paddingBottom: 80 }}>
@@ -286,7 +290,7 @@ export const ProductOptionsUI = (props: any) => {
286
290
  />
287
291
  </ProductComment>
288
292
  {productCart && !isSoldOut && maxProductQuantity > 0 && (
289
- <View style={{ paddingVertical: 4 }}>
293
+ <View style={{ paddingVertical: 4, marginBottom: 10 }}>
290
294
  <SectionTitle>
291
295
  <OText style={theme.labels.middle as TextStyle}>{t('PREFERENCES', 'Preferences')}</OText>
292
296
  </SectionTitle>
@@ -335,6 +339,7 @@ export const ProductOptionsUI = (props: any) => {
335
339
  textSub={`${orderState.loading ? '' : productCart.total ? parsePrice(productCart?.total) : ''}`}
336
340
  textStyle={{ color: saveErrors ? theme.colors.textSecondary : theme.colors.white, fontSize: 14, fontWeight: Platform.OS === 'ios' ? '600' : 'bold' }}
337
341
  style={{
342
+ bottom: 5,
338
343
  backgroundColor: saveErrors ? theme.colors.backgroundGray300 : theme.colors.primary,
339
344
  borderWidth: 1, shadowOpacity: 0, height: 40,
340
345
  borderColor: saveErrors ? theme.colors.backgroundGray300 : theme.colors.primary,
@@ -361,13 +366,13 @@ export const ProductOptionsUI = (props: any) => {
361
366
  text={isSoldOut || maxProductQuantity <= 0 ? t('SOLD_OUT', 'Sold out') : t('LOGIN_SIGNUP', 'Login / Sign Up')}
362
367
  imgRightSrc=''
363
368
  textStyle={{ color: theme.colors.primary, ...theme.labels.middle }}
364
- style={{ height: 40, borderWidth: 1, borderColor: theme.colors.primary, backgroundColor: theme.colors.white }}
369
+ style={{ bottom: 5, marginTop: 2, height: 40, borderWidth: 1, borderColor: theme.colors.primary, backgroundColor: theme.colors.white }}
365
370
  />
366
371
  )}
367
372
  </View>
368
373
  </ProductActions>
369
374
  )}
370
- </>
375
+ </KeyboardAvoidingView>
371
376
  )
372
377
  }
373
378