ordering-ui-react-native 0.12.49 → 0.12.53

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.
Files changed (21) hide show
  1. package/package.json +1 -1
  2. package/themes/business/src/components/GoogleMap/index.tsx +78 -4
  3. package/themes/business/src/components/OrderDetails/Business.tsx +11 -3
  4. package/themes/business/src/components/OrderDetails/Delivery.tsx +111 -101
  5. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +54 -39
  6. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +7 -7
  7. package/themes/business/src/components/OrderDetails/styles.tsx +11 -2
  8. package/themes/business/src/components/OrdersOption/index.tsx +5 -5
  9. package/themes/business/src/components/PreviousOrders/index.tsx +41 -26
  10. package/themes/doordash/src/components/ProductForm/index.tsx +37 -28
  11. package/themes/instacart/src/components/ProductForm/index.tsx +26 -15
  12. package/themes/original/src/components/ActiveOrders/index.tsx +19 -0
  13. package/themes/original/src/components/ActiveOrders/styles.tsx +5 -0
  14. package/themes/original/src/components/BusinessController/styles.tsx +5 -5
  15. package/themes/original/src/components/BusinessTypeFilter/index.tsx +16 -16
  16. package/themes/original/src/components/BusinessTypeFilter/styles.tsx +1 -0
  17. package/themes/original/src/components/BusinessesListing/index.tsx +8 -9
  18. package/themes/original/src/components/BusinessesListing/styles.tsx +1 -0
  19. package/themes/original/src/components/ProductForm/index.tsx +39 -36
  20. package/themes/single-business/src/components/ProductForm/index.tsx +15 -12
  21. package/themes/uber-eats/src/components/ProductForm/index.tsx +41 -44
@@ -32,7 +32,7 @@ import {
32
32
  import { OButton, OInput, OText } from '../shared'
33
33
  import { ProductOptionSubOption } from '../ProductOptionSubOption'
34
34
  import { NotFoundSource } from '../NotFoundSource'
35
- import { Placeholder,PlaceholderLine,Fade } from 'rn-placeholder'
35
+ import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder'
36
36
  import { useTheme } from 'styled-components/native'
37
37
  import MaterialIcon from 'react-native-vector-icons/MaterialIcons'
38
38
 
@@ -149,9 +149,9 @@ export const ProductOptionsUI = (props: any) => {
149
149
  }
150
150
  }
151
151
 
152
- const handleRedirectLogin = (product : any) => {
152
+ const handleRedirectLogin = (product: any) => {
153
153
  onClose()
154
- navigation.navigate('Login', {product: {businessId: product?.businessId, id: product?.id, categoryId: product?.categoryId, slug: businessSlug} })
154
+ navigation.navigate('Login', { product: { businessId: product?.businessId, id: product?.id, categoryId: product?.categoryId, slug: businessSlug } })
155
155
  }
156
156
 
157
157
  const saveErrors = orderState.loading || maxProductQuantity === 0 || Object.keys(errors).length > 0
@@ -215,49 +215,46 @@ export const ProductOptionsUI = (props: any) => {
215
215
  </View>
216
216
  </Placeholder>
217
217
  ) : (
218
- <>
219
- <OText
220
- weight={600}
221
- size={20}
222
- numberOfLines={1}
223
- ellipsizeMode='tail'
224
- style={{
225
- flex: 1,
226
- marginRight: 30,
227
- textAlign: 'left'
228
- }}
229
- >
230
- {product?.name || productCart.name}
231
- </OText>
232
- <OText weight={600} size={20} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={theme.colors.primary}>{productCart.price ? parsePrice(productCart.price) : ''}</OText>
233
- </>
218
+ <View style={{ flexDirection: 'column', width: '100%' }}>
219
+ <OText size={20} style={{ flex: I18nManager.isRTL ? 0 : 1, marginBottom: 10 }}>{product?.name || productCart.name}</OText>
220
+ <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
221
+ {((product?.sku && product?.sku !== '-1' && product?.sku !== '1') || (product?.estimated_person)) && (
222
+ <OText size={14} style={{ marginBottom: 10, flex: I18nManager.isRTL ? 1 : 0 }} color={'#909BA9'}>
223
+ {
224
+ ((product?.sku && product?.sku !== '-1' && product?.sku !== '1') || (productCart?.sku && productCart?.sku !== '-1' && productCart?.sku !== '1'))
225
+ && <>{t('SKU', 'Sku')}{' '}{product?.sku || productCart?.sku}</>
226
+ }
227
+ {product?.sku && product?.sku !== '-1' && product?.sku !== '1' && product?.estimated_person && (
228
+ <>&nbsp;&#183;&nbsp;</>
229
+ )}
230
+ {product?.estimated_person
231
+ && <>{product?.estimated_person}{' '}{t('ESTIMATED_PERSONS', 'persons')}</>
232
+ }
233
+ </OText>
234
+ )}
235
+ </View>
236
+ <OText size={16} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={theme.colors.primary}>{productCart.price ? parsePrice(productCart.price) : ''}</OText>
237
+ </View>
234
238
  )}
235
239
  </ProductTitle>
236
- <ProductDescription>
237
- <OText color={theme.colors.gray} style={{ textAlign: 'left' }}>{product?.description || productCart?.description}</OText>
238
- {(
239
- (product?.sku && product?.sku !== '-1' && product?.sku !== '1') ||
240
- (productCart?.sku && productCart?.sku !== '-1' && productCart?.sku !== '1')
241
- ) && (
242
- <>
243
- <OText size={20}>{t('SKU', 'Sku')}</OText>
244
- <OText>{product?.sku || productCart?.sku}</OText>
245
- </>
246
- )}
247
- </ProductDescription>
240
+ {(product?.description || productCart?.description) && (
241
+ <ProductDescription>
242
+ <OText color={theme.colors.gray} style={{ textAlign: 'left', marginBottom: 10 }}>{product?.description || productCart?.description}</OText>
243
+ </ProductDescription>
244
+ )}
248
245
  {loading && !product ? (
249
246
  <>
250
- {[...Array(2)].map((item,i) => (
251
- <Placeholder key={i} style={{marginBottom: 20}} Animation={Fade}>
252
- <PlaceholderLine height={40} style={{ flex: 1, marginTop: 10 }} />
253
- {[...Array(3)].map((item,i) => (
254
- <View key={i} style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
255
- <PlaceholderLine height={30} width={10} style={{marginBottom: 20}} />
256
- <PlaceholderLine height={30} width={50} style={{marginBottom: 20}} />
257
- <PlaceholderLine height={30} width={30} style={{marginBottom: 20}} />
258
- </View>
259
- ))}
260
- </Placeholder>
247
+ {[...Array(2)].map((item, i) => (
248
+ <Placeholder key={i} style={{ marginBottom: 20 }} Animation={Fade}>
249
+ <PlaceholderLine height={40} style={{ flex: 1, marginTop: 10 }} />
250
+ {[...Array(3)].map((item, i) => (
251
+ <View key={i} style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
252
+ <PlaceholderLine height={30} width={10} style={{ marginBottom: 20 }} />
253
+ <PlaceholderLine height={30} width={50} style={{ marginBottom: 20 }} />
254
+ <PlaceholderLine height={30} width={30} style={{ marginBottom: 20 }} />
255
+ </View>
256
+ ))}
257
+ </Placeholder>
261
258
  ))}
262
259
  </>
263
260
  ) : (
@@ -279,7 +276,7 @@ export const ProductOptionsUI = (props: any) => {
279
276
  </SectionTitle>
280
277
  <WrapperIngredients
281
278
  style={{ backgroundColor: isSoldOut || maxProductQuantity <= 0 ? 'hsl(0, 0%, 72%)' : theme.colors.white }}
282
- hidden={!openIngredient}
279
+ hidden={!openIngredient}
283
280
  >
284
281
  {product?.ingredients.map((ingredient: any) => (
285
282
  <ProductIngredient
@@ -319,7 +316,7 @@ export const ProductOptionsUI = (props: any) => {
319
316
  state={currentState}
320
317
  disabled={isSoldOut || maxProductQuantity <= 0}
321
318
  />
322
- ): null
319
+ ) : null
323
320
  })
324
321
  }
325
322
  </WrapperSubOption>