ordering-ui-react-native 0.16.46 → 0.16.47-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/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +8 -14
- package/src/components/BusinessBasicInformation/index.tsx +11 -19
- package/src/components/BusinessInformation/index.tsx +33 -4
- package/src/components/BusinessInformation/styles.tsx +2 -2
- package/src/components/BusinessProductsList/index.tsx +10 -10
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +2 -1
- package/src/components/LanguageSelector/index.tsx +21 -16
- package/src/components/Messages/index.tsx +2 -2
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrdersOption/index.tsx +54 -56
- package/src/components/PaymentOptions/index.tsx +298 -345
- package/src/components/PaymentOptionsWebView/index.tsx +120 -121
- package/src/components/ReviewDriver/index.tsx +1 -1
- package/src/components/ReviewOrder/index.tsx +2 -2
- package/src/components/ReviewProducts/index.tsx +11 -0
- package/src/components/SingleProductReview/index.tsx +8 -5
- package/src/components/StripeElementsForm/index.tsx +25 -16
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OBottomPopup.tsx +6 -2
- package/src/components/shared/OToast.tsx +3 -3
- package/src/index.tsx +2 -0
- package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
- package/src/utils/index.tsx +2 -1
- package/themes/business/src/components/BusinessController/index.tsx +2 -2
- package/themes/business/src/components/Chat/index.tsx +40 -32
- package/themes/business/src/components/DriverMap/index.tsx +7 -5
- package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
- package/themes/business/src/components/LoginForm/index.tsx +111 -74
- package/themes/business/src/components/MapView/index.tsx +12 -1
- package/themes/business/src/components/MessagesOption/index.tsx +11 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +33 -23
- package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
- package/themes/business/src/components/OrdersOption/index.tsx +65 -21
- package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
- package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
- package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
- package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
- package/themes/business/src/components/PreviousOrders/index.tsx +18 -20
- package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +27 -13
- package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
- package/themes/business/src/components/shared/ODropDown.tsx +42 -8
- package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
- package/themes/business/src/components/shared/OLink.tsx +24 -12
- package/themes/business/src/types/index.tsx +15 -9
- package/themes/business/src/utils/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/BusinessesListing/index.tsx +2 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
- package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -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/ProductForm/index.tsx +1 -14
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +2 -0
- package/themes/original/index.tsx +4 -0
- package/themes/original/src/components/AddressDetails/index.tsx +10 -8
- package/themes/original/src/components/AddressForm/index.tsx +157 -140
- package/themes/original/src/components/AddressList/index.tsx +1 -1
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +218 -147
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessController/index.tsx +231 -114
- package/themes/original/src/components/BusinessController/styles.tsx +14 -9
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
- package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +109 -139
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +59 -60
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +175 -80
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -11
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +35 -23
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +275 -120
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -10
- package/themes/original/src/components/BusinessesListing/index.tsx +80 -25
- package/themes/original/src/components/Cart/index.tsx +82 -15
- package/themes/original/src/components/Cart/styles.tsx +4 -0
- package/themes/original/src/components/CartContent/index.tsx +22 -16
- package/themes/original/src/components/Checkout/index.tsx +113 -117
- package/themes/original/src/components/Checkout/styles.tsx +4 -3
- package/themes/original/src/components/CitiesControl/index.tsx +89 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
- package/themes/original/src/components/DriverTips/index.tsx +4 -4
- package/themes/original/src/components/DriverTips/styles.tsx +2 -1
- package/themes/original/src/components/FavoriteList/index.tsx +69 -45
- package/themes/original/src/components/FloatingButton/index.tsx +13 -11
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +20 -19
- package/themes/original/src/components/GPSButton/styles.ts +3 -3
- package/themes/original/src/components/GoogleMap/index.tsx +20 -12
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
- package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
- package/themes/original/src/components/HelpGuide/index.tsx +9 -8
- package/themes/original/src/components/HelpOrder/index.tsx +9 -8
- package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
- package/themes/original/src/components/LoginForm/Otp/index.tsx +89 -73
- package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
- package/themes/original/src/components/LoginForm/index.tsx +98 -41
- package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
- package/themes/original/src/components/Messages/index.tsx +35 -20
- package/themes/original/src/components/MomentOption/index.tsx +8 -6
- package/themes/original/src/components/MultiCart/index.tsx +63 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -93
- package/themes/original/src/components/MultiCheckout/index.tsx +10 -2
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +34 -16
- package/themes/original/src/components/MyOrders/index.tsx +88 -22
- package/themes/original/src/components/NavBar/index.tsx +11 -5
- package/themes/original/src/components/NetworkError/index.tsx +5 -3
- package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
- package/themes/original/src/components/Notifications/index.tsx +148 -0
- package/themes/original/src/components/Notifications/styles.tsx +17 -0
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +200 -39
- package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
- package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderProgress/index.tsx +77 -66
- package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
- package/themes/original/src/components/OrderSummary/index.tsx +2 -35
- package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
- package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +94 -98
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
- package/themes/original/src/components/OrdersOption/index.tsx +102 -56
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
- package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
- package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
- package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
- package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
- package/themes/original/src/components/ProductForm/index.tsx +639 -664
- package/themes/original/src/components/ProductForm/styles.tsx +10 -11
- package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
- package/themes/original/src/components/ProductOption/index.tsx +1 -1
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
- package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
- package/themes/original/src/components/ProfessionalProfile/index.tsx +19 -8
- package/themes/original/src/components/Promotions/index.tsx +232 -219
- package/themes/original/src/components/Promotions/styles.tsx +7 -2
- package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
- package/themes/original/src/components/ReviewOrder/index.tsx +120 -108
- package/themes/original/src/components/ReviewOrder/styles.tsx +5 -7
- package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
- package/themes/original/src/components/ReviewTrigger/index.tsx +136 -0
- package/themes/original/src/components/ReviewTrigger/styles.tsx +41 -0
- package/themes/original/src/components/ServiceForm/index.tsx +332 -264
- package/themes/original/src/components/SignupForm/index.tsx +160 -113
- package/themes/original/src/components/SingleOrderCard/index.tsx +266 -183
- package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
- package/themes/original/src/components/SingleProductCard/index.tsx +198 -112
- package/themes/original/src/components/SingleProductCard/styles.tsx +3 -10
- package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
- package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
- package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
- package/themes/original/src/components/UserDetails/index.tsx +5 -3
- package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
- package/themes/original/src/components/UserProfile/index.tsx +56 -31
- package/themes/original/src/components/UserProfile/styles.ts +17 -0
- package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
- package/themes/original/src/components/Wallets/index.tsx +176 -164
- package/themes/original/src/components/Wallets/styles.tsx +12 -8
- package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
- package/themes/original/src/components/shared/OBottomPopup.tsx +48 -15
- package/themes/original/src/components/shared/OButton.tsx +10 -3
- package/themes/original/src/components/shared/OIcon.tsx +8 -1
- package/themes/original/src/components/shared/OInput.tsx +10 -1
- package/themes/original/src/layouts/Container.tsx +13 -9
- package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
- package/themes/original/src/types/index.tsx +83 -28
- package/themes/original/src/utils/index.tsx +103 -58
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -14,6 +14,8 @@ Sound.setCategory('Playback')
|
|
|
14
14
|
|
|
15
15
|
const windowWidth = Dimensions.get('screen').width
|
|
16
16
|
|
|
17
|
+
const SOUND_LOOP = 3
|
|
18
|
+
|
|
17
19
|
const NewOrderNotificationUI = (props: any) => {
|
|
18
20
|
const { isBusinessApp } = props
|
|
19
21
|
const [events] = useEvent()
|
|
@@ -22,8 +24,7 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
22
24
|
const [{ user, token }] = useSession()
|
|
23
25
|
const [ordering] = useApi()
|
|
24
26
|
const { getCurrentLocation } = useLocation();
|
|
25
|
-
const [
|
|
26
|
-
let [currentEvent, setCurrentEvent] = useState<any>(null)
|
|
27
|
+
const [currentEvent, setCurrentEvent] = useState<any>(null)
|
|
27
28
|
|
|
28
29
|
const evtList: any = {
|
|
29
30
|
1: {
|
|
@@ -43,29 +44,27 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
43
44
|
},
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
const notificationSound = new Sound(theme.sounds.notification
|
|
47
|
+
const notificationSound = new Sound(theme.sounds.notification);
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
times = times + 1
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
setSoundTimeout(_timeout)
|
|
58
|
-
if (times === 3) {
|
|
59
|
-
clearInterval(_timeout)
|
|
60
|
-
clearInterval(soundTimeout)
|
|
61
|
-
}
|
|
62
|
-
}, 2500)
|
|
49
|
+
let _timeout: any = null
|
|
50
|
+
|
|
51
|
+
const handleCloseEvents = () => {
|
|
52
|
+
notificationSound.stop()
|
|
53
|
+
setCurrentEvent(null)
|
|
54
|
+
clearInterval(_timeout)
|
|
63
55
|
}
|
|
64
56
|
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
const handlePlayNotificationSound = (eventObj: any = null) => {
|
|
58
|
+
setCurrentEvent(eventObj)
|
|
59
|
+
let times = 1
|
|
60
|
+
if (times < SOUND_LOOP) {
|
|
61
|
+
_timeout = setInterval(() => {
|
|
62
|
+
notificationSound.setVolume(1).play(success => success && (times = times + 1))
|
|
63
|
+
if (times === SOUND_LOOP) {
|
|
64
|
+
clearInterval(_timeout)
|
|
65
|
+
}
|
|
66
|
+
}, 2500)
|
|
67
|
+
}
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
const handleEventNotification = async (evtType: number, value: any) => {
|
|
@@ -79,26 +78,15 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
79
78
|
}),
|
|
80
79
|
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }
|
|
81
80
|
})
|
|
82
|
-
} catch
|
|
83
|
-
console.log(error)
|
|
84
|
-
}
|
|
81
|
+
} catch {}
|
|
85
82
|
const duration = moment.duration(moment().diff(moment.utc(value?.last_driver_assigned_at)))
|
|
86
83
|
const assignedSecondsDiff = duration.asSeconds()
|
|
87
84
|
if (assignedSecondsDiff < 5 && !isBusinessApp) {
|
|
88
|
-
handlePlayNotificationSound()
|
|
89
|
-
clearInterval(soundTimeout)
|
|
90
|
-
currentEvent = { evt: 2, orderId: value?.id }
|
|
91
|
-
setCurrentEvent({ evt: 2, orderId: value?.id })
|
|
85
|
+
handlePlayNotificationSound({ evt: 2, orderId: value?.id })
|
|
92
86
|
}
|
|
93
87
|
}
|
|
94
88
|
if (evtType === 3 || value.author_id === user.id) return
|
|
95
|
-
handlePlayNotificationSound(
|
|
96
|
-
clearInterval(soundTimeout)
|
|
97
|
-
currentEvent = {
|
|
98
|
-
evt: evtType,
|
|
99
|
-
orderId: evtList[evtType].event === 'messages' ? value?.order_id : value?.id
|
|
100
|
-
}
|
|
101
|
-
setCurrentEvent({
|
|
89
|
+
handlePlayNotificationSound({
|
|
102
90
|
evt: evtType,
|
|
103
91
|
orderId: evtList[evtType].event === 'messages' ? value?.order_id : value?.id
|
|
104
92
|
})
|
|
@@ -116,10 +104,7 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
116
104
|
}, [])
|
|
117
105
|
|
|
118
106
|
useEffect(() => {
|
|
119
|
-
|
|
120
|
-
return () => {
|
|
121
|
-
notificationSound.release();
|
|
122
|
-
}
|
|
107
|
+
return () => handleCloseEvents()
|
|
123
108
|
}, [])
|
|
124
109
|
|
|
125
110
|
return (
|
|
@@ -133,7 +118,7 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
133
118
|
<View style={styles.modalView}>
|
|
134
119
|
<TouchableOpacity
|
|
135
120
|
style={styles.wrapperIcon}
|
|
136
|
-
onPress={() =>
|
|
121
|
+
onPress={() => handleCloseEvents()}
|
|
137
122
|
>
|
|
138
123
|
<Icon name="x" size={30} />
|
|
139
124
|
</TouchableOpacity>
|
|
@@ -439,7 +439,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
439
439
|
<>
|
|
440
440
|
<OrderContentComponent order={order} />
|
|
441
441
|
{(order?.status === 7 || order?.status === 4) &&
|
|
442
|
-
order?.delivery_type === 1 && (
|
|
442
|
+
order?.delivery_type === 1 && configs?.assign_driver_enabled?.value === '1' && (
|
|
443
443
|
<AssignDriver>
|
|
444
444
|
<OText style={{ marginBottom: 5 }} size={16} weight="600">
|
|
445
445
|
{t('ASSIGN_DRIVER', 'Assign driver')}
|
|
@@ -91,6 +91,10 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
91
91
|
return order?.taxes?.filter((tax: any) => tax?.type === 1)?.reduce((carry: number, tax: any) => carry + (tax?.summary?.tax_after_discount ?? tax?.summary?.tax), 0)
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
const containsOnlyNumbers = (str: string) => {
|
|
95
|
+
return /^\d+$/.test(str);
|
|
96
|
+
}
|
|
97
|
+
|
|
94
98
|
return (
|
|
95
99
|
<OrderContent isOrderGroup={isOrderGroup} lastOrder={lastOrder}>
|
|
96
100
|
{isOrderGroup && (
|
|
@@ -148,7 +152,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
148
152
|
<View style={styles.linkWithIcons}>
|
|
149
153
|
<OLink
|
|
150
154
|
PressStyle={styles.linkWithIcons}
|
|
151
|
-
url={`tel:${order?.business?.cellphone}`}
|
|
155
|
+
url={`tel:${containsOnlyNumbers(order?.business?.cellphone) ? order?.business?.cellphone : 'invalid'}`}
|
|
152
156
|
shorcut={`${order?.business?.cellphone}`}
|
|
153
157
|
TextStyle={styles.textLink}
|
|
154
158
|
/>
|
|
@@ -159,7 +163,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
159
163
|
<View style={styles.linkWithIcons}>
|
|
160
164
|
<OLink
|
|
161
165
|
PressStyle={styles.linkWithIcons}
|
|
162
|
-
url={`tel:${order?.business?.phone}`}
|
|
166
|
+
url={`tel:${containsOnlyNumbers(order?.business?.cellphone) ? order?.business?.phone : 'invalid'}`}
|
|
163
167
|
shorcut={order?.business?.phone}
|
|
164
168
|
TextStyle={styles.textLink}
|
|
165
169
|
/>
|
|
@@ -274,7 +278,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
274
278
|
<View style={styles.linkWithIcons}>
|
|
275
279
|
<OLink
|
|
276
280
|
PressStyle={styles.linkWithIcons}
|
|
277
|
-
url={`tel:${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${order?.customer?.cellphone}`}
|
|
281
|
+
url={`tel:${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${containsOnlyNumbers(order?.customer?.cellphone) ? order?.customer?.cellphone : 'invalid'}`}
|
|
278
282
|
shorcut={`${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${order?.customer?.cellphone}`}
|
|
279
283
|
TextStyle={styles.textLink}
|
|
280
284
|
/>
|
|
@@ -285,7 +289,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
285
289
|
<View style={styles.linkWithIcons}>
|
|
286
290
|
<OLink
|
|
287
291
|
PressStyle={styles.linkWithIcons}
|
|
288
|
-
url={`tel:${order?.customer?.phone}`}
|
|
292
|
+
url={`tel:${containsOnlyNumbers(order?.customer?.phone) ? order?.customer?.phone : 'invalid'}`}
|
|
289
293
|
shorcut={order?.customer?.phone}
|
|
290
294
|
TextStyle={styles.textLink}
|
|
291
295
|
/>
|
|
@@ -337,9 +341,14 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
337
341
|
</OText>
|
|
338
342
|
)}
|
|
339
343
|
{!!order?.comment && (
|
|
340
|
-
|
|
341
|
-
{
|
|
342
|
-
|
|
344
|
+
<>
|
|
345
|
+
<OText weight='500' style={{ marginBottom: 5 }}>
|
|
346
|
+
{t('ORDER_COMMENT', 'Order Comment')}
|
|
347
|
+
</OText>
|
|
348
|
+
<OText style={{ fontStyle: 'italic', opacity: 0.6, marginBottom: 20 }}>
|
|
349
|
+
{order?.comment}
|
|
350
|
+
</OText>
|
|
351
|
+
</>
|
|
343
352
|
)}
|
|
344
353
|
</View>
|
|
345
354
|
)}
|
|
@@ -364,6 +373,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
364
373
|
<ProductItemAccordion
|
|
365
374
|
key={product?.id || i}
|
|
366
375
|
product={product}
|
|
376
|
+
currency={order?.currency}
|
|
367
377
|
/>
|
|
368
378
|
))}
|
|
369
379
|
</OrderProducts>
|
|
@@ -372,7 +382,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
372
382
|
<Table>
|
|
373
383
|
<OText mBottom={4}>{t('SUBTOTAL', 'Subtotal')}</OText>
|
|
374
384
|
<OText mBottom={4}>
|
|
375
|
-
{parsePrice(((order?.summary?.subtotal ?? order?.subtotal) + getIncludedTaxes()))}
|
|
385
|
+
{parsePrice(((order?.summary?.subtotal ?? order?.subtotal) + getIncludedTaxes()), { currency: order?.currency})}
|
|
376
386
|
</OText>
|
|
377
387
|
</Table>
|
|
378
388
|
{(order?.summary?.discount > 0 ?? order?.discount > 0) && order?.offers?.length === 0 && (
|
|
@@ -385,7 +395,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
385
395
|
) : (
|
|
386
396
|
<OText mBottom={4}>{t('DISCOUNT', theme?.defaultLanguages?.DISCOUNT || 'Discount')}</OText>
|
|
387
397
|
)}
|
|
388
|
-
<OText>- {parsePrice(order?.summary?.discount ?? order?.discount)}</OText>
|
|
398
|
+
<OText>- {parsePrice(order?.summary?.discount ?? order?.discount, { currency: order?.currency})}</OText>
|
|
389
399
|
</Table>
|
|
390
400
|
)}
|
|
391
401
|
{
|
|
@@ -399,7 +409,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
399
409
|
)}
|
|
400
410
|
</OText>
|
|
401
411
|
</OSRow>
|
|
402
|
-
<OText mBottom={4}>- {parsePrice(offer?.summary?.discount)}</OText>
|
|
412
|
+
<OText mBottom={4}>- {parsePrice(offer?.summary?.discount, { currency: order?.currency})}</OText>
|
|
403
413
|
</Table>
|
|
404
414
|
))
|
|
405
415
|
}
|
|
@@ -407,9 +417,9 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
407
417
|
<Table>
|
|
408
418
|
<OText mBottom={4}>{t('SUBTOTAL_WITH_DISCOUNT', 'Subtotal with discount')}</OText>
|
|
409
419
|
{order?.tax_type === 1 ? (
|
|
410
|
-
<OText mBottom={4}>{parsePrice((order?.summary?.subtotal_with_discount + getIncludedTaxesDiscounts() ?? 0))}</OText>
|
|
420
|
+
<OText mBottom={4}>{parsePrice((order?.summary?.subtotal_with_discount + getIncludedTaxesDiscounts() ?? 0), { currency: order?.currency})}</OText>
|
|
411
421
|
) : (
|
|
412
|
-
<OText mBottom={4}>{parsePrice(order?.summary?.subtotal_with_discount ?? 0)}</OText>
|
|
422
|
+
<OText mBottom={4}>{parsePrice(order?.summary?.subtotal_with_discount ?? 0, { currency: order?.currency})}</OText>
|
|
413
423
|
)}
|
|
414
424
|
</Table>
|
|
415
425
|
)}
|
|
@@ -419,7 +429,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
419
429
|
{t('TAX', 'Tax')} {`(${verifyDecimals(order?.tax, parseNumber)}%)`}
|
|
420
430
|
</OText>
|
|
421
431
|
<OText mBottom={4}>
|
|
422
|
-
{parsePrice(order?.summary?.tax ?? 0)}
|
|
432
|
+
{parsePrice(order?.summary?.tax ?? 0, { currency: order?.currency})}
|
|
423
433
|
</OText>
|
|
424
434
|
</Table>
|
|
425
435
|
)}
|
|
@@ -430,7 +440,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
430
440
|
{t('SERVICE_FEE', 'Service fee')}
|
|
431
441
|
{`(${verifyDecimals(order?.service_fee, parseNumber)}%)`}
|
|
432
442
|
</OText>
|
|
433
|
-
<OText mBottom={4}>{parsePrice(order?.summary?.service_fee ?? 0)}</OText>
|
|
443
|
+
<OText mBottom={4}>{parsePrice(order?.summary?.service_fee ?? 0, { currency: order?.currency})}</OText>
|
|
434
444
|
</Table>
|
|
435
445
|
)
|
|
436
446
|
}
|
|
@@ -443,7 +453,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
443
453
|
{`(${verifyDecimals(tax?.rate, parseNumber)}%)`}{' '}
|
|
444
454
|
</OText>
|
|
445
455
|
</OSRow>
|
|
446
|
-
<OText mBottom={4}>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0)}</OText>
|
|
456
|
+
<OText mBottom={4}>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0, { currency: order?.currency})}</OText>
|
|
447
457
|
</Table>
|
|
448
458
|
))
|
|
449
459
|
}
|
|
@@ -453,10 +463,10 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
453
463
|
<OSRow>
|
|
454
464
|
<OText mBottom={4}>
|
|
455
465
|
{fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
456
|
-
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)} + `}{fee.percentage}%){' '}
|
|
466
|
+
({fee?.fixed > 0 && `${parsePrice(fee?.fixed, { currency: order?.currency})} + `}{fee.percentage}%){' '}
|
|
457
467
|
</OText>
|
|
458
468
|
</OSRow>
|
|
459
|
-
<OText mBottom={4}>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</OText>
|
|
469
|
+
<OText mBottom={4}>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0, { currency: order?.currency})}</OText>
|
|
460
470
|
</Table>
|
|
461
471
|
))
|
|
462
472
|
}
|
|
@@ -471,7 +481,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
471
481
|
)}
|
|
472
482
|
</OText>
|
|
473
483
|
</OSRow>
|
|
474
|
-
<OText mBottom={4}>- {parsePrice(offer?.summary?.discount)}</OText>
|
|
484
|
+
<OText mBottom={4}>- {parsePrice(offer?.summary?.discount, { currency: order?.currency})}</OText>
|
|
475
485
|
</Table>
|
|
476
486
|
))
|
|
477
487
|
}
|
|
@@ -483,7 +493,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
483
493
|
</OText>
|
|
484
494
|
|
|
485
495
|
<OText mBottom={4}>
|
|
486
|
-
{parsePrice(order?.summary?.delivery_price)}
|
|
496
|
+
{parsePrice(order?.summary?.delivery_price, { currency: order?.currency})}
|
|
487
497
|
</OText>
|
|
488
498
|
</Table>
|
|
489
499
|
)
|
|
@@ -499,7 +509,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
499
509
|
)}
|
|
500
510
|
</OText>
|
|
501
511
|
</OSRow>
|
|
502
|
-
<OText mBottom={4}>- {parsePrice(offer?.summary?.discount)}</OText>
|
|
512
|
+
<OText mBottom={4}>- {parsePrice(offer?.summary?.discount, { currency: order?.currency})}</OText>
|
|
503
513
|
</Table>
|
|
504
514
|
))
|
|
505
515
|
}
|
|
@@ -514,7 +524,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
514
524
|
`(${verifyDecimals(order?.summary?.driver_tip, parseNumber)}%)`
|
|
515
525
|
)}
|
|
516
526
|
</OText>
|
|
517
|
-
<OText mBottom={4}>{parsePrice(order?.summary?.driver_tip ?? order?.totalDriverTip)}</OText>
|
|
527
|
+
<OText mBottom={4}>{parsePrice(order?.summary?.driver_tip ?? order?.totalDriverTip, { currency: order?.currency})}</OText>
|
|
518
528
|
</Table>
|
|
519
529
|
)}
|
|
520
530
|
|
|
@@ -528,7 +538,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
528
538
|
mBottom={4}
|
|
529
539
|
style={styles.textBold}
|
|
530
540
|
color={theme.colors.primary}>
|
|
531
|
-
{parsePrice(order?.summary?.total ?? order?.total)}
|
|
541
|
+
{parsePrice(order?.summary?.total ?? order?.total, { currency: order?.currency})}
|
|
532
542
|
</OText>
|
|
533
543
|
</Table>
|
|
534
544
|
</Total>
|
|
@@ -571,7 +581,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
571
581
|
)}
|
|
572
582
|
</View>
|
|
573
583
|
<OText>
|
|
574
|
-
-{parsePrice(event.amount)}
|
|
584
|
+
-{parsePrice(event.amount, { currency: order?.currency})}
|
|
575
585
|
</OText>
|
|
576
586
|
</View>
|
|
577
587
|
))}
|
|
@@ -6,7 +6,7 @@ import FontistoIcon from 'react-native-vector-icons/Fontisto'
|
|
|
6
6
|
import FeatherIcon from 'react-native-vector-icons/Feather';
|
|
7
7
|
import SelectDropdown from 'react-native-select-dropdown'
|
|
8
8
|
import { useTheme } from 'styled-components/native';
|
|
9
|
-
|
|
9
|
+
import { NotificationSetting } from '../../../../../src/components/NotificationSetting'
|
|
10
10
|
import {
|
|
11
11
|
FiltersTab,
|
|
12
12
|
TabsContainer,
|
|
@@ -611,7 +611,7 @@ const OrdersListManagerUI = (props: OrdersOptionParams) => {
|
|
|
611
611
|
</LeftSide>
|
|
612
612
|
|
|
613
613
|
<RightSide style={{ paddingBottom: 110, paddingHorizontal: 20 }}>
|
|
614
|
-
{currentOrderSelected &&
|
|
614
|
+
{currentOrderSelected && (
|
|
615
615
|
<OrderDetailsBusiness {...props.orderDetailsProps} order={currentOrderSelected} isCustomView />
|
|
616
616
|
)}
|
|
617
617
|
</RightSide>
|
|
@@ -756,6 +756,7 @@ const OrdersListManagerUI = (props: OrdersOptionParams) => {
|
|
|
756
756
|
|
|
757
757
|
export const OrdersListManager = (props: OrdersOptionParams) => {
|
|
758
758
|
const [, t] = useLanguage();
|
|
759
|
+
const [checkNotificationStatus, setCheckNotificationStatus] = useState({ open: false, checked: false })
|
|
759
760
|
const ordersProps = {
|
|
760
761
|
...props,
|
|
761
762
|
UIComponent: OrdersListManagerUI,
|
|
@@ -870,5 +871,11 @@ export const OrdersListManager = (props: OrdersOptionParams) => {
|
|
|
870
871
|
]
|
|
871
872
|
};
|
|
872
873
|
|
|
873
|
-
return
|
|
874
|
+
return (<>
|
|
875
|
+
<OrderListGroups {...ordersProps} />
|
|
876
|
+
{props?.checkNotification && (
|
|
877
|
+
<NotificationSetting checkNotificationStatus={checkNotificationStatus}
|
|
878
|
+
setCheckNotificationStatus={setCheckNotificationStatus} />
|
|
879
|
+
)}
|
|
880
|
+
</>);
|
|
874
881
|
};
|
|
@@ -5,8 +5,10 @@ import SelectDropdown from 'react-native-select-dropdown'
|
|
|
5
5
|
import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
|
|
6
6
|
import FeatherIcon from 'react-native-vector-icons/Feather';
|
|
7
7
|
import FontistoIcon from 'react-native-vector-icons/Fontisto'
|
|
8
|
+
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
8
9
|
import { useTheme } from 'styled-components/native';
|
|
9
10
|
import { DeviceOrientationMethods } from '../../../../../src/hooks/DeviceOrientation'
|
|
11
|
+
import { NotificationSetting } from '../../../../../src/components/NotificationSetting'
|
|
10
12
|
import { NewOrderNotification } from '../NewOrderNotification';
|
|
11
13
|
|
|
12
14
|
import { OText, OButton, OModal, OIconButton, OInput, OIcon } from '../shared';
|
|
@@ -32,7 +34,8 @@ import {
|
|
|
32
34
|
ItemContent,
|
|
33
35
|
TimerInputWrapper,
|
|
34
36
|
OverLine,
|
|
35
|
-
Actions
|
|
37
|
+
Actions,
|
|
38
|
+
InputContainer
|
|
36
39
|
} from './styles';
|
|
37
40
|
import { PreviousOrders } from '../PreviousOrders';
|
|
38
41
|
import { OrdersOptionParams } from '../../types';
|
|
@@ -47,7 +50,7 @@ import { OrdersOptionDelivery } from '../OrdersOptionDelivery';
|
|
|
47
50
|
import { OrdersOptionPaymethod } from '../OrdersOptionPaymethod';
|
|
48
51
|
import { OrdersOptionDriver } from '../OrdersOptionDriver';
|
|
49
52
|
import { OrdersOptionDate } from '../OrdersOptionDate';
|
|
50
|
-
|
|
53
|
+
import { GestureEvent, GestureDetector } from 'react-native-gesture-handler'
|
|
51
54
|
const tabsList: any = {
|
|
52
55
|
pending: 1,
|
|
53
56
|
inProgress: 2,
|
|
@@ -88,7 +91,8 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
88
91
|
handleClickLogisticOrder,
|
|
89
92
|
logisticOrders,
|
|
90
93
|
loadLogisticOrders,
|
|
91
|
-
isLogisticActivated
|
|
94
|
+
isLogisticActivated,
|
|
95
|
+
isAlsea
|
|
92
96
|
} = props;
|
|
93
97
|
|
|
94
98
|
const defaultSearchList = {
|
|
@@ -121,7 +125,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
121
125
|
const [selectedTabStatus, setSelectedTabStatus] = useState([])
|
|
122
126
|
const [hour, setHour] = useState(0)
|
|
123
127
|
const [minute, setMinute] = useState(0)
|
|
124
|
-
|
|
128
|
+
const [openedSelect, setOpenedSelect] = useState('')
|
|
125
129
|
const WIDTH_SCREEN = orientationState?.dimensions?.width
|
|
126
130
|
const HEIGHT_SCREEN = orientationState?.dimensions?.height
|
|
127
131
|
const IS_PORTRAIT = orientationState.orientation === PORTRAIT
|
|
@@ -401,19 +405,21 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
401
405
|
setOpenSLASettingModal(false)
|
|
402
406
|
}
|
|
403
407
|
|
|
404
|
-
|
|
405
|
-
setCurrentFilters(null)
|
|
406
|
-
onFiltered && onFiltered(null)
|
|
408
|
+
const handleClearFilters = () => {
|
|
407
409
|
setSearch(defaultSearchList)
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
useEffect(() => {
|
|
408
413
|
scrollRefTab.current?.scrollTo({ animated: true });
|
|
409
414
|
scrollListRef.current?.scrollTo({ animated: true });
|
|
410
415
|
scrollRef.current?.scrollTo({ y: 0, animated: true });
|
|
416
|
+
setTags({ values: [] })
|
|
411
417
|
}, [currentTabSelected])
|
|
412
418
|
|
|
413
419
|
useEffect(() => {
|
|
414
420
|
setSelectedTabStatus(deliveryStatus)
|
|
415
421
|
}, [])
|
|
416
|
-
|
|
422
|
+
|
|
417
423
|
return (
|
|
418
424
|
// <GestureRecognizer
|
|
419
425
|
// onSwipeLeft={onSwipeLeft}
|
|
@@ -545,7 +551,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
545
551
|
</ScrollView>
|
|
546
552
|
</FiltersTab>
|
|
547
553
|
<View style={{ flex: 1, minHeight: HEIGHT_SCREEN - 450 }}>
|
|
548
|
-
{currentTabSelected !== 'logisticOrders' && (
|
|
554
|
+
{currentTabSelected !== 'logisticOrders' && !isAlsea && (
|
|
549
555
|
<View
|
|
550
556
|
style={{
|
|
551
557
|
display: 'flex',
|
|
@@ -725,11 +731,11 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
725
731
|
</ScrollView>
|
|
726
732
|
</View>
|
|
727
733
|
{/* </GestureRecognizer> */}
|
|
728
|
-
|
|
734
|
+
|
|
729
735
|
{isBusinessApp && (
|
|
730
736
|
<NewOrderNotification isBusinessApp={isBusinessApp} />
|
|
731
737
|
)}
|
|
732
|
-
|
|
738
|
+
|
|
733
739
|
{(openSearchModal || openSLASettingModal) && (
|
|
734
740
|
<OModal open={openSearchModal || openSLASettingModal} entireModal customClose>
|
|
735
741
|
<ModalContainer
|
|
@@ -752,22 +758,34 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
752
758
|
{openSearchModal && (
|
|
753
759
|
<SearchModalContent>
|
|
754
760
|
<ModalTitle>{t('SEARCH_ORDERS', 'Search orders')}</ModalTitle>
|
|
755
|
-
<
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
761
|
+
<InputContainer>
|
|
762
|
+
<OInput
|
|
763
|
+
value={search.id}
|
|
764
|
+
onChange={(value: any) => setSearch({ ...search, id: value })}
|
|
765
|
+
style={styles.inputStyle}
|
|
766
|
+
placeholder={t('ORDER_NUMBER', 'Order number')}
|
|
767
|
+
autoCorrect={false}
|
|
768
|
+
/>
|
|
769
|
+
<AntDesignIcon
|
|
770
|
+
name='close'
|
|
771
|
+
size={20}
|
|
772
|
+
style={{ position: 'absolute', right: 12, top: 13 }}
|
|
773
|
+
onPress={() => setSearch({ ...search, id: '' })}
|
|
774
|
+
/>
|
|
775
|
+
</InputContainer>
|
|
762
776
|
<OrdersOptionDate
|
|
763
777
|
{...props}
|
|
764
778
|
search={search}
|
|
765
779
|
onSearch={setSearch}
|
|
780
|
+
setOpenedSelect={setOpenedSelect}
|
|
781
|
+
openedSelect={openedSelect}
|
|
766
782
|
/>
|
|
767
783
|
<OrdersOptionCity
|
|
768
784
|
{...props}
|
|
769
785
|
search={search}
|
|
770
786
|
onSearch={setSearch}
|
|
787
|
+
setOpenedSelect={setOpenedSelect}
|
|
788
|
+
openedSelect={openedSelect}
|
|
771
789
|
/>
|
|
772
790
|
{isBusinessApp && (
|
|
773
791
|
<>
|
|
@@ -775,21 +793,29 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
775
793
|
{...props}
|
|
776
794
|
search={search}
|
|
777
795
|
onSearch={setSearch}
|
|
796
|
+
setOpenedSelect={setOpenedSelect}
|
|
797
|
+
openedSelect={openedSelect}
|
|
778
798
|
/>
|
|
779
799
|
<OrdersOptionDelivery
|
|
780
800
|
{...props}
|
|
781
801
|
search={search}
|
|
782
802
|
onSearch={setSearch}
|
|
803
|
+
setOpenedSelect={setOpenedSelect}
|
|
804
|
+
openedSelect={openedSelect}
|
|
783
805
|
/>
|
|
784
806
|
<OrdersOptionDriver
|
|
785
807
|
{...props}
|
|
786
808
|
search={search}
|
|
787
809
|
onSearch={setSearch}
|
|
810
|
+
setOpenedSelect={setOpenedSelect}
|
|
811
|
+
openedSelect={openedSelect}
|
|
788
812
|
/>
|
|
789
813
|
<OrdersOptionPaymethod
|
|
790
814
|
{...props}
|
|
791
815
|
search={search}
|
|
792
816
|
onSearch={setSearch}
|
|
817
|
+
setOpenedSelect={setOpenedSelect}
|
|
818
|
+
openedSelect={openedSelect}
|
|
793
819
|
/>
|
|
794
820
|
</>
|
|
795
821
|
)}
|
|
@@ -799,13 +825,24 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
799
825
|
imgRightSrc={null}
|
|
800
826
|
style={{
|
|
801
827
|
borderRadius: 7.6,
|
|
802
|
-
marginBottom:
|
|
828
|
+
marginBottom: 10,
|
|
803
829
|
marginTop: 60,
|
|
804
830
|
zIndex: 12
|
|
805
831
|
}}
|
|
806
832
|
onClick={applyFilters}
|
|
807
833
|
/>
|
|
808
|
-
|
|
834
|
+
<OButton
|
|
835
|
+
text={t('CLEAR_SEARCh', 'Clear search')}
|
|
836
|
+
imgRightSrc={null}
|
|
837
|
+
bgColor='#fff'
|
|
838
|
+
style={{
|
|
839
|
+
borderRadius: 7.6,
|
|
840
|
+
marginBottom: 0,
|
|
841
|
+
marginTop: 0,
|
|
842
|
+
zIndex: 12
|
|
843
|
+
}}
|
|
844
|
+
onClick={handleClearFilters}
|
|
845
|
+
/>
|
|
809
846
|
</SearchModalContent>
|
|
810
847
|
)}
|
|
811
848
|
{openSLASettingModal && (
|
|
@@ -934,6 +971,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
|
|
|
934
971
|
const [, t] = useLanguage();
|
|
935
972
|
const [configState] = useConfig()
|
|
936
973
|
const theme = useTheme()
|
|
974
|
+
const [checkNotificationStatus, setCheckNotificationStatus] = useState({ open: false, checked: false })
|
|
937
975
|
const ordersProps = {
|
|
938
976
|
...props,
|
|
939
977
|
UIComponent: OrdersOptionUI,
|
|
@@ -1048,5 +1086,11 @@ export const OrdersOption = (props: OrdersOptionParams) => {
|
|
|
1048
1086
|
]
|
|
1049
1087
|
};
|
|
1050
1088
|
|
|
1051
|
-
return
|
|
1089
|
+
return (<>
|
|
1090
|
+
<OrderListGroups {...ordersProps} />
|
|
1091
|
+
{props?.checkNotification && (
|
|
1092
|
+
<NotificationSetting checkNotificationStatus={checkNotificationStatus}
|
|
1093
|
+
setCheckNotificationStatus={setCheckNotificationStatus} />
|
|
1094
|
+
)}
|
|
1095
|
+
</>);
|
|
1052
1096
|
};
|
|
@@ -10,7 +10,9 @@ export const OrdersOptionBusinessUI = (props: any) => {
|
|
|
10
10
|
const {
|
|
11
11
|
search,
|
|
12
12
|
onSearch,
|
|
13
|
-
businessesList
|
|
13
|
+
businessesList,
|
|
14
|
+
setOpenedSelect,
|
|
15
|
+
openedSelect
|
|
14
16
|
} = props
|
|
15
17
|
|
|
16
18
|
const theme = useTheme();
|
|
@@ -25,6 +27,14 @@ export const OrdersOptionBusinessUI = (props: any) => {
|
|
|
25
27
|
setOptionsList(businesses)
|
|
26
28
|
}, [businessesList?.businesses])
|
|
27
29
|
|
|
30
|
+
const handleClear = () => {
|
|
31
|
+
onSearch({ ...search, business: '' })
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const handleOpenSelect = () => {
|
|
35
|
+
setOpenedSelect('business')
|
|
36
|
+
}
|
|
37
|
+
|
|
28
38
|
return (
|
|
29
39
|
<Container isIos={Platform.OS === 'ios'}>
|
|
30
40
|
<ODropDown
|
|
@@ -36,6 +46,10 @@ export const OrdersOptionBusinessUI = (props: any) => {
|
|
|
36
46
|
textcolor={theme.colors.unselectText}
|
|
37
47
|
placeholder={t('SELECT_BUSINESS', 'Select Business')}
|
|
38
48
|
dropViewMaxHeight={200}
|
|
49
|
+
handleClear={handleClear}
|
|
50
|
+
handleOpenSelect={handleOpenSelect}
|
|
51
|
+
openedSelect={openedSelect}
|
|
52
|
+
selectType='business'
|
|
39
53
|
/>
|
|
40
54
|
</Container>
|
|
41
55
|
);
|
|
@@ -10,7 +10,9 @@ export const OrdersOptionCityUI = (props: any) => {
|
|
|
10
10
|
const {
|
|
11
11
|
search,
|
|
12
12
|
onSearch,
|
|
13
|
-
allListValues
|
|
13
|
+
allListValues,
|
|
14
|
+
setOpenedSelect,
|
|
15
|
+
openedSelect
|
|
14
16
|
} = props
|
|
15
17
|
|
|
16
18
|
const theme = useTheme();
|
|
@@ -27,6 +29,14 @@ export const OrdersOptionCityUI = (props: any) => {
|
|
|
27
29
|
setOptionsList(cities)
|
|
28
30
|
}, [allListValues?.countries])
|
|
29
31
|
|
|
32
|
+
const handleClear = () => {
|
|
33
|
+
onSearch({ ...search, city: '' })
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const handleOpenSelect = () => {
|
|
37
|
+
setOpenedSelect('city')
|
|
38
|
+
}
|
|
39
|
+
|
|
30
40
|
return (
|
|
31
41
|
<Container isIos={Platform.OS === 'ios'}>
|
|
32
42
|
<ODropDown
|
|
@@ -38,6 +48,10 @@ export const OrdersOptionCityUI = (props: any) => {
|
|
|
38
48
|
textcolor={theme.colors.unselectText}
|
|
39
49
|
placeholder={t('SELECT_CITY', 'Select City')}
|
|
40
50
|
dropViewMaxHeight={200}
|
|
51
|
+
handleClear={handleClear}
|
|
52
|
+
handleOpenSelect={handleOpenSelect}
|
|
53
|
+
openedSelect={openedSelect}
|
|
54
|
+
selectType='city'
|
|
41
55
|
/>
|
|
42
56
|
</Container>
|
|
43
57
|
);
|