ordering-ui-react-native 0.19.2-testing → 0.19.3-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 +6 -5
- 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/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OToast.tsx +3 -2
- package/src/utils/index.tsx +2 -2
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -2
- package/themes/business/src/components/BusinessController/index.tsx +19 -17
- package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
- package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
- package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
- package/themes/business/src/components/Chat/index.tsx +41 -13
- package/themes/business/src/components/DriverMap/index.tsx +4 -2
- package/themes/business/src/components/DriverSchedule/index.tsx +5 -5
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- package/themes/business/src/components/MapView/index.tsx +11 -7
- package/themes/business/src/components/MessagesOption/index.tsx +22 -94
- package/themes/business/src/components/NewOrderNotification/index.tsx +121 -103
- package/themes/business/src/components/OrderDetails/Delivery.tsx +19 -10
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +88 -51
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +26 -6
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
- package/themes/business/src/components/OrderSummary/index.tsx +27 -13
- 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 +83 -37
- 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 +24 -31
- 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 +192 -220
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- 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/StoresList/index.tsx +5 -3
- package/themes/business/src/components/UserProfileForm/index.tsx +27 -10
- package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
- package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/business/src/types/index.tsx +10 -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/LoginForm/index.tsx +124 -96
- 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 +7 -3
- package/themes/original/src/components/AddressForm/index.tsx +2 -2
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +4 -7
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +3 -3
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +9 -6
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/BusinessInformation/index.tsx +35 -3
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +56 -361
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +3 -4
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsList/index.tsx +2 -2
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +43 -19
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +3 -4
- package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
- 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 +29 -402
- 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 +27 -8
- package/themes/original/src/components/CartContent/index.tsx +61 -39
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +199 -55
- package/themes/original/src/components/Checkout/styles.tsx +17 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
- 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/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 +1 -1
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GoogleMap/index.tsx +50 -5
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +1 -1
- 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 +53 -47
- package/themes/original/src/components/LoginForm/index.tsx +6 -1
- package/themes/original/src/components/Messages/index.tsx +9 -4
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +4 -4
- 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 +13 -4
- package/themes/original/src/components/MultiCheckout/index.tsx +184 -51
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -1
- package/themes/original/src/components/MyOrders/index.tsx +5 -5
- package/themes/original/src/components/NavBar/index.tsx +3 -1
- package/themes/original/src/components/NetworkError/index.tsx +2 -3
- package/themes/original/src/components/NetworkError/styles.tsx +2 -2
- package/themes/original/src/components/Notifications/index.tsx +4 -8
- package/themes/original/src/components/Notifications/styles.tsx +0 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +7 -3
- package/themes/original/src/components/OrderDetails/index.tsx +716 -667
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderProgress/index.tsx +7 -7
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +5 -3
- 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/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/index.tsx +4 -3
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/PageBanner/index.tsx +3 -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 +41 -32
- package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -1
- 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 +81 -167
- package/themes/original/src/components/ProductForm/styles.tsx +1 -1
- package/themes/original/src/components/ProductItemAccordion/index.tsx +5 -0
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +120 -79
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +10 -9
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
- package/themes/original/src/components/Promotions/index.tsx +4 -4
- package/themes/original/src/components/Promotions/styles.tsx +0 -2
- 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/styles.tsx +1 -1
- package/themes/original/src/components/ServiceForm/index.tsx +2 -2
- package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
- package/themes/original/src/components/SingleOrderCard/index.tsx +4 -3
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +53 -7
- package/themes/original/src/components/StripeElementsForm/index.tsx +1 -1
- 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 +15 -199
- package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
- package/themes/original/src/components/UserFormDetails/index.tsx +53 -7
- package/themes/original/src/components/UserProfile/index.tsx +1 -1
- package/themes/original/src/components/UserProfileForm/index.tsx +30 -36
- package/themes/original/src/components/UserVerification/index.tsx +55 -50
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +8 -9
- package/themes/original/src/components/Wallets/styles.tsx +1 -1
- package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
- package/themes/original/src/components/shared/OInput.tsx +1 -4
- package/themes/original/src/components/shared/OModal.tsx +12 -14
- package/themes/original/src/layouts/Container.tsx +5 -3
- package/themes/original/src/types/index.tsx +10 -2
- package/themes/original/src/utils/index.tsx +124 -0
- 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
package/src/pages/Login.tsx
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
import styled from 'styled-components/native';
|
|
4
|
-
import { LoginForm } from '../components/LoginForm';
|
|
5
|
-
import { Container } from '../layouts/Container';
|
|
6
|
-
|
|
7
|
-
import { useLanguage } from 'ordering-components/native';
|
|
8
|
-
import { _setStoreData } from '../providers/StoreUtil';
|
|
9
|
-
import { useTheme } from 'styled-components/native';
|
|
10
|
-
|
|
11
|
-
const KeyboardView = styled.KeyboardAvoidingView`
|
|
12
|
-
flex: 1;
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
export const Login = ({ navigation, route }: any) => {
|
|
16
|
-
const [, t] = useLanguage()
|
|
17
|
-
const theme = useTheme()
|
|
18
|
-
|
|
19
|
-
const loginProps = {
|
|
20
|
-
navigation,
|
|
21
|
-
useLoginByCellphone: true,
|
|
22
|
-
loginButtonText: t('LOGIN', 'Login'),
|
|
23
|
-
loginButtonBackground: theme.colors.primary,
|
|
24
|
-
forgotButtonText: t('FORGOT_YOUR_PASSWORD', 'Forgot your password?'),
|
|
25
|
-
registerButtonText: t('SIGNUP', 'Signup'),
|
|
26
|
-
onNavigationRedirect: (page: string) => {
|
|
27
|
-
if (!page) return
|
|
28
|
-
navigation.navigate(page);
|
|
29
|
-
},
|
|
30
|
-
notificationState: route?.params?.notification_state
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
_setStoreData('notification_state', route?.params?.notification_state);
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<KeyboardView
|
|
37
|
-
enabled
|
|
38
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
39
|
-
>
|
|
40
|
-
<Container>
|
|
41
|
-
<LoginForm {...loginProps} />
|
|
42
|
-
</Container>
|
|
43
|
-
</KeyboardView>
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export default Login;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { useConfig } from 'ordering-components/native'
|
|
3
|
-
import { MomentOption as MomentOptionController } from '../components/MomentOption'
|
|
4
|
-
|
|
5
|
-
const MomentOption = ({ navigation, props }: any) => {
|
|
6
|
-
const [{ configs }] = useConfig()
|
|
7
|
-
const limitDays = configs?.max_days_preorder?.value
|
|
8
|
-
const currentDate = new Date()
|
|
9
|
-
const time = limitDays > 1
|
|
10
|
-
? currentDate.getTime() + ((limitDays - 1) * 24 * 60 * 60 * 1000)
|
|
11
|
-
: limitDays === 1 ? currentDate.getTime() : currentDate.getTime() + (6 * 24 * 60 * 60 * 1000)
|
|
12
|
-
|
|
13
|
-
currentDate.setTime(time)
|
|
14
|
-
currentDate.setHours(23)
|
|
15
|
-
currentDate.setMinutes(59)
|
|
16
|
-
const momentOptionProps = {
|
|
17
|
-
...props,
|
|
18
|
-
navigation: navigation,
|
|
19
|
-
maxDate: currentDate
|
|
20
|
-
}
|
|
21
|
-
return (
|
|
22
|
-
<>
|
|
23
|
-
{currentDate && (
|
|
24
|
-
<MomentOptionController {...momentOptionProps} />
|
|
25
|
-
)}
|
|
26
|
-
</>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default MomentOption
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Platform, KeyboardAvoidingView, StyleSheet } from 'react-native'
|
|
3
|
-
import { MultiCheckout as MultiCheckoutController } from '../../themes/original/src/components/MultiCheckout'
|
|
4
|
-
|
|
5
|
-
const MultiCheckout = (props: any) => {
|
|
6
|
-
const multiCheckoutProps = {
|
|
7
|
-
...props,
|
|
8
|
-
onPlaceOrderClick: (orderUuids: any) => {
|
|
9
|
-
props.navigation.navigate('MultiOrdersDetails', { orderUuids: orderUuids, isFromMultiCheckout: true })
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<KeyboardAvoidingView
|
|
15
|
-
enabled
|
|
16
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
17
|
-
style={styles.container}
|
|
18
|
-
>
|
|
19
|
-
<MultiCheckoutController {...multiCheckoutProps} />
|
|
20
|
-
</KeyboardAvoidingView>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const styles = StyleSheet.create({
|
|
25
|
-
container: {
|
|
26
|
-
flexGrow: 1,
|
|
27
|
-
paddingBottom: 70,
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export default MultiCheckout
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Platform } from 'react-native'
|
|
3
|
-
import { MultiOrdersDetails as MultiOrdersDetailsController } from '../../themes/original/src/components/MultiOrdersDetails'
|
|
4
|
-
import styled from 'styled-components/native';
|
|
5
|
-
|
|
6
|
-
const SafeAreaContainer = styled.SafeAreaView`
|
|
7
|
-
flex: 1;
|
|
8
|
-
background-color: ${(props: any) => props.theme.colors.backgroundPage};
|
|
9
|
-
padding-top: ${Platform.OS === 'ios' ? '0px' : '24px'};
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
const MultiOrdersDetails = ({ navigation, route }: any) => {
|
|
13
|
-
const multiOrdersDetailsProps = {
|
|
14
|
-
navigation,
|
|
15
|
-
orderUuids: route.params?.orderUuids || [],
|
|
16
|
-
isFromMultiCheckout: route.params?.isFromMultiCheckout,
|
|
17
|
-
onRedirectPage: () => navigation.navigate('BusinessList')
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<SafeAreaContainer>
|
|
22
|
-
<MultiOrdersDetailsController {...multiOrdersDetailsProps} />
|
|
23
|
-
</SafeAreaContainer>
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default MultiOrdersDetails
|
package/src/pages/MyOrders.tsx
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React, {useState} from 'react'
|
|
2
|
-
import { useLanguage } from 'ordering-components/native'
|
|
3
|
-
import { OrdersOption } from '../components/OrdersOption'
|
|
4
|
-
import { OText } from '../components/shared'
|
|
5
|
-
import { Container } from '../layouts/Container'
|
|
6
|
-
|
|
7
|
-
const MyOrders = ({ navigation }: any) => {
|
|
8
|
-
|
|
9
|
-
const [, t] = useLanguage()
|
|
10
|
-
const [ordersLength,setOrdersLength] = useState({activeOrdersLength: 0, previousOrdersLength: 0})
|
|
11
|
-
const myOrderProps = {
|
|
12
|
-
navigation,
|
|
13
|
-
onNavigationRedirect: (page: string, params: any) => {
|
|
14
|
-
if (!page) return
|
|
15
|
-
navigation.navigate(page, params);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<Container>
|
|
22
|
-
<OText size={24} mBottom={20}>
|
|
23
|
-
{t('MY_ORDERS', 'My Orders')}
|
|
24
|
-
</OText>
|
|
25
|
-
<OrdersOption
|
|
26
|
-
{...myOrderProps}
|
|
27
|
-
activeOrders
|
|
28
|
-
ordersLength={ordersLength}
|
|
29
|
-
setOrdersLength={setOrdersLength}
|
|
30
|
-
/>
|
|
31
|
-
<OrdersOption
|
|
32
|
-
{...myOrderProps}
|
|
33
|
-
ordersLength={ordersLength}
|
|
34
|
-
setOrdersLength={setOrdersLength}
|
|
35
|
-
/>
|
|
36
|
-
</Container>
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export default MyOrders;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
NotFoundSource,
|
|
4
|
-
} from '../components/NotFoundSource';
|
|
5
|
-
import { useTheme } from 'styled-components/native';
|
|
6
|
-
import { useLanguage } from 'ordering-components/native';
|
|
7
|
-
import { SafeAreaContainer } from '../layouts/SafeAreaContainer'
|
|
8
|
-
|
|
9
|
-
const NetworkError = () => {
|
|
10
|
-
const theme = useTheme();
|
|
11
|
-
const [, t] = useLanguage();
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<SafeAreaContainer style={{ backgroundColor: theme.colors.white }}>
|
|
15
|
-
<NotFoundSource
|
|
16
|
-
content={t('NETWORK_ERROR', 'Network Error')}
|
|
17
|
-
image={theme.images.general.notFound}
|
|
18
|
-
conditioned={false}
|
|
19
|
-
/>
|
|
20
|
-
</SafeAreaContainer>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default NetworkError;
|
package/src/pages/NotFound.tsx
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { NotFoundSource } from '../components/NotFoundSource'
|
|
3
|
-
import { Container } from '../layouts/Container'
|
|
4
|
-
import {useSession, useLanguage} from 'ordering-components/native'
|
|
5
|
-
|
|
6
|
-
const NotFound = ({navigation} : any) => {
|
|
7
|
-
const [{auth}] = useSession()
|
|
8
|
-
const [ ,t] = useLanguage()
|
|
9
|
-
|
|
10
|
-
const btnTitle = !auth ? t('GO_TO_HOMEPAGE', 'Go to homepage') : t('GO_TO_BUSINESSLIST', 'Go to business list')
|
|
11
|
-
|
|
12
|
-
const handleNavigate = () => {
|
|
13
|
-
auth ? navigation.navigate('BusinessList') : navigation.navigate('Home')
|
|
14
|
-
}
|
|
15
|
-
return (
|
|
16
|
-
<Container>
|
|
17
|
-
<NotFoundSource btnTitle={btnTitle} content={t('PAGE_NOT_FOUND' , 'Page not found')} onClickButton={handleNavigate}/>
|
|
18
|
-
</Container>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default NotFound
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { OrderDetails as OrderDetailsController } from '../components/OrderDetails'
|
|
3
|
-
import { SafeAreaContainer } from '../layouts/SafeAreaContainer'
|
|
4
|
-
|
|
5
|
-
const OrderDetails = ({ navigation, route }: any) => {
|
|
6
|
-
const orderDetailsProps = {
|
|
7
|
-
navigation,
|
|
8
|
-
orderId: route.params?.orderId,
|
|
9
|
-
isFromCheckout: route.params?.isFromCheckout,
|
|
10
|
-
isFromRoot: route.params?.isFromRoot,
|
|
11
|
-
goToBusinessList: route?.params?.goToBusinessList,
|
|
12
|
-
onNavigationRedirect: (page: string, params: any) => {
|
|
13
|
-
if (!page) return
|
|
14
|
-
navigation.navigate(page, params);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<SafeAreaContainer>
|
|
20
|
-
<OrderDetailsController {...orderDetailsProps} />
|
|
21
|
-
</SafeAreaContainer>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default OrderDetails;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import styled, { useTheme } from 'styled-components/native';
|
|
3
|
-
import { Platform } from 'react-native';
|
|
4
|
-
import { ProductForm as ProductFormController } from '../components/ProductForm';
|
|
5
|
-
interface Props {
|
|
6
|
-
navigation: any;
|
|
7
|
-
route: any;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const ProductDetails = (props: Props) => {
|
|
11
|
-
const theme = useTheme()
|
|
12
|
-
|
|
13
|
-
const productProps = {
|
|
14
|
-
...props,
|
|
15
|
-
isCartProduct: props.route.params?.isCartProduct,
|
|
16
|
-
isFromCheckout: props.route.params?.isFromCheckout,
|
|
17
|
-
productCart: props.route.params?.productCart,
|
|
18
|
-
product: props.route.params?.product,
|
|
19
|
-
businessSlug: props.route.params?.businessSlug,
|
|
20
|
-
businessId: props.route.params?.businessId,
|
|
21
|
-
categoryId: props.route.params?.categoryId,
|
|
22
|
-
productId: props.route.params?.productId,
|
|
23
|
-
onSave: props?.navigation?.canGoBack()
|
|
24
|
-
? () => { props.route.params?.onAction && props.route.params?.onAction(); props?.navigation?.goBack(); }
|
|
25
|
-
: () => { props.route.params?.onAction && props.route.params?.onAction(); props?.navigation?.navigate('BottomTab') }
|
|
26
|
-
,
|
|
27
|
-
handleGoBack: props?.navigation?.canGoBack()
|
|
28
|
-
? () => {
|
|
29
|
-
props.route.params?.onAction &&
|
|
30
|
-
props.route.params?.onAction();
|
|
31
|
-
props?.navigation?.goBack();
|
|
32
|
-
}
|
|
33
|
-
: (businessSlug: any) => {
|
|
34
|
-
props.route.params?.onAction &&
|
|
35
|
-
props.route.params?.onAction();
|
|
36
|
-
businessSlug
|
|
37
|
-
? props?.navigation.navigate('Business', { store: businessSlug })
|
|
38
|
-
: props?.navigation.navigate('BottomTab')
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const BusinessProductsListView = styled.SafeAreaView`
|
|
43
|
-
flex: 1;
|
|
44
|
-
background-color: ${theme.colors.backgroundPage};
|
|
45
|
-
padding-top: ${Platform.OS === 'ios' ? '0px' : '20px'};
|
|
46
|
-
`;
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<BusinessProductsListView>
|
|
50
|
-
<ProductFormController {...productProps} />
|
|
51
|
-
</BusinessProductsListView>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default ProductDetails;
|
package/src/pages/Profile.tsx
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import styled from 'styled-components/native';
|
|
3
|
-
import { Platform } from 'react-native';
|
|
4
|
-
import { UserProfileForm as ProfileController } from '../components/UserProfileForm';
|
|
5
|
-
import { SafeAreaContainer } from '../layouts/SafeAreaContainer'
|
|
6
|
-
|
|
7
|
-
const KeyboardView = styled.KeyboardAvoidingView`
|
|
8
|
-
flex-grow: 1;
|
|
9
|
-
`;
|
|
10
|
-
interface Props {
|
|
11
|
-
navigation: any;
|
|
12
|
-
route: any;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const Profile = (props: Props) => {
|
|
16
|
-
const profileProps = {
|
|
17
|
-
...props,
|
|
18
|
-
goToBack: () => props.navigation?.canGoBack() && props.navigation.goBack(),
|
|
19
|
-
onNavigationRedirect: (route: string, params: any) => props.navigation.navigate(route, params)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<>
|
|
24
|
-
<KeyboardView
|
|
25
|
-
enabled
|
|
26
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
27
|
-
>
|
|
28
|
-
<SafeAreaContainer>
|
|
29
|
-
<ProfileController {...profileProps} />
|
|
30
|
-
</SafeAreaContainer>
|
|
31
|
-
</KeyboardView>
|
|
32
|
-
</>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default Profile;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
import styled from 'styled-components/native';
|
|
4
|
-
import { ReviewDriver as ReviewDriverController } from '../components/ReviewDriver'
|
|
5
|
-
import { SafeAreaContainer } from '../layouts/SafeAreaContainer';
|
|
6
|
-
|
|
7
|
-
const KeyboardView = styled.KeyboardAvoidingView`
|
|
8
|
-
flex: 1;
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
const ReviewDriver = ({ navigation, route }: any) => {
|
|
12
|
-
const reviewDriverProps = {
|
|
13
|
-
navigation,
|
|
14
|
-
order: route?.params?.order,
|
|
15
|
-
onNavigationRedirect: (route: string, params: any) => navigation.navigate(route, params)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<KeyboardView
|
|
20
|
-
enabled
|
|
21
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
22
|
-
>
|
|
23
|
-
<SafeAreaContainer>
|
|
24
|
-
<ReviewDriverController {...reviewDriverProps} />
|
|
25
|
-
</SafeAreaContainer>
|
|
26
|
-
</KeyboardView>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default ReviewDriver
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
import styled from 'styled-components/native';
|
|
4
|
-
import { ReviewOrder as ReviewOrderController } from '../components/ReviewOrder'
|
|
5
|
-
import { SafeAreaContainer } from '../layouts/SafeAreaContainer';
|
|
6
|
-
|
|
7
|
-
const KeyboardView = styled.KeyboardAvoidingView`
|
|
8
|
-
flex: 1;
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
const ReviewOrder = ({ navigation, route }: any) => {
|
|
12
|
-
const reviewOrderProps = {
|
|
13
|
-
navigation,
|
|
14
|
-
order: route?.params?.order,
|
|
15
|
-
setIsReviewed: route?.params?.setIsReviewed,
|
|
16
|
-
handleReviewState: route?.params?.handleReviewState,
|
|
17
|
-
onNavigationRedirect: (route: string, params: any) => navigation.navigate(route, params)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<KeyboardView
|
|
22
|
-
enabled
|
|
23
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
24
|
-
>
|
|
25
|
-
<SafeAreaContainer>
|
|
26
|
-
<ReviewOrderController {...reviewOrderProps} />
|
|
27
|
-
</SafeAreaContainer>
|
|
28
|
-
</KeyboardView>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default ReviewOrder
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
import styled from 'styled-components/native';
|
|
4
|
-
import {ReviewProducts as ReviewProductsController} from '../components/ReviewProducts'
|
|
5
|
-
import { SafeAreaContainer } from '../layouts/SafeAreaContainer';
|
|
6
|
-
|
|
7
|
-
const KeyboardView = styled.KeyboardAvoidingView`
|
|
8
|
-
flex: 1;
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
const ReviewProducts = ({navigation, route} : any) => {
|
|
12
|
-
const reviewProductProps = {
|
|
13
|
-
navigation,
|
|
14
|
-
order: route?.params?.order,
|
|
15
|
-
onNavigationRedirect: (route: string, params: any) => navigation.navigate(route, params)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<KeyboardView
|
|
20
|
-
enabled
|
|
21
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
22
|
-
>
|
|
23
|
-
<SafeAreaContainer>
|
|
24
|
-
<ReviewProductsController {...reviewProductProps} />
|
|
25
|
-
</SafeAreaContainer>
|
|
26
|
-
</KeyboardView>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default ReviewProducts
|
package/src/pages/Sessions.tsx
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Container } from '../../themes/original/src/layouts/Container'
|
|
3
|
-
import { Sessions as SessionsController } from '../../themes/original/src/components/Sessions'
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
navigation: any;
|
|
7
|
-
route: any;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const Sessions = (props: Props) => {
|
|
11
|
-
const sessionsProps = {
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<Container>
|
|
17
|
-
<SessionsController {...sessionsProps} />
|
|
18
|
-
</Container>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default Sessions
|
package/src/pages/Signup.tsx
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SignupForm } from '../components/SignupForm';
|
|
3
|
-
import { Container } from '../layouts/Container'
|
|
4
|
-
import styled from 'styled-components/native';
|
|
5
|
-
import { useLanguage, useSession } from 'ordering-components/native';
|
|
6
|
-
import { Platform } from 'react-native';
|
|
7
|
-
import { _setStoreData, _removeStoreData } from '../providers/StoreUtil';
|
|
8
|
-
|
|
9
|
-
const KeyboardView = styled.KeyboardAvoidingView`
|
|
10
|
-
flex: 1;
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
export const Signup = (props: any) => {
|
|
14
|
-
const [, t] = useLanguage()
|
|
15
|
-
const [, { login }] = useSession()
|
|
16
|
-
|
|
17
|
-
const signupProps = {
|
|
18
|
-
...props,
|
|
19
|
-
useChekoutFileds: true,
|
|
20
|
-
loginButtonText: t('LOGIN', 'Login'),
|
|
21
|
-
signupButtonText: t('SIGNUP', 'Signup'),
|
|
22
|
-
useSignupByEmail: true,
|
|
23
|
-
notificationState: props.route?.params?.notification_state,
|
|
24
|
-
onNavigationRedirect: (page: string) => {
|
|
25
|
-
if (!page) return
|
|
26
|
-
props.navigation.navigate(page);
|
|
27
|
-
},
|
|
28
|
-
handleSuccessSignup: (user: any) => {
|
|
29
|
-
_removeStoreData('isGuestUser')
|
|
30
|
-
if (user?.id) {
|
|
31
|
-
login({
|
|
32
|
-
user,
|
|
33
|
-
token: user.session.access_token
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
_setStoreData('notification_state', props.route?.params?.notification_state);
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<KeyboardView
|
|
43
|
-
enabled
|
|
44
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
45
|
-
>
|
|
46
|
-
<Container>
|
|
47
|
-
<SignupForm {...signupProps} />
|
|
48
|
-
</Container>
|
|
49
|
-
</KeyboardView>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default Signup;
|
package/src/pages/Splash.tsx
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled, { useTheme } from 'styled-components/native';
|
|
3
|
-
|
|
4
|
-
const LogoSplash = styled.ImageBackground`
|
|
5
|
-
width: 100%;
|
|
6
|
-
height: 100%;
|
|
7
|
-
background-color: ${(props: any) => props.theme.colors.backgroundPage};
|
|
8
|
-
`
|
|
9
|
-
|
|
10
|
-
const Splash = () => {
|
|
11
|
-
const theme = useTheme();
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<LogoSplash
|
|
15
|
-
source={theme.images.general.loadingSplash}
|
|
16
|
-
resizeMode='contain'
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default Splash;
|