Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
EmidWife-New
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
2023-24-005
EmidWife-New
Commits
d5a7607b
Commit
d5a7607b
authored
May 15, 2024
by
Devin B
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated
parent
82cf4e3e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
434 additions
and
152 deletions
+434
-152
src/screens/home/skin/AdditionalSymptoms.js
src/screens/home/skin/AdditionalSymptoms.js
+23
-13
src/screens/home/skin/AdditionalSymptoms1.js
src/screens/home/skin/AdditionalSymptoms1.js
+141
-46
src/screens/home/skin/AdditionalSymptoms2.js
src/screens/home/skin/AdditionalSymptoms2.js
+137
-46
src/screens/home/skin/AdditionalSymptoms3.js
src/screens/home/skin/AdditionalSymptoms3.js
+132
-46
src/screens/home/skin/SkinUploader.js
src/screens/home/skin/SkinUploader.js
+1
-1
No files found.
src/screens/home/skin/AdditionalSymptoms.js
View file @
d5a7607b
...
@@ -10,9 +10,12 @@ import { Linking } from 'react-native';
...
@@ -10,9 +10,12 @@ import { Linking } from 'react-native';
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom1
:
false
,
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom2
:
false
,
symptom1
:
false
,
symptom2
:
false
,
symptom3
:
false
,
symptom4
:
false
,
symptom3
:
false
,});
symptom5
:
false
,
symptom6
:
false
,
symptom7
:
false
,
symptom8
:
false
,
symptom9
:
false
,
symptom10
:
false
,
symptom11
:
false
,
symptom12
:
false
,
symptom13
:
false
,
symptom14
:
false
});
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
...
@@ -39,14 +42,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -39,14 +42,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
{
key
:
'
symptom7
'
,
text
:
'
Thigh muscle pain | කලවා මාංශ පේශි වේදනාව
'
},
{
key
:
'
symptom7
'
,
text
:
'
Thigh muscle pain | කලවා මාංශ පේශි වේදනාව
'
},
{
key
:
'
symptom8
'
,
text
:
'
Groin pain | ඉකිලි වේදනාව
'
},
{
key
:
'
symptom8
'
,
text
:
'
Groin pain | ඉකිලි වේදනාව
'
},
{
key
:
'
symptom9
'
,
text
:
'
Breast Pain |පියයුරු වේදනාව
'
},
{
key
:
'
symptom9
'
,
text
:
'
Breast Pain |පියයුරු වේදනාව
'
},
{
key
:
'
symptom1
2
'
,
text
:
'
Side muscle pain | පැත්තේ මාංශ පේශි වේදනාව
'
},
{
key
:
'
symptom1
0
'
,
text
:
'
Side muscle pain | පැත්තේ මාංශ පේශි වේදනාව
'
},
],
],
[
[
{
key
:
'
symptom1
0
'
,
text
:
'
Upper arm pain | ඉහළ අතේ වේදනාව
'
},
{
key
:
'
symptom1
1
'
,
text
:
'
Upper arm pain | ඉහළ අතේ වේදනාව
'
},
{
key
:
'
symptom1
1
'
,
text
:
'
Heart burn | හදවත දැවෙනවා
'
},
{
key
:
'
symptom1
2
'
,
text
:
'
Heart burn | හදවත දැවෙනවා
'
},
{
key
:
'
symptom1
2
'
,
text
:
'
Mouth and Nose ulcer’s | මුඛයේ සහ නාසයේ වණ
'
},
{
key
:
'
symptom1
3
'
,
text
:
'
Mouth and Nose ulcer’s | මුඛයේ සහ නාසයේ වණ
'
},
{
key
:
'
symptom1
3
'
,
text
:
'
Back Pain |පිටුපස මාංශ පේශි වේදනාව
'
},
{
key
:
'
symptom1
4
'
,
text
:
'
Back Pain |පිටුපස මාංශ පේශි වේදනාව
'
},
{
key
:
'
symptom14
'
,
text
:
'
Breast Pain |පියයුරු වේදනාව
'
},
],
],
// Add more groups as needed
// Add more groups as needed
];
];
...
@@ -68,9 +71,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -68,9 +71,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
};
};
const
handleSubmit
=
()
=>
{
const
handleSubmit
=
()
=>
{
// Handle the submission of symptoms
// Checking for specific symptoms that lead to SKIN_RISK
console
.
log
(
selectedSymptoms
);
const
skinRiskSymptoms
=
[
'
symptom12
'
,
'
symptom5
'
,
'
symptom4
'
,
'
symptom10
'
,
'
symptom8
'
,
'
symptom6
'
];
// Navigate or perform next steps
const
toSkinRisk
=
skinRiskSymptoms
.
some
(
symptom
=>
selectedSymptoms
[
symptom
]);
// Navigate based on condition
if
(
toSkinRisk
)
{
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
);
}
else
{
navigation
.
navigate
(
ROUTES
.
SKIN_UPLOAD
);
}
};
};
const
toggleFullscreen
=
()
=>
{
const
toggleFullscreen
=
()
=>
{
...
@@ -175,7 +185,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -175,7 +185,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<
Button
<
Button
title
=
"
Continue for more information
"
title
=
"
Continue for more information
"
style
=
{
styles
.
nextButton
}
style
=
{
styles
.
nextButton
}
onPress
=
{
()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
)}
onPress
=
{
handleSubmit
}
/
>
/
>
<
/ScrollView
>
<
/ScrollView
>
<
/SafeAreaView
>
<
/SafeAreaView
>
...
...
src/screens/home/skin/AdditionalSymptoms1.js
View file @
d5a7607b
...
@@ -5,12 +5,18 @@ import CheckBox from '@react-native-community/checkbox'; // Make sure to install
...
@@ -5,12 +5,18 @@ import CheckBox from '@react-native-community/checkbox'; // Make sure to install
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Button
from
'
../../../components/Button
'
;
import
Button
from
'
../../../components/Button
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
import
{
Dimensions
}
from
'
react-native
'
;
import
{
Linking
}
from
'
react-native
'
;
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom1
:
false
,
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom2
:
false
,
symptom1
:
false
,
symptom2
:
false
,
symptom3
:
false
,
symptom4
:
false
,
symptom3
:
false
,});
symptom5
:
false
,
symptom6
:
false
,
symptom7
:
false
,
symptom8
:
false
,
symptom9
:
false
,
});
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
...
@@ -20,6 +26,27 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -20,6 +26,27 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374537/3D/ulxecngohldnmcizzrej.mp4
"
;
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374537/3D/ulxecngohldnmcizzrej.mp4
"
;
const
videoRef
=
useRef
(
null
);
const
videoRef
=
useRef
(
null
);
const
screenHeight
=
Dimensions
.
get
(
'
window
'
).
height
;
const
imageHeight
=
screenHeight
*
0.20
;
const
symptomsGroups
=
[
[
{
key
:
'
symptom1
'
,
text
:
'
Headache | හිසරදය
'
},
{
key
:
'
symptom2
'
,
text
:
'
Shoulder pain |උරහිස් වේදනාව
'
},
{
key
:
'
symptom3
'
,
text
:
'
Swelling in the hands | අත්වල ඉදිමීම
'
},
],
[
{
key
:
'
symptom4
'
,
text
:
'
Change in vision | ඇස් පෙනීම වෙනස් වීම
'
},
{
key
:
'
symptom5
'
,
text
:
'
Shortness in breath | හුස්ම හිරවීම
'
},
{
key
:
'
symptom6
'
,
text
:
'
Upper Abdominal pain | ඉහළ උදරයේ වේදනාව
'
},
],
[
{
key
:
'
symptom7
'
,
text
:
'
Swelling in joints | සන්ධි ඉදිමීම
'
},
{
key
:
'
symptom8
'
,
text
:
'
Back Pain | පිටුපස වේදනාව
'
},
{
key
:
'
symptom9
'
,
text
:
'
Side muscle pain | පැත්තේ මාංශ පේශි වේදනාව
'
},
],
// Add more groups as needed
];
const
handleLoad
=
()
=>
{
const
handleLoad
=
()
=>
{
...
@@ -38,9 +65,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -38,9 +65,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
};
};
const
handleSubmit
=
()
=>
{
const
handleSubmit
=
()
=>
{
// Handle the submission of symptoms
// Checking for specific symptoms that lead to SKIN_RISK
console
.
log
(
selectedSymptoms
);
const
skinRiskSymptoms
=
[
'
symptom3
'
,
'
symptom4
'
,
'
symptom7
'
,
'
symptom9
'
];
// Navigate or perform next steps
const
toSkinRisk
=
skinRiskSymptoms
.
some
(
symptom
=>
selectedSymptoms
[
symptom
]);
// Navigate based on condition
if
(
toSkinRisk
)
{
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
);
}
else
{
navigation
.
navigate
(
ROUTES
.
SKIN_UPLOAD
);
}
};
};
const
toggleFullscreen
=
()
=>
{
const
toggleFullscreen
=
()
=>
{
...
@@ -79,13 +113,15 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -79,13 +113,15 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
return
(
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
contentContainerStyle
=
{
styles
.
contentContainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
Text
style
=
{
styles
.
topicText
}
>
patechiae
Additional
Symptoms
<
/Text
>
<
Text
style
=
{
styles
.
topicText
}
>
Patechiae
Additional
Symptoms
<
/Text
>
<
View
style
=
{
styles
.
videoBox
}
>
<
View
style
=
{
styles
.
videoBox
}
>
<
View
style
=
{
styles
.
videoDescriptionBox
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
Self
diagnose
with
the
3
D
Model
Self
diagnose
with
the
3
D
Model
<
/Text
>
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
Video
<
Video
// ref={videoRef}
// ref={videoRef}
...
@@ -106,44 +142,51 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -106,44 +142,51 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
)}
)}
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
Image
source
=
{
require
(
'
./skinassets/scanme.png
'
)}
<
View
style
=
{
styles
.
checkboxContainer
}
>
style
=
{{
width
:
'
50%
'
,
height
:
imageHeight
,
alignSelf
:
'
center
'
,
resizeMode
:
'
contain
'
,
marginBottom
:
-
29
}}
/
>
{
/* Repeat this CheckBox component for each symptom */
}
<
View
style
=
{
styles
.
qrCodeBox
}
>
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
<
Image
<
CheckBox
source
=
{
require
(
'
./skinassets/QR1.png
'
)}
// Make sure the path is correct
value
=
{
selectedSymptoms
[
'
symptom1
'
]}
style
=
{
styles
.
qrCodeImage
}
onValueChange
=
{()
=>
toggleCheckbox
(
'
symptom1
'
)}
/
>
/
>
<
Text
style
=
{
styles
.
checkboxText
}
>
Scattered
itchy
bumps
<
/Text
>
<
TouchableOpacity
style
=
{
styles
.
orButton
}
onPress
=
{()
=>
Linking
.
openURL
(
'
https://mywebar.com/p/Project_0_ysb0ffrwxn
'
)}
>
<
Text
style
=
{
styles
.
orButtonText
}
>
OR
Click
This
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
View
style
=
{
styles
.
checkboxContainer
}
>
{
symptomsGroups
.
map
((
group
,
index
)
=>
(
<
View
key
=
{
index
}
>
{
group
.
map
(
symptom
=>
(
<
View
style
=
{
styles
.
individualCheckboxContainer
}
key
=
{
symptom
.
key
}
>
<
CheckBox
<
CheckBox
value
=
{
selectedSymptoms
[
'
symptom2
'
]}
value
=
{
selectedSymptoms
[
symptom
.
key
]}
onValueChange
=
{()
=>
toggleCheckbox
(
'
symptom2
'
)}
onValueChange
=
{()
=>
toggleCheckbox
(
symptom
.
key
)}
/
>
/
>
<
Text
style
=
{
styles
.
checkboxText
}
>
Large
red
inflamed
area
across
belly
<
/Text
>
<
Text
style
=
{
styles
.
checkboxText
}
>
{
symptom
.
text
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
))}
<
CheckBox
{
index
!==
symptomsGroups
.
length
-
1
&&
(
value
=
{
selectedSymptoms
[
'
symptom3
'
]}
<
View
style
=
{
styles
.
separator
}
/
>
onValueChange
=
{()
=>
toggleCheckbox
(
'
symptom3
'
)}
)}
/
>
<
Text
style
=
{
styles
.
checkboxText
}
>
Yellow
discharges
<
/Text
>
<
/View
>
<
/View
>
))}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
Button
<
Button
title
=
"
Continue for more information
"
title
=
"
Continue for more information
"
style
=
{
styles
.
nextButton
}
style
=
{
styles
.
nextButton
}
onPress
=
{
()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
)}
onPress
=
{
handleSubmit
}
/
>
/
>
<
/ScrollView
>
<
/ScrollView
>
<
/SafeAreaView
>
<
/SafeAreaView
>
);
);
};
};
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
scrollContainer
:
{
scrollContainer
:
{
flexGrow
:
1
,
flexGrow
:
1
,
...
@@ -170,20 +213,30 @@ const styles = StyleSheet.create({
...
@@ -170,20 +213,30 @@ const styles = StyleSheet.create({
marginVertical
:
20
,
marginVertical
:
20
,
},
},
descriptionText
:
{
descriptionText
:
{
fontSize
:
16
,
fontSize
:
18
,
textAlign
:
'
center
'
,
textAlign
:
'
center
'
,
marginHorizontal
:
20
,
marginHorizontal
:
20
,
marginBottom
:
20
,
marginBottom
:
20
,
color
:
COLORS
.
black
,
fontWeight
:
'
bold
'
,
},
},
separator
:
{
height
:
2
,
backgroundColor
:
COLORS
.
blue
,
marginVertical
:
10
,
width
:
'
90%
'
,
// Reduce width to see margins from container edges
alignSelf
:
'
center
'
,
marginLeft
:
-
197
,
checkboxContainer
:
{
},
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
checkboxContainer
:
{
backgroundColor
:
COLORS
.
lightBlue
,
borderRadius
:
25
,
borderRadius
:
25
,
width
:
'
100%
'
,
width
:
'
100%
'
,
// Ensure it's taking the full width of its parent
alignSelf
:
'
center
'
,
// This ensures it's centered relative to the parent
paddingTop
:
10
,
marginLeft
:
197
,
marginLeft
:
197
,
paddingTop
:
10
...
@@ -193,6 +246,7 @@ const styles = StyleSheet.create({
...
@@ -193,6 +246,7 @@ const styles = StyleSheet.create({
fontWeight
:
'
bold
'
,
fontWeight
:
'
bold
'
,
marginBottom
:
10
,
marginBottom
:
10
,
alignSelf
:
'
center
'
,
alignSelf
:
'
center
'
,
color
:
COLORS
.
black
,
},
},
checkboxRow
:
{
checkboxRow
:
{
flexDirection
:
'
row
'
,
flexDirection
:
'
row
'
,
...
@@ -202,6 +256,7 @@ const styles = StyleSheet.create({
...
@@ -202,6 +256,7 @@ const styles = StyleSheet.create({
checkboxText
:
{
checkboxText
:
{
fontSize
:
16
,
fontSize
:
16
,
marginLeft
:
8
,
marginLeft
:
8
,
flexShrink
:
1
,
// Allows the text to shrink and wrap onto the next line
},
},
submitButton
:
{
submitButton
:
{
backgroundColor
:
COLORS
.
primary
,
backgroundColor
:
COLORS
.
primary
,
...
@@ -251,9 +306,10 @@ const styles = StyleSheet.create({
...
@@ -251,9 +306,10 @@ const styles = StyleSheet.create({
flexDirection
:
'
row
'
,
// Align checkbox and label in a row
flexDirection
:
'
row
'
,
// Align checkbox and label in a row
alignItems
:
'
center
'
,
// Center align items vertically
alignItems
:
'
center
'
,
// Center align items vertically
borderWidth
:
0.6
,
// Optional border width
borderWidth
:
0.6
,
// Optional border width
width
:
'
100
%
'
,
// Width 100% to fill container width
width
:
'
98
%
'
,
// Width 100% to fill container width
marginLeft
:
-
100
,
marginLeft
:
-
95
,
elevation
:
6
,
elevation
:
6
,
minHeight
:
50
,
},
},
...
@@ -273,7 +329,7 @@ const styles = StyleSheet.create({
...
@@ -273,7 +329,7 @@ const styles = StyleSheet.create({
borderColor
:
'
#80BCBD
'
,
// Set the border color
borderColor
:
'
#80BCBD
'
,
// Set the border color
borderRadius
:
10
,
// Set border radius for rounded corners
borderRadius
:
10
,
// Set border radius for rounded corners
padding
:
20
,
// Add padding around the content
padding
:
20
,
// Add padding around the content
marginBottom
:
20
,
// Add bottom margin for spacing
marginBottom
:
-
20
,
// Add bottom margin for spacing
width
:
'
100%
'
,
// Adjust the width as necessary
width
:
'
100%
'
,
// Adjust the width as necessary
alignSelf
:
'
center
'
,
// Center the box within its container
alignSelf
:
'
center
'
,
// Center the box within its container
// Add shadows for elevation effect (optional)
// Add shadows for elevation effect (optional)
...
@@ -287,6 +343,7 @@ const styles = StyleSheet.create({
...
@@ -287,6 +343,7 @@ const styles = StyleSheet.create({
elevation
:
5
,
elevation
:
5
,
},
},
playPauseButton
:
{
playPauseButton
:
{
position
:
'
absolute
'
,
position
:
'
absolute
'
,
top
:
'
50%
'
,
top
:
'
50%
'
,
...
@@ -306,6 +363,44 @@ const styles = StyleSheet.create({
...
@@ -306,6 +363,44 @@ const styles = StyleSheet.create({
contentContainer
:
{
contentContainer
:
{
paddingBottom
:
20
,
// Adds padding at the bottom
paddingBottom
:
20
,
// Adds padding at the bottom
},
},
qrCodeBox
:
{
width
:
'
90%
'
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
padding
:
20
,
backgroundColor
:
COLORS
.
white
,
marginBottom
:
20
,
shadowColor
:
"
#000
"
,
borderColor
:
'
#80BCBD
'
,
borderWidth
:
2
,
borderRadius
:
10
,
shadowOffset
:
{
width
:
0
,
height
:
2
,
},
shadowOpacity
:
0.25
,
shadowRadius
:
3.84
,
elevation
:
5
,
},
qrCodeImage
:
{
width
:
200
,
// Adjust size as needed
height
:
200
,
// Adjust size as needed
},
orButton
:
{
marginTop
:
30
,
backgroundColor
:
COLORS
.
primary
,
padding
:
10
,
borderRadius
:
5
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
orButtonText
:
{
color
:
COLORS
.
white
,
fontSize
:
14
,
fontWeight
:
'
bold
'
,
}
// ... possibly other styles
// ... possibly other styles
});
});
...
...
src/screens/home/skin/AdditionalSymptoms2.js
View file @
d5a7607b
...
@@ -5,12 +5,17 @@ import CheckBox from '@react-native-community/checkbox'; // Make sure to install
...
@@ -5,12 +5,17 @@ import CheckBox from '@react-native-community/checkbox'; // Make sure to install
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Button
from
'
../../../components/Button
'
;
import
Button
from
'
../../../components/Button
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
import
{
Dimensions
}
from
'
react-native
'
;
import
{
Linking
}
from
'
react-native
'
;
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom1
:
false
,
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom2
:
false
,
symptom1
:
false
,
symptom2
:
false
,
symptom3
:
false
,
symptom4
:
false
,
symptom3
:
false
,});
symptom5
:
false
,
symptom6
:
false
,
symptom7
:
false
,
symptom8
:
false
,
symptom9
:
false
,
symptom10
:
false
,
symptom11
:
false
,
symptom12
:
false
,
symptom13
:
false
,
symptom14
:
false
});
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
...
@@ -20,6 +25,24 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -20,6 +25,24 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374525/3D/tu1jhgaa6hvcyby5zybr.mp4
"
;
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374525/3D/tu1jhgaa6hvcyby5zybr.mp4
"
;
const
videoRef
=
useRef
(
null
);
const
videoRef
=
useRef
(
null
);
const
screenHeight
=
Dimensions
.
get
(
'
window
'
).
height
;
const
imageHeight
=
screenHeight
*
0.20
;
const
symptomsGroups
=
[
[
{
key
:
'
symptom1
'
,
text
:
'
Headache | හිසරදය
'
},
{
key
:
'
symptom2
'
,
text
:
'
Sore throat | උගුරේ අමාරුව
'
},
{
key
:
'
symptom3
'
,
text
:
'
Swelling in joints | සන්ධි ඉදිමීම
'
},
],
[
{
key
:
'
symptom5
'
,
text
:
'
Shortness in breath | හුස්ම හිරවීම
'
},
{
key
:
'
symptom6
'
,
text
:
'
Large mouth ulcers | මුඛයේ විශාල වණ
'
},
{
key
:
'
symptom4
'
,
text
:
'
Weight loss | බර අඩුවීම
'
},
],
// Add more groups as needed
];
const
handleLoad
=
()
=>
{
const
handleLoad
=
()
=>
{
...
@@ -38,9 +61,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -38,9 +61,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
};
};
const
handleSubmit
=
()
=>
{
const
handleSubmit
=
()
=>
{
// Handle the submission of symptoms
// Checking for specific symptoms that lead to SKIN_RISK
console
.
log
(
selectedSymptoms
);
const
skinRiskSymptoms
=
[
'
symptom3
'
,
'
symptom4
'
,
'
symptom4
'
,
'
symptom10
'
,
'
symptom8
'
,
'
symptom6
'
];
// Navigate or perform next steps
const
toSkinRisk
=
skinRiskSymptoms
.
some
(
symptom
=>
selectedSymptoms
[
symptom
]);
// Navigate based on condition
if
(
toSkinRisk
)
{
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
);
}
else
{
navigation
.
navigate
(
ROUTES
.
SKIN_UPLOAD
);
}
};
};
const
toggleFullscreen
=
()
=>
{
const
toggleFullscreen
=
()
=>
{
...
@@ -79,13 +109,15 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -79,13 +109,15 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
return
(
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
contentContainerStyle
=
{
styles
.
contentContainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
Text
style
=
{
styles
.
topicText
}
>
Cytomegalovirus
Additional
Symptoms
<
/Text
>
<
Text
style
=
{
styles
.
topicText
}
>
Cytomegalovirus
Additional
Symptoms
<
/Text
>
<
View
style
=
{
styles
.
videoBox
}
>
<
View
style
=
{
styles
.
videoBox
}
>
<
View
style
=
{
styles
.
videoDescriptionBox
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
Self
diagnose
with
the
3
D
Model
Self
diagnose
with
the
3
D
Model
<
/Text
>
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
Video
<
Video
// ref={videoRef}
// ref={videoRef}
...
@@ -106,44 +138,51 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -106,44 +138,51 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
)}
)}
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
Image
source
=
{
require
(
'
./skinassets/scanme.png
'
)}
<
View
style
=
{
styles
.
checkboxContainer
}
>
style
=
{{
width
:
'
50%
'
,
height
:
imageHeight
,
alignSelf
:
'
center
'
,
resizeMode
:
'
contain
'
,
marginBottom
:
-
29
}}
/
>
{
/* Repeat this CheckBox component for each symptom */
}
<
View
style
=
{
styles
.
qrCodeBox
}
>
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
<
Image
<
CheckBox
source
=
{
require
(
'
./skinassets/QR1.png
'
)}
// Make sure the path is correct
value
=
{
selectedSymptoms
[
'
symptom1
'
]}
style
=
{
styles
.
qrCodeImage
}
onValueChange
=
{()
=>
toggleCheckbox
(
'
symptom1
'
)}
/
>
/
>
<
Text
style
=
{
styles
.
checkboxText
}
>
Scattered
itchy
bumps
<
/Text
>
<
TouchableOpacity
style
=
{
styles
.
orButton
}
onPress
=
{()
=>
Linking
.
openURL
(
'
https://mywebar.com/p/Project_0_ysb0ffrwxn
'
)}
>
<
Text
style
=
{
styles
.
orButtonText
}
>
OR
Click
This
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
View
style
=
{
styles
.
checkboxContainer
}
>
{
symptomsGroups
.
map
((
group
,
index
)
=>
(
<
View
key
=
{
index
}
>
{
group
.
map
(
symptom
=>
(
<
View
style
=
{
styles
.
individualCheckboxContainer
}
key
=
{
symptom
.
key
}
>
<
CheckBox
<
CheckBox
value
=
{
selectedSymptoms
[
'
symptom2
'
]}
value
=
{
selectedSymptoms
[
symptom
.
key
]}
onValueChange
=
{()
=>
toggleCheckbox
(
'
symptom2
'
)}
onValueChange
=
{()
=>
toggleCheckbox
(
symptom
.
key
)}
/
>
/
>
<
Text
style
=
{
styles
.
checkboxText
}
>
Large
red
inflamed
area
across
belly
<
/Text
>
<
Text
style
=
{
styles
.
checkboxText
}
>
{
symptom
.
text
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
))}
<
CheckBox
{
index
!==
symptomsGroups
.
length
-
1
&&
(
value
=
{
selectedSymptoms
[
'
symptom3
'
]}
<
View
style
=
{
styles
.
separator
}
/
>
onValueChange
=
{()
=>
toggleCheckbox
(
'
symptom3
'
)}
)}
/
>
<
Text
style
=
{
styles
.
checkboxText
}
>
Yellow
discharges
<
/Text
>
<
/View
>
<
/View
>
))}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
Button
<
Button
title
=
"
Continue for more information
"
title
=
"
Continue for more information
"
style
=
{
styles
.
nextButton
}
style
=
{
styles
.
nextButton
}
onPress
=
{
()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
)}
onPress
=
{
handleSubmit
}
/
>
/
>
<
/ScrollView
>
<
/ScrollView
>
<
/SafeAreaView
>
<
/SafeAreaView
>
);
);
};
};
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
scrollContainer
:
{
scrollContainer
:
{
flexGrow
:
1
,
flexGrow
:
1
,
...
@@ -170,20 +209,30 @@ const styles = StyleSheet.create({
...
@@ -170,20 +209,30 @@ const styles = StyleSheet.create({
marginVertical
:
20
,
marginVertical
:
20
,
},
},
descriptionText
:
{
descriptionText
:
{
fontSize
:
16
,
fontSize
:
18
,
textAlign
:
'
center
'
,
textAlign
:
'
center
'
,
marginHorizontal
:
20
,
marginHorizontal
:
20
,
marginBottom
:
20
,
marginBottom
:
20
,
color
:
COLORS
.
black
,
fontWeight
:
'
bold
'
,
},
},
separator
:
{
height
:
2
,
backgroundColor
:
COLORS
.
blue
,
marginVertical
:
10
,
width
:
'
90%
'
,
// Reduce width to see margins from container edges
alignSelf
:
'
center
'
,
marginLeft
:
-
197
,
checkboxContainer
:
{
},
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
checkboxContainer
:
{
backgroundColor
:
COLORS
.
lightBlue
,
borderRadius
:
25
,
borderRadius
:
25
,
width
:
'
100%
'
,
width
:
'
100%
'
,
// Ensure it's taking the full width of its parent
alignSelf
:
'
center
'
,
// This ensures it's centered relative to the parent
paddingTop
:
10
,
marginLeft
:
197
,
marginLeft
:
197
,
paddingTop
:
10
...
@@ -193,6 +242,7 @@ const styles = StyleSheet.create({
...
@@ -193,6 +242,7 @@ const styles = StyleSheet.create({
fontWeight
:
'
bold
'
,
fontWeight
:
'
bold
'
,
marginBottom
:
10
,
marginBottom
:
10
,
alignSelf
:
'
center
'
,
alignSelf
:
'
center
'
,
color
:
COLORS
.
black
,
},
},
checkboxRow
:
{
checkboxRow
:
{
flexDirection
:
'
row
'
,
flexDirection
:
'
row
'
,
...
@@ -202,6 +252,7 @@ const styles = StyleSheet.create({
...
@@ -202,6 +252,7 @@ const styles = StyleSheet.create({
checkboxText
:
{
checkboxText
:
{
fontSize
:
16
,
fontSize
:
16
,
marginLeft
:
8
,
marginLeft
:
8
,
flexShrink
:
1
,
// Allows the text to shrink and wrap onto the next line
},
},
submitButton
:
{
submitButton
:
{
backgroundColor
:
COLORS
.
primary
,
backgroundColor
:
COLORS
.
primary
,
...
@@ -251,9 +302,10 @@ const styles = StyleSheet.create({
...
@@ -251,9 +302,10 @@ const styles = StyleSheet.create({
flexDirection
:
'
row
'
,
// Align checkbox and label in a row
flexDirection
:
'
row
'
,
// Align checkbox and label in a row
alignItems
:
'
center
'
,
// Center align items vertically
alignItems
:
'
center
'
,
// Center align items vertically
borderWidth
:
0.6
,
// Optional border width
borderWidth
:
0.6
,
// Optional border width
width
:
'
100
%
'
,
// Width 100% to fill container width
width
:
'
98
%
'
,
// Width 100% to fill container width
marginLeft
:
-
100
,
marginLeft
:
-
95
,
elevation
:
6
,
elevation
:
6
,
minHeight
:
50
,
},
},
...
@@ -273,7 +325,7 @@ const styles = StyleSheet.create({
...
@@ -273,7 +325,7 @@ const styles = StyleSheet.create({
borderColor
:
'
#80BCBD
'
,
// Set the border color
borderColor
:
'
#80BCBD
'
,
// Set the border color
borderRadius
:
10
,
// Set border radius for rounded corners
borderRadius
:
10
,
// Set border radius for rounded corners
padding
:
20
,
// Add padding around the content
padding
:
20
,
// Add padding around the content
marginBottom
:
20
,
// Add bottom margin for spacing
marginBottom
:
-
20
,
// Add bottom margin for spacing
width
:
'
100%
'
,
// Adjust the width as necessary
width
:
'
100%
'
,
// Adjust the width as necessary
alignSelf
:
'
center
'
,
// Center the box within its container
alignSelf
:
'
center
'
,
// Center the box within its container
// Add shadows for elevation effect (optional)
// Add shadows for elevation effect (optional)
...
@@ -287,6 +339,7 @@ const styles = StyleSheet.create({
...
@@ -287,6 +339,7 @@ const styles = StyleSheet.create({
elevation
:
5
,
elevation
:
5
,
},
},
playPauseButton
:
{
playPauseButton
:
{
position
:
'
absolute
'
,
position
:
'
absolute
'
,
top
:
'
50%
'
,
top
:
'
50%
'
,
...
@@ -306,6 +359,44 @@ const styles = StyleSheet.create({
...
@@ -306,6 +359,44 @@ const styles = StyleSheet.create({
contentContainer
:
{
contentContainer
:
{
paddingBottom
:
20
,
// Adds padding at the bottom
paddingBottom
:
20
,
// Adds padding at the bottom
},
},
qrCodeBox
:
{
width
:
'
90%
'
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
padding
:
20
,
backgroundColor
:
COLORS
.
white
,
marginBottom
:
20
,
shadowColor
:
"
#000
"
,
borderColor
:
'
#80BCBD
'
,
borderWidth
:
2
,
borderRadius
:
10
,
shadowOffset
:
{
width
:
0
,
height
:
2
,
},
shadowOpacity
:
0.25
,
shadowRadius
:
3.84
,
elevation
:
5
,
},
qrCodeImage
:
{
width
:
200
,
// Adjust size as needed
height
:
200
,
// Adjust size as needed
},
orButton
:
{
marginTop
:
30
,
backgroundColor
:
COLORS
.
primary
,
padding
:
10
,
borderRadius
:
5
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
orButtonText
:
{
color
:
COLORS
.
white
,
fontSize
:
14
,
fontWeight
:
'
bold
'
,
}
// ... possibly other styles
// ... possibly other styles
});
});
...
...
src/screens/home/skin/AdditionalSymptoms3.js
View file @
d5a7607b
...
@@ -5,12 +5,17 @@ import CheckBox from '@react-native-community/checkbox'; // Make sure to install
...
@@ -5,12 +5,17 @@ import CheckBox from '@react-native-community/checkbox'; // Make sure to install
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Button
from
'
../../../components/Button
'
;
import
Button
from
'
../../../components/Button
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
import
{
Dimensions
}
from
'
react-native
'
;
import
{
Linking
}
from
'
react-native
'
;
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom1
:
false
,
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom2
:
false
,
symptom1
:
false
,
symptom2
:
false
,
symptom3
:
false
,
symptom4
:
false
,
symptom3
:
false
,});
symptom5
:
false
,
symptom6
:
false
,
symptom7
:
false
,
symptom8
:
false
,
symptom9
:
false
,
symptom10
:
false
,
symptom11
:
false
,
symptom12
:
false
,
symptom13
:
false
,
symptom14
:
false
});
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
...
@@ -20,6 +25,19 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -20,6 +25,19 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374517/3D/q2zk6ka9aqamthwgn1vv.mp4
"
;
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374517/3D/q2zk6ka9aqamthwgn1vv.mp4
"
;
const
videoRef
=
useRef
(
null
);
const
videoRef
=
useRef
(
null
);
const
screenHeight
=
Dimensions
.
get
(
'
window
'
).
height
;
const
imageHeight
=
screenHeight
*
0.20
;
const
symptomsGroups
=
[
[
{
key
:
'
symptom1
'
,
text
:
'
Headache | හිසරදය
'
},
{
key
:
'
symptom2
'
,
text
:
'
Sore throat | උගුරේ අමාරුව
'
},
{
key
:
'
symptom3
'
,
text
:
'
Pain around genitals | ලිංගික අවයව වටා වේදනාව
'
},
{
key
:
'
symptom5
'
,
text
:
'
Pain in urination | මුත්රා කිරීමේදී වේදනාව
'
},
],
];
const
handleLoad
=
()
=>
{
const
handleLoad
=
()
=>
{
...
@@ -38,9 +56,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -38,9 +56,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
};
};
const
handleSubmit
=
()
=>
{
const
handleSubmit
=
()
=>
{
// Handle the submission of symptoms
// Checking for specific symptoms that lead to SKIN_RISK
console
.
log
(
selectedSymptoms
);
const
skinRiskSymptoms
=
[
'
symptom3
'
,
'
symptom4
'
,
'
symptom4
'
,
'
symptom10
'
,
'
symptom8
'
,
'
symptom6
'
];
// Navigate or perform next steps
const
toSkinRisk
=
skinRiskSymptoms
.
some
(
symptom
=>
selectedSymptoms
[
symptom
]);
// Navigate based on condition
if
(
toSkinRisk
)
{
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
);
}
else
{
navigation
.
navigate
(
ROUTES
.
SKIN_UPLOAD
);
}
};
};
const
toggleFullscreen
=
()
=>
{
const
toggleFullscreen
=
()
=>
{
...
@@ -79,13 +104,15 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -79,13 +104,15 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
return
(
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
contentContainerStyle
=
{
styles
.
contentContainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
Text
style
=
{
styles
.
topicText
}
>
Herpes
Additional
Symptoms
<
/Text
>
<
Text
style
=
{
styles
.
topicText
}
>
Cytomegalovirus
Additional
Symptoms
<
/Text
>
<
View
style
=
{
styles
.
videoBox
}
>
<
View
style
=
{
styles
.
videoBox
}
>
<
View
style
=
{
styles
.
videoDescriptionBox
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
Self
diagnose
with
the
3
D
Model
Self
diagnose
with
the
3
D
Model
<
/Text
>
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
Video
<
Video
// ref={videoRef}
// ref={videoRef}
...
@@ -106,44 +133,51 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
...
@@ -106,44 +133,51 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
)}
)}
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
Image
source
=
{
require
(
'
./skinassets/scanme.png
'
)}
<
View
style
=
{
styles
.
checkboxContainer
}
>
style
=
{{
width
:
'
50%
'
,
height
:
imageHeight
,
alignSelf
:
'
center
'
,
resizeMode
:
'
contain
'
,
marginBottom
:
-
29
}}
/
>
{
/* Repeat this CheckBox component for each symptom */
}
<
View
style
=
{
styles
.
qrCodeBox
}
>
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
<
Image
<
CheckBox
source
=
{
require
(
'
./skinassets/QR1.png
'
)}
// Make sure the path is correct
value
=
{
selectedSymptoms
[
'
symptom1
'
]}
style
=
{
styles
.
qrCodeImage
}
onValueChange
=
{()
=>
toggleCheckbox
(
'
symptom1
'
)}
/
>
/
>
<
Text
style
=
{
styles
.
checkboxText
}
>
Scattered
itchy
bumps
<
/Text
>
<
TouchableOpacity
style
=
{
styles
.
orButton
}
onPress
=
{()
=>
Linking
.
openURL
(
'
https://mywebar.com/p/Project_0_ysb0ffrwxn
'
)}
>
<
Text
style
=
{
styles
.
orButtonText
}
>
OR
Click
This
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
View
style
=
{
styles
.
checkboxContainer
}
>
{
symptomsGroups
.
map
((
group
,
index
)
=>
(
<
View
key
=
{
index
}
>
{
group
.
map
(
symptom
=>
(
<
View
style
=
{
styles
.
individualCheckboxContainer
}
key
=
{
symptom
.
key
}
>
<
CheckBox
<
CheckBox
value
=
{
selectedSymptoms
[
'
symptom2
'
]}
value
=
{
selectedSymptoms
[
symptom
.
key
]}
onValueChange
=
{()
=>
toggleCheckbox
(
'
symptom2
'
)}
onValueChange
=
{()
=>
toggleCheckbox
(
symptom
.
key
)}
/
>
/
>
<
Text
style
=
{
styles
.
checkboxText
}
>
Large
red
inflamed
area
across
belly
<
/Text
>
<
Text
style
=
{
styles
.
checkboxText
}
>
{
symptom
.
text
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
))}
<
CheckBox
{
index
!==
symptomsGroups
.
length
-
1
&&
(
value
=
{
selectedSymptoms
[
'
symptom3
'
]}
<
View
style
=
{
styles
.
separator
}
/
>
onValueChange
=
{()
=>
toggleCheckbox
(
'
symptom3
'
)}
)}
/
>
<
Text
style
=
{
styles
.
checkboxText
}
>
Yellow
discharges
<
/Text
>
<
/View
>
<
/View
>
))}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
Button
<
Button
title
=
"
Continue for more information
"
title
=
"
Continue for more information
"
style
=
{
styles
.
nextButton
}
style
=
{
styles
.
nextButton
}
onPress
=
{
()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
)}
onPress
=
{
handleSubmit
}
/
>
/
>
<
/ScrollView
>
<
/ScrollView
>
<
/SafeAreaView
>
<
/SafeAreaView
>
);
);
};
};
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
scrollContainer
:
{
scrollContainer
:
{
flexGrow
:
1
,
flexGrow
:
1
,
...
@@ -170,20 +204,30 @@ const styles = StyleSheet.create({
...
@@ -170,20 +204,30 @@ const styles = StyleSheet.create({
marginVertical
:
20
,
marginVertical
:
20
,
},
},
descriptionText
:
{
descriptionText
:
{
fontSize
:
16
,
fontSize
:
18
,
textAlign
:
'
center
'
,
textAlign
:
'
center
'
,
marginHorizontal
:
20
,
marginHorizontal
:
20
,
marginBottom
:
20
,
marginBottom
:
20
,
color
:
COLORS
.
black
,
fontWeight
:
'
bold
'
,
},
},
separator
:
{
height
:
2
,
backgroundColor
:
COLORS
.
blue
,
marginVertical
:
10
,
width
:
'
90%
'
,
// Reduce width to see margins from container edges
alignSelf
:
'
center
'
,
marginLeft
:
-
197
,
checkboxContainer
:
{
},
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
checkboxContainer
:
{
backgroundColor
:
COLORS
.
lightBlue
,
borderRadius
:
25
,
borderRadius
:
25
,
width
:
'
100%
'
,
width
:
'
100%
'
,
// Ensure it's taking the full width of its parent
alignSelf
:
'
center
'
,
// This ensures it's centered relative to the parent
paddingTop
:
10
,
marginLeft
:
197
,
marginLeft
:
197
,
paddingTop
:
10
...
@@ -193,6 +237,7 @@ const styles = StyleSheet.create({
...
@@ -193,6 +237,7 @@ const styles = StyleSheet.create({
fontWeight
:
'
bold
'
,
fontWeight
:
'
bold
'
,
marginBottom
:
10
,
marginBottom
:
10
,
alignSelf
:
'
center
'
,
alignSelf
:
'
center
'
,
color
:
COLORS
.
black
,
},
},
checkboxRow
:
{
checkboxRow
:
{
flexDirection
:
'
row
'
,
flexDirection
:
'
row
'
,
...
@@ -202,6 +247,7 @@ const styles = StyleSheet.create({
...
@@ -202,6 +247,7 @@ const styles = StyleSheet.create({
checkboxText
:
{
checkboxText
:
{
fontSize
:
16
,
fontSize
:
16
,
marginLeft
:
8
,
marginLeft
:
8
,
flexShrink
:
1
,
// Allows the text to shrink and wrap onto the next line
},
},
submitButton
:
{
submitButton
:
{
backgroundColor
:
COLORS
.
primary
,
backgroundColor
:
COLORS
.
primary
,
...
@@ -251,9 +297,10 @@ const styles = StyleSheet.create({
...
@@ -251,9 +297,10 @@ const styles = StyleSheet.create({
flexDirection
:
'
row
'
,
// Align checkbox and label in a row
flexDirection
:
'
row
'
,
// Align checkbox and label in a row
alignItems
:
'
center
'
,
// Center align items vertically
alignItems
:
'
center
'
,
// Center align items vertically
borderWidth
:
0.6
,
// Optional border width
borderWidth
:
0.6
,
// Optional border width
width
:
'
100
%
'
,
// Width 100% to fill container width
width
:
'
98
%
'
,
// Width 100% to fill container width
marginLeft
:
-
100
,
marginLeft
:
-
95
,
elevation
:
6
,
elevation
:
6
,
minHeight
:
50
,
},
},
...
@@ -273,7 +320,7 @@ const styles = StyleSheet.create({
...
@@ -273,7 +320,7 @@ const styles = StyleSheet.create({
borderColor
:
'
#80BCBD
'
,
// Set the border color
borderColor
:
'
#80BCBD
'
,
// Set the border color
borderRadius
:
10
,
// Set border radius for rounded corners
borderRadius
:
10
,
// Set border radius for rounded corners
padding
:
20
,
// Add padding around the content
padding
:
20
,
// Add padding around the content
marginBottom
:
20
,
// Add bottom margin for spacing
marginBottom
:
-
20
,
// Add bottom margin for spacing
width
:
'
100%
'
,
// Adjust the width as necessary
width
:
'
100%
'
,
// Adjust the width as necessary
alignSelf
:
'
center
'
,
// Center the box within its container
alignSelf
:
'
center
'
,
// Center the box within its container
// Add shadows for elevation effect (optional)
// Add shadows for elevation effect (optional)
...
@@ -287,6 +334,7 @@ const styles = StyleSheet.create({
...
@@ -287,6 +334,7 @@ const styles = StyleSheet.create({
elevation
:
5
,
elevation
:
5
,
},
},
playPauseButton
:
{
playPauseButton
:
{
position
:
'
absolute
'
,
position
:
'
absolute
'
,
top
:
'
50%
'
,
top
:
'
50%
'
,
...
@@ -306,6 +354,44 @@ const styles = StyleSheet.create({
...
@@ -306,6 +354,44 @@ const styles = StyleSheet.create({
contentContainer
:
{
contentContainer
:
{
paddingBottom
:
20
,
// Adds padding at the bottom
paddingBottom
:
20
,
// Adds padding at the bottom
},
},
qrCodeBox
:
{
width
:
'
90%
'
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
padding
:
20
,
backgroundColor
:
COLORS
.
white
,
marginBottom
:
20
,
shadowColor
:
"
#000
"
,
borderColor
:
'
#80BCBD
'
,
borderWidth
:
2
,
borderRadius
:
10
,
shadowOffset
:
{
width
:
0
,
height
:
2
,
},
shadowOpacity
:
0.25
,
shadowRadius
:
3.84
,
elevation
:
5
,
},
qrCodeImage
:
{
width
:
200
,
// Adjust size as needed
height
:
200
,
// Adjust size as needed
},
orButton
:
{
marginTop
:
30
,
backgroundColor
:
COLORS
.
primary
,
padding
:
10
,
borderRadius
:
5
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
orButtonText
:
{
color
:
COLORS
.
white
,
fontSize
:
14
,
fontWeight
:
'
bold
'
,
}
// ... possibly other styles
// ... possibly other styles
});
});
...
...
src/screens/home/skin/SkinUploader.js
View file @
d5a7607b
...
@@ -143,7 +143,7 @@ const Camera = ({ navigation }) => {
...
@@ -143,7 +143,7 @@ const Camera = ({ navigation }) => {
<
Button
<
Button
title
=
"
Continue for more information
"
title
=
"
Continue for more information
"
style
=
{
styles
.
nextButton
}
style
=
{
styles
.
nextButton
}
onPress
=
{()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_VIDEO
)}
onPress
=
{()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_VIDEO
2
)}
/
>
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
...
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