ordering-ui-react-native 0.17.99 → 0.18.0-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 +9 -7
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessInformation/index.tsx +10 -9
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/OrderCreating/index.tsx +0 -20
- package/src/components/PaymentOptionsWebView/index.tsx +29 -8
- package/src/components/PhoneInputNumber/index.tsx +6 -2
- package/src/components/StripeMethodForm/index.tsx +136 -102
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OToast.tsx +3 -2
- package/src/types/index.tsx +5 -0
- package/src/utils/index.tsx +7 -2
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +36 -26
- package/themes/business/src/components/BusinessController/index.tsx +0 -1
- package/themes/business/src/components/Chat/index.tsx +163 -123
- package/themes/business/src/components/DriverMap/index.tsx +17 -6
- package/themes/business/src/components/DriverSchedule/index.tsx +45 -8
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- package/themes/business/src/components/GoogleMap/index.tsx +58 -57
- package/themes/business/src/components/LoginForm/index.tsx +5 -2
- package/themes/business/src/components/MapView/index.tsx +14 -10
- package/themes/business/src/components/MessagesOption/index.tsx +22 -94
- package/themes/business/src/components/NewOrderNotification/index.tsx +123 -96
- package/themes/business/src/components/NotFoundSource/index.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +209 -15
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +91 -43
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +87 -66
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +200 -0
- package/themes/business/src/components/OrderDetailsLogistic/styles.tsx +5 -0
- package/themes/business/src/components/OrderMessage/index.tsx +19 -18
- package/themes/business/src/components/OrderSummary/index.tsx +114 -123
- package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
- package/themes/business/src/components/OrdersListManager/utils.tsx +1 -1
- package/themes/business/src/components/OrdersOption/index.tsx +60 -47
- package/themes/business/src/components/PreviousMessages/FooterMessageComponent.tsx +103 -0
- package/themes/business/src/components/PreviousMessages/index.tsx +97 -55
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +21 -29
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +93 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/index.tsx +198 -221
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +7 -1
- package/themes/business/src/components/ReviewCustomer/index.tsx +18 -13
- package/themes/business/src/components/StoresList/index.tsx +3 -4
- package/themes/business/src/components/UserProfileForm/index.tsx +14 -15
- package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
- package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/business/src/components/shared/OModal.tsx +16 -9
- package/themes/business/src/types/index.tsx +24 -10
- package/themes/business/src/utils/index.tsx +29 -2
- 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/Intro/index.tsx +16 -1
- package/themes/kiosk/src/components/LoginForm/index.tsx +7 -5
- 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/PhoneInputNumber/index.tsx +2 -2
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +7 -3
- package/themes/original/src/components/AddressDetails/index.tsx +19 -3
- package/themes/original/src/components/AddressForm/index.tsx +33 -15
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +5 -8
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AnalyticsSegment/index.tsx +193 -10
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/AppleLogin/styles.tsx +3 -1
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +74 -38
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +11 -13
- package/themes/original/src/components/BusinessController/index.tsx +35 -44
- package/themes/original/src/components/BusinessController/styles.tsx +12 -5
- package/themes/original/src/components/BusinessFeaturedController/index.tsx +21 -54
- package/themes/original/src/components/BusinessFeaturedController/styles.tsx +8 -0
- package/themes/original/src/components/BusinessInformation/index.tsx +140 -85
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +25 -26
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +346 -341
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -19
- package/themes/original/src/components/BusinessPreorder/index.tsx +105 -22
- package/themes/original/src/components/BusinessPreorder/styles.tsx +14 -0
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -3
- package/themes/original/src/components/BusinessProductsList/index.tsx +15 -7
- package/themes/original/src/components/BusinessProductsList/styles.tsx +8 -3
- package/themes/original/src/components/BusinessProductsListing/UpsellingRedirect.tsx +1 -1
- package/themes/original/src/components/BusinessProductsListing/index.tsx +162 -39
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +4 -5
- package/themes/original/src/components/BusinessReviews/index.tsx +4 -2
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +37 -404
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +49 -47
- package/themes/original/src/components/CartContent/index.tsx +99 -38
- package/themes/original/src/components/CartContent/styles.tsx +6 -6
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +324 -43
- package/themes/original/src/components/Checkout/styles.tsx +17 -0
- package/themes/original/src/components/CitiesControl/index.tsx +1 -1
- package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
- package/themes/original/src/components/CouponControl/index.tsx +10 -3
- package/themes/original/src/components/DatePicker/index.tsx +17 -0
- package/themes/original/src/components/DatePicker/styles.tsx +20 -0
- package/themes/original/src/components/DriverTips/index.tsx +12 -4
- package/themes/original/src/components/FacebookLogin/styles.tsx +3 -1
- package/themes/original/src/components/Favorite/index.tsx +4 -9
- package/themes/original/src/components/Favorite/styles.tsx +0 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +7 -5
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +42 -5
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +3 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +84 -8
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GoogleLogin/styles.tsx +1 -1
- package/themes/original/src/components/GoogleMap/index.tsx +63 -7
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +14 -5
- package/themes/original/src/components/LastOrder/index.tsx +2 -1
- package/themes/original/src/components/LastOrders/index.tsx +2 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -25
- package/themes/original/src/components/LoginForm/index.tsx +64 -34
- package/themes/original/src/components/LottieAnimation/index.tsx +88 -63
- package/themes/original/src/components/MessageListing/index.tsx +9 -2
- package/themes/original/src/components/Messages/index.tsx +15 -4
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +44 -39
- package/themes/original/src/components/MomentSelector/index.tsx +1 -1
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +161 -49
- package/themes/original/src/components/MultiCheckout/index.tsx +348 -70
- package/themes/original/src/components/MultiCheckout/styles.tsx +3 -1
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +2 -2
- package/themes/original/src/components/MyOrders/index.tsx +16 -5
- package/themes/original/src/components/NavBar/index.tsx +20 -13
- package/themes/original/src/components/NetworkError/styles.tsx +2 -2
- package/themes/original/src/components/NotFoundSource/index.tsx +14 -10
- package/themes/original/src/components/Notifications/index.tsx +2 -4
- package/themes/original/src/components/Notifications/styles.tsx +0 -1
- package/themes/original/src/components/OrderDetails/OrderEta.tsx +76 -0
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +22 -6
- package/themes/original/src/components/OrderDetails/index.tsx +721 -670
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderItAgain/index.tsx +3 -1
- package/themes/original/src/components/OrderProgress/index.tsx +34 -25
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +62 -57
- package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +13 -13
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/index.tsx +44 -21
- package/themes/original/src/components/OrdersOption/styles.tsx +2 -2
- package/themes/original/src/components/PageBanner/index.tsx +65 -29
- package/themes/original/src/components/PageBanner/styles.tsx +0 -3
- package/themes/original/src/components/PaymentOptionCard/index.tsx +180 -0
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +100 -34
- package/themes/original/src/components/PhoneInputNumber/index.tsx +18 -4
- package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
- package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
- package/themes/original/src/components/ProductForm/index.tsx +106 -170
- package/themes/original/src/components/ProductForm/styles.tsx +3 -3
- package/themes/original/src/components/ProductItemAccordion/index.tsx +13 -6
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +49 -20
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +10 -9
- package/themes/original/src/components/ProfessionalProfile/index.tsx +35 -6
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
- package/themes/original/src/components/Promotions/index.tsx +6 -6
- package/themes/original/src/components/Promotions/styles.tsx +3 -3
- package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
- package/themes/original/src/components/ReviewProducts/index.tsx +16 -7
- package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
- package/themes/original/src/components/ScheduleAccordion/index.tsx +3 -3
- package/themes/original/src/components/ServiceForm/index.tsx +36 -24
- package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
- package/themes/original/src/components/SignupForm/index.tsx +27 -16
- package/themes/original/src/components/SingleOrderCard/index.tsx +44 -20
- package/themes/original/src/components/SingleOrderCard/styles.tsx +1 -1
- package/themes/original/src/components/SingleProductCard/index.tsx +13 -10
- package/themes/original/src/components/SingleProductCard/styles.tsx +8 -3
- package/themes/original/src/components/SingleProductReview/styles.tsx +1 -1
- package/themes/original/src/components/StripeCardsList/index.tsx +61 -5
- package/themes/original/src/components/StripeElementsForm/index.tsx +48 -34
- package/themes/original/src/components/StripeElementsForm/naked.tsx +12 -1
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
- package/themes/original/src/components/UpsellingProducts/index.tsx +16 -205
- package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
- package/themes/original/src/components/UserDetails/index.tsx +3 -1
- package/themes/original/src/components/UserFormDetails/index.tsx +100 -22
- package/themes/original/src/components/UserFormDetails/styles.tsx +1 -1
- package/themes/original/src/components/UserProfile/index.tsx +8 -26
- package/themes/original/src/components/UserProfileForm/index.tsx +30 -31
- package/themes/original/src/components/UserVerification/index.tsx +55 -50
- package/themes/original/src/components/WalletTransactionItem/index.tsx +2 -2
- package/themes/original/src/components/WalletTransactions/index.tsx +3 -3
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +48 -60
- package/themes/original/src/components/Wallets/styles.tsx +3 -4
- package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
- package/themes/original/src/components/shared/OButton.tsx +3 -3
- package/themes/original/src/components/shared/OInput.tsx +4 -5
- package/themes/original/src/components/shared/OModal.tsx +15 -17
- package/themes/original/src/layouts/Container.tsx +1 -1
- package/themes/original/src/types/index.tsx +28 -6
- package/themes/original/src/utils/index.tsx +180 -13
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
- package/src/navigators/BottomNavigator.tsx +0 -117
- package/src/navigators/CheckoutNavigator.tsx +0 -66
- package/src/navigators/HomeNavigator.tsx +0 -202
- package/src/navigators/NavigationRef.tsx +0 -7
- package/src/navigators/RootNavigator.tsx +0 -269
- package/src/pages/Account.tsx +0 -34
- package/src/pages/AddressForm.tsx +0 -62
- package/src/pages/AddressList.tsx +0 -24
- package/src/pages/BusinessProductsList.tsx +0 -81
- package/src/pages/BusinessesListing.tsx +0 -43
- package/src/pages/CartList.tsx +0 -49
- package/src/pages/Checkout.tsx +0 -101
- package/src/pages/ForgotPassword.tsx +0 -24
- package/src/pages/Help.tsx +0 -23
- package/src/pages/HelpAccountAndPayment.tsx +0 -23
- package/src/pages/HelpGuide.tsx +0 -23
- package/src/pages/HelpOrder.tsx +0 -23
- package/src/pages/Home.tsx +0 -36
- package/src/pages/IntroductoryTutorial.tsx +0 -170
- package/src/pages/Login.tsx +0 -47
- package/src/pages/MomentOption.tsx +0 -30
- package/src/pages/MultiCheckout.tsx +0 -31
- package/src/pages/MultiOrdersDetails.tsx +0 -27
- package/src/pages/MyOrders.tsx +0 -40
- package/src/pages/NetworkError.tsx +0 -24
- package/src/pages/NotFound.tsx +0 -22
- package/src/pages/OrderDetails.tsx +0 -25
- package/src/pages/ProductDetails.tsx +0 -55
- package/src/pages/Profile.tsx +0 -36
- package/src/pages/ReviewDriver.tsx +0 -30
- package/src/pages/ReviewOrder.tsx +0 -32
- package/src/pages/ReviewProducts.tsx +0 -30
- package/src/pages/Sessions.tsx +0 -22
- package/src/pages/Signup.tsx +0 -53
- package/src/pages/SpinnerLoader.tsx +0 -10
- package/src/pages/Splash.tsx +0 -21
|
@@ -288,38 +288,37 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
288
288
|
showCall={false}
|
|
289
289
|
btnStyle={{ paddingLeft: 0 }}
|
|
290
290
|
/>
|
|
291
|
-
<
|
|
292
|
-
<
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
onClick={() => handleImagePicker()}
|
|
313
|
-
/>
|
|
314
|
-
</CenterView>
|
|
315
|
-
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginVertical: 32, zIndex: 10 }} />
|
|
316
|
-
<Spinner visible={formState?.loading || verifyPhoneState?.loading} />
|
|
317
|
-
<UserFormDetailsUI
|
|
318
|
-
{...props}
|
|
319
|
-
isEdit
|
|
320
|
-
setWillVerifyOtpState={setWillVerifyOtpState}
|
|
291
|
+
<CenterView>
|
|
292
|
+
<View style={styles.photo}>
|
|
293
|
+
{user?.photo ? (
|
|
294
|
+
<FastImage
|
|
295
|
+
style={{ height: 80, width: 80, borderRadius: 8 }}
|
|
296
|
+
source={{
|
|
297
|
+
uri: user?.photo,
|
|
298
|
+
priority: FastImage.priority.normal,
|
|
299
|
+
}}
|
|
300
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
301
|
+
/>
|
|
302
|
+
) : (
|
|
303
|
+
<Ionicons name='person-outline' size={50} />
|
|
304
|
+
)}
|
|
305
|
+
</View>
|
|
306
|
+
<OIconButton
|
|
307
|
+
icon={theme.images.general.camera}
|
|
308
|
+
borderColor={theme.colors.clear}
|
|
309
|
+
iconStyle={{ width: 20, height: 20 }}
|
|
310
|
+
style={{ maxWidth: 40, position: 'absolute', alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
|
|
311
|
+
onClick={() => handleImagePicker()}
|
|
321
312
|
/>
|
|
322
|
-
</
|
|
313
|
+
</CenterView>
|
|
314
|
+
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginVertical: 32, zIndex: 10 }} />
|
|
315
|
+
<Spinner visible={formState?.loading || verifyPhoneState?.loading} />
|
|
316
|
+
<UserFormDetailsUI
|
|
317
|
+
{...props}
|
|
318
|
+
isProfile
|
|
319
|
+
isEdit
|
|
320
|
+
setWillVerifyOtpState={setWillVerifyOtpState}
|
|
321
|
+
/>
|
|
323
322
|
</Container>
|
|
324
323
|
<OModal
|
|
325
324
|
open={isModalVisible}
|
|
@@ -195,38 +195,39 @@ const UserVerificationUI = (props: any) => {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
useEffect(() => {
|
|
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
|
-
|
|
198
|
+
if (verificationState.phone) {
|
|
199
|
+
let _timer = TIME_COUNTDOWN - 1;
|
|
200
|
+
let minutes = 0;
|
|
201
|
+
let seconds = 0;
|
|
202
|
+
const interval = setInterval(() => {
|
|
203
|
+
minutes = _timer / 60;
|
|
204
|
+
seconds = _timer % 60;
|
|
205
|
+
|
|
206
|
+
minutes = minutes < 10 ? 0 + minutes : minutes;
|
|
207
|
+
seconds = seconds < 10 ? 0 + seconds : seconds;
|
|
208
|
+
|
|
209
|
+
const formatMinutes = parseInt(minutes.toString()) < 10
|
|
210
|
+
? `0${parseInt(minutes.toString())}`
|
|
211
|
+
: parseInt(minutes.toString());
|
|
212
|
+
|
|
213
|
+
const formatseconds = parseInt(seconds.toString()) < 10
|
|
214
|
+
? `0${parseInt(seconds.toString())}`
|
|
215
|
+
: parseInt(seconds.toString());
|
|
216
|
+
|
|
217
|
+
setTimer(`${formatMinutes}:${formatseconds}`);
|
|
218
|
+
|
|
219
|
+
if (--_timer < 0) {
|
|
220
|
+
clearInterval(interval);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (timer === `${TIME_COUNTDOWN / 60}:00` && isSendCodeAgain) {
|
|
224
|
+
setIsSendCodeAgain(false)
|
|
225
|
+
clearInterval(interval);
|
|
226
|
+
}
|
|
227
|
+
}, 1000);
|
|
228
|
+
return () => clearInterval(interval)
|
|
229
|
+
}
|
|
230
|
+
}, [isSendCodeAgain, verificationState.phone])
|
|
230
231
|
|
|
231
232
|
useEffect(() => {
|
|
232
233
|
if (otpState?.length === CODE_LENGTH) {
|
|
@@ -292,7 +293,7 @@ const UserVerificationUI = (props: any) => {
|
|
|
292
293
|
|
|
293
294
|
useEffect(() => {
|
|
294
295
|
setupUserPhoneNumber()
|
|
295
|
-
}, [user])
|
|
296
|
+
}, [user?.cellphone, user?.country_phone_code])
|
|
296
297
|
|
|
297
298
|
return (
|
|
298
299
|
<SafeAreaView style={{ flex: 1 }}>
|
|
@@ -401,6 +402,7 @@ const UserVerificationUI = (props: any) => {
|
|
|
401
402
|
textStyle={{ color: theme.colors.textNormal, fontSize: 12, padding: 0 }}
|
|
402
403
|
noDropIcon
|
|
403
404
|
isDisabled
|
|
405
|
+
updateStateWithSubmit
|
|
404
406
|
/>
|
|
405
407
|
</InputWrapper>
|
|
406
408
|
</>
|
|
@@ -460,28 +462,31 @@ const UserVerificationUI = (props: any) => {
|
|
|
460
462
|
)}
|
|
461
463
|
|
|
462
464
|
</Container>
|
|
463
|
-
|
|
464
|
-
<
|
|
465
|
-
<
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
465
|
+
{!!phoneState?.cellphone && (
|
|
466
|
+
<ButtonsActions>
|
|
467
|
+
<View style={{ width: '100%' }}>
|
|
468
|
+
<OButton
|
|
469
|
+
onClick={(verificationState.email || verificationState.phone)
|
|
470
|
+
? () => setVerificationState({ email: false, phone: false })
|
|
471
|
+
: () => handleSendOtp(isPhoneVerifyRequired && !isEmailVerifyRequired ? 'phone' : '')
|
|
472
|
+
}
|
|
473
|
+
text={(verificationState.email || verificationState.phone) ? t('CANCEL', 'Cancel') : t('SEND_CODE', 'Send code')}
|
|
474
|
+
bgColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
|
|
475
|
+
borderColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
|
|
476
|
+
textStyle={{ color: (verificationState.email || verificationState.phone) ? 'black' : 'white' }}
|
|
477
|
+
imgRightSrc={null}
|
|
478
|
+
isLoading={verifyEmailState?.loadingSendCode || verifyEmailState?.loadingCheckCode || verifyPhoneState?.loadingSendCode || verifyPhoneState?.loadingCheckCode}
|
|
479
|
+
style={(verificationState.email || verificationState.phone) ? style.btnStyle : { borderRadius: 7.6 }}
|
|
480
|
+
/>
|
|
481
|
+
</View>
|
|
482
|
+
</ButtonsActions>
|
|
483
|
+
)}
|
|
480
484
|
<View style={{ paddingHorizontal: 20, paddingBottom: 80 }}>
|
|
481
485
|
<UserDetails
|
|
482
486
|
user={user}
|
|
483
487
|
isEdit
|
|
484
488
|
isVerifiedPhone
|
|
489
|
+
dontToggleEditMode
|
|
485
490
|
/>
|
|
486
491
|
</View>
|
|
487
492
|
</ScrollView>
|
|
@@ -54,7 +54,7 @@ export const WalletTransactionItem = (props: any) => {
|
|
|
54
54
|
<OText>{item?.description}</OText>
|
|
55
55
|
</DescriptionBlock>
|
|
56
56
|
)}
|
|
57
|
-
{!!item?.code && (
|
|
57
|
+
{/* {!!item?.code && (
|
|
58
58
|
<DescriptionBlock>
|
|
59
59
|
<OText weight={'bold'}>
|
|
60
60
|
{t('CODE', 'Code')}
|
|
@@ -63,7 +63,7 @@ export const WalletTransactionItem = (props: any) => {
|
|
|
63
63
|
</OText>
|
|
64
64
|
</OText>
|
|
65
65
|
</DescriptionBlock>
|
|
66
|
-
)}
|
|
66
|
+
)} */}
|
|
67
67
|
</Container>
|
|
68
68
|
)
|
|
69
69
|
}
|
|
@@ -63,12 +63,12 @@ export const WalletTransactions = (props: any) => {
|
|
|
63
63
|
(transactionsList?.error ||
|
|
64
64
|
!transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.length) &&
|
|
65
65
|
(
|
|
66
|
-
<
|
|
67
|
-
|
|
66
|
+
<OText color={theme.colors.disabled} size={16} style={{ textAlign: 'center' }}>
|
|
67
|
+
{transactionsList?.error
|
|
68
68
|
? t('ERROR_NOT_FOUND_TRANSACTIONS', 'Sorry, an error has occurred')
|
|
69
69
|
: t('NOT_FOUND_TRANSACTIONS', 'No transactions to show at this time.')
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
</OText>
|
|
72
72
|
)}
|
|
73
73
|
</View>
|
|
74
74
|
</Container>
|
|
@@ -3,6 +3,7 @@ import { Pressable, StyleSheet, View, ScrollView, TouchableOpacity, Platform } f
|
|
|
3
3
|
import { useTheme } from 'styled-components/native'
|
|
4
4
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
5
5
|
import FastImage from 'react-native-fast-image'
|
|
6
|
+
import NavBar from '../NavBar'
|
|
6
7
|
import {
|
|
7
8
|
WalletList,
|
|
8
9
|
useLanguage,
|
|
@@ -72,7 +73,7 @@ const WalletsUI = (props: any) => {
|
|
|
72
73
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
73
74
|
const [openHistory, setOpenHistory] = useState(false)
|
|
74
75
|
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
75
|
-
const hideWalletsTheme = theme?.bar_menu?.components?.
|
|
76
|
+
const hideWalletsTheme = theme?.bar_menu?.components?.wallet?.hidden === true
|
|
76
77
|
|
|
77
78
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
78
79
|
|
|
@@ -121,58 +122,38 @@ const WalletsUI = (props: any) => {
|
|
|
121
122
|
<>
|
|
122
123
|
<Container>
|
|
123
124
|
<Header>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
<View style={{
|
|
126
|
+
...{
|
|
127
|
+
width: '100%',
|
|
128
|
+
display: 'flex',
|
|
129
|
+
flexDirection: !hideWalletsTheme ? 'column' : 'row',
|
|
130
|
+
justifyContent: !hideWalletsTheme ? 'flex-start' : 'space-between',
|
|
131
|
+
alignItems: !hideWalletsTheme ? 'flex-start' : 'center',
|
|
132
|
+
marginTop: !hideWalletsTheme ? 0 : 10,
|
|
133
|
+
},
|
|
134
|
+
}}>
|
|
135
|
+
<NavBar
|
|
136
|
+
title={t('WALLETS', 'Wallets')}
|
|
137
|
+
titleAlign={'center'}
|
|
138
|
+
onActionLeft={goToBack}
|
|
139
|
+
showCall={false}
|
|
140
|
+
paddingTop={10}
|
|
141
|
+
btnStyle={{ paddingLeft: 0 }}
|
|
142
|
+
isVertical={!hideWalletsTheme}
|
|
143
|
+
hideArrowLeft={!hideWalletsTheme}
|
|
144
|
+
/>
|
|
145
|
+
{isChewLayout && !openHistory && (
|
|
133
146
|
<OButton
|
|
134
|
-
|
|
147
|
+
text={t('WALLET_HISTORY', 'Wallet history')}
|
|
148
|
+
bgColor={theme.colors.white}
|
|
149
|
+
borderColor={theme.colors.lightGray}
|
|
135
150
|
imgRightSrc={null}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
height: 26,
|
|
140
|
-
backgroundColor: '#FFF',
|
|
141
|
-
borderColor: '#FFF',
|
|
142
|
-
shadowColor: '#FFF',
|
|
143
|
-
paddingLeft: 0,
|
|
144
|
-
paddingRight: 0,
|
|
145
|
-
marginTop: 30,
|
|
146
|
-
}}
|
|
147
|
-
onClick={goToBack}
|
|
148
|
-
icon={AntDesignIcon}
|
|
149
|
-
iconProps={{
|
|
150
|
-
name: 'arrowleft',
|
|
151
|
-
size: 26
|
|
152
|
-
}}
|
|
151
|
+
textStyle={{ fontSize: 12, color: theme.colors.disabled }}
|
|
152
|
+
onClick={() => setOpenHistory(true)}
|
|
153
|
+
style={{ borderRadius: 8, height: 40, width: !hideWalletsTheme ? '100%' : 150, marginTop: !hideWalletsTheme ? 10 : 0 }}
|
|
153
154
|
/>
|
|
154
155
|
)}
|
|
155
|
-
|
|
156
|
-
size={20}
|
|
157
|
-
style={{
|
|
158
|
-
marginTop: 30,
|
|
159
|
-
marginLeft: (!props.hideBackBtn || !hideWalletsTheme) && !isChewLayout ? 10 : 0,
|
|
160
|
-
color: theme.colors.textNormal,
|
|
161
|
-
}}
|
|
162
|
-
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
163
|
-
>{t('WALLETS', 'Wallets')}</OText>
|
|
164
|
-
</View>
|
|
165
|
-
{isChewLayout && (
|
|
166
|
-
<OButton
|
|
167
|
-
text={t('WALLET_HISTORY', 'Wallet history')}
|
|
168
|
-
bgColor={theme.colors.white}
|
|
169
|
-
borderColor={theme.colors.lightGray}
|
|
170
|
-
imgRightSrc={null}
|
|
171
|
-
textStyle={{ fontSize: 12, color: theme.colors.disabled }}
|
|
172
|
-
onClick={() => setOpenHistory(true)}
|
|
173
|
-
style={{ borderRadius: 8, height: 40 }}
|
|
174
|
-
/>
|
|
175
|
-
)}
|
|
156
|
+
</View>
|
|
176
157
|
</Header>
|
|
177
158
|
|
|
178
159
|
{!walletList.loading &&
|
|
@@ -213,9 +194,9 @@ const WalletsUI = (props: any) => {
|
|
|
213
194
|
<LoyaltyContent>
|
|
214
195
|
<LoyaltyWrapp>
|
|
215
196
|
<OText size={20}>
|
|
216
|
-
{`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}
|
|
197
|
+
{`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}`}
|
|
217
198
|
</OText>
|
|
218
|
-
{
|
|
199
|
+
{loyaltyLevel.image ? (
|
|
219
200
|
<FastImage
|
|
220
201
|
style={styles.logoStyle}
|
|
221
202
|
source={{
|
|
@@ -230,7 +211,7 @@ const WalletsUI = (props: any) => {
|
|
|
230
211
|
source={theme.images.dummies.loyaltyLevel}
|
|
231
212
|
resizeMode='contain'
|
|
232
213
|
/>
|
|
233
|
-
)}
|
|
214
|
+
)}
|
|
234
215
|
<OText
|
|
235
216
|
size={22}
|
|
236
217
|
weight='bold'
|
|
@@ -256,9 +237,13 @@ const WalletsUI = (props: any) => {
|
|
|
256
237
|
</OText>
|
|
257
238
|
</BalanceElement>
|
|
258
239
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
240
|
+
{currentWalletSelected?.type === 'cash' && (
|
|
241
|
+
<>
|
|
242
|
+
<View style={styles.dividerStyle} />
|
|
243
|
+
<GiftCardUI navigation={navigation} />
|
|
244
|
+
<View style={styles.dividerStyle} />
|
|
245
|
+
</>
|
|
246
|
+
)}
|
|
262
247
|
|
|
263
248
|
{!isChewLayout && (
|
|
264
249
|
<WalletTransactions
|
|
@@ -313,15 +298,18 @@ const WalletsUI = (props: any) => {
|
|
|
313
298
|
<ScrollView>
|
|
314
299
|
<WalletTransactionsWrapper>
|
|
315
300
|
<OButton
|
|
301
|
+
imgLeftStyle={{ width: 18 }}
|
|
316
302
|
imgRightSrc={null}
|
|
317
303
|
style={{
|
|
318
304
|
borderWidth: 0,
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
305
|
+
width: 26,
|
|
306
|
+
height: 26,
|
|
307
|
+
backgroundColor: '#FFF',
|
|
308
|
+
borderColor: '#FFF',
|
|
309
|
+
shadowColor: '#FFF',
|
|
323
310
|
paddingLeft: 0,
|
|
324
|
-
paddingRight: 0
|
|
311
|
+
paddingRight: 0,
|
|
312
|
+
marginBottom: 10
|
|
325
313
|
}}
|
|
326
314
|
onClick={() => setOpenHistory(false)}
|
|
327
315
|
icon={AntDesignIcon}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import styled from 'styled-components/native'
|
|
2
2
|
|
|
3
3
|
export const Container = styled.View`
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
padding-horizontal: 20px;
|
|
5
|
+
padding-bottom: 20px;
|
|
6
|
+
padding-top: ${(props: any) => props.pdng};
|
|
6
7
|
`
|
|
7
8
|
export const Header = styled.View`
|
|
8
9
|
flex-direction: row;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: space-between;
|
|
11
10
|
`
|
|
12
11
|
export const SectionContent = styled.View`
|
|
13
12
|
width: 100%;
|
|
@@ -13,7 +13,7 @@ const HeaderTitle = (props: any) => {
|
|
|
13
13
|
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
14
14
|
style={style ?? {
|
|
15
15
|
marginTop: Platform.OS === 'android' ? 50 : 30,
|
|
16
|
-
paddingHorizontal: props.ph ??
|
|
16
|
+
paddingHorizontal: props.ph ?? 20,
|
|
17
17
|
textTransform: 'capitalize',
|
|
18
18
|
color: props.titleColor || theme.colors.textNormal,
|
|
19
19
|
}}
|
|
@@ -27,8 +27,8 @@ const StyledButton = styled.View<Props>`
|
|
|
27
27
|
padding-left: 20px;
|
|
28
28
|
padding-right: 20px;
|
|
29
29
|
position: relative;
|
|
30
|
-
${(props
|
|
31
|
-
border-radius: ${props?.theme?.general?.components?.buttons?.borderRadius};
|
|
30
|
+
${(props: any) => props?.theme?.general?.components?.buttons?.borderRadius && css`
|
|
31
|
+
border-radius: ${props?.theme?.general?.components?.buttons?.borderRadius}px;
|
|
32
32
|
`}
|
|
33
33
|
`
|
|
34
34
|
const StyledButtonDisabled = styled(StyledButton)`
|
|
@@ -119,7 +119,7 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
119
119
|
style={{ width: props.isCircle ? 52 : props.style?.width, ...props.parentStyle }}
|
|
120
120
|
disabled={props.isDisabledWithSameStyles}
|
|
121
121
|
>
|
|
122
|
-
<StyledButton style={props.bgColor ? { ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor } : props.style}>
|
|
122
|
+
<StyledButton style={props.bgColor ? { ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor, borderRadius: parseInt(theme?.general?.components?.buttons?.borderRadius) || props.style?.borderRadius } : { ...props.style, borderRadius: parseInt(theme?.general?.components?.buttons?.borderRadius) || props.style?.borderRadius }}>
|
|
123
123
|
{props.icon ? (
|
|
124
124
|
<props.icon {...props.iconProps} />
|
|
125
125
|
) : null}
|
|
@@ -3,7 +3,7 @@ import { ImageSourcePropType, ImageStyle, ViewStyle, TextInputProps, TextStyle }
|
|
|
3
3
|
import styled from 'styled-components/native';
|
|
4
4
|
import OIcon from './OIcon';
|
|
5
5
|
import MaterialIcon from 'react-native-vector-icons/MaterialIcons'
|
|
6
|
-
import { useTheme
|
|
6
|
+
import { useTheme } from 'styled-components/native';
|
|
7
7
|
|
|
8
8
|
const Input = styled.TextInput`
|
|
9
9
|
flex-grow: 1;
|
|
@@ -53,9 +53,6 @@ const Wrapper = styled.Pressable`
|
|
|
53
53
|
align-items: center;
|
|
54
54
|
justify-content: center;
|
|
55
55
|
width: 100%;
|
|
56
|
-
${(props: any) => props.theme?.general?.components?.inputs?.borderRadius && css`
|
|
57
|
-
border-radius: ${props?.theme?.general?.components?.inputs?.borderRadius};
|
|
58
|
-
`}
|
|
59
56
|
`;
|
|
60
57
|
|
|
61
58
|
const OInput = (props: Props): React.ReactElement => {
|
|
@@ -104,7 +101,9 @@ const OInput = (props: Props): React.ReactElement => {
|
|
|
104
101
|
props.forwardRef && (props.forwardRef.current = e)
|
|
105
102
|
}}
|
|
106
103
|
style={{
|
|
107
|
-
|
|
104
|
+
...(theme?.general?.components?.inputs?.color && {
|
|
105
|
+
color: theme?.general?.components?.inputs?.color
|
|
106
|
+
}),
|
|
108
107
|
...props?.inputStyle
|
|
109
108
|
}}
|
|
110
109
|
onFocus={() => setInputFocused(true)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Modal, StyleSheet, Text, SafeAreaView, View, TouchableOpacity, Platform } from "react-native";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import styled from 'styled-components/native';
|
|
4
|
+
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
7
|
open?: boolean;
|
|
@@ -50,17 +50,15 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
50
50
|
isAvoidKeyBoardView
|
|
51
51
|
} = props
|
|
52
52
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
const RenderSafeAreaView = () => (
|
|
53
|
+
const renderSafeAreaView = () => (
|
|
56
54
|
<SafeAreaView style={styles.container}>
|
|
57
55
|
{!entireModal ? (
|
|
58
56
|
<View style={styles.centeredView}>
|
|
59
57
|
<View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
|
|
60
|
-
<TouchableOpacity style={{...styles.wrapperIcon, ...styleContainerCloseButton}} onPress={onClose}>
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
<TouchableOpacity style={{ ...styles.wrapperIcon, ...styleContainerCloseButton }} onPress={onClose}>
|
|
59
|
+
<AntDesignIcon
|
|
60
|
+
name='close'
|
|
61
|
+
size={26}
|
|
64
62
|
style={isNotDecoration && (styleCloseButton || styles.cancelBtn)}
|
|
65
63
|
/>
|
|
66
64
|
</TouchableOpacity>
|
|
@@ -73,9 +71,9 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
73
71
|
{!customClose && (
|
|
74
72
|
<View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
|
|
75
73
|
<TouchableOpacity style={styles.wrapperIcon} onPress={onClose}>
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
<AntDesignIcon
|
|
75
|
+
name='close'
|
|
76
|
+
size={26}
|
|
79
77
|
style={styleCloseButton || styles.cancelBtn}
|
|
80
78
|
/>
|
|
81
79
|
</TouchableOpacity>
|
|
@@ -93,7 +91,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
93
91
|
animationType="slide"
|
|
94
92
|
transparent={isTransparent}
|
|
95
93
|
visible={open}
|
|
96
|
-
onRequestClose={() =>
|
|
94
|
+
onRequestClose={() => onClose && onClose()}
|
|
97
95
|
style={{ height: '100%', flex: 1, position: 'absolute', ...style, zIndex: 9999 }}
|
|
98
96
|
>
|
|
99
97
|
{isAvoidKeyBoardView ? (
|
|
@@ -101,10 +99,10 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
101
99
|
enabled
|
|
102
100
|
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
103
101
|
>
|
|
104
|
-
|
|
102
|
+
{renderSafeAreaView()}
|
|
105
103
|
</KeyboardView>
|
|
106
104
|
) : (
|
|
107
|
-
|
|
105
|
+
renderSafeAreaView()
|
|
108
106
|
)}
|
|
109
107
|
</Modal>
|
|
110
108
|
);
|
|
@@ -125,8 +123,8 @@ const styles = StyleSheet.create({
|
|
|
125
123
|
flex: 1,
|
|
126
124
|
justifyContent: 'space-between',
|
|
127
125
|
alignItems: 'flex-start',
|
|
128
|
-
paddingLeft:
|
|
129
|
-
paddingRight:
|
|
126
|
+
paddingLeft: 20,
|
|
127
|
+
paddingRight: 20,
|
|
130
128
|
marginBottom: 40
|
|
131
129
|
},
|
|
132
130
|
cancelBtn: {
|
|
@@ -6,7 +6,7 @@ import { Platform, View } from 'react-native';
|
|
|
6
6
|
const ContainerStyled = styled.ScrollView`
|
|
7
7
|
flex: 1;
|
|
8
8
|
${(props: any) => !props.noPadding && css`
|
|
9
|
-
padding: ${Platform.OS === 'ios' ? '0px
|
|
9
|
+
padding: ${Platform.OS === 'ios' ? '0px 20px' : '20px 20px'};
|
|
10
10
|
`}
|
|
11
11
|
background-color: ${(props: any) => props.theme.colors.backgroundPage};
|
|
12
12
|
`;
|