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
37f2f0b4
Commit
37f2f0b4
authored
May 18, 2024
by
isuraem
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'exercise-manage' of
http://gitlab.sliit.lk/2023-24-005/emidwife-new
into final-app
parents
ebf20096
7edd1ddf
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
190 additions
and
107 deletions
+190
-107
App.js
App.js
+8
-7
src/constants/routes.js
src/constants/routes.js
+5
-1
src/navigations/ExerciseNavigator.js
src/navigations/ExerciseNavigator.js
+3
-0
src/screens/home/exercise/ExerciseActionView.js
src/screens/home/exercise/ExerciseActionView.js
+167
-96
src/screens/home/exercise/HealthFormExercise.js
src/screens/home/exercise/HealthFormExercise.js
+2
-1
src/screens/home/exercise/MainMenuExercise.js
src/screens/home/exercise/MainMenuExercise.js
+5
-2
No files found.
App.js
View file @
37f2f0b4
...
@@ -7,14 +7,15 @@ LogBox.ignoreAllLogs();
...
@@ -7,14 +7,15 @@ LogBox.ignoreAllLogs();
const
App
=
()
=>
{
const
App
=
()
=>
{
// Your Firebase project config
// Your Firebase project config
const
firebaseConfig
=
{
const
firebaseConfig
=
{
apiKey
:
"
AIzaSy
DYUf2gYWwE_qvQk2e-8ErEZ_PYBZ7eX0o
"
,
apiKey
:
"
AIzaSy
CeAB4zi1RAoBPPJyE6qii36pz01tfKrYQ
"
,
authDomain
:
"
e
midwife-382f9
.firebaseapp.com
"
,
authDomain
:
"
e
sp32-emidwife
.firebaseapp.com
"
,
databaseURL
:
"
https://e
midwife-382f9-default-rtdb.asia-southeast1.firebasedatabase.app
"
,
databaseURL
:
"
https://e
sp32-emidwife-default-rtdb.firebaseio.com
"
,
projectId
:
"
e
midwife-382f9
"
,
projectId
:
"
e
sp32-emidwife
"
,
storageBucket
:
"
e
midwife-382f9
.appspot.com
"
,
storageBucket
:
"
e
sp32-emidwife
.appspot.com
"
,
messagingSenderId
:
"
5
8634203025
6
"
,
messagingSenderId
:
"
5
9030704531
6
"
,
appId
:
"
1:5
86342030256:web:a88085b0dd2a72a953d475
"
appId
:
"
1:5
90307045316:web:3471bfeaec9f74f6dcbe91
"
};
};
// Initialize Firebase
// Initialize Firebase
if
(
!
firebase
.
apps
.
length
)
{
if
(
!
firebase
.
apps
.
length
)
{
firebase
.
initializeApp
(
firebaseConfig
);
firebase
.
initializeApp
(
firebaseConfig
);
...
...
src/constants/routes.js
View file @
37f2f0b4
...
@@ -24,7 +24,10 @@ export default {
...
@@ -24,7 +24,10 @@ export default {
EXERCISE_VIEW
:
'
Exercise_View
'
,
EXERCISE_VIEW
:
'
Exercise_View
'
,
EXERCISE_ACTION_VIEW
:
'
Exercise_ACTION_View
'
,
EXERCISE_ACTION_VIEW
:
'
Exercise_ACTION_View
'
,
EXERCISE_PROGRESS
:
'
Exercise_PROGRESS
'
,
EXERCISE_PROGRESS
:
'
Exercise_PROGRESS
'
,
EXERCISE_NEW_VIEW
:
'
Exercise_NEW_View
'
,
EXERCISE_NEW_ACTION_VIEW
:
'
Exercise_NEW_ACTION_View
'
,
EXERCISE_NEW_PROGRESS
:
'
Exercise_NEW_PROGRESS
'
,
//skin
//skin
SKIN_WELCOME
:
'
Skin_Welcome
'
,
SKIN_WELCOME
:
'
Skin_Welcome
'
,
...
@@ -80,5 +83,6 @@ export default {
...
@@ -80,5 +83,6 @@ export default {
Game02ProgressLevel04
:
'
Game02ProgressLevel04
'
,
Game02ProgressLevel04
:
'
Game02ProgressLevel04
'
,
Game02ProgressLevel05
:
'
Game02ProgressLevel05
'
,
Game02ProgressLevel05
:
'
Game02ProgressLevel05
'
,
Game02ProgressLevel06
:
'
Game02ProgressLevel06
'
,
Game02ProgressLevel06
:
'
Game02ProgressLevel06
'
,
};
};
src/navigations/ExerciseNavigator.js
View file @
37f2f0b4
...
@@ -69,6 +69,9 @@ function ExerciseNavigator() {
...
@@ -69,6 +69,9 @@ function ExerciseNavigator() {
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_WELCOME
}
component
=
{
WelcomeExercise
}
key
=
"
ExerciseWelcome
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_WELCOME
}
component
=
{
WelcomeExercise
}
key
=
"
ExerciseWelcome
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_FORM
}
component
=
{
HealthFormExercise
}
key
=
"
ExerciseForm
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_FORM
}
component
=
{
HealthFormExercise
}
key
=
"
ExerciseForm
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_MAIN_NEW_MENU
}
component
=
{
MainMenuExercise
}
key
=
"
MainMenuNewExercise
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_MAIN_NEW_MENU
}
component
=
{
MainMenuExercise
}
key
=
"
MainMenuNewExercise
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_NEW_VIEW
}
component
=
{
ExerciseView
}
key
=
"
ExerciseNewView
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_NEW_ACTION_VIEW
}
component
=
{
ExerciseActionView
}
key
=
"
ExerciseActionNewView
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_NEW_PROGRESS
}
component
=
{
ExercisesProgress
}
key
=
"
ExercisesNewProgress
"
/>
<
/
>
<
/
>
)}
)}
<
/Stack.Navigator
>
<
/Stack.Navigator
>
...
...
src/screens/home/exercise/ExerciseActionView.js
View file @
37f2f0b4
This diff is collapsed.
Click to expand it.
src/screens/home/exercise/HealthFormExercise.js
View file @
37f2f0b4
...
@@ -75,7 +75,7 @@ const HealthFormExercise = (props) => {
...
@@ -75,7 +75,7 @@ const HealthFormExercise = (props) => {
if
(
responds
.
data
)
{
if
(
responds
.
data
)
{
try
{
try
{
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
userData
));
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
userData
));
navigation
.
navigate
(
ROUTES
.
EXERCISE_MAIN_MENU
)
navigation
.
navigate
(
ROUTES
.
EXERCISE_MAIN_
NEW_
MENU
)
ToastAndroid
.
show
(
'
userData updated successfully !
'
,
ToastAndroid
.
SHORT
);
ToastAndroid
.
show
(
'
userData updated successfully !
'
,
ToastAndroid
.
SHORT
);
}
catch
(
error
)
{
}
catch
(
error
)
{
ToastAndroid
.
show
(
'
Error updating userData !
'
,
ToastAndroid
.
SHORT
);
ToastAndroid
.
show
(
'
Error updating userData !
'
,
ToastAndroid
.
SHORT
);
...
@@ -163,6 +163,7 @@ const HealthFormExercise = (props) => {
...
@@ -163,6 +163,7 @@ const HealthFormExercise = (props) => {
</TouchableOpacity>
</TouchableOpacity>
<TouchableOpacity
<TouchableOpacity
onPress={() => {
onPress={() => {
setIsWearbleDevice(false)
setWearableModalVisible(false);
setWearableModalVisible(false);
}}
}}
...
...
src/screens/home/exercise/MainMenuExercise.js
View file @
37f2f0b4
...
@@ -94,9 +94,11 @@ const MainMenuExercise = (props) => {
...
@@ -94,9 +94,11 @@ const MainMenuExercise = (props) => {
dataNum
=
2
;
dataNum
=
2
;
}
}
if
(
todayDateByFormat
===
"
Friday
"
||
todayDateByFormat
===
"
Saturday
"
||
todayDateByFormat
===
"
Sunday
"
)
{
if
(
todayDateByFormat
===
"
Friday
"
||
todayDateByFormat
===
"
Saturday
"
||
todayDateByFormat
===
"
Sunday
"
)
{
dataNum
=
2
;
dataNum
=
3
;
}
}
console
.
log
(
"
data
"
,
userData
.
_id
,
dataNum
)
let
exerciseData
=
await
getAllExerciseDay
(
userData
.
_id
,
dataNum
);
let
exerciseData
=
await
getAllExerciseDay
(
userData
.
_id
,
dataNum
);
console
.
log
(
"
dAT
"
,
exerciseData
.
data
.
data
)
let
dataArray
=
exerciseData
.
data
.
data
;
let
dataArray
=
exerciseData
.
data
.
data
;
if
(
dataArray
.
length
>
0
)
{
if
(
dataArray
.
length
>
0
)
{
let
exerciseModifiedAarray
=
[];
let
exerciseModifiedAarray
=
[];
...
@@ -138,6 +140,7 @@ const MainMenuExercise = (props) => {
...
@@ -138,6 +140,7 @@ const MainMenuExercise = (props) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
retriveExerciseList
()
retriveExerciseList
()
setSelectedId
(
null
)
},
[])
},
[])
return
(
return
(
...
@@ -155,7 +158,7 @@ const MainMenuExercise = (props) => {
...
@@ -155,7 +158,7 @@ const MainMenuExercise = (props) => {
renderItem
=
{
renderItem
}
renderItem
=
{
renderItem
}
keyExtractor
=
{
item
=>
item
.
_id
}
keyExtractor
=
{
item
=>
item
.
_id
}
extraData
=
{
selectedId
}
extraData
=
{
selectedId
}
style
=
{{
marginBottom
:
20
}}
style
=
{{
marginBottom
:
20
}}
/
>
/
>
{
loading
&&
<
ActivityIndicator
style
=
{
styles
.
loader
}
size
=
"
large
"
color
=
"
#0000ff
"
/>
}
{
loading
&&
<
ActivityIndicator
style
=
{
styles
.
loader
}
size
=
"
large
"
color
=
"
#0000ff
"
/>
}
<
/ScrollView
>
<
/ScrollView
>
...
...
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