Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
240
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-240
240
Commits
48a4f9a7
Commit
48a4f9a7
authored
Nov 13, 2022
by
Malsha Rathnasiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new integrations
parent
3a33a194
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
2025 additions
and
148 deletions
+2025
-148
MobileApp/navigation/index.jsx
MobileApp/navigation/index.jsx
+2
-0
MobileApp/screens/Comment.js
MobileApp/screens/Comment.js
+52
-0
MobileApp/screens/ConfirmPayment.js
MobileApp/screens/ConfirmPayment.js
+179
-0
MobileApp/screens/DriverInfo.js
MobileApp/screens/DriverInfo.js
+272
-0
MobileApp/screens/GenerateSeatNo.js
MobileApp/screens/GenerateSeatNo.js
+229
-0
MobileApp/screens/Home (2).js
MobileApp/screens/Home (2).js
+181
-0
MobileApp/screens/InnerNavigator.js
MobileApp/screens/InnerNavigator.js
+28
-16
MobileApp/screens/Location.js
MobileApp/screens/Location.js
+155
-0
MobileApp/screens/Login.js
MobileApp/screens/Login.js
+201
-0
MobileApp/screens/PaymentQR.js
MobileApp/screens/PaymentQR.js
+59
-0
MobileApp/screens/PaymentStatus.js
MobileApp/screens/PaymentStatus.js
+100
-0
MobileApp/screens/RegInfo.js
MobileApp/screens/RegInfo.js
+99
-91
MobileApp/screens/RouteInfo.js
MobileApp/screens/RouteInfo.js
+43
-11
MobileApp/screens/Signup.js
MobileApp/screens/Signup.js
+404
-0
MobileApp/screens/SignupScreen.jsx
MobileApp/screens/SignupScreen.jsx
+0
-30
MobileApp/screens/config.jsx
MobileApp/screens/config.jsx
+21
-0
backend/db.sqlite3
backend/db.sqlite3
+0
-0
No files found.
MobileApp/navigation/index.jsx
View file @
48a4f9a7
...
...
@@ -28,6 +28,7 @@ import LinkingConfiguration from './LinkingConfiguration';
import
Small_logo
from
'
../assets/images/Logo_small.jpeg
'
import
{
PRIMARY_COLOR
}
from
'
../util/styles
'
;
import
InnerNavigator
from
'
../screens/InnerNavigator
'
;
import
Signup
from
'
../screens/Signup
'
;
export
default
function
Navigation
({
colorScheme
})
{
return
(
...
...
@@ -79,6 +80,7 @@ function RootNavigator() {
<
Stack
.
Group
screenOptions=
{
{
presentation
:
'
modal
'
}
}
>
<
Stack
.
Screen
name=
"Modal"
component=
{
ModalScreen
}
/>
</
Stack
.
Group
>
<
Stack
.
Screen
name=
"Signup"
component=
{
Signup
}
/>
</
Stack
.
Navigator
>
);
}
...
...
MobileApp/screens/Comment.js
0 → 100644
View file @
48a4f9a7
import
React
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
}
from
'
react-native
'
;
const
Comment
=
(
props
)
=>
{
return
(
<
View
style
=
{
styles
.
item
}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
View
style
=
{
styles
.
square
}
><
/View
>
<
Text
style
=
{
styles
.
itemText
}
>
{
props
.
text
}
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
circular
}
><
/View
>
<
/View
>
)
}
const
styles
=
StyleSheet
.
create
({
item
:
{
backgroundColor
:
'
#FFF
'
,
padding
:
15
,
borderRadius
:
10
,
flexDirection
:
'
row
'
,
alignItems
:
'
center
'
,
justifyContent
:
'
space-between
'
,
marginBottom
:
20
,
},
itemLeft
:
{
flexDirection
:
'
row
'
,
alignItems
:
'
center
'
,
flexWrap
:
'
wrap
'
},
square
:
{
width
:
24
,
height
:
24
,
backgroundColor
:
'
#55BCF6
'
,
opacity
:
0.4
,
borderRadius
:
5
,
marginRight
:
15
,
},
itemText
:
{
maxWidth
:
'
80%
'
,
},
circular
:
{
width
:
12
,
height
:
12
,
borderColor
:
'
#55BCF6
'
,
borderWidth
:
2
,
borderRadius
:
5
,
},
});
export
default
Comment
;
\ No newline at end of file
MobileApp/screens/ConfirmPayment.js
0 → 100644
View file @
48a4f9a7
import
{
StatusBar
}
from
'
expo-status-bar
'
;
import
React
,
{
useState
}
from
'
react
'
;
import
{
StyleSheet
,
Text
,
View
,
TouchableOpacity
,
TextInput
}
from
'
react-native
'
;
import
{
Input
,
NativeBaseProvider
,
Button
,
Icon
,
Box
,
Image
,
AspectRatio
}
from
'
native-base
'
;
import
{
FontAwesome5
,
MaterialCommunityIcons
}
from
'
@expo/vector-icons
'
;
import
{
useNavigation
}
from
'
@react-navigation/native
'
;
import
{
alignContent
,
flex
,
flexDirection
,
marginBottom
,
width
}
from
'
styled-system
'
;
import
{
colors
}
from
'
../utils/index
'
const
{
PRIMARY_COLOR
,
SECONDARY_COLOR
,
BORDER_COLOR
}
=
colors
;
import
{
useRoute
}
from
'
@react-navigation/native
'
;
function
ConfirmPayment
()
{
const
navigation
=
useNavigation
();
const
route
=
useRoute
();
seatNo
=
9
;
const
data
=
route
.
params
.
data
;
const
accData
=
data
.
split
(
/
\r?\n
/
)
console
.
log
(
accData
);
const
[
amount
,
setAmount
]
=
useState
(
''
);
const
saveSeatNo
=
()
=>
{
navigation
.
navigate
(
'
Home
'
,
{
seatNo
});
};
accNo
=
accData
[
1
]
const
conPayment
=
()
=>
{
navigation
.
navigate
(
'
PaymentStatus
'
,
{
amount
,
accNo
});
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
main
}
>
<
View
style
=
{
styles
.
Info
}
>
<
Text
style
=
{{
fontSize
:
20
,
marginTop
:
20
,
color
:
'
green
'
}}
>
payment
amount
<
/Text
>
<
TextInput
style
=
{
styles
.
input
}
onChangeText
=
{(
value
)
=>
setAmount
(
value
)}
placeholder
=
"
amount
"
keyboardType
=
"
numeric
"
/>
<
/View
>
<
/View>
<
View
style
=
{
styles
.
weatherDetails
}
>
<
View
style
=
{
styles
.
weatherDetailsRow
}
>
<
View
style
=
{{
...
styles
.
weatherDetailsBox
,
borderRightWidth
:
1
,
borderRightColor
:
BORDER_COLOR
}}
>
<
View
style
=
{
styles
.
weatherDetailsRow
}
>
<
MaterialCommunityIcons
name
=
"
card-account-details-outline
"
size
=
{
25
}
color
=
{
PRIMARY_COLOR
}
/
>
<
View
style
=
{
styles
.
weatherDetailsItems
}
>
<
Text
>
Acc
Number
<
/Text
>
<
Text
style
=
{
styles
.
textSecondary
}
>
{
accData
[
1
]}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
weatherDetailsBox
}
>
<
View
style
=
{
styles
.
weatherDetailsRow
}
>
<
MaterialCommunityIcons
name
=
"
bank
"
size
=
{
25
}
color
=
{
PRIMARY_COLOR
}
/
>
<
View
style
=
{
styles
.
weatherDetailsItems
}
>
<
Text
>
Bank
name
<
/Text
>
<
Text
style
=
{
styles
.
textSecondary
}
>
{
accData
[
2
]}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
...
styles
.
weatherDetailsRow
,
borderTopWidth
:
1
,
borderTopColor
:
BORDER_COLOR
}}
>
<
View
style
=
{{
...
styles
.
weatherDetailsBox
,
borderRightWidth
:
1
,
borderRightColor
:
BORDER_COLOR
}}
>
<
View
style
=
{
styles
.
weatherDetailsRow
}
>
<
MaterialCommunityIcons
name
=
"
map-marker
"
size
=
{
30
}
color
=
{
PRIMARY_COLOR
}
/
>
<
View
style
=
{
styles
.
weatherDetailsItems
}
>
<
Text
>
Branch
name
<
/Text
>
<
Text
style
=
{
styles
.
textSecondary
}
>
{
accData
[
3
]}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
weatherDetailsBox
}
>
<
View
style
=
{
styles
.
weatherDetailsRow
}
>
<
MaterialCommunityIcons
name
=
"
qrcode
"
size
=
{
30
}
color
=
{
PRIMARY_COLOR
}
/
>
<
View
style
=
{
styles
.
weatherDetailsItems
}
>
<
Text
>
QR
Tpye
<
/Text
>
<
Text
style
=
{
styles
.
textSecondary
}
>
{
route
.
params
.
type
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
buttonStyle
}
>
<
Button
style
=
{
styles
.
buttonDesign
}
onPress
=
{
conPayment
}
>
Confirm
Payment
<
/Button
>
<
/View
>
<
View
style
=
{
styles
.
buttonStyle
}
>
<
Button
style
=
{
styles
.
buttonDesign
}
onPress
=
{
saveSeatNo
}
>
Cancel
Payment
<
/Button
>
<
/View
>
<
/View
>
);
}
export
default
()
=>
{
return
(
<
NativeBaseProvider
>
<
ConfirmPayment
/>
<
/NativeBaseProvider
>
)
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
'
#fff
'
,
},
main
:
{
marginTop
:
200
,
justifyContent
:
'
center
'
,
},
Icon
:
{
width
:
100
,
height
:
100
,
},
Info
:
{
alignItems
:
'
center
'
,
},
weatherDetails
:
{
marginTop
:
50
,
margin
:
5
,
borderWidth
:
1
,
borderColor
:
BORDER_COLOR
,
borderRadius
:
10
,
},
weatherDetailsRow
:
{
flexDirection
:
'
row
'
,
alignItems
:
'
center
'
,
justifyContent
:
'
space-between
'
,
},
weatherDetailsBox
:
{
flex
:
1
,
padding
:
20
,
},
weatherDetailsItems
:
{
alignItems
:
'
flex-end
'
,
justifyContent
:
'
flex-end
'
,
},
textSecondary
:
{
fontSize
:
15
,
color
:
SECONDARY_COLOR
,
fontWeight
:
'
700
'
,
margin
:
7
,
},
buttonStyleX
:{
marginTop
:
12
,
marginLeft
:
15
,
marginRight
:
15
},
buttonDesign
:{
backgroundColor
:
'
#026efd
'
,
marginBottom
:
12
},
buttonStyle
:{
marginTop
:
30
,
marginLeft
:
15
,
marginRight
:
15
},
input
:
{
height
:
40
,
marginTop
:
12
,
borderWidth
:
1
,
padding
:
10
,
},
})
\ No newline at end of file
MobileApp/screens/DriverInfo.js
0 → 100644
View file @
48a4f9a7
import
{
StatusBar
}
from
'
expo-status-bar
'
;
import
React
,
{
useState
}
from
'
react
'
;
import
{
StyleSheet
,
Text
,
View
,
TouchableOpacity
,
ScrollView
,
Keyboard
,
KeyboardAvoidingView
,
TextInput
}
from
'
react-native
'
;
import
{
Input
,
NativeBaseProvider
,
Button
,
Icon
,
Box
,
Image
,
AspectRatio
}
from
'
native-base
'
;
import
{
FontAwesome5
,
MaterialCommunityIcons
}
from
'
@expo/vector-icons
'
;
import
{
useNavigation
}
from
'
@react-navigation/native
'
;
import
SQLite
from
'
react-native-sqlite-storage
'
;
import
{
colors
}
from
'
../utils/index
'
const
{
PRIMARY_COLOR
,
SECONDARY_COLOR
,
BORDER_COLOR
}
=
colors
import
Comment
from
'
./Comment
'
;
import
{
marginBottom
}
from
'
styled-system
'
;
import
{
useRoute
}
from
'
@react-navigation/native
'
;
function
DriverInfo
()
{
const
navigation
=
useNavigation
();
seatNo
=
9
;
const
saveSeatNo
=
()
=>
{
navigation
.
navigate
(
'
Home
'
,
{
seatNo
});
};
const
[
comment
,
setComment
]
=
useState
();
const
[
commentItems
,
setCcommentItems
]
=
useState
([]);
const
handleAddComment
=
()
=>
{
Keyboard
.
dismiss
();
setCcommentItems
([...
commentItems
,
comment
])
setComment
(
null
);
}
const
completeComment
=
(
index
)
=>
{
let
itemsCopy
=
[...
commentItems
];
itemsCopy
.
splice
(
index
,
1
);
setCcommentItems
(
itemsCopy
)
}
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
TopView
}
>
<
Image
style
=
{
styles
.
imageStyle
}
source
=
{
require
(
'
../assets/driver.png
'
)}
alt
=
"
image
"
/>
<
/View
>
<
View
style
=
{
styles
.
Middle
}
>
<
Text
style
=
{
styles
.
LoginText
}
>
Gayan
Peris
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
weatherDetails
}
>
<
View
style
=
{
styles
.
weatherDetailsRow
}
>
<
View
style
=
{
styles
.
weatherDetailsBox
}
>
<
View
style
=
{
styles
.
weatherDetailsRow
}
>
<
View
style
=
{
styles
.
weatherDetailsItems
}
>
<
Text
style
=
{
styles
.
textSecondary
}
>
Years
<
/Text
>
<
Text
style
=
{
styles
.
textSecondary
}
>
4
+<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
weatherDetailsBox
}
>
<
View
style
=
{
styles
.
weatherDetailsRow
}
>
<
View
style
=
{
styles
.
weatherDetailsItems
}
>
<
Text
style
=
{
styles
.
textSecondary
}
>
Rating
<
/Text
>
<
Text
style
=
{
styles
.
textSecondary
}
>
4.8
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
weatherDetailsBox
}
>
<
View
style
=
{
styles
.
weatherDetailsRow
}
>
<
View
style
=
{
styles
.
weatherDetailsItems
}
>
<
Text
style
=
{
styles
.
textSecondary
}
>
Vehicle
<
/Text
>
<
Text
style
=
{{
marginTop
:
5
,
justifyContent
:
'
flex-start
'
,
fontSize
:
15
,
fontWeight
:
'
700
'
,
color
:
SECONDARY_COLOR
,}}
>
BDA
-
0713
<
/Text>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
ScrollView
contentContainerStyle
=
{{
flexGrow
:
1
}}
keyboardShouldPersistTaps
=
'
handled
'
>
<
View
style
=
{
styles
.
tasksWrapper
}
>
<
Text
style
=
{
styles
.
sectionTitle
}
>
feedback
<
/Text
>
<
View
style
=
{
styles
.
items
}
>
{
/* This is where the tasks will go! */
}
{
commentItems
.
map
((
item
,
index
)
=>
{
return
(
<
TouchableOpacity
key
=
{
index
}
onPress
=
{()
=>
completeComment
(
index
)}
>
<
Comment
text
=
{
item
}
/>
<
/TouchableOpacity
>
)
})
}
<
/View
>
<
/View
>
<
/ScrollView
>
{
/* Write a task */
}
{
/* Uses a keyboard avoiding view which ensures the keyboard does not cover the items on screen */
}
<
KeyboardAvoidingView
behavior
=
{
Platform
.
OS
===
"
ios
"
?
"
padding
"
:
"
height
"
}
style
=
{
styles
.
writeTaskWrapper
}
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
{
'
Write a comment
'
}
value
=
{
comment
}
onChangeText
=
{
text
=>
setComment
(
text
)}
/
>
<
TouchableOpacity
onPress
=
{()
=>
handleAddComment
()}
>
<
View
style
=
{
styles
.
addWrapper
}
>
<
Text
style
=
{
styles
.
addText
}
>+<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/KeyboardAvoidingView
>
{
/* Button */
}
<
View
style
=
{
styles
.
buttonStyle
}
>
<
Button
style
=
{
styles
.
buttonDesign
}
onPress
=
{
saveSeatNo
}
>
Home
<
/Button
>
<
/View
>
<
StatusBar
style
=
"
auto
"
/>
<
/View
>
);
}
export
default
()
=>
{
return
(
<
NativeBaseProvider
>
<
DriverInfo
/>
<
/NativeBaseProvider
>
)
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
'
#fff
'
,
},
LoginText
:
{
marginTop
:
30
,
fontSize
:
30
,
fontWeight
:
'
bold
'
,
},
Middle
:{
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
text2
:{
flexDirection
:
'
row
'
,
justifyContent
:
'
center
'
,
paddingTop
:
5
},
buttonStyle
:{
marginLeft
:
15
,
marginRight
:
15
,
marginBottom
:
15
,
},
buttonStyleX
:{
marginTop
:
12
,
marginLeft
:
15
,
marginRight
:
15
},
buttonDesign
:{
backgroundColor
:
'
#026efd
'
},
lineStyle
:{
flexDirection
:
'
row
'
,
marginTop
:
30
,
marginLeft
:
15
,
marginRight
:
15
,
alignItems
:
'
center
'
},
imageStyle
:{
width
:
80
,
height
:
80
,
marginLeft
:
20
,
},
boxStyle
:{
flexDirection
:
'
row
'
,
marginTop
:
30
,
marginLeft
:
15
,
marginRight
:
15
,
justifyContent
:
'
space-around
'
},
TopView
:{
width
:
'
100%
'
,
height
:
'
30%
'
,
display
:
'
flex
'
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
imageStyle
:{
width
:
'
50%
'
,
resizeMode
:
'
contain
'
,
alignItems
:
'
center
'
,
top
:
50
,
},
weatherDetails
:
{
marginTop
:
30
,
margin
:
5
,
borderWidth
:
1
,
borderColor
:
BORDER_COLOR
,
borderRadius
:
10
,
},
weatherDetailsRow
:
{
flexDirection
:
'
row
'
,
alignItems
:
'
center
'
,
justifyContent
:
'
space-between
'
,
},
weatherDetailsBox
:
{
flex
:
1
,
padding
:
10
,
},
weatherDetailsItems
:
{
alignItems
:
'
flex-end
'
,
justifyContent
:
'
flex-end
'
,
},
textSecondary
:
{
fontSize
:
15
,
color
:
SECONDARY_COLOR
,
fontWeight
:
'
700
'
,
margin
:
7
,
},
tasksWrapper
:
{
paddingTop
:
30
,
paddingHorizontal
:
10
,
},
sectionTitle
:
{
fontSize
:
24
,
fontWeight
:
'
bold
'
},
items
:
{
marginTop
:
10
,
},
writeTaskWrapper
:
{
position
:
'
absolute
'
,
bottom
:
60
,
width
:
'
100%
'
,
flexDirection
:
'
row
'
,
justifyContent
:
'
space-around
'
,
alignItems
:
'
center
'
},
input
:
{
paddingVertical
:
15
,
paddingHorizontal
:
15
,
backgroundColor
:
'
#FFF
'
,
borderRadius
:
60
,
borderColor
:
'
#C0C0C0
'
,
borderWidth
:
1
,
width
:
250
,
},
addWrapper
:
{
width
:
60
,
height
:
60
,
backgroundColor
:
'
#FFF
'
,
borderRadius
:
60
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
borderColor
:
'
#C0C0C0
'
,
borderWidth
:
1
,
},
addText
:
{},
});
MobileApp/screens/GenerateSeatNo.js
0 → 100644
View file @
48a4f9a7
import
{
useNavigation
}
from
'
@react-navigation/native
'
;
import
React
from
'
react
'
;
import
{
Input
,
NativeBaseProvider
,
Button
,
Icon
,
Box
,
Image
,
AspectRatio
}
from
'
native-base
'
;
import
{
StyleSheet
,
Text
,
View
,
TouchableOpacity
}
from
'
react-native
'
;
import
{
useRoute
}
from
'
@react-navigation/native
'
;
import
{
colors
}
from
'
../utils/index
'
const
{
PRIMARY_COLOR
,
SECONDARY_COLOR
,
BORDER_COLOR
}
=
colors
function
GenerateSeatNo
()
{
const
navigation
=
useNavigation
();
const
route
=
useRoute
();
seatNo
=
'
NA
'
const
saveSeatNo
=
()
=>
{
navigation
.
navigate
(
'
Home
'
,
{
seatNo
});
};
const
confirmSeatNo
=
()
=>
{
navigation
.
navigate
(
'
RegInfo
'
,
{
seatNo
});
};
const
people
=
[
{
'
name
'
:
"
ruwan
"
,
'
age
'
:
26
,
'
gender
'
:
"
F
"
,
'
job
'
:
"
IT
"
},
{
'
name
'
:
"
madush
"
,
'
age
'
:
28
,
'
gender
'
:
"
F
"
,
'
job
'
:
"
HR
"
},
{
'
name
'
:
"
gayan
"
,
'
age
'
:
32
,
'
gender
'
:
"
M
"
,
'
job
'
:
"
IT
"
},
{
'
name
'
:
"
yohan
"
,
'
age
'
:
29
,
'
gender
'
:
"
F
"
,
'
job
'
:
"
Engineer
"
},
{
'
name
'
:
"
rukshan
"
,
'
age
'
:
34
,
'
gender
'
:
"
M
"
,
'
job
'
:
"
HR
"
},
{
'
name
'
:
"
namal
"
,
'
age
'
:
38
,
'
gender
'
:
"
F
"
,
'
job
'
:
"
IT
"
},
{
'
name
'
:
"
kasun
"
,
'
age
'
:
45
,
'
gender
'
:
"
M
"
,
'
job
'
:
"
Engineer
"
},
{
'
name
'
:
"
nuwan
"
,
'
age
'
:
55
,
'
gender
'
:
"
M
"
,
'
job
'
:
"
Engineer
"
}
]
const
newPeople
=
{
'
name
'
:
route
.
params
.
username
,
'
age
'
:
route
.
params
.
age
,
'
gender
'
:
route
.
params
.
genderx
,
'
job
'
:
route
.
params
.
selectedProfession
.
item
}
console
.
log
(
newPeople
);
const
addPeople
=
[].
concat
(
people
,
newPeople
)
console
.
log
(
addPeople
);
const
age_30
=
addPeople
.
filter
(
function
(
element
){
return
element
.
age
<
30
&&
element
.
age
>
0
;
});
const
sortedAge_30
=
[...
age_30
].
sort
((
a
,
b
)
=>
a
.
age
-
b
.
age
||
a
.
gender
-
b
.
gender
);
/*console.log('sortedAge_30', sortedAge_30);*/
const
age_40
=
addPeople
.
filter
(
function
(
element
){
return
element
.
age
<
40
&&
element
.
age
>
30
;
});
const
sortedAge_40
=
[...
age_40
].
sort
((
a
,
b
)
=>
a
.
age
-
b
.
age
||
a
.
gender
-
b
.
gender
);
/*console.log('sortedAge_40', sortedAge_40);*/
const
age_50
=
addPeople
.
filter
(
function
(
element
){
return
element
.
age
<
50
&&
element
.
age
>
40
;
});
const
sortedAge_50
=
[...
age_50
].
sort
((
a
,
b
)
=>
a
.
age
-
b
.
age
||
a
.
gender
-
b
.
gender
);
/*console.log('sortedAge_50', sortedAge_50);*/
const
age_60
=
addPeople
.
filter
(
function
(
element
){
return
element
.
age
<
60
&&
element
.
age
>
50
;
});
const
sortedAge_60
=
[...
age_60
].
sort
((
a
,
b
)
=>
a
.
age
-
b
.
age
||
a
.
gender
-
b
.
gender
);
/*console.log('sortedAge_60', sortedAge_60);*/
const
merged
=
[].
concat
(
sortedAge_30
,
sortedAge_40
,
sortedAge_50
,
sortedAge_60
);
console
.
log
(
'
mm
'
,
merged
);
const
index
=
merged
.
findIndex
(
object
=>
{
return
object
.
name
===
route
.
params
.
username
;
});
seatNo
=
index
+
1
;
function
GenSeatNo
()
{
console
.
log
(
final_list
);
}
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
lineStyle
}
>
<
View
>
<
Text
style
=
{{
width
:
120
,
textAlign
:
'
left
'
,
fontWeight
:
'
bold
'
,
fontSize
:
15
,
marginTop
:
100
}}
>
Your
Data
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
height
:
1
,
backgroundColor
:
'
black
'
,
marginTop
:
100
}}
/
>
<
/View
>
<
View
style
=
{
styles
.
summeryDetails
}
>
<
View
style
=
{
styles
.
summeryDetailsRow
}
>
<
View
style
=
{{
...
styles
.
summeryDetailsBox
,
borderRightWidth
:
1
,
borderRightColor
:
BORDER_COLOR
}}
>
<
View
style
=
{
styles
.
summeryDetailsRow
}
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{{
margin
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
left
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
Name
:
<
/Text
>
<
/View
>
<
View
style
=
{{
margin
:
20
,
marginVertical
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
right
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
{
route
.
params
.
username
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{{
margin
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
left
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
Email
:
<
/Text
>
<
/View
>
<
View
style
=
{{
margin
:
20
,
marginVertical
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
right
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
{
route
.
params
.
email
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{{
margin
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
left
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
Age
:
<
/Text
>
<
/View
>
<
View
style
=
{{
margin
:
20
,
marginVertical
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
right
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
{
route
.
params
.
age
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{{
margin
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
left
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
Gender
:
<
/Text
>
<
/View
>
<
View
style
=
{{
margin
:
20
,
marginVertical
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
right
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
{
route
.
params
.
genderx
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{{
margin
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
left
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
Job
:
<
/Text
>
<
/View
>
<
View
style
=
{{
margin
:
20
,
marginVertical
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
right
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
{
route
.
params
.
selectedProfession
.
item
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{{
margin
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
left
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
Pickup
:
<
/Text
>
<
/View
>
<
View
style
=
{{
margin
:
20
,
marginVertical
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
right
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
{
route
.
params
.
selectedPickLoc
.
item
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{{
margin
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
left
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
Pickup
:
<
/Text
>
<
/View
>
<
View
style
=
{{
margin
:
20
,
marginVertical
:
20
}}
>
<
Text
style
=
{{
color
:
'
#8e8e8e
'
,
fontSize
:
15
,
textAlign
:
'
right
'
,
fontWeight
:
'
bold
'
,
marginTop
:
3
}}
>
{
route
.
params
.
selectedDropLoc
.
item
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
buttonStyle
}
>
<
Button
style
=
{
styles
.
buttonDesign
}
onPress
=
{
confirmSeatNo
}
>
Save
Reservation
<
/Button
>
<
/View
>
<
View
style
=
{
styles
.
buttonStyle
}
>
<
Button
style
=
{
styles
.
buttonDesign
}
onPress
=
{
saveSeatNo
}
>
Cancel
Reservation
<
/Button
>
<
/View
>
<
/View
>
)
}
export
default
()
=>
{