ordering-ui-react-native 0.16.89 → 0.16.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/themes/business/src/components/Chat/index.tsx +1 -1
- package/themes/business/src/components/MessagesOption/index.tsx +11 -1
- package/themes/business/src/components/OrdersOption/index.tsx +50 -16
- 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 +1 -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/types/index.tsx +2 -1
- package/themes/original/src/components/BusinessProductsListing/index.tsx +7 -11
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +7 -0
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +2 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +3 -1
- package/themes/original/src/components/SignupForm/index.tsx +0 -1
- package/themes/original/src/components/Wallets/index.tsx +83 -79
package/package.json
CHANGED
|
@@ -742,7 +742,7 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
742
742
|
color: '#414954'
|
|
743
743
|
}}
|
|
744
744
|
style={{ ...styles.editButton }}
|
|
745
|
-
onClick={() => handleClickQuickMessage(quickMessage.text)}
|
|
745
|
+
onClick={() => handleClickQuickMessage(message?.length > 0 ? ' ' + quickMessage.text : quickMessage.text)}
|
|
746
746
|
/>
|
|
747
747
|
</React.Fragment>
|
|
748
748
|
))}
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
StyleSheet,
|
|
6
6
|
Dimensions,
|
|
7
7
|
ScrollView,
|
|
8
|
+
RefreshControl,
|
|
8
9
|
} from 'react-native';
|
|
9
10
|
import { Contacts, useLanguage } from 'ordering-components/native';
|
|
10
11
|
import { useTheme } from 'styled-components/native';
|
|
@@ -24,6 +25,7 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
24
25
|
messages,
|
|
25
26
|
onNavigationRedirect,
|
|
26
27
|
setSortBy,
|
|
28
|
+
getOrders
|
|
27
29
|
} = props;
|
|
28
30
|
|
|
29
31
|
const theme = useTheme();
|
|
@@ -55,6 +57,7 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
55
57
|
const [tabsFilter, setTabsFilter] = useState(tabs[0].tags);
|
|
56
58
|
const [activeTag, setActiveTag] = useState(tags[0].key);
|
|
57
59
|
const [reload, setReload] = useState(false);
|
|
60
|
+
const [refreshing] = useState(false);
|
|
58
61
|
const [unreadMessages, setUnreadMessages] = useState(
|
|
59
62
|
values?.reduce(
|
|
60
63
|
(total: number, order: any) => total + order.unread_count,
|
|
@@ -247,7 +250,14 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
247
250
|
/>
|
|
248
251
|
)}
|
|
249
252
|
|
|
250
|
-
<ScrollView
|
|
253
|
+
<ScrollView
|
|
254
|
+
showsVerticalScrollIndicator={false}
|
|
255
|
+
style={{ flex: 1 }}
|
|
256
|
+
refreshControl={<RefreshControl
|
|
257
|
+
refreshing={refreshing}
|
|
258
|
+
onRefresh={() => getOrders?.()}
|
|
259
|
+
/>}
|
|
260
|
+
>
|
|
251
261
|
{!reload &&
|
|
252
262
|
!error &&
|
|
253
263
|
values.length > 0 &&
|
|
@@ -5,6 +5,7 @@ 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'
|
|
10
11
|
import { NotificationSetting } from '../../../../../src/components/NotificationSetting'
|
|
@@ -33,7 +34,8 @@ import {
|
|
|
33
34
|
ItemContent,
|
|
34
35
|
TimerInputWrapper,
|
|
35
36
|
OverLine,
|
|
36
|
-
Actions
|
|
37
|
+
Actions,
|
|
38
|
+
InputContainer
|
|
37
39
|
} from './styles';
|
|
38
40
|
import { PreviousOrders } from '../PreviousOrders';
|
|
39
41
|
import { OrdersOptionParams } from '../../types';
|
|
@@ -48,7 +50,7 @@ import { OrdersOptionDelivery } from '../OrdersOptionDelivery';
|
|
|
48
50
|
import { OrdersOptionPaymethod } from '../OrdersOptionPaymethod';
|
|
49
51
|
import { OrdersOptionDriver } from '../OrdersOptionDriver';
|
|
50
52
|
import { OrdersOptionDate } from '../OrdersOptionDate';
|
|
51
|
-
|
|
53
|
+
import { GestureEvent, GestureDetector } from 'react-native-gesture-handler'
|
|
52
54
|
const tabsList: any = {
|
|
53
55
|
pending: 1,
|
|
54
56
|
inProgress: 2,
|
|
@@ -123,7 +125,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
123
125
|
const [selectedTabStatus, setSelectedTabStatus] = useState([])
|
|
124
126
|
const [hour, setHour] = useState(0)
|
|
125
127
|
const [minute, setMinute] = useState(0)
|
|
126
|
-
|
|
128
|
+
const [openedSelect, setOpenedSelect] = useState('')
|
|
127
129
|
const WIDTH_SCREEN = orientationState?.dimensions?.width
|
|
128
130
|
const HEIGHT_SCREEN = orientationState?.dimensions?.height
|
|
129
131
|
const IS_PORTRAIT = orientationState.orientation === PORTRAIT
|
|
@@ -403,10 +405,11 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
403
405
|
setOpenSLASettingModal(false)
|
|
404
406
|
}
|
|
405
407
|
|
|
406
|
-
|
|
407
|
-
setCurrentFilters(null)
|
|
408
|
-
onFiltered && onFiltered(null)
|
|
408
|
+
const handleClearFilters = () => {
|
|
409
409
|
setSearch(defaultSearchList)
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
useEffect(() => {
|
|
410
413
|
scrollRefTab.current?.scrollTo({ animated: true });
|
|
411
414
|
scrollListRef.current?.scrollTo({ animated: true });
|
|
412
415
|
scrollRef.current?.scrollTo({ y: 0, animated: true });
|
|
@@ -415,7 +418,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
415
418
|
useEffect(() => {
|
|
416
419
|
setSelectedTabStatus(deliveryStatus)
|
|
417
420
|
}, [])
|
|
418
|
-
|
|
421
|
+
|
|
419
422
|
return (
|
|
420
423
|
// <GestureRecognizer
|
|
421
424
|
// onSwipeLeft={onSwipeLeft}
|
|
@@ -754,22 +757,34 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
754
757
|
{openSearchModal && (
|
|
755
758
|
<SearchModalContent>
|
|
756
759
|
<ModalTitle>{t('SEARCH_ORDERS', 'Search orders')}</ModalTitle>
|
|
757
|
-
<
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
760
|
+
<InputContainer>
|
|
761
|
+
<OInput
|
|
762
|
+
value={search.id}
|
|
763
|
+
onChange={(value: any) => setSearch({ ...search, id: value })}
|
|
764
|
+
style={styles.inputStyle}
|
|
765
|
+
placeholder={t('ORDER_NUMBER', 'Order number')}
|
|
766
|
+
autoCorrect={false}
|
|
767
|
+
/>
|
|
768
|
+
<AntDesignIcon
|
|
769
|
+
name='close'
|
|
770
|
+
size={20}
|
|
771
|
+
style={{ position: 'absolute', right: 12, top: 13 }}
|
|
772
|
+
onPress={() => setSearch({ ...search, id: '' })}
|
|
773
|
+
/>
|
|
774
|
+
</InputContainer>
|
|
764
775
|
<OrdersOptionDate
|
|
765
776
|
{...props}
|
|
766
777
|
search={search}
|
|
767
778
|
onSearch={setSearch}
|
|
779
|
+
setOpenedSelect={setOpenedSelect}
|
|
780
|
+
openedSelect={openedSelect}
|
|
768
781
|
/>
|
|
769
782
|
<OrdersOptionCity
|
|
770
783
|
{...props}
|
|
771
784
|
search={search}
|
|
772
785
|
onSearch={setSearch}
|
|
786
|
+
setOpenedSelect={setOpenedSelect}
|
|
787
|
+
openedSelect={openedSelect}
|
|
773
788
|
/>
|
|
774
789
|
{isBusinessApp && (
|
|
775
790
|
<>
|
|
@@ -777,21 +792,29 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
777
792
|
{...props}
|
|
778
793
|
search={search}
|
|
779
794
|
onSearch={setSearch}
|
|
795
|
+
setOpenedSelect={setOpenedSelect}
|
|
796
|
+
openedSelect={openedSelect}
|
|
780
797
|
/>
|
|
781
798
|
<OrdersOptionDelivery
|
|
782
799
|
{...props}
|
|
783
800
|
search={search}
|
|
784
801
|
onSearch={setSearch}
|
|
802
|
+
setOpenedSelect={setOpenedSelect}
|
|
803
|
+
openedSelect={openedSelect}
|
|
785
804
|
/>
|
|
786
805
|
<OrdersOptionDriver
|
|
787
806
|
{...props}
|
|
788
807
|
search={search}
|
|
789
808
|
onSearch={setSearch}
|
|
809
|
+
setOpenedSelect={setOpenedSelect}
|
|
810
|
+
openedSelect={openedSelect}
|
|
790
811
|
/>
|
|
791
812
|
<OrdersOptionPaymethod
|
|
792
813
|
{...props}
|
|
793
814
|
search={search}
|
|
794
815
|
onSearch={setSearch}
|
|
816
|
+
setOpenedSelect={setOpenedSelect}
|
|
817
|
+
openedSelect={openedSelect}
|
|
795
818
|
/>
|
|
796
819
|
</>
|
|
797
820
|
)}
|
|
@@ -801,13 +824,24 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
801
824
|
imgRightSrc={null}
|
|
802
825
|
style={{
|
|
803
826
|
borderRadius: 7.6,
|
|
804
|
-
marginBottom:
|
|
827
|
+
marginBottom: 10,
|
|
805
828
|
marginTop: 60,
|
|
806
829
|
zIndex: 12
|
|
807
830
|
}}
|
|
808
831
|
onClick={applyFilters}
|
|
809
832
|
/>
|
|
810
|
-
|
|
833
|
+
<OButton
|
|
834
|
+
text={t('CLEAR_SEARCh', 'Clear search')}
|
|
835
|
+
imgRightSrc={null}
|
|
836
|
+
bgColor='#fff'
|
|
837
|
+
style={{
|
|
838
|
+
borderRadius: 7.6,
|
|
839
|
+
marginBottom: 0,
|
|
840
|
+
marginTop: 0,
|
|
841
|
+
zIndex: 12
|
|
842
|
+
}}
|
|
843
|
+
onClick={handleClearFilters}
|
|
844
|
+
/>
|
|
811
845
|
</SearchModalContent>
|
|
812
846
|
)}
|
|
813
847
|
{openSLASettingModal && (
|
|
@@ -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, option: '' })
|
|
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
|
);
|
|
@@ -3,12 +3,16 @@ import { useLanguage } from 'ordering-components/native';
|
|
|
3
3
|
import { useTheme } from 'styled-components/native';
|
|
4
4
|
import { Container } from './styles';
|
|
5
5
|
import ODropDownCalendar from '../shared/ODropDownCalendar';
|
|
6
|
-
import { Platform } from 'react-native'
|
|
7
|
-
|
|
6
|
+
import { Button, Platform, Touchable, TouchableOpacity, View } from 'react-native'
|
|
7
|
+
import DoubleClick from 'react-native-double-tap'
|
|
8
|
+
import { OText } from '../shared';
|
|
9
|
+
import DoubleTap from 'react-native-double-tap';
|
|
8
10
|
export const OrdersOptionDate = (props: any) => {
|
|
9
11
|
const {
|
|
10
12
|
search,
|
|
11
|
-
onSearch
|
|
13
|
+
onSearch,
|
|
14
|
+
setOpenedSelect,
|
|
15
|
+
openedSelect
|
|
12
16
|
} = props
|
|
13
17
|
|
|
14
18
|
const theme = useTheme();
|
|
@@ -22,18 +26,23 @@ export const OrdersOptionDate = (props: any) => {
|
|
|
22
26
|
|
|
23
27
|
const handleChangeOption = (option: any) => {
|
|
24
28
|
if (option === 'calendar') {
|
|
25
|
-
onSearch({...search, date: {...search.date, type: option}})
|
|
29
|
+
onSearch({ ...search, date: { ...search.date, type: option } })
|
|
26
30
|
} else {
|
|
27
|
-
onSearch({...search, date: {from: '', to: '', type: option}})
|
|
31
|
+
onSearch({ ...search, date: { from: '', to: '', type: option } })
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
const handleChangeDate = (from: any, to: any) => {
|
|
32
|
-
onSearch({...search, date: {...search.date, from: from, to: to}})
|
|
36
|
+
onSearch({ ...search, date: { ...search.date, from: from, to: to } })
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const handleOpenSelect = () => {
|
|
40
|
+
setOpenedSelect('calendar')
|
|
33
41
|
}
|
|
34
42
|
|
|
35
43
|
return (
|
|
36
44
|
<Container isIos={Platform.OS === 'ios'}>
|
|
45
|
+
|
|
37
46
|
<ODropDownCalendar
|
|
38
47
|
options={optionsList}
|
|
39
48
|
defaultValue={search.date.type}
|
|
@@ -47,6 +56,10 @@ export const OrdersOptionDate = (props: any) => {
|
|
|
47
56
|
rangeDate={search.date}
|
|
48
57
|
handleChangeDate={handleChangeDate}
|
|
49
58
|
isCalendarAlwaysVisible
|
|
59
|
+
handleClear={() => onSearch({ ...search, date: { from: '', to: '', type: '' } })}
|
|
60
|
+
handleOpenSelect={handleOpenSelect}
|
|
61
|
+
openedSelect={openedSelect}
|
|
62
|
+
selectType='calendar'
|
|
50
63
|
/>
|
|
51
64
|
</Container>
|
|
52
65
|
);
|
|
@@ -8,7 +8,9 @@ import { Platform } from 'react-native'
|
|
|
8
8
|
export const OrdersOptionDelivery = (props: any) => {
|
|
9
9
|
const {
|
|
10
10
|
search,
|
|
11
|
-
onSearch
|
|
11
|
+
onSearch,
|
|
12
|
+
setOpenedSelect,
|
|
13
|
+
openedSelect
|
|
12
14
|
} = props
|
|
13
15
|
|
|
14
16
|
const theme = useTheme();
|
|
@@ -18,6 +20,14 @@ export const OrdersOptionDelivery = (props: any) => {
|
|
|
18
20
|
{ value: '2', content: t('PICKUP', 'Pickup') }
|
|
19
21
|
]
|
|
20
22
|
|
|
23
|
+
const handleClear = () => {
|
|
24
|
+
onSearch({ ...search, delivery_type: '' })
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const handleOpenSelect = () => {
|
|
28
|
+
setOpenedSelect('delivery_type')
|
|
29
|
+
}
|
|
30
|
+
|
|
21
31
|
return (
|
|
22
32
|
<Container isIos={Platform.OS === 'ios'}>
|
|
23
33
|
<ODropDown
|
|
@@ -29,6 +39,10 @@ export const OrdersOptionDelivery = (props: any) => {
|
|
|
29
39
|
textcolor={theme.colors.unselectText}
|
|
30
40
|
placeholder={t('SELECT_DELIVERY_TYPE', 'Select Delivery type')}
|
|
31
41
|
dropViewMaxHeight={200}
|
|
42
|
+
handleClear={handleClear}
|
|
43
|
+
handleOpenSelect={handleOpenSelect}
|
|
44
|
+
openedSelect={openedSelect}
|
|
45
|
+
selectType='delivery_type'
|
|
32
46
|
/>
|
|
33
47
|
</Container>
|
|
34
48
|
);
|
|
@@ -9,7 +9,9 @@ export const OrdersOptionDriverUI = (props: any) => {
|
|
|
9
9
|
const {
|
|
10
10
|
search,
|
|
11
11
|
onSearch,
|
|
12
|
-
driverList
|
|
12
|
+
driverList,
|
|
13
|
+
setOpenedSelect,
|
|
14
|
+
openedSelect
|
|
13
15
|
} = props
|
|
14
16
|
|
|
15
17
|
const theme = useTheme();
|
|
@@ -24,6 +26,14 @@ export const OrdersOptionDriverUI = (props: any) => {
|
|
|
24
26
|
setOptionsList(drivers)
|
|
25
27
|
}, [driverList?.drivers])
|
|
26
28
|
|
|
29
|
+
const handleClear = () => {
|
|
30
|
+
onSearch({ ...search, driver: '' })
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const handleOpenSelect = () => {
|
|
34
|
+
setOpenedSelect('driver')
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
return (
|
|
28
38
|
<Container isIos={Platform.OS === 'ios'}>
|
|
29
39
|
<ODropDown
|
|
@@ -35,6 +45,10 @@ export const OrdersOptionDriverUI = (props: any) => {
|
|
|
35
45
|
textcolor={theme.colors.unselectText}
|
|
36
46
|
placeholder={t('SELECT_DRIVER', 'Select Driver')}
|
|
37
47
|
dropViewMaxHeight={165}
|
|
48
|
+
handleClear={handleClear}
|
|
49
|
+
handleOpenSelect={handleOpenSelect}
|
|
50
|
+
openedSelect={openedSelect}
|
|
51
|
+
selectType='driver'
|
|
38
52
|
/>
|
|
39
53
|
</Container>
|
|
40
54
|
);
|
|
@@ -9,7 +9,9 @@ export const OrdersOptionPaymethodUI = (props: any) => {
|
|
|
9
9
|
const {
|
|
10
10
|
search,
|
|
11
11
|
onSearch,
|
|
12
|
-
paymethodList
|
|
12
|
+
paymethodList,
|
|
13
|
+
setOpenedSelect,
|
|
14
|
+
openedSelect
|
|
13
15
|
} = props
|
|
14
16
|
|
|
15
17
|
const theme = useTheme();
|
|
@@ -24,6 +26,14 @@ export const OrdersOptionPaymethodUI = (props: any) => {
|
|
|
24
26
|
setOptionsList(paymethods)
|
|
25
27
|
}, [paymethodList?.paymethods])
|
|
26
28
|
|
|
29
|
+
const handleClear = () => {
|
|
30
|
+
onSearch({ ...search, paymethod: '' })
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const handleOpenSelect = () => {
|
|
34
|
+
setOpenedSelect('paymethod')
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
return (
|
|
28
38
|
<Container isIos={Platform.OS === 'ios'}>
|
|
29
39
|
<ODropDown
|
|
@@ -35,6 +45,10 @@ export const OrdersOptionPaymethodUI = (props: any) => {
|
|
|
35
45
|
textcolor={theme.colors.unselectText}
|
|
36
46
|
placeholder={t('SELECT_PAYMETHOD', 'Select Paymethod')}
|
|
37
47
|
dropViewMaxHeight={200}
|
|
48
|
+
handleClear={handleClear}
|
|
49
|
+
handleOpenSelect={handleOpenSelect}
|
|
50
|
+
openedSelect={openedSelect}
|
|
51
|
+
selectType='paymethod'
|
|
38
52
|
/>
|
|
39
53
|
</Container>
|
|
40
54
|
);
|
|
@@ -11,7 +11,9 @@ export const OrdersOptionStatus = (props: any) => {
|
|
|
11
11
|
tabs,
|
|
12
12
|
orderStatus,
|
|
13
13
|
search,
|
|
14
|
-
onSearch
|
|
14
|
+
onSearch,
|
|
15
|
+
setOpenedSelect,
|
|
16
|
+
openedSelect
|
|
15
17
|
} = props
|
|
16
18
|
|
|
17
19
|
const theme = useTheme();
|
|
@@ -29,6 +31,10 @@ export const OrdersOptionStatus = (props: any) => {
|
|
|
29
31
|
setOptionsList(_optionList)
|
|
30
32
|
}, [currentTabSelected, tabs, orderStatus])
|
|
31
33
|
|
|
34
|
+
const handleOpenSelect = () => {
|
|
35
|
+
setOpenedSelect('state')
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
return (
|
|
33
39
|
<Container isIos={Platform.OS === 'ios'}>
|
|
34
40
|
<ODropDown
|
|
@@ -40,6 +46,9 @@ export const OrdersOptionStatus = (props: any) => {
|
|
|
40
46
|
textcolor={theme.colors.unselectText}
|
|
41
47
|
placeholder={t('SELECT_STATUS', 'Select Status')}
|
|
42
48
|
dropViewMaxHeight={200}
|
|
49
|
+
handleOpenSelect={handleOpenSelect}
|
|
50
|
+
openedSelect={openedSelect}
|
|
51
|
+
selectType='state'
|
|
43
52
|
/>
|
|
44
53
|
</Container>
|
|
45
54
|
);
|
|
@@ -4,6 +4,7 @@ import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler'
|
|
|
4
4
|
import { ScrollView as CustomScrollView, TouchableOpacity as CustomTouchableOpacity, View } from 'react-native'
|
|
5
5
|
import FeatherIcon from 'react-native-vector-icons/Feather';
|
|
6
6
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
7
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
7
8
|
import { Text } from 'react-native-paper';
|
|
8
9
|
|
|
9
10
|
interface Props {
|
|
@@ -16,7 +17,11 @@ interface Props {
|
|
|
16
17
|
dropViewMaxHeight?: any,
|
|
17
18
|
isModal?: any,
|
|
18
19
|
bgcolor?: string,
|
|
19
|
-
textcolor?: string
|
|
20
|
+
textcolor?: string,
|
|
21
|
+
handleClear?: any,
|
|
22
|
+
handleOpenSelect?: any,
|
|
23
|
+
openedSelect?: string,
|
|
24
|
+
selectType?: string
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
const Wrapper = styled.View`
|
|
@@ -70,7 +75,11 @@ const ODropDown = (props: Props) => {
|
|
|
70
75
|
placeholder,
|
|
71
76
|
onSelect,
|
|
72
77
|
dropViewMaxHeight,
|
|
73
|
-
isModal
|
|
78
|
+
isModal,
|
|
79
|
+
handleClear,
|
|
80
|
+
handleOpenSelect,
|
|
81
|
+
openedSelect,
|
|
82
|
+
selectType
|
|
74
83
|
} = props
|
|
75
84
|
|
|
76
85
|
const theme = useTheme();
|
|
@@ -82,6 +91,7 @@ const ODropDown = (props: Props) => {
|
|
|
82
91
|
|
|
83
92
|
const onToggle = () => {
|
|
84
93
|
setIsOpen(!isOpen)
|
|
94
|
+
if (!isOpen) handleOpenSelect?.()
|
|
85
95
|
}
|
|
86
96
|
|
|
87
97
|
const onSelectOption = (option: any) => {
|
|
@@ -91,12 +101,25 @@ const ODropDown = (props: Props) => {
|
|
|
91
101
|
setIsOpen(false)
|
|
92
102
|
}
|
|
93
103
|
|
|
104
|
+
const handleClearSearch = () => {
|
|
105
|
+
handleClear()
|
|
106
|
+
if (isOpen) {
|
|
107
|
+
onToggle()
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
94
111
|
useEffect(() => {
|
|
95
112
|
const _defaultOption = options?.find((option: any) => option.value === defaultValue)
|
|
96
113
|
setSelectedOption(_defaultOption)
|
|
97
114
|
setValue(defaultValue)
|
|
98
115
|
}, [defaultValue, options])
|
|
99
116
|
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
if (openedSelect !== selectType && typeof openedSelect === 'string') {
|
|
119
|
+
setIsOpen(false)
|
|
120
|
+
}
|
|
121
|
+
}, [openedSelect])
|
|
122
|
+
|
|
100
123
|
return (
|
|
101
124
|
<Wrapper style={props.style}>
|
|
102
125
|
<Selected
|
|
@@ -110,11 +133,22 @@ const ODropDown = (props: Props) => {
|
|
|
110
133
|
>
|
|
111
134
|
{selectedOption?.content || selectedOption?.name || placeholder}
|
|
112
135
|
</SelectedLabel>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
136
|
+
{selectedOption && handleClear ? (
|
|
137
|
+
<AntDesign
|
|
138
|
+
name={'close'}
|
|
139
|
+
size={20}
|
|
140
|
+
onPress={() => handleClearSearch()}
|
|
141
|
+
style={{ position: 'absolute', right: 12, top: 13 }}
|
|
142
|
+
/>
|
|
143
|
+
) : (
|
|
144
|
+
<FeatherIcon
|
|
145
|
+
name='chevron-down'
|
|
146
|
+
color={props.textcolor}
|
|
147
|
+
size={24}
|
|
148
|
+
style={{ position: 'absolute', right: 12, top: 13 }}
|
|
149
|
+
|
|
150
|
+
/>
|
|
151
|
+
)}
|
|
118
152
|
</Selected>
|
|
119
153
|
{isOpen && options && (
|
|
120
154
|
<DropView
|
|
@@ -154,7 +188,7 @@ const ODropDown = (props: Props) => {
|
|
|
154
188
|
maxHeight: dropViewMaxHeight || null,
|
|
155
189
|
paddingBottom: 15
|
|
156
190
|
}}
|
|
157
|
-
|
|
191
|
+
nestedScrollEnabled={true}
|
|
158
192
|
>
|
|
159
193
|
{options.map((option: any, index: number) => (
|
|
160
194
|
<CustomTouchableOpacity
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react'
|
|
1
|
+
import React, { useState, useEffect, useRef } from 'react'
|
|
2
2
|
import styled, { css, useTheme } from 'styled-components/native'
|
|
3
3
|
import { useLanguage } from 'ordering-components/native';
|
|
4
4
|
import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler'
|
|
@@ -24,6 +24,10 @@ interface Props {
|
|
|
24
24
|
handleChangeDate?: any,
|
|
25
25
|
rangeDate?: any,
|
|
26
26
|
isCalendarAlwaysVisible?: boolean
|
|
27
|
+
handleClear?: any;
|
|
28
|
+
handleOpenSelect?: any,
|
|
29
|
+
openedSelect?: string,
|
|
30
|
+
selectType?: string
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
const Wrapper = styled.View`
|
|
@@ -96,7 +100,11 @@ const ODropDownCalendar = (props: Props) => {
|
|
|
96
100
|
isCalendar,
|
|
97
101
|
handleChangeDate,
|
|
98
102
|
rangeDate,
|
|
99
|
-
isCalendarAlwaysVisible
|
|
103
|
+
isCalendarAlwaysVisible,
|
|
104
|
+
handleClear,
|
|
105
|
+
handleOpenSelect,
|
|
106
|
+
openedSelect,
|
|
107
|
+
selectType
|
|
100
108
|
} = props
|
|
101
109
|
|
|
102
110
|
const theme = useTheme();
|
|
@@ -110,6 +118,7 @@ const ODropDownCalendar = (props: Props) => {
|
|
|
110
118
|
|
|
111
119
|
const onToggle = () => {
|
|
112
120
|
setIsOpen(!isOpen)
|
|
121
|
+
if (!isOpen) handleOpenSelect?.()
|
|
113
122
|
}
|
|
114
123
|
|
|
115
124
|
const onSelectOption = (option: any) => {
|
|
@@ -122,7 +131,7 @@ const ODropDownCalendar = (props: Props) => {
|
|
|
122
131
|
const onDateChange = (date: any, type: any) => {
|
|
123
132
|
if (!date) return
|
|
124
133
|
if (type === 'END_DATE') {
|
|
125
|
-
handleChangeDate(rangeDate.from, date.format('MM/DD/YY'))
|
|
134
|
+
handleChangeDate(rangeDate.from, new Date(date.format('MM/DD/YY')) === rangeDate.from ? '' : date.format('MM/DD/YY'))
|
|
126
135
|
} else {
|
|
127
136
|
handleChangeDate(date.format('MM/DD/YY'), '')
|
|
128
137
|
}
|
|
@@ -142,12 +151,31 @@ const ODropDownCalendar = (props: Props) => {
|
|
|
142
151
|
return (from || to) ? (from + (to ? end : '')) : placeholder
|
|
143
152
|
}
|
|
144
153
|
|
|
154
|
+
const handleClearCalendar = () => {
|
|
155
|
+
handleClear && handleClear()
|
|
156
|
+
if (isOpen) {
|
|
157
|
+
onToggle()
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
145
161
|
useEffect(() => {
|
|
146
162
|
const _defaultOption = options?.find((option: any) => option.value === defaultValue)
|
|
147
163
|
setSelectedOption(_defaultOption)
|
|
148
164
|
setValue(defaultValue)
|
|
149
165
|
}, [defaultValue, options])
|
|
150
166
|
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
if (openedSelect !== selectType && typeof openedSelect === 'string') {
|
|
169
|
+
setIsOpen(false)
|
|
170
|
+
}
|
|
171
|
+
}, [openedSelect])
|
|
172
|
+
|
|
173
|
+
useEffect(() => {
|
|
174
|
+
if (rangeDate.to && rangeDate.from) {
|
|
175
|
+
onSelect('calendar')
|
|
176
|
+
}
|
|
177
|
+
}, [rangeDate.to, rangeDate.from])
|
|
178
|
+
|
|
151
179
|
return (
|
|
152
180
|
<Wrapper style={props.style}>
|
|
153
181
|
<Selected
|
|
@@ -165,10 +193,11 @@ const ODropDownCalendar = (props: Props) => {
|
|
|
165
193
|
: `${selectedOption?.content || selectedOption?.name || placeholder}`
|
|
166
194
|
}
|
|
167
195
|
</SelectedLabel>
|
|
168
|
-
<
|
|
169
|
-
name='calendar'
|
|
170
|
-
|
|
171
|
-
|
|
196
|
+
<AntDesign
|
|
197
|
+
name={selectedOption && handleClear ? 'close' : 'calendar'}
|
|
198
|
+
size={20}
|
|
199
|
+
onPress={() => handleClearCalendar()}
|
|
200
|
+
style={{ position: 'absolute', right: 12, top: 13 }}
|
|
172
201
|
/>
|
|
173
202
|
</Selected>
|
|
174
203
|
{isOpen && options && (
|
|
@@ -256,6 +256,7 @@ export interface MessagesOptionParams {
|
|
|
256
256
|
messagesReadList?: any;
|
|
257
257
|
onNavigationRedirect?: any;
|
|
258
258
|
setSortBy?: any;
|
|
259
|
+
getOrders: any
|
|
259
260
|
}
|
|
260
261
|
export interface OrdersOptionParams {
|
|
261
262
|
orderList?: any;
|
|
@@ -409,7 +410,7 @@ export interface MessagesParams {
|
|
|
409
410
|
order?: any;
|
|
410
411
|
orderId?: number;
|
|
411
412
|
messages?: any;
|
|
412
|
-
message
|
|
413
|
+
message: string;
|
|
413
414
|
image?: string;
|
|
414
415
|
messagesToShow?: any;
|
|
415
416
|
sendMessage?: any;
|
|
@@ -21,6 +21,8 @@ import { BusinessProductsCategories } from '../BusinessProductsCategories'
|
|
|
21
21
|
import { BusinessProductsList } from '../BusinessProductsList'
|
|
22
22
|
import { BusinessProductsListingParams } from '../../types'
|
|
23
23
|
import { _retrieveStoreData, _removeStoreData } from '../../providers/StoreUtil';
|
|
24
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
25
|
+
|
|
24
26
|
import {
|
|
25
27
|
TopHeader,
|
|
26
28
|
WrapSearchBar,
|
|
@@ -29,7 +31,8 @@ import {
|
|
|
29
31
|
ContainerSafeAreaView,
|
|
30
32
|
BackgroundGray,
|
|
31
33
|
ProfessionalFilterWrapper,
|
|
32
|
-
NearBusiness
|
|
34
|
+
NearBusiness,
|
|
35
|
+
TopActions
|
|
33
36
|
} from './styles'
|
|
34
37
|
import { FloatingButton } from '../FloatingButton'
|
|
35
38
|
import { UpsellingRedirect } from './UpsellingRedirect'
|
|
@@ -248,16 +251,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
248
251
|
<TopHeader isIos={Platform.OS === 'ios'}>
|
|
249
252
|
{!isOpenSearchBar && (
|
|
250
253
|
<>
|
|
251
|
-
<
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
imgRightSrc={null}
|
|
255
|
-
style={styles.btnBackArrow}
|
|
256
|
-
onClick={() => handleBackNavigation()}
|
|
257
|
-
imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 30 }}
|
|
258
|
-
/>
|
|
259
|
-
|
|
260
|
-
</View>
|
|
254
|
+
<TopActions onPress={() => handleBackNavigation()}>
|
|
255
|
+
<IconAntDesign name='arrowleft' size={26} />
|
|
256
|
+
</TopActions>
|
|
261
257
|
{!errorQuantityProducts && (
|
|
262
258
|
<View style={{ ...styles.headerItem }}>
|
|
263
259
|
<TouchableOpacity
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
} from 'ordering-components/native';
|
|
23
23
|
import { useTheme } from 'styled-components/native';
|
|
24
24
|
import Ionicons from 'react-native-vector-icons/Ionicons'
|
|
25
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
25
26
|
|
|
26
27
|
import {
|
|
27
28
|
Search,
|
|
@@ -283,7 +284,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
283
284
|
style={{ paddingTop: top + 20 }}>
|
|
284
285
|
{!auth && (
|
|
285
286
|
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
|
|
286
|
-
<
|
|
287
|
+
<IconAntDesign name='arrowleft' size={26} />
|
|
287
288
|
</TouchableOpacity>
|
|
288
289
|
)}
|
|
289
290
|
<Search>
|
|
@@ -53,6 +53,7 @@ import { getTypesText, convertToRadian } from '../../../../utils';
|
|
|
53
53
|
import { OrderProgress } from '../../../OrderProgress';
|
|
54
54
|
import { useFocusEffect, useIsFocused } from '@react-navigation/native';
|
|
55
55
|
import FastImage from 'react-native-fast-image';
|
|
56
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
56
57
|
|
|
57
58
|
const PIXELS_TO_SCROLL = 2000;
|
|
58
59
|
|
|
@@ -450,8 +451,9 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
450
451
|
resizeMode='cover'
|
|
451
452
|
>
|
|
452
453
|
{!auth && (
|
|
454
|
+
|
|
453
455
|
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
|
|
454
|
-
<
|
|
456
|
+
<IconAntDesign name='arrowleft' size={26} />
|
|
455
457
|
</TouchableOpacity>
|
|
456
458
|
)}
|
|
457
459
|
</HeaderWrapper>
|
|
@@ -635,7 +635,6 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
635
635
|
}
|
|
636
636
|
})}
|
|
637
637
|
forwardRef={phoneRef}
|
|
638
|
-
defaultCode={formState?.country_code ?? formState?.country_phone_code ?? null}
|
|
639
638
|
changeCountry={(val: any) => setPhoneInputData({
|
|
640
639
|
...phoneInputData,
|
|
641
640
|
phone: {
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
useUtils,
|
|
10
10
|
useConfig
|
|
11
11
|
} from 'ordering-components/native'
|
|
12
|
+
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
12
13
|
|
|
13
14
|
import {
|
|
14
15
|
Container,
|
|
@@ -64,7 +65,7 @@ const WalletsUI = (props: any) => {
|
|
|
64
65
|
|
|
65
66
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
66
67
|
const [openHistory, setOpenHistory] = useState(false)
|
|
67
|
-
|
|
68
|
+
const isChewLayout = theme?.wallets_view?.components?.layout?.type === 'original'
|
|
68
69
|
|
|
69
70
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
70
71
|
|
|
@@ -103,7 +104,7 @@ const WalletsUI = (props: any) => {
|
|
|
103
104
|
}, [configs])
|
|
104
105
|
|
|
105
106
|
useEffect(() => {
|
|
106
|
-
if(refreshWallets){
|
|
107
|
+
if (refreshWallets) {
|
|
107
108
|
getWallets()
|
|
108
109
|
setRefreshWallets && setRefreshWallets(false)
|
|
109
110
|
}
|
|
@@ -139,83 +140,83 @@ const WalletsUI = (props: any) => {
|
|
|
139
140
|
!userLoyaltyLevel.loading &&
|
|
140
141
|
!walletList.error &&
|
|
141
142
|
walletList.wallets?.length > 0 &&
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
143
|
+
(
|
|
144
|
+
<>
|
|
145
|
+
<OTabs
|
|
146
|
+
horizontal
|
|
147
|
+
showsHorizontalScrollIndicator={false}
|
|
148
|
+
>
|
|
149
|
+
{walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
|
|
150
|
+
<Pressable
|
|
151
|
+
key={wallet.id}
|
|
152
|
+
onPress={() => handleChangeTab(wallet)}
|
|
153
|
+
>
|
|
154
|
+
<OTab isSelected={tabSelected === wallet.type}>
|
|
155
|
+
<OText size={18}>
|
|
156
|
+
{walletName[wallet.type]?.name}
|
|
157
|
+
</OText>
|
|
158
|
+
</OTab>
|
|
159
|
+
</Pressable>
|
|
160
|
+
))}
|
|
161
|
+
</OTabs>
|
|
161
162
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
163
|
+
<SectionContent>
|
|
164
|
+
{!!loyaltyLevel && tabSelected === 'credit_point' && (
|
|
165
|
+
<LoyaltyContent>
|
|
166
|
+
<LoyaltyWrapp>
|
|
167
|
+
<OText size={20}>
|
|
168
|
+
{`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
|
|
169
|
+
</OText>
|
|
170
|
+
{loyaltyLevel.image ? (
|
|
171
|
+
<FastImage
|
|
172
|
+
style={styles.logoStyle}
|
|
173
|
+
source={{
|
|
174
|
+
uri: loyaltyLevel.image,
|
|
175
|
+
priority: FastImage.priority.high,
|
|
176
|
+
cache: FastImage.cacheControl.web
|
|
177
|
+
}}
|
|
178
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
179
|
+
/>
|
|
180
|
+
) : (
|
|
181
|
+
<LoyaltyImg
|
|
182
|
+
source={theme.images.dummies.loyaltyLevel}
|
|
183
|
+
resizeMode='contain'
|
|
184
|
+
/>
|
|
185
|
+
)}
|
|
186
|
+
<OText
|
|
187
|
+
size={22}
|
|
188
|
+
weight='bold'
|
|
189
|
+
style={{ textTransform: 'uppercase' }}
|
|
190
|
+
color={theme.colors.primary}
|
|
191
|
+
>
|
|
192
|
+
{loyaltyLevel.name}
|
|
193
|
+
</OText>
|
|
194
|
+
</LoyaltyWrapp>
|
|
195
|
+
</LoyaltyContent>
|
|
196
|
+
)}
|
|
197
|
+
<BalanceElement>
|
|
198
|
+
<OText size={20} style={{ fontWeight: '600' }}>
|
|
199
|
+
{currentWalletSelected?.type === 'cash'
|
|
200
|
+
? parsePrice(currentWalletSelected?.balance)
|
|
201
|
+
: currentWalletSelected?.balance
|
|
202
|
+
}
|
|
203
|
+
</OText>
|
|
204
|
+
<OText style={{ paddingLeft: 5 }}>
|
|
205
|
+
{currentWalletSelected?.type === 'cash'
|
|
206
|
+
? configs?.stripe_currency?.value
|
|
207
|
+
: t('POINTS', 'Points')}
|
|
208
|
+
</OText>
|
|
209
|
+
</BalanceElement>
|
|
209
210
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
211
|
+
{!isChewLayout && (
|
|
212
|
+
<WalletTransactions
|
|
213
|
+
transactionsList={transactionsList}
|
|
214
|
+
currentWalletSelected={currentWalletSelected}
|
|
215
|
+
/>
|
|
216
|
+
)}
|
|
217
|
+
</SectionContent>
|
|
218
|
+
</>
|
|
219
|
+
)}
|
|
219
220
|
|
|
220
221
|
{(walletList?.loading || userLoyaltyLevel.loading) && (
|
|
221
222
|
<>
|
|
@@ -260,8 +261,6 @@ const WalletsUI = (props: any) => {
|
|
|
260
261
|
<ScrollView>
|
|
261
262
|
<WalletTransactionsWrapper>
|
|
262
263
|
<OButton
|
|
263
|
-
imgLeftSrc={theme.images.general.arrow_left}
|
|
264
|
-
imgLeftStyle={{ width: 18 }}
|
|
265
264
|
imgRightSrc={null}
|
|
266
265
|
style={{
|
|
267
266
|
borderWidth: 0,
|
|
@@ -273,6 +272,11 @@ const WalletsUI = (props: any) => {
|
|
|
273
272
|
paddingRight: 0
|
|
274
273
|
}}
|
|
275
274
|
onClick={() => setOpenHistory(false)}
|
|
275
|
+
icon={AntDesignIcon}
|
|
276
|
+
iconProps={{
|
|
277
|
+
name: 'arrowleft',
|
|
278
|
+
size: 26
|
|
279
|
+
}}
|
|
276
280
|
/>
|
|
277
281
|
<WalletTransactions
|
|
278
282
|
transactionsList={transactionsList}
|