ordering-ui-react-native 0.23.96 → 0.23.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 +1 -1
- package/themes/original/index.tsx +214 -218
- package/themes/original/src/components/Help/functions.tsx +76 -0
- package/themes/original/src/components/Help/index.tsx +74 -29
- package/themes/original/src/components/Help/styles.tsx +4 -1
- package/themes/original/src/components/HelpOptions/index.tsx +44 -0
- package/themes/original/src/components/NotFoundSource/index.tsx +40 -39
- package/themes/original/src/components/NotFoundSource/styles.tsx +18 -9
- package/themes/original/src/types/index.tsx +699 -699
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +0 -62
- package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +0 -12
- package/themes/original/src/components/HelpGuide/index.tsx +0 -68
- package/themes/original/src/components/HelpGuide/styles.tsx +0 -12
- package/themes/original/src/components/HelpOrder/index.tsx +0 -71
- package/themes/original/src/components/HelpOrder/styles.tsx +0 -13
package/package.json
CHANGED
|
@@ -35,9 +35,7 @@ import { MessageListing } from './src/components/MessageListing';
|
|
|
35
35
|
import { Messages } from './src/components/Messages';
|
|
36
36
|
import { MyOrders } from './src/components/MyOrders';
|
|
37
37
|
import { Help } from './src/components/Help';
|
|
38
|
-
import {
|
|
39
|
-
import { HelpGuide } from './src/components/HelpGuide';
|
|
40
|
-
import { HelpOrder } from './src/components/HelpOrder';
|
|
38
|
+
import { HelpOptions } from './src/components/HelpOptions';
|
|
41
39
|
import { NetworkError } from './src/components/NetworkError';
|
|
42
40
|
import { NotFoundSource } from './src/components/NotFoundSource';
|
|
43
41
|
import { OrderTypeSelector } from './src/components/OrderTypeSelector';
|
|
@@ -113,49 +111,49 @@ import { orderTypeList, getTraduction, verifyDecimals, getOrderStatus, getOrderS
|
|
|
113
111
|
import Alert from './src/providers/AlertProvider'
|
|
114
112
|
|
|
115
113
|
import {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
114
|
+
LoginParams,
|
|
115
|
+
ProfileParams,
|
|
116
|
+
AddressListParams,
|
|
117
|
+
AddressFormParams,
|
|
118
|
+
SignupParams,
|
|
119
|
+
PhoneInputParams,
|
|
120
|
+
LanguageSelectorParams,
|
|
121
|
+
BusinessesListingParams,
|
|
122
|
+
HighestRatedBusinessesParams,
|
|
123
|
+
BusinessTypeFilterParams,
|
|
124
|
+
BusinessControllerParams,
|
|
125
|
+
BusinessProductsListingParams,
|
|
126
|
+
BusinessBasicInformationParams,
|
|
127
|
+
BusinessProductsCategoriesParams,
|
|
128
|
+
BusinessProductsListParams,
|
|
129
|
+
SingleProductCardParams,
|
|
130
|
+
BusinessInformationParams,
|
|
131
|
+
BusinessReviewsParams,
|
|
132
|
+
SearchBarParams,
|
|
133
|
+
NotFoundSourceParams,
|
|
134
|
+
OrdersOptionParams,
|
|
135
|
+
ActiveOrdersParams,
|
|
136
|
+
PreviousOrdersParams,
|
|
137
|
+
OrderDetailsParams,
|
|
138
|
+
ReviewDriverParams
|
|
141
139
|
} from './src/types';
|
|
142
140
|
|
|
143
141
|
import { Toast } from './src/components/shared/OToast';
|
|
144
142
|
import {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
143
|
+
OText,
|
|
144
|
+
OButton,
|
|
145
|
+
OInput,
|
|
146
|
+
ODropDown,
|
|
147
|
+
OIcon,
|
|
148
|
+
OIconText,
|
|
149
|
+
OIconButton,
|
|
150
|
+
OTextarea,
|
|
151
|
+
OToggle,
|
|
152
|
+
OKeyButton,
|
|
153
|
+
OAlert,
|
|
154
|
+
OModal,
|
|
155
|
+
OBottomPopup,
|
|
156
|
+
HeaderTitle
|
|
159
157
|
} from './src/components/shared';
|
|
160
158
|
|
|
161
159
|
import { Container } from './src/layouts/Container';
|
|
@@ -163,198 +161,196 @@ import { SafeAreaContainer } from './src/layouts/SafeAreaContainer';
|
|
|
163
161
|
import { FloatingBottomContainer } from './src/layouts/FloatingBottomContainer';
|
|
164
162
|
|
|
165
163
|
import {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
164
|
+
_retrieveStoreData,
|
|
165
|
+
_setStoreData,
|
|
166
|
+
_removeStoreData,
|
|
167
|
+
_clearStoreData
|
|
170
168
|
} from './src/providers/StoreUtil';
|
|
171
169
|
|
|
172
170
|
export {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
171
|
+
AddressForm,
|
|
172
|
+
AddressDetails,
|
|
173
|
+
AnalyticsSegment,
|
|
174
|
+
Home as HomeView,
|
|
175
|
+
SignupForm,
|
|
176
|
+
LoginForm,
|
|
177
|
+
ActiveOrders,
|
|
178
|
+
AddressList,
|
|
179
|
+
AppleLogin,
|
|
180
|
+
BusinessesListing,
|
|
181
|
+
BusinessProductsListing,
|
|
182
|
+
CartContent,
|
|
183
|
+
BusinessCart,
|
|
184
|
+
Checkout,
|
|
185
|
+
Favorite,
|
|
186
|
+
FavoriteList,
|
|
189
187
|
GPSButton,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
ProductOption,
|
|
263
|
-
ProductOptionSubOption,
|
|
188
|
+
ForgotPasswordForm,
|
|
189
|
+
MomentOption,
|
|
190
|
+
OrdersOption,
|
|
191
|
+
OrderDetails,
|
|
192
|
+
OrderProgress,
|
|
193
|
+
BusinessPreorder,
|
|
194
|
+
NotificationsList,
|
|
195
|
+
UserProfileForm,
|
|
196
|
+
ReviewOrder,
|
|
197
|
+
ReviewProducts,
|
|
198
|
+
ReviewDriver,
|
|
199
|
+
BusinessMenuList,
|
|
200
|
+
UserProfile,
|
|
201
|
+
MessageListing,
|
|
202
|
+
Messages,
|
|
203
|
+
Help,
|
|
204
|
+
HelpOptions,
|
|
205
|
+
MultiCheckout,
|
|
206
|
+
MultiOrdersDetails,
|
|
207
|
+
NetworkError,
|
|
208
|
+
NotFoundSource,
|
|
209
|
+
OrderTypeSelector,
|
|
210
|
+
Wallets,
|
|
211
|
+
PaymentOptionWallet,
|
|
212
|
+
ProductForm,
|
|
213
|
+
UpsellingProducts,
|
|
214
|
+
UserVerification,
|
|
215
|
+
BusinessListingSearch,
|
|
216
|
+
BusinessBasicInformation,
|
|
217
|
+
BusinessProductsCategories,
|
|
218
|
+
BusinessProductsList,
|
|
219
|
+
FloatingButton,
|
|
220
|
+
SearchBar,
|
|
221
|
+
LastOrders,
|
|
222
|
+
BusinessTypeFilter,
|
|
223
|
+
BusinessController,
|
|
224
|
+
BusinessFeaturedController,
|
|
225
|
+
HighestRatedBusinesses,
|
|
226
|
+
PaymentOptions,
|
|
227
|
+
DriverTips,
|
|
228
|
+
UserDetails,
|
|
229
|
+
OrderSummary,
|
|
230
|
+
OrderItAgain,
|
|
231
|
+
CartStoresListing,
|
|
232
|
+
PaymentOptionsWebView,
|
|
233
|
+
GoogleMap,
|
|
234
|
+
SingleProductCard,
|
|
235
|
+
SingleOrderCard,
|
|
236
|
+
UpsellingRedirect,
|
|
237
|
+
ProductItemAccordion,
|
|
238
|
+
ScheduleAccordion,
|
|
239
|
+
BusinessItemAccordion,
|
|
240
|
+
CouponControl,
|
|
241
|
+
TaxInformation,
|
|
242
|
+
PlaceSpot,
|
|
243
|
+
ProfessionalFilter,
|
|
244
|
+
ServiceForm,
|
|
245
|
+
ProfessionalProfile,
|
|
246
|
+
MomentSelector,
|
|
247
|
+
Cart,
|
|
248
|
+
LanguageSelector,
|
|
249
|
+
PhoneInputNumber,
|
|
250
|
+
FacebookLogin,
|
|
251
|
+
VerifyPhone,
|
|
252
|
+
GoogleLogin,
|
|
253
|
+
PreviousOrders,
|
|
254
|
+
PaymentOptionCash,
|
|
255
|
+
StripeElementsForm,
|
|
256
|
+
StripeCardsList,
|
|
257
|
+
ProductIngredient,
|
|
258
|
+
ProductOption,
|
|
259
|
+
ProductOptionSubOption,
|
|
264
260
|
SendGiftCard,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
261
|
+
Sessions,
|
|
262
|
+
SingleProductReview,
|
|
263
|
+
LogoutButton,
|
|
264
|
+
UserFormDetailsUI,
|
|
265
|
+
WalletTransactionItem,
|
|
266
|
+
Promotions,
|
|
267
|
+
PageBanner,
|
|
268
|
+
MyOrders,
|
|
269
|
+
MultiCart,
|
|
270
|
+
WebsocketStatus,
|
|
271
|
+
ORDER_TYPES,
|
|
272
|
+
USER_TYPE,
|
|
277
273
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
274
|
+
OSBill,
|
|
275
|
+
OSTable,
|
|
276
|
+
OSCoupon,
|
|
277
|
+
OSTotal,
|
|
278
|
+
OSRow,
|
|
283
279
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
280
|
+
FormInput,
|
|
281
|
+
FormSide,
|
|
282
|
+
ButtonsWrapper,
|
|
283
|
+
LoginWith,
|
|
284
|
+
OTab,
|
|
285
|
+
OTabs,
|
|
290
286
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
287
|
+
OSItem,
|
|
288
|
+
OSItemContent,
|
|
289
|
+
OSItemActions,
|
|
294
290
|
|
|
295
|
-
|
|
291
|
+
Alert,
|
|
296
292
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
293
|
+
//Types
|
|
294
|
+
LoginParams,
|
|
295
|
+
ProfileParams,
|
|
296
|
+
AddressListParams,
|
|
297
|
+
AddressFormParams,
|
|
298
|
+
SignupParams,
|
|
299
|
+
PhoneInputParams,
|
|
300
|
+
LanguageSelectorParams,
|
|
301
|
+
BusinessesListingParams,
|
|
302
|
+
HighestRatedBusinessesParams,
|
|
303
|
+
BusinessTypeFilterParams,
|
|
304
|
+
BusinessControllerParams,
|
|
305
|
+
BusinessProductsListingParams,
|
|
306
|
+
BusinessBasicInformationParams,
|
|
307
|
+
BusinessProductsCategoriesParams,
|
|
308
|
+
BusinessProductsListParams,
|
|
309
|
+
SingleProductCardParams,
|
|
310
|
+
BusinessInformationParams,
|
|
311
|
+
BusinessReviewsParams,
|
|
312
|
+
SearchBarParams,
|
|
313
|
+
NotFoundSourceParams,
|
|
314
|
+
OrdersOptionParams,
|
|
315
|
+
ActiveOrdersParams,
|
|
316
|
+
PreviousOrdersParams,
|
|
317
|
+
OrderDetailsParams,
|
|
318
|
+
ReviewDriverParams,
|
|
323
319
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
320
|
+
// OComponents
|
|
321
|
+
Toast,
|
|
322
|
+
OText,
|
|
323
|
+
OButton,
|
|
324
|
+
OInput,
|
|
325
|
+
ODropDown,
|
|
326
|
+
OIcon,
|
|
327
|
+
OIconText,
|
|
328
|
+
OIconButton,
|
|
329
|
+
OTextarea,
|
|
330
|
+
OToggle,
|
|
331
|
+
OKeyButton,
|
|
332
|
+
OAlert,
|
|
333
|
+
OModal,
|
|
334
|
+
OBottomPopup,
|
|
335
|
+
HeaderTitle,
|
|
340
336
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
337
|
+
// layout
|
|
338
|
+
Container,
|
|
339
|
+
SafeAreaContainer,
|
|
340
|
+
FloatingBottomContainer,
|
|
341
|
+
NavBar,
|
|
346
342
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
343
|
+
// utils
|
|
344
|
+
_retrieveStoreData,
|
|
345
|
+
_setStoreData,
|
|
346
|
+
_removeStoreData,
|
|
347
|
+
_clearStoreData,
|
|
348
|
+
orderTypeList,
|
|
353
349
|
getTraduction,
|
|
354
350
|
verifyDecimals,
|
|
355
351
|
getOrderStatus,
|
|
356
352
|
getOrderStatuPickUp,
|
|
357
353
|
|
|
358
|
-
|
|
359
|
-
|
|
354
|
+
// Date Picker
|
|
355
|
+
DatePickerUI
|
|
360
356
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import { useApi } from 'ordering-components/native'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component to manage login behavior without UI component
|
|
7
|
+
*/
|
|
8
|
+
export const CmsContent = (props: any) => {
|
|
9
|
+
const { UIComponent } = props
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Array to save the body of the page
|
|
13
|
+
*/
|
|
14
|
+
const [ordering] = useApi()
|
|
15
|
+
const [cmsState, setCmsState] = useState({ items: [], pages: [], loading: true, error: null })
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Method used to get the page by slug
|
|
19
|
+
*/
|
|
20
|
+
const getPages = async () => {
|
|
21
|
+
setCmsState({ ...cmsState, loading: true })
|
|
22
|
+
try {
|
|
23
|
+
const propsToFetch = ['name', 'enabled']
|
|
24
|
+
let pages: any = []
|
|
25
|
+
const { content: { error, result } } = await ordering.pages().select(propsToFetch).get()
|
|
26
|
+
if (!error) {
|
|
27
|
+
const promises = result.map((item: any) => getPage(item.id));
|
|
28
|
+
pages = await Promise.all(promises)
|
|
29
|
+
}
|
|
30
|
+
setCmsState({
|
|
31
|
+
...cmsState,
|
|
32
|
+
loading: false,
|
|
33
|
+
error: error ? typeof result === 'string' ? result : result[0] : null,
|
|
34
|
+
items: error ? [] : result.filter((i: any) => i.enabled).map((item: any) => ({ id: item.id, name: item.name })),
|
|
35
|
+
pages
|
|
36
|
+
})
|
|
37
|
+
} catch (err: any) {
|
|
38
|
+
setCmsState({
|
|
39
|
+
...cmsState,
|
|
40
|
+
loading: false,
|
|
41
|
+
error: err?.message ?? err
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const getPage = async (id: number) => {
|
|
47
|
+
try {
|
|
48
|
+
const { content: { error, result } } = await ordering.pages(id).get()
|
|
49
|
+
return error ? null : { id, body: result?.body }
|
|
50
|
+
} catch {
|
|
51
|
+
return null
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
getPages()
|
|
57
|
+
}, [])
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<>
|
|
61
|
+
{UIComponent && (
|
|
62
|
+
<UIComponent
|
|
63
|
+
{...props}
|
|
64
|
+
cmsState={cmsState}
|
|
65
|
+
/>
|
|
66
|
+
)}
|
|
67
|
+
</>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
CmsContent.propTypes = {
|
|
72
|
+
/**
|
|
73
|
+
* UI Component, this must be containt all graphic elements and use parent props
|
|
74
|
+
*/
|
|
75
|
+
UIComponent: PropTypes.elementType
|
|
76
|
+
}
|
|
@@ -1,27 +1,48 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Platform, RefreshControl, View } from 'react-native'
|
|
3
|
+
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
|
|
4
|
+
import { useTheme } from 'styled-components/native'
|
|
5
5
|
import { useLanguage } from 'ordering-components/native'
|
|
6
|
+
|
|
7
|
+
import { HelpParams } from '../../types'
|
|
8
|
+
import { CmsContent } from './functions'
|
|
9
|
+
import { HelpSubItem, LastOrdersContainer } from './styles'
|
|
10
|
+
import { Container } from '../../layouts/Container'
|
|
11
|
+
|
|
12
|
+
import { OText, OIcon } from '../shared'
|
|
13
|
+
import { NotFoundSource } from '../NotFoundSource'
|
|
6
14
|
import NavBar from '../NavBar'
|
|
7
|
-
import { OText } from '../shared'
|
|
8
15
|
import { LastOrders } from '../LastOrders'
|
|
9
|
-
import { Container } from '../../layouts/Container'
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
17
|
+
const HelpUI = (props: HelpParams) => {
|
|
18
|
+
const { cmsState, navigation } = props
|
|
19
|
+
|
|
20
|
+
const { items, loading, error, pages } = cmsState
|
|
15
21
|
|
|
16
|
-
export const Help = (props: HelpParams) => {
|
|
17
|
-
const {
|
|
18
|
-
navigation
|
|
19
|
-
} = props
|
|
20
22
|
const [, t] = useLanguage()
|
|
21
23
|
const theme = useTheme()
|
|
22
|
-
|
|
24
|
+
|
|
25
|
+
const [refreshing] = useState(false)
|
|
23
26
|
const [refresh, setRefresh] = useState(false)
|
|
24
27
|
|
|
28
|
+
const HelpItem = ({ item }: any) => {
|
|
29
|
+
const currentItem = pages.find((p: any) => p.id === item.id)
|
|
30
|
+
return (
|
|
31
|
+
<HelpSubItem
|
|
32
|
+
activeOpacity={0.7}
|
|
33
|
+
onPress={() => onRedirect('HelpOptions', { item: currentItem })}
|
|
34
|
+
>
|
|
35
|
+
<OText size={14} style={{ width: '90%' }}>
|
|
36
|
+
{item.name}
|
|
37
|
+
</OText>
|
|
38
|
+
<OIcon
|
|
39
|
+
width={15}
|
|
40
|
+
src={theme.images.general.chevron_right}
|
|
41
|
+
/>
|
|
42
|
+
</HelpSubItem>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
25
46
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
26
47
|
const onRedirect = (route: string, params?: any) => {
|
|
27
48
|
navigation.navigate(route, params)
|
|
@@ -49,22 +70,36 @@ export const Help = (props: HelpParams) => {
|
|
|
49
70
|
showCall={false}
|
|
50
71
|
btnStyle={{ paddingLeft: 0 }}
|
|
51
72
|
/>
|
|
52
|
-
<
|
|
53
|
-
|
|
73
|
+
<OText
|
|
74
|
+
size={20}
|
|
75
|
+
weight={'bold'}
|
|
76
|
+
style={{ marginBottom: 20 }}
|
|
54
77
|
>
|
|
55
|
-
|
|
56
|
-
</
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
78
|
+
{t('ALL_THE_THEMES', 'All the themes')}
|
|
79
|
+
</OText>
|
|
80
|
+
{!loading && !error && items.map((item: any) => (
|
|
81
|
+
<HelpItem
|
|
82
|
+
key={item.id}
|
|
83
|
+
item={item}
|
|
84
|
+
/>
|
|
85
|
+
))}
|
|
86
|
+
{loading && (
|
|
87
|
+
<Placeholder Animation={Fade}>
|
|
88
|
+
<View style={{ flexDirection: 'column' }}>
|
|
89
|
+
{[...Array(5)].map((_, i) => (
|
|
90
|
+
<HelpSubItem key={i}>
|
|
91
|
+
<PlaceholderLine key={i} height={30} width={90} noMargin />
|
|
92
|
+
</HelpSubItem>
|
|
93
|
+
))}
|
|
94
|
+
</View>
|
|
95
|
+
</Placeholder>
|
|
96
|
+
)}
|
|
97
|
+
{!loading && !!error && (
|
|
98
|
+
<NotFoundSource
|
|
99
|
+
simple
|
|
100
|
+
content={error}
|
|
101
|
+
/>
|
|
102
|
+
)}
|
|
68
103
|
<LastOrdersContainer>
|
|
69
104
|
<OText size={18} weight={600}>{t('LAST_ORDERS', 'Last Orders')}</OText>
|
|
70
105
|
<LastOrders {...props} onRedirect={onRedirect} refresh={refresh} setRefresh={setRefresh} />
|
|
@@ -72,3 +107,13 @@ export const Help = (props: HelpParams) => {
|
|
|
72
107
|
</Container>
|
|
73
108
|
)
|
|
74
109
|
}
|
|
110
|
+
|
|
111
|
+
export const Help = (props: HelpParams) => {
|
|
112
|
+
const helpProps = {
|
|
113
|
+
...props,
|
|
114
|
+
UIComponent: HelpUI
|
|
115
|
+
}
|
|
116
|
+
return (
|
|
117
|
+
<CmsContent {...helpProps} />
|
|
118
|
+
)
|
|
119
|
+
}
|