ordering-ui-react-native 0.22.88 → 0.22.90

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.22.88",
3
+ "version": "0.22.90",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { View, StyleSheet, ScrollView, Dimensions, TouchableOpacity } from 'react-native';
2
+ import { View, StyleSheet, ScrollView, Dimensions, TouchableOpacity, Platform } from 'react-native';
3
3
  import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
4
4
  import { useTheme } from 'styled-components/native';
5
5
  import { SearchBar } from '../SearchBar';
@@ -190,6 +190,7 @@ export const BusinessProductList = (props: any) => {
190
190
  const businessProductListProps = {
191
191
  ...props,
192
192
  UIComponent: BusinessProductListUI,
193
+ isIos: Platform.OS === 'ios'
193
194
  };
194
195
 
195
196
  return <StoreProductList {...businessProductListProps} />;
@@ -14,6 +14,7 @@ import {
14
14
  Total,
15
15
  OSRow,
16
16
  OrderVehicle,
17
+ OrderSpot,
17
18
  } from './styles';
18
19
 
19
20
  import { ProductItemAccordion } from '../ProductItemAccordion';
@@ -662,6 +663,20 @@ export const OrderContentComponent = (props: OrderContent) => {
662
663
  )}
663
664
 
664
665
  </OrderBill >
666
+
667
+ {!!order?.spot_number && (
668
+ <OrderSpot vehicleExists={!!order?.vehicle}>
669
+ <Table>
670
+ <OText style={{ marginBottom: 5 }}>
671
+ {t('SPOT_NUMBER', 'Spot number')}
672
+ </OText>
673
+ <OText style={{ marginBottom: 5 }}>
674
+ {order?.spot_number}
675
+ </OText>
676
+ </Table>
677
+ </OrderSpot>
678
+ )}
679
+
665
680
  {!!order?.vehicle && (
666
681
  <OrderVehicle>
667
682
  <OText
@@ -83,6 +83,16 @@ export const OrderVehicle = styled.View`
83
83
  flex: 1;
84
84
  `;
85
85
 
86
+ export const OrderSpot = styled.View`
87
+ border-top-width: 1px;
88
+ border-top-color: ${(props: any) => props.theme.colors.borderTops};
89
+ padding-vertical: 20px;
90
+ ${(props: any) => !props.vehicleExists && css`
91
+ padding-bottom: 50px;
92
+ `}
93
+ flex: 1;
94
+ `;
95
+
86
96
  export const Total = styled.View`
87
97
  border-top-width: 1px;
88
98
  border-top-color: ${(props: any) => props.theme.colors.borderTops};
@@ -258,7 +258,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
258
258
  paddingLeft: 0,
259
259
  paddingRight: 0,
260
260
  marginBottom: 30,
261
- marginTop: 30
261
+ marginTop: Platform.OS === 'ios' ? 60 : 30
262
262
  },
263
263
  rowStyle: {
264
264
  display: 'flex',
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react'
2
2
  import { useLanguage, useUtils, WebsocketStatus as WebsocketStatusController } from 'ordering-components/native'
3
- import { TouchableOpacity, View, StyleSheet } from 'react-native'
3
+ import { TouchableOpacity, View, StyleSheet, Platform } from 'react-native'
4
4
  import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
5
5
  import { useTheme } from 'styled-components/native'
6
6
  import RNRestart from 'react-native-restart'
@@ -37,7 +37,7 @@ const SocketStatusUI = (props: any) => {
37
37
  paddingLeft: 0,
38
38
  paddingRight: 0,
39
39
  marginBottom: 30,
40
- marginTop: 30
40
+ marginTop: Platform.OS === 'ios' ? 60 : 30
41
41
  },
42
42
  })
43
43