ordering-ui-react-native 0.21.52 → 0.21.53-release
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 +8 -8
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/PaymentOptionsWebView/index.tsx +1 -0
- package/src/components/StripeMethodForm/index.tsx +6 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/types/index.tsx +3 -1
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +4 -3
- package/themes/business/src/components/BusinessProductList/ProductList.tsx +72 -27
- package/themes/business/src/components/BusinessProductList/index.tsx +57 -25
- package/themes/business/src/components/DriverMap/index.tsx +36 -23
- package/themes/business/src/components/GoogleMap/index.tsx +15 -8
- package/themes/business/src/components/Home/index.tsx +5 -1
- package/themes/business/src/components/LanguageSelector/index.tsx +1 -2
- package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/MapView/index.tsx +30 -15
- package/themes/business/src/components/NewOrderNotification/index.tsx +66 -26
- package/themes/business/src/components/OrderDetails/Business.tsx +52 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +42 -23
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +68 -61
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +36 -22
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
- package/themes/business/src/components/OrderSummary/index.tsx +240 -76
- package/themes/business/src/components/OrdersOption/index.tsx +245 -112
- package/themes/business/src/components/PhoneInputNumber/index.tsx +8 -5
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +29 -19
- package/themes/business/src/components/PreviousOrders/index.tsx +5 -3
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/PrinterEdition/index.tsx +363 -0
- package/themes/business/src/components/PrinterEdition/styles.tsx +61 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +267 -0
- package/themes/business/src/components/PrinterSettings/styles.tsx +30 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/SearchBar/index.tsx +2 -1
- package/themes/business/src/components/Sessions/index.tsx +187 -0
- package/themes/business/src/components/Sessions/styles.tsx +20 -0
- package/themes/business/src/components/StoresList/index.tsx +4 -3
- package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
- package/themes/business/src/components/UserProfileForm/index.tsx +106 -54
- package/themes/business/src/components/WebsocketStatus/index.tsx +2 -2
- package/themes/business/src/components/shared/OInput.tsx +2 -0
- package/themes/business/src/components/shared/OTextarea.tsx +8 -9
- package/themes/business/src/hooks/useLocation.tsx +5 -4
- package/themes/business/src/types/index.tsx +22 -5
- package/themes/business/src/utils/index.tsx +5 -0
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +6 -2
- package/themes/original/src/components/AddressDetails/index.tsx +20 -10
- package/themes/original/src/components/AddressForm/index.tsx +32 -17
- package/themes/original/src/components/AddressList/index.tsx +8 -7
- package/themes/original/src/components/AnalyticsSegment/index.tsx +6 -6
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +6 -9
- package/themes/original/src/components/BusinessController/index.tsx +18 -10
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +15 -7
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +316 -0
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +94 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +48 -359
- package/themes/original/src/components/BusinessPreorder/index.tsx +20 -16
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +5 -5
- package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +29 -14
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +9 -8
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +2 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +26 -9
- package/themes/original/src/components/CartContent/index.tsx +60 -45
- package/themes/original/src/components/Checkout/index.tsx +106 -64
- package/themes/original/src/components/CitiesControl/index.tsx +0 -3
- package/themes/original/src/components/CouponControl/index.tsx +1 -3
- package/themes/original/src/components/DatePicker/index.tsx +18 -2
- package/themes/original/src/components/DriverTips/index.tsx +1 -3
- package/themes/original/src/components/Favorite/index.tsx +1 -5
- package/themes/original/src/components/FavoriteList/index.tsx +0 -1
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +5 -7
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/index.tsx +64 -0
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +15 -17
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +3 -7
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +24 -32
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +9 -11
- package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
- package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +82 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
- package/themes/original/src/components/GoogleMap/index.tsx +39 -18
- package/themes/original/src/components/Help/index.tsx +2 -0
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
- package/themes/original/src/components/Home/index.tsx +2 -10
- package/themes/original/src/components/LoginForm/Otp/index.tsx +4 -19
- package/themes/original/src/components/LoginForm/index.tsx +4 -7
- package/themes/original/src/components/MessageListing/index.tsx +1 -0
- package/themes/original/src/components/Messages/index.tsx +8 -7
- package/themes/original/src/components/MomentOption/index.tsx +13 -2
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +7 -3
- package/themes/original/src/components/MultiCheckout/index.tsx +124 -63
- package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -14
- package/themes/original/src/components/MyOrders/index.tsx +21 -26
- package/themes/original/src/components/NavBar/index.tsx +4 -2
- package/themes/original/src/components/NetworkError/index.tsx +2 -8
- package/themes/original/src/components/NotFoundSource/index.tsx +0 -3
- package/themes/original/src/components/Notifications/index.tsx +2 -4
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +5 -7
- package/themes/original/src/components/OrderDetails/index.tsx +5 -7
- package/themes/original/src/components/OrderDetails/styles.tsx +0 -1
- package/themes/original/src/components/OrderProgress/index.tsx +22 -3
- package/themes/original/src/components/OrderTypeSelector/index.tsx +7 -6
- package/themes/original/src/components/OrdersOption/index.tsx +2 -4
- package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
- package/themes/original/src/components/PaymentOptionStripe/index.tsx +0 -5
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +47 -6
- package/themes/original/src/components/PlaceSpot/index.tsx +1 -3
- package/themes/original/src/components/PreviousOrders/index.tsx +1 -2
- package/themes/original/src/components/ProductForm/ActionButton.tsx +16 -19
- package/themes/original/src/components/ProductForm/index.tsx +123 -112
- package/themes/original/src/components/ProductItemAccordion/index.tsx +55 -49
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +112 -91
- package/themes/original/src/components/ProfessionalProfile/index.tsx +4 -5
- package/themes/original/src/components/Promotions/index.tsx +6 -9
- package/themes/original/src/components/ReviewDriver/index.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/index.tsx +2 -2
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
- package/themes/original/src/components/ReviewTrigger/index.tsx +2 -2
- package/themes/original/src/components/ServiceForm/index.tsx +52 -54
- package/themes/original/src/components/Sessions/index.tsx +3 -3
- package/themes/original/src/components/SignupForm/index.tsx +65 -67
- package/themes/original/src/components/SingleOrderCard/index.tsx +1 -2
- package/themes/original/src/components/SingleProductCard/index.tsx +5 -6
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardForm/index.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +12 -35
- package/themes/original/src/components/StripeElementsForm/index.tsx +78 -59
- package/themes/original/src/components/StripeElementsForm/naked.tsx +48 -1
- package/themes/original/src/components/StripeRedirectForm/index.tsx +0 -3
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +10 -7
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +8 -3
- package/themes/original/src/components/UserFormDetails/index.tsx +88 -91
- package/themes/original/src/components/UserFormDetails/styles.tsx +7 -0
- package/themes/original/src/components/UserProfile/index.tsx +11 -2
- package/themes/original/src/components/Wallets/index.tsx +7 -4
- package/themes/original/src/components/Wallets/styles.tsx +1 -1
- package/themes/original/src/components/WebsocketStatus/index.tsx +169 -0
- package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/original/src/components/shared/OAlert.tsx +2 -1
- package/themes/original/src/components/shared/OButton.tsx +8 -7
- package/themes/original/src/components/shared/OInput.tsx +1 -4
- package/themes/original/src/layouts/Container.tsx +4 -2
- package/themes/original/src/types/index.tsx +5 -1
- package/themes/original/src/utils/index.tsx +12 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -30,7 +30,6 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
30
30
|
isBusinessMarker,
|
|
31
31
|
isToFollow,
|
|
32
32
|
handleViewActionOrder,
|
|
33
|
-
updateDriverPosition,
|
|
34
33
|
driverUpdateLocation,
|
|
35
34
|
setDriverUpdateLocation,
|
|
36
35
|
} = props;
|
|
@@ -59,6 +58,7 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
59
58
|
key?: string | null;
|
|
60
59
|
}>({ open: false, content: [], key: null });
|
|
61
60
|
const distanceUnit = configState?.configs?.distance_unit?.value
|
|
61
|
+
const isHideRejectButtons = configState?.configs?.reject_orders_enabled && configState?.configs?.reject_orders_enabled?.value !== '1'
|
|
62
62
|
|
|
63
63
|
const {
|
|
64
64
|
hasLocation,
|
|
@@ -69,11 +69,20 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
69
69
|
stopFollowUserLocation,
|
|
70
70
|
} = useLocation();
|
|
71
71
|
|
|
72
|
-
const
|
|
73
|
-
latitude:
|
|
74
|
-
longitude:
|
|
72
|
+
const destination = {
|
|
73
|
+
latitude: typeof location?.lat === 'string' ? parseFloat(location?.lat) || 0 : location?.lat || 0,
|
|
74
|
+
longitude: typeof location?.lng === 'string' ? parseFloat(location?.lng) || 0 : location?.lng || 0
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
|
|
77
|
+
const parsedInitialPosition = {
|
|
78
|
+
latitude: typeof initialPosition.latitude === 'string' ? parseFloat(initialPosition.latitude) || 0 : initialPosition.latitude || 0,
|
|
79
|
+
longitude: typeof initialPosition.longitude === 'string' ? parseFloat(initialPosition.longitude) || 0 : initialPosition.longitude || 0,
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const parsedUserLocation = {
|
|
83
|
+
latitude: typeof userLocation?.latitude === 'string' ? parseFloat(userLocation?.latitude) || 0 : userLocation?.latitude || 0,
|
|
84
|
+
longitude: typeof userLocation?.longitude === 'string' ? parseFloat(userLocation?.longitude) || 0 : userLocation?.longitude || 0
|
|
85
|
+
}
|
|
77
86
|
|
|
78
87
|
useEffect(() => {
|
|
79
88
|
if (isToFollow) {
|
|
@@ -161,7 +170,7 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
161
170
|
if (driverUpdateLocation.error) return;
|
|
162
171
|
|
|
163
172
|
calculateDistance(
|
|
164
|
-
{ lat:
|
|
173
|
+
{ lat: parsedUserLocation.latitude, lng: parsedUserLocation.longitude },
|
|
165
174
|
destination,
|
|
166
175
|
);
|
|
167
176
|
// geocodePosition(userLocation);
|
|
@@ -169,13 +178,13 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
169
178
|
if (!following.current) return;
|
|
170
179
|
fitCoordinates();
|
|
171
180
|
|
|
172
|
-
const { latitude, longitude } =
|
|
181
|
+
const { latitude, longitude } = parsedUserLocation;
|
|
173
182
|
|
|
174
183
|
mapRef.current?.animateCamera({
|
|
175
184
|
center: { latitude, longitude },
|
|
176
185
|
});
|
|
177
186
|
|
|
178
|
-
}, [
|
|
187
|
+
}, [parsedUserLocation]);
|
|
179
188
|
|
|
180
189
|
const handleArrowBack: any = () => {
|
|
181
190
|
setDriverUpdateLocation?.({
|
|
@@ -241,8 +250,8 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
241
250
|
[
|
|
242
251
|
{ latitude: location.lat, longitude: location.lng },
|
|
243
252
|
{
|
|
244
|
-
latitude:
|
|
245
|
-
longitude:
|
|
253
|
+
latitude: parsedInitialPosition.latitude,
|
|
254
|
+
longitude: parsedInitialPosition.longitude,
|
|
246
255
|
},
|
|
247
256
|
],
|
|
248
257
|
{
|
|
@@ -255,7 +264,7 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
255
264
|
|
|
256
265
|
useEffect(() => {
|
|
257
266
|
const interval = setInterval(() => {
|
|
258
|
-
if (
|
|
267
|
+
if (parsedInitialPosition.latitude !== 0 && autoFit.current) {
|
|
259
268
|
if (mapRef.current) {
|
|
260
269
|
fitCoordinates();
|
|
261
270
|
autoFit.current = false;
|
|
@@ -263,7 +272,7 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
263
272
|
}
|
|
264
273
|
}, 1000);
|
|
265
274
|
return () => clearInterval(interval);
|
|
266
|
-
}, [
|
|
275
|
+
}, [parsedInitialPosition]);
|
|
267
276
|
|
|
268
277
|
const fitCoordinatesZoom = () => {
|
|
269
278
|
following.current = false;
|
|
@@ -346,8 +355,8 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
346
355
|
ref={mapRef}
|
|
347
356
|
provider={PROVIDER_GOOGLE}
|
|
348
357
|
initialRegion={{
|
|
349
|
-
latitude:
|
|
350
|
-
longitude:
|
|
358
|
+
latitude: parsedInitialPosition.latitude,
|
|
359
|
+
longitude: parsedInitialPosition.longitude,
|
|
351
360
|
latitudeDelta: 0.001,
|
|
352
361
|
longitudeDelta: 0.001 * ASPECT_RATIO,
|
|
353
362
|
}}
|
|
@@ -369,8 +378,8 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
369
378
|
<>
|
|
370
379
|
<Marker
|
|
371
380
|
coordinate={{
|
|
372
|
-
latitude:
|
|
373
|
-
longitude:
|
|
381
|
+
latitude: typeof destination?.latitude !== 'object' ? destination?.latitude : 0,
|
|
382
|
+
longitude: typeof destination?.longitude !== 'object' ? destination?.latitude : 0
|
|
374
383
|
}}
|
|
375
384
|
title={location.title}>
|
|
376
385
|
<Icon
|
|
@@ -381,13 +390,16 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
381
390
|
<View style={styles.view}>
|
|
382
391
|
<OIcon
|
|
383
392
|
style={styles.image}
|
|
384
|
-
|
|
393
|
+
src={typeof location.icon === 'number' ? location.icon : { uri: location.icon }}
|
|
385
394
|
width={25}
|
|
386
395
|
height={25}
|
|
387
396
|
/>
|
|
388
397
|
</View>
|
|
389
398
|
</Marker>
|
|
390
|
-
<Marker coordinate={
|
|
399
|
+
<Marker coordinate={{
|
|
400
|
+
latitude: typeof parsedUserLocation?.latitude !== 'object' ? parsedUserLocation?.latitude : 0,
|
|
401
|
+
longitude: typeof parsedUserLocation?.longitude !== 'object' ? parsedUserLocation?.latitude : 0
|
|
402
|
+
}}>
|
|
391
403
|
<View style={styles.driverIcon}>
|
|
392
404
|
<OIcon
|
|
393
405
|
style={styles.image}
|
|
@@ -401,8 +413,8 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
401
413
|
) : (
|
|
402
414
|
<Marker
|
|
403
415
|
coordinate={{
|
|
404
|
-
latitude:
|
|
405
|
-
longitude:
|
|
416
|
+
latitude: typeof parsedUserLocation?.latitude !== 'object' ? parsedUserLocation?.latitude : 0,
|
|
417
|
+
longitude: typeof parsedUserLocation?.longitude !== 'object' ? parsedUserLocation?.latitude : 0
|
|
406
418
|
}}
|
|
407
419
|
title={markerTitle || t('YOUR_LOCATION', 'Your Location')}
|
|
408
420
|
/>
|
|
@@ -516,8 +528,8 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
516
528
|
options={{
|
|
517
529
|
latitude: destination.latitude,
|
|
518
530
|
longitude: destination.longitude,
|
|
519
|
-
sourceLatitude:
|
|
520
|
-
sourceLongitude:
|
|
531
|
+
sourceLatitude: parsedUserLocation.latitude,
|
|
532
|
+
sourceLongitude: parsedUserLocation.longitude,
|
|
521
533
|
naverCallerName: 'com.deliveryapp',
|
|
522
534
|
dialogTitle: t('SHOW_IN_OTHER_MAPS', 'Show in other maps'),
|
|
523
535
|
dialogMessage: t('WHAT_APP_WOULD_YOU_USE', 'What app would you like to use?'),
|
|
@@ -539,8 +551,9 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
539
551
|
secondButton={true}
|
|
540
552
|
firstColorCustom={theme.colors.red}
|
|
541
553
|
secondColorCustom={theme.colors.green}
|
|
542
|
-
widthButton={'45%'}
|
|
554
|
+
widthButton={isHideRejectButtons ? '100%' : '45%'}
|
|
543
555
|
isPadding
|
|
556
|
+
isHideRejectButtons={isHideRejectButtons}
|
|
544
557
|
/>
|
|
545
558
|
)}
|
|
546
559
|
|
|
@@ -50,12 +50,16 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
50
50
|
const ASPECT_RATIO = width / height;
|
|
51
51
|
const [isMapReady, setIsMapReady] = useState(false);
|
|
52
52
|
const [markerPosition, setMarkerPosition] = useState({
|
|
53
|
-
latitude: locations
|
|
54
|
-
|
|
53
|
+
latitude: locations
|
|
54
|
+
? typeof locations[locations.length - 1].lat === 'string' ? parseFloat(locations[locations.length - 1].lat) || 0 : locations[locations.length - 1].lat || 0
|
|
55
|
+
: typeof location?.lat === 'string' ? parseFloat(location?.lat) || 0 : location?.lat || 0,
|
|
56
|
+
longitude: locations
|
|
57
|
+
? typeof locations[locations.length - 1].lng === 'string' ? parseFloat(locations[locations.length - 1].lng) || 0 : locations[locations.length - 1].lng || 0
|
|
58
|
+
: typeof location?.lng === 'string' ? parseFloat(location?.lng) || 0 : location?.lng || 0,
|
|
55
59
|
});
|
|
56
60
|
const [region, setRegion] = useState({
|
|
57
|
-
latitude: location
|
|
58
|
-
longitude: location
|
|
61
|
+
latitude: typeof location?.lat === 'string' ? parseFloat(location?.lat) || 0 : location?.lat || 0,
|
|
62
|
+
longitude: typeof location?.lng === 'string' ? parseFloat(location?.lng) || 0 : location?.lng || 0,
|
|
59
63
|
latitudeDelta: 0.001,
|
|
60
64
|
longitudeDelta: 0.001 * ASPECT_RATIO,
|
|
61
65
|
});
|
|
@@ -78,12 +82,15 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
78
82
|
let MARKERS =
|
|
79
83
|
locations &&
|
|
80
84
|
locations.map((location: { lat: number; lng: number; level: number }) => {
|
|
81
|
-
return location.level === 4 && driverLocation?.lat
|
|
85
|
+
return location.level === 4 && driverLocation?.lat && driverLocation?.lng
|
|
82
86
|
? {
|
|
83
|
-
latitude: driverLocation?.lat,
|
|
84
|
-
longitude: driverLocation?.lng,
|
|
87
|
+
latitude: typeof driverLocation?.lat === 'string' ? parseFloat(driverLocation?.lat) || 0 : driverLocation?.lat,
|
|
88
|
+
longitude: typeof driverLocation?.lng === 'string' ? parseFloat(driverLocation?.lng) || 0 : driverLocation?.lng,
|
|
85
89
|
}
|
|
86
|
-
: {
|
|
90
|
+
: {
|
|
91
|
+
latitude: typeof location?.lat === 'string' ? parseFloat(location?.lat) || 0 : location?.lat,
|
|
92
|
+
longitude: typeof location?.lng === 'string' ? parseFloat(location?.lng) || 0 : location?.lng
|
|
93
|
+
};
|
|
87
94
|
});
|
|
88
95
|
|
|
89
96
|
const handleArrowBack: any = () => {
|
|
@@ -138,7 +138,10 @@ export const Home = (props: any) => {
|
|
|
138
138
|
placeholder={t('PROJECT_NAME', 'Project Name')}
|
|
139
139
|
icon={theme.images.general.project}
|
|
140
140
|
iconColor={theme.colors.arrowColor}
|
|
141
|
-
onChange={(e: any) =>
|
|
141
|
+
onChange={(e: any) => {
|
|
142
|
+
const project = e?.target?.value?.replace(/\s/g, '')
|
|
143
|
+
onChange(project)
|
|
144
|
+
}}
|
|
142
145
|
selectionColor={theme.colors.primary}
|
|
143
146
|
color={theme.colors.white}
|
|
144
147
|
value={value}
|
|
@@ -148,6 +151,7 @@ export const Home = (props: any) => {
|
|
|
148
151
|
autoCapitalize='none'
|
|
149
152
|
blurOnSubmit={false}
|
|
150
153
|
onSubmitEditing={() => handleSubmit(onSubmit)()}
|
|
154
|
+
isValueSync
|
|
151
155
|
/>
|
|
152
156
|
)}
|
|
153
157
|
/>
|
|
@@ -25,8 +25,7 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
25
25
|
value: language?.code,
|
|
26
26
|
label: language?.name,
|
|
27
27
|
inputLabel: language?.code.toUpperCase(),
|
|
28
|
-
countryCode: langCountries.find(item => item.value == language?.code)
|
|
29
|
-
?.countryCode,
|
|
28
|
+
countryCode: langCountries.find(item => item.value == language?.code)?.countryCode,
|
|
30
29
|
};
|
|
31
30
|
});
|
|
32
31
|
|