ordering-ui-react-native 0.10.3 → 0.11.3
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 +2 -1
- package/themes/business/index.tsx +12 -12
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +49 -43
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +4 -10
- package/themes/business/src/components/Chat/index.tsx +97 -60
- package/themes/business/src/components/DriverMap/index.tsx +196 -183
- package/themes/business/src/components/FloatingButton/index.tsx +61 -43
- package/themes/business/src/components/FloatingButton/styles.tsx +2 -5
- package/themes/business/src/components/GoogleMap/index.tsx +10 -8
- package/themes/business/src/components/Home/index.tsx +2 -5
- package/themes/business/src/components/Home/styles.tsx +1 -2
- package/themes/business/src/components/LanguageSelector/index.tsx +1 -3
- package/themes/business/src/components/MessagesOption/index.tsx +13 -18
- package/themes/business/src/components/MessagesOption/styles.tsx +3 -0
- package/themes/business/src/components/OrderDetails/Business.tsx +642 -0
- package/themes/business/src/components/OrderDetails/Delivery.tsx +436 -0
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +378 -0
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +148 -0
- package/themes/business/src/components/OrderDetails/styles.tsx +16 -74
- package/themes/business/src/components/OrderMessage/index.tsx +5 -2
- package/themes/business/src/components/OrdersOption/index.tsx +344 -302
- package/themes/business/src/components/OrdersOption/styles.tsx +4 -2
- package/themes/business/src/components/PreviousMessages/index.tsx +15 -8
- package/themes/business/src/components/PreviousOrders/index.tsx +86 -141
- package/themes/business/src/components/PreviousOrders/styles.tsx +4 -3
- package/themes/business/src/components/UserProfileForm/index.tsx +73 -6
- package/themes/business/src/components/UserProfileForm/styles.tsx +0 -2
- package/themes/business/src/components/shared/OModal.tsx +9 -7
- package/themes/business/src/components/shared/OTextarea.tsx +2 -1
- package/themes/business/src/layouts/SafeAreaContainer.tsx +2 -2
- package/themes/business/src/types/index.tsx +24 -13
- package/themes/business/src/utils/index.tsx +160 -0
- package/themes/business/src/components/OrderDetails/index.tsx +0 -1262
- package/themes/business/src/components/OrderDetailsDelivery/index.tsx +0 -1056
- package/themes/business/src/components/OrderDetailsDelivery/styles.tsx +0 -142
|
@@ -50,10 +50,7 @@ export const Home = (props: any) => {
|
|
|
50
50
|
</OText>
|
|
51
51
|
|
|
52
52
|
<OText style={styles.textSubtitle} color={theme.colors.inputChat}>
|
|
53
|
-
{t(
|
|
54
|
-
'BUSINESS_WELCOME_SUBTITLE',
|
|
55
|
-
"Let's start to administrate your business now",
|
|
56
|
-
)}
|
|
53
|
+
{t(props.title.key, props.title.value)}
|
|
57
54
|
</OText>
|
|
58
55
|
</View>
|
|
59
56
|
|
|
@@ -80,7 +77,7 @@ export const Home = (props: any) => {
|
|
|
80
77
|
const styles = StyleSheet.create({
|
|
81
78
|
logo: {
|
|
82
79
|
height: 65,
|
|
83
|
-
width:
|
|
80
|
+
width: 300,
|
|
84
81
|
},
|
|
85
82
|
wrapperContent: {
|
|
86
83
|
width: '100%',
|
|
@@ -60,8 +60,6 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
60
60
|
withCountryNameButton
|
|
61
61
|
countryCodes={countryCodes}
|
|
62
62
|
//@ts-ignore
|
|
63
|
-
closeButtonImageStyle={{ width: 15, height: 15 }}
|
|
64
|
-
closeButtonImage={theme.images.general.close}
|
|
65
63
|
renderFlagButton={() => (
|
|
66
64
|
<TouchableOpacity onPress={() => setCountryModalVisible(true)}>
|
|
67
65
|
<LanguageItem justifyContent="space-between">
|
|
@@ -79,7 +77,7 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
79
77
|
|
|
80
78
|
<OIcon
|
|
81
79
|
src={theme?.images?.general?.chevronDown}
|
|
82
|
-
|
|
80
|
+
|
|
83
81
|
width={20}
|
|
84
82
|
height={20}
|
|
85
83
|
/>
|
|
@@ -15,7 +15,7 @@ import { PreviousMessages } from '../PreviousMessages';
|
|
|
15
15
|
// import { Contacts } from '../Contacts';
|
|
16
16
|
import { FiltersTab, TabsContainer, TagsContainer, Tag } from './styles';
|
|
17
17
|
import { MessagesOptionParams } from '../../types';
|
|
18
|
-
|
|
18
|
+
import { useDeviceOrientation } from '../../../../../src/hooks/DeviceOrientation';
|
|
19
19
|
const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
20
20
|
const {
|
|
21
21
|
orders,
|
|
@@ -31,7 +31,7 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
31
31
|
const [, t] = useLanguage();
|
|
32
32
|
|
|
33
33
|
const { loading, error, data: values } = orders;
|
|
34
|
-
|
|
34
|
+
const [{ dimensions }] = useDeviceOrientation();
|
|
35
35
|
const tabs = [
|
|
36
36
|
{ key: 0, text: t('ORDERS', 'Orders'), tags: [0, 1] },
|
|
37
37
|
// { key: 1, text: t('CONTACTS', 'Contacts'), tags: [2, 3, 4] },
|
|
@@ -139,11 +139,14 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
139
139
|
tab: {
|
|
140
140
|
fontFamily: 'Poppins',
|
|
141
141
|
fontStyle: 'normal',
|
|
142
|
-
fontSize:
|
|
143
|
-
|
|
142
|
+
fontSize: 16,
|
|
143
|
+
paddingBottom: 5,
|
|
144
|
+
marginBottom: -1,
|
|
145
|
+
zIndex: 100,
|
|
146
|
+
borderColor: theme.colors.textGray,
|
|
144
147
|
},
|
|
145
148
|
tagsContainer: {
|
|
146
|
-
|
|
149
|
+
marginBottom: 20,
|
|
147
150
|
},
|
|
148
151
|
tag: {
|
|
149
152
|
fontFamily: 'Poppins',
|
|
@@ -152,7 +155,6 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
152
155
|
fontSize: 14,
|
|
153
156
|
},
|
|
154
157
|
pressable: {
|
|
155
|
-
flex: 0.5,
|
|
156
158
|
alignItems: 'center',
|
|
157
159
|
},
|
|
158
160
|
loadButton: {
|
|
@@ -178,11 +180,14 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
178
180
|
</View>
|
|
179
181
|
|
|
180
182
|
<FiltersTab>
|
|
181
|
-
<TabsContainer>
|
|
183
|
+
<TabsContainer width={dimensions.width - 42}>
|
|
182
184
|
{tabs.map((tab: any) => (
|
|
183
185
|
<Pressable
|
|
184
186
|
key={tab.key}
|
|
185
|
-
style={
|
|
187
|
+
style={{
|
|
188
|
+
...styles.tab,
|
|
189
|
+
borderBottomWidth: 1,
|
|
190
|
+
}}
|
|
186
191
|
onPress={() => handleChangeTab(tab.tags)}>
|
|
187
192
|
<OText
|
|
188
193
|
style={styles.tab}
|
|
@@ -199,16 +204,6 @@ const MessagesOptionUI = (props: MessagesOptionParams) => {
|
|
|
199
204
|
{tab.text}
|
|
200
205
|
{` ${tab.key === 0 ? `(${unreadMessages || 0})` : ''}`}
|
|
201
206
|
</OText>
|
|
202
|
-
|
|
203
|
-
<View
|
|
204
|
-
style={{
|
|
205
|
-
width: '100%',
|
|
206
|
-
borderBottomColor:
|
|
207
|
-
JSON.stringify(tabsFilter) === JSON.stringify(tab.tags)
|
|
208
|
-
? theme.colors.textGray
|
|
209
|
-
: theme.colors.tabBar,
|
|
210
|
-
borderBottomWidth: 1.75,
|
|
211
|
-
}}></View>
|
|
212
207
|
</Pressable>
|
|
213
208
|
))}
|
|
214
209
|
</TabsContainer>
|
|
@@ -7,6 +7,9 @@ export const FiltersTab = styled.View`
|
|
|
7
7
|
export const TabsContainer = styled.View`
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: row;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
border-bottom-width: 1px;
|
|
12
|
+
border-bottom-color: #e9ecef;
|
|
10
13
|
`;
|
|
11
14
|
|
|
12
15
|
export const TagsContainer = styled.ScrollView`
|