ordering-ui-react-native 0.15.95 → 0.15.98

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.95",
3
+ "version": "0.15.98",
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;
@@ -450,7 +450,7 @@ export const orderCommentList = (value: string) => {
450
450
 
451
451
  if (!messages[status]) return null
452
452
 
453
- const list = messages[status].map((val: any, i: number) => ({ key: i, value: val, content: t(`REJECT_REASON_${val.toUpperCase()}`, val.replaceAll('_', ' ')) }))
453
+ const list = messages[status].map((val: any, i: number) => ({ key: i, value: val, content: t(`REJECT_REASON_${val.toUpperCase()}`, val.replace(/_/g, ' ')) }))
454
454
 
455
455
  return { list }
456
456
  }
@@ -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,