Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
22_23-J 16
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
22_23-J 16
22_23-J 16
Commits
06b50cf3
Commit
06b50cf3
authored
May 05, 2023
by
Ishini Kiridena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DOB and gender picker
parent
1edb288f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
188 additions
and
7 deletions
+188
-7
emma-frontend/App.js
emma-frontend/App.js
+6
-0
emma-frontend/components/practitionerscreens/registration/regThree.js
...d/components/practitionerscreens/registration/regThree.js
+126
-0
emma-frontend/components/practitionerscreens/registration/regTwo.js
...end/components/practitionerscreens/registration/regTwo.js
+7
-7
emma-frontend/package-lock.json
emma-frontend/package-lock.json
+47
-0
emma-frontend/package.json
emma-frontend/package.json
+2
-0
No files found.
emma-frontend/App.js
View file @
06b50cf3
...
...
@@ -7,6 +7,7 @@ import SharedLogin from "./components/shared/sharedLogin";
import
SharedRegisterScreen
from
"
./components/shared/sharedRegistration
"
;
import
PatientRegOne
from
"
./components/practitionerscreens/registration/regOne
"
;
import
PatientRegTwo
from
"
./components/practitionerscreens/registration/regTwo
"
;
import
PatientRegThree
from
"
./components/practitionerscreens/registration/regThree
"
;
const
Stack
=
createStackNavigator
();
...
...
@@ -48,6 +49,11 @@ export default function App() {
component
=
{
PatientRegTwo
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"
PatientRegThree
"
component
=
{
PatientRegThree
}
options
=
{{
headerShown
:
false
}}
/
>
<
/Stack.Navigator
>
)
:
(
<
SplashScreenComponent
/>
...
...
emma-frontend/components/practitionerscreens/registration/regThree.js
0 → 100644
View file @
06b50cf3
import
React
,
{
useState
}
from
"
react
"
;
import
{
View
,
Text
,
TextInput
,
TouchableOpacity
,
StyleSheet
,
Button
,
}
from
"
react-native
"
;
import
RadioForm
,
{
RadioButton
,
RadioButtonInput
,
RadioButtonLabel
,
}
from
"
react-native-simple-radio-button
"
;
import
DateTimePicker
from
"
@react-native-community/datetimepicker
"
;
export
default
function
PatientRegThree
({
navigation
,
route
})
{
const
[
birthday
,
setBirthday
]
=
useState
(
new
Date
());
const
[
gender
,
setGender
]
=
useState
(
""
);
const
[
showDatePicker
,
setShowDatePicker
]
=
useState
(
false
);
const
handleDateChange
=
(
event
,
selectedDate
)
=>
{
const
currentDate
=
selectedDate
||
date
;
setShowDatePicker
(
false
);
setBirthday
(
currentDate
);
};
const
handleNext
=
()
=>
{
// navigation.navigate("PatientRegFour", {
// email: route.params.email,
// username: route.params.username,
// password: route.params.password,
// name: route.params.name,
// pronoun: route.params.pronoun,
// birthday,
// gender,
// });
console
.
log
({
email
:
route
.
params
.
email
,
username
:
route
.
params
.
username
,
password
:
route
.
params
.
password
,
name
:
route
.
params
.
name
,
pronoun
:
route
.
params
.
pronoun
,
birthday
,
gender
,
});
};
const
radioOptions
=
[
{
label
:
"
Male
"
,
value
:
"
male
"
},
{
label
:
"
Female
"
,
value
:
"
female
"
},
{
label
:
"
Other
"
,
value
:
"
other
"
},
];
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
>
Date
of
Birth
<
/Text
>
<
Button
title
=
"
Pick a date
"
onPress
=
{()
=>
setShowDatePicker
(
true
)}
/
>
{
showDatePicker
&&
(
<
DateTimePicker
value
=
{
birthday
}
mode
=
"
date
"
display
=
"
default
"
onChange
=
{
handleDateChange
}
/
>
)}
<
Text
>
Gender
<
/Text
>
<
RadioForm
radio_props
=
{
radioOptions
}
initial
=
{
0
}
onPress
=
{(
value
)
=>
setGender
(
value
)}
formHorizontal
=
{
true
}
labelHorizontal
=
{
false
}
buttonColor
=
{
"
#2196f3
"
}
selectedButtonColor
=
{
"
#2196f3
"
}
labelStyle
=
{{
fontSize
:
16
,
marginHorizontal
:
10
}}
style
=
{{
marginVertical
:
10
}}
/
>
<
Button
title
=
"
Next
"
onPress
=
{
handleNext
}
/
>
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
alignItems
:
"
center
"
,
justifyContent
:
"
center
"
,
},
input
:
{
width
:
"
80%
"
,
height
:
40
,
marginVertical
:
10
,
paddingHorizontal
:
10
,
borderColor
:
"
gray
"
,
borderWidth
:
1
,
borderRadius
:
5
,
},
label
:
{
fontSize
:
18
,
fontWeight
:
"
bold
"
,
marginVertical
:
10
,
},
datePicker
:
{
width
:
"
100%
"
,
marginBottom
:
20
,
},
dateInput
:
{
borderWidth
:
0
,
borderBottomWidth
:
1
,
borderBottomColor
:
"
#ccc
"
,
},
dateText
:
{
fontSize
:
16
,
},
placeholderText
:
{
fontSize
:
16
,
color
:
"
#aaa
"
,
},
btnTextConfirm
:
{
color
:
"
#2196f3
"
,
},
btnTextCancel
:
{
color
:
"
#666
"
,
},
});
emma-frontend/components/practitionerscreens/registration/regTwo.js
View file @
06b50cf3
...
...
@@ -22,13 +22,13 @@ export default function PatientRegTwo() {
];
const
handleNext
=
()
=>
{
//
navigation.navigate("PatientRegThree", {
//
email,
//
username,
//
password,
//
name,
//
pronoun: pronounOptions[pronoun].label,
//
});
navigation
.
navigate
(
"
PatientRegThree
"
,
{
email
,
username
,
password
,
name
,
pronoun
:
pronounOptions
[
pronoun
].
label
,
});
console
.
log
(
email
,
username
,
password
,
name
,
pronounOptions
[
pronoun
].
label
);
};
...
...
emma-frontend/package-lock.json
View file @
06b50cf3
...
...
@@ -8,12 +8,14 @@
"name"
:
"emma-frontend"
,
"version"
:
"1.0.0"
,
"dependencies"
:
{
"@react-native-community/datetimepicker"
:
"6.7.3"
,
"@react-navigation/native"
:
"^6.1.6"
,
"@react-navigation/stack"
:
"^6.3.16"
,
"expo"
:
"~48.0.15"
,
"expo-status-bar"
:
"~1.4.4"
,
"react"
:
"18.2.0"
,
"react-native"
:
"0.71.7"
,
"react-native-datepicker"
:
"^1.7.2"
,
"react-native-simple-radio-button"
:
"^2.7.4"
},
"devDependencies"
:
{
...
...
@@ -4611,6 +4613,14 @@
"node"
:
">=8"
}
},
"node_modules/@react-native-community/datetimepicker"
:
{
"version"
:
"6.7.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-native-community/datetimepicker/-/datetimepicker-6.7.3.tgz"
,
"integrity"
:
"sha512-fXWbEdHMLW/e8cts3snEsbOTbnFXfUHeO2pkiDFX3fWpFoDtUrRWvn50xbY13IJUUKHDhoJ+mj24nMRVIXfX1A=="
,
"dependencies"
:
{
"invariant"
:
"^2.2.4"
}
},
"node_modules/@react-native/assets"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz"
,
...
...
@@ -10082,6 +10092,14 @@
"mkdirp"
:
"bin/cmd.js"
}
},
"node_modules/moment"
:
{
"version"
:
"2.29.4"
,
"resolved"
:
"https://registry.npmjs.org/moment/-/moment-2.29.4.tgz"
,
"integrity"
:
"sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
,
"engines"
:
{
"node"
:
"*"
}
},
"node_modules/ms"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
,
...
...
@@ -11204,6 +11222,14 @@
"nullthrows"
:
"^1.1.1"
}
},
"node_modules/react-native-datepicker"
:
{
"version"
:
"1.7.2"
,
"resolved"
:
"https://registry.npmjs.org/react-native-datepicker/-/react-native-datepicker-1.7.2.tgz"
,
"integrity"
:
"sha512-ses0N1y44fYBmlejYwR2i+dGnQQ8v5/gacX2CrbFJiWxbcQaRuxexsZPB9YQuQkAy+uKz5Gti3Lrp3dh9BfkzA=="
,
"dependencies"
:
{
"moment"
:
"^2.22.0"
}
},
"node_modules/react-native-gesture-handler"
:
{
"version"
:
"2.9.0"
,
"resolved"
:
"https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.9.0.tgz"
,
...
...
@@ -16792,6 +16818,14 @@
"joi"
:
"^17.2.1"
}
},
"@react-native-community/datetimepicker"
:
{
"version"
:
"6.7.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-native-community/datetimepicker/-/datetimepicker-6.7.3.tgz"
,
"integrity"
:
"sha512-fXWbEdHMLW/e8cts3snEsbOTbnFXfUHeO2pkiDFX3fWpFoDtUrRWvn50xbY13IJUUKHDhoJ+mj24nMRVIXfX1A=="
,
"requires"
:
{
"invariant"
:
"^2.2.4"
}
},
"@react-native/assets"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz"
,
...
...
@@ -21008,6 +21042,11 @@
"minimist"
:
"^1.2.6"
}
},
"moment"
:
{
"version"
:
"2.29.4"
,
"resolved"
:
"https://registry.npmjs.org/moment/-/moment-2.29.4.tgz"
,
"integrity"
:
"sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
},
"ms"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
,
...
...
@@ -21844,6 +21883,14 @@
"nullthrows"
:
"^1.1.1"
}
},
"react-native-datepicker"
:
{
"version"
:
"1.7.2"
,
"resolved"
:
"https://registry.npmjs.org/react-native-datepicker/-/react-native-datepicker-1.7.2.tgz"
,
"integrity"
:
"sha512-ses0N1y44fYBmlejYwR2i+dGnQQ8v5/gacX2CrbFJiWxbcQaRuxexsZPB9YQuQkAy+uKz5Gti3Lrp3dh9BfkzA=="
,
"requires"
:
{
"moment"
:
"^2.22.0"
}
},
"react-native-gesture-handler"
:
{
"version"
:
"2.9.0"
,
"resolved"
:
"https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.9.0.tgz"
,
...
...
emma-frontend/package.json
View file @
06b50cf3
...
...
@@ -9,12 +9,14 @@
"web"
:
"expo start --web"
},
"dependencies"
:
{
"@react-native-community/datetimepicker"
:
"6.7.3"
,
"@react-navigation/native"
:
"^6.1.6"
,
"@react-navigation/stack"
:
"^6.3.16"
,
"expo"
:
"~48.0.15"
,
"expo-status-bar"
:
"~1.4.4"
,
"react"
:
"18.2.0"
,
"react-native"
:
"0.71.7"
,
"react-native-datepicker"
:
"^1.7.2"
,
"react-native-simple-radio-button"
:
"^2.7.4"
},
"devDependencies"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment