ordering-ui-react-native 0.12.49 → 0.12.50
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 +1 -1
- package/themes/original/src/components/ActiveOrders/index.tsx +19 -0
- package/themes/original/src/components/ActiveOrders/styles.tsx +5 -0
- package/themes/original/src/components/BusinessController/styles.tsx +5 -5
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +16 -16
- package/themes/original/src/components/BusinessTypeFilter/styles.tsx +1 -0
- package/themes/original/src/components/BusinessesListing/index.tsx +8 -9
- package/themes/original/src/components/BusinessesListing/styles.tsx +1 -0
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
OrderInformation,
|
|
11
11
|
BusinessInformation,
|
|
12
12
|
Price,
|
|
13
|
+
LoadMore
|
|
13
14
|
} from './styles';
|
|
14
15
|
import { View, StyleSheet } from 'react-native';
|
|
15
16
|
import { getGoogleMapImage } from '../../utils';
|
|
@@ -113,6 +114,18 @@ export const ActiveOrders = (props: ActiveOrdersParams) => {
|
|
|
113
114
|
orders.map((order: any, index: any) => (
|
|
114
115
|
<Order key={order?.id || order?.uuid} order={order} index={index} />
|
|
115
116
|
))}
|
|
117
|
+
{pagination?.totalPages && pagination?.currentPage < pagination?.totalPages && (
|
|
118
|
+
<LoadMore>
|
|
119
|
+
<OButton
|
|
120
|
+
bgColor={theme.colors.white}
|
|
121
|
+
textStyle={{ color: theme.colors.primary, fontSize: 14 }}
|
|
122
|
+
text={t('LOAD_MORE_ORDERS', 'Load more orders')}
|
|
123
|
+
borderColor={theme.colors.primary}
|
|
124
|
+
onClick={loadMoreOrders}
|
|
125
|
+
style={styles.loadMoreButton}
|
|
126
|
+
/>
|
|
127
|
+
</LoadMore>
|
|
128
|
+
)}
|
|
116
129
|
</ActiveOrdersContainer>
|
|
117
130
|
<View
|
|
118
131
|
style={{
|
|
@@ -140,4 +153,10 @@ const styles = StyleSheet.create({
|
|
|
140
153
|
alignItems: 'center',
|
|
141
154
|
minWidth: 230,
|
|
142
155
|
},
|
|
156
|
+
loadMoreButton: {
|
|
157
|
+
width: 200,
|
|
158
|
+
height: 46,
|
|
159
|
+
marginLeft: 'auto',
|
|
160
|
+
marginRight: 'auto',
|
|
161
|
+
},
|
|
143
162
|
});
|
|
@@ -3,9 +3,9 @@ import styled, { css } from 'styled-components/native';
|
|
|
3
3
|
export const Card = styled.TouchableOpacity`
|
|
4
4
|
margin-vertical: 20px;
|
|
5
5
|
border-radius: 7.6px;
|
|
6
|
-
flex: 1;
|
|
7
6
|
width: 100%;
|
|
8
|
-
|
|
7
|
+
position: relative;
|
|
8
|
+
`
|
|
9
9
|
|
|
10
10
|
export const BusinessHero = styled.View`
|
|
11
11
|
position: relative;
|
|
@@ -40,9 +40,9 @@ export const Metadata = styled.View`
|
|
|
40
40
|
`;
|
|
41
41
|
|
|
42
42
|
export const BusinessState = styled.View`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 13px;
|
|
45
|
+
end: 18px;
|
|
46
46
|
`
|
|
47
47
|
|
|
48
48
|
export const BusinessLogo = styled.View`
|
|
@@ -29,7 +29,7 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
|
|
|
29
29
|
const [, t] = useLanguage();
|
|
30
30
|
|
|
31
31
|
const theme = useTheme();
|
|
32
|
-
|
|
32
|
+
const [isOpenAllCategories, setIsOpenAllCategories] = useState(false)
|
|
33
33
|
|
|
34
34
|
const renderTypes = ({ item }: any) => {
|
|
35
35
|
return (
|
|
@@ -110,17 +110,17 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
|
|
|
110
110
|
entireModal
|
|
111
111
|
>
|
|
112
112
|
<ScrollView style={styles.allCategoriesContainer}>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
113
|
+
<OText
|
|
114
|
+
size={20}
|
|
115
|
+
mBottom={30}
|
|
116
|
+
color={theme.colors.textSecondary}
|
|
117
|
+
style={{ paddingHorizontal: 10 }}
|
|
118
|
+
>
|
|
119
|
+
{t('ALL_CATEGORIES', 'All categories')}
|
|
120
|
+
</OText>
|
|
121
|
+
<View style={styles.allCategoriesWrapper}>
|
|
122
|
+
{typesState?.types.map((item: any) => (
|
|
123
|
+
<TouchableOpacity
|
|
124
124
|
key={item.id}
|
|
125
125
|
style={styles.categoryStyle}
|
|
126
126
|
onPress={() => {
|
|
@@ -149,9 +149,9 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
|
|
|
149
149
|
{t(`BUSINESS_TYPE_${item.name.replace(/\s/g, '_').toUpperCase()}`, item.name)}
|
|
150
150
|
</OText>
|
|
151
151
|
</TouchableOpacity>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
))}
|
|
153
|
+
</View>
|
|
154
|
+
</ScrollView>
|
|
155
155
|
</OModal>
|
|
156
156
|
</>
|
|
157
157
|
);
|
|
@@ -178,7 +178,7 @@ const styles = StyleSheet.create({
|
|
|
178
178
|
marginHorizontal: 10,
|
|
179
179
|
marginBottom: 40
|
|
180
180
|
},
|
|
181
|
-
allCategoriesContainer
|
|
181
|
+
allCategoriesContainer: {
|
|
182
182
|
paddingHorizontal: 30,
|
|
183
183
|
paddingVertical: 30
|
|
184
184
|
},
|
|
@@ -281,15 +281,14 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
281
281
|
/>
|
|
282
282
|
)}
|
|
283
283
|
{businessesList.businesses?.map(
|
|
284
|
-
(business: any) =>
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
),
|
|
284
|
+
(business: any) => (
|
|
285
|
+
<BusinessController
|
|
286
|
+
key={business.id}
|
|
287
|
+
business={business}
|
|
288
|
+
handleCustomClick={handleBusinessClick}
|
|
289
|
+
orderType={orderState?.options?.type}
|
|
290
|
+
/>
|
|
291
|
+
)
|
|
293
292
|
)}
|
|
294
293
|
{businessesList.loading && (
|
|
295
294
|
<>
|