ordering-ui-react-native 0.15.94 → 0.15.97

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.94",
3
+ "version": "0.15.97",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -32,6 +32,7 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
32
32
  business,
33
33
  handleClick,
34
34
  isBusinessOpen,
35
+ getBusinessOffer,
35
36
  businessWillCloseSoonMinutes,
36
37
  isBusinessClose
37
38
  } = props;
@@ -145,9 +146,14 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
145
146
  />
146
147
  </BusinessLogo>
147
148
  <BusinessState>
148
- {!isBusinessOpen && (
149
+ {(isBusinessOpen || !!getBusinessOffer(business?.offers)) && (
149
150
  <View style={styles.businessStateView}>
150
- <OText color={theme.colors.white} size={20} style={styles.businessStateText}>
151
+ {getBusinessOffer(business?.offers) && (
152
+ <OText color={theme.colors.white} size={18} style={styles.businessStateText}>
153
+ {getBusinessOffer(business?.offers) || parsePrice(0)}
154
+ </OText>
155
+ )}
156
+ <OText color={theme.colors.white} size={18} style={styles.businessStateText}>
151
157
  {t('PREORDER', 'PREORDER')}
152
158
  </OText>
153
159
  </View>
@@ -143,8 +143,9 @@ export interface BusinessControllerParams {
143
143
  orderType?: any;
144
144
  handleClick?: any;
145
145
  isBusinessOpen?: boolean;
146
- businessWillCloseSoonMinutes?: number
147
- isBusinessClose?: number
146
+ businessWillCloseSoonMinutes?: number;
147
+ isBusinessClose?: number;
148
+ getBusinessOffer: any;
148
149
  }
149
150
  export interface BusinessProductsListingParams {
150
151
  navigation?: any;
@@ -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,