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
47d33bbc
Commit
47d33bbc
authored
May 19, 2024
by
Madiwilage Isura Eranda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed_issues
parent
37f2f0b4
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
38 additions
and
18 deletions
+38
-18
android/gradle.properties
android/gradle.properties
+2
-2
src/navigations/ExerciseNavigator.js
src/navigations/ExerciseNavigator.js
+4
-4
src/screens/home/exercise/HealthFormExercise.js
src/screens/home/exercise/HealthFormExercise.js
+1
-4
src/screens/home/exercise/MainMenuExercise.js
src/screens/home/exercise/MainMenuExercise.js
+26
-3
src/screens/home/game/QuestionsInEnglish.js
src/screens/home/game/QuestionsInEnglish.js
+1
-1
src/screens/home/game/QuestionsInShinhala.js
src/screens/home/game/QuestionsInShinhala.js
+1
-1
src/screens/home/skin/information1.js
src/screens/home/skin/information1.js
+1
-1
src/screens/home/skin/skinassets/Vectorw.jpg
src/screens/home/skin/skinassets/Vectorw.jpg
+0
-0
src/services/auth/index.js
src/services/auth/index.js
+1
-1
src/services/exercises/index.js
src/services/exercises/index.js
+1
-1
No files found.
android/gradle.properties
View file @
47d33bbc
...
...
@@ -42,5 +42,5 @@ hermesEnabled=true
MYAPP_UPLOAD_STORE_FILE
=
my-upload-key.keystore
MYAPP_UPLOAD_KEY_ALIAS
=
my-key-alias
MYAPP_UPLOAD_STORE_PASSWORD
=
midwife
MYAPP_UPLOAD_KEY_PASSWORD
=
midwife
\ No newline at end of file
MYAPP_UPLOAD_STORE_PASSWORD
=
password
MYAPP_UPLOAD_KEY_PASSWORD
=
password
\ No newline at end of file
src/navigations/ExerciseNavigator.js
View file @
47d33bbc
...
...
@@ -68,10 +68,10 @@ function ExerciseNavigator() {
<>
<
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_MAIN_
NEW_MENU
}
component
=
{
MainMenuExercise
}
key
=
"
MainMenuNew
Exercise
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_
NEW_VIEW
}
component
=
{
ExerciseView
}
key
=
"
ExerciseNew
View
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_
NEW_ACTION_VIEW
}
component
=
{
ExerciseActionView
}
key
=
"
ExerciseActionNew
View
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_
NEW_PROGRESS
}
component
=
{
ExercisesProgress
}
key
=
"
ExercisesNew
Progress
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_MAIN_
MENU
}
component
=
{
MainMenuExercise
}
key
=
"
MainMenu
Exercise
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_
VIEW
}
component
=
{
ExerciseView
}
key
=
"
Exercise
View
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_
ACTION_VIEW
}
component
=
{
ExerciseActionView
}
key
=
"
ExerciseAction
View
"
/>
<
Stack
.
Screen
name
=
{
ROUTES
.
EXERCISE_
PROGRESS
}
component
=
{
ExercisesProgress
}
key
=
"
Exercises
Progress
"
/>
<
/
>
)}
<
/Stack.Navigator
>
...
...
src/screens/home/exercise/HealthFormExercise.js
View file @
47d33bbc
...
...
@@ -26,11 +26,9 @@ const HealthFormExercise = (props) => {
useEffect
(()
=>
{
if
(
isWearbleDevice
)
{
// Reference to your Firebase Realtime Database
const
databaseRef
=
database
().
ref
(
'
test
'
);
ToastAndroid
.
show
(
'
Data reading on device !
'
,
ToastAndroid
.
SHORT
);
// Attach an asynchronous listener to read the data at our reference
const
onDataChange
=
(
snapshot
)
=>
{
const
data
=
snapshot
.
val
();
setDataArray
(
data
);
...
...
@@ -40,7 +38,6 @@ const HealthFormExercise = (props) => {
databaseRef
.
on
(
'
value
'
,
onDataChange
);
// Detach the listener when component unmounts or when isWearableDevice changes
return
()
=>
{
databaseRef
.
off
(
'
value
'
,
onDataChange
);
};
...
...
@@ -75,7 +72,7 @@ const HealthFormExercise = (props) => {
if
(
responds
.
data
)
{
try
{
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
userData
));
navigation
.
navigate
(
ROUTES
.
EXERCISE_MAIN_
NEW_MENU
)
navigation
.
navigate
(
ROUTES
.
EXERCISE_MAIN_
MENU
);
ToastAndroid
.
show
(
'
userData updated successfully !
'
,
ToastAndroid
.
SHORT
);
}
catch
(
error
)
{
ToastAndroid
.
show
(
'
Error updating userData !
'
,
ToastAndroid
.
SHORT
);
...
...
src/screens/home/exercise/MainMenuExercise.js
View file @
47d33bbc
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'
react
'
;
import
React
,
{
useState
,
useRef
,
useEffect
,
useCallback
}
from
'
react
'
;
import
{
FlatList
,
SafeAreaView
,
...
...
@@ -20,6 +20,8 @@ import { Cloudinary } from "@cloudinary/url-gen";
import
{
getAllExerciseDay
}
from
'
../../../services/exercises/index
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
const
moment
=
require
(
'
moment
'
);
import
{
useFocusEffect
}
from
'
@react-navigation/native
'
;
const
Item
=
({
item
,
onPress
,
backgroundColor
,
textColor
})
=>
(
<
TouchableOpacity
onPress
=
{
onPress
}
style
=
{[
styles
.
item
,
{
backgroundColor
,
flexDirection
:
"
row
"
,
width
:
'
100%
'
}]}
>
...
...
@@ -138,10 +140,31 @@ const MainMenuExercise = (props) => {
}
useEffect
(()
=>
{
retriveExerciseList
()
// useEffect(() => {
// retriveExerciseList()
// setSelectedId(null)
// }, [])
useEffect
(()
=>
{
// Initial check when component mounts
retriveExerciseList
();
setSelectedId
(
null
)
},
[]);
useFocusEffect
(
useCallback
(()
=>
{
const
checkStatus
=
async
()
=>
{
await
retriveExerciseList
();
setSelectedId
(
null
)
};
checkStatus
();
return
()
=>
{
// Cleanup if necessary
};
},
[])
);
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
...
...
src/screens/home/game/QuestionsInEnglish.js
View file @
47d33bbc
...
...
@@ -45,7 +45,7 @@ const QuestionInEnglishPage = ({navigation, route}) => {
const
loadData
=
()
=>
{
axios
.
get
(
'
http://
emidwife-api.onrender.com
/api/quiz/all_english
'
)
.
get
(
'
http://
16.171.16.144
/api/quiz/all_english
'
)
.
then
(
response
=>
{
setQuestions
(
response
.
data
.
data
);
setIsLoading
(
false
);
...
...
src/screens/home/game/QuestionsInShinhala.js
View file @
47d33bbc
...
...
@@ -45,7 +45,7 @@ const QuestionInSinhalaPage = ({navigation, route}) => {
const
loadData
=
()
=>
{
axios
.
get
(
'
http://
emidwife-api.onrender.com
/api/quiz/all_sinhala
'
)
.
get
(
'
http://
16.171.16.144
/api/quiz/all_sinhala
'
)
.
then
(
response
=>
{
setQuestions
(
response
.
data
.
data
);
setIsLoading
(
false
);
...
...
src/screens/home/skin/information1.js
View file @
47d33bbc
...
...
@@ -156,7 +156,7 @@ const Additionalinformation = ({ navigation }) => {
<
/View
>
<
View
style
=
{
styles
.
qrCodeBox
}
>
<
Image
source
=
{
require
(
'
./skinassets/Vectorw.
pn
g
'
)}
// Make sure the path is correct
source
=
{
require
(
'
./skinassets/Vectorw.
jp
g
'
)}
// Make sure the path is correct
style
=
{
styles
.
qrCodeImage1
}
/
>
<
Text
style
=
{
styles
.
dscriptionText
}
>
...
...
src/screens/home/skin/skinassets/Vectorw.
pn
g
→
src/screens/home/skin/skinassets/Vectorw.
jp
g
View file @
47d33bbc
File moved
src/services/auth/index.js
View file @
47d33bbc
import
axios
from
'
axios
'
;
const
BASE_PATH
=
'
http
s://emidwife-api.onrender.com
/api/mother
'
;
const
BASE_PATH
=
'
http
://16.171.16.144
/api/mother
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
//signIn API Call
...
...
src/services/exercises/index.js
View file @
47d33bbc
import
axios
from
"
axios
"
;
let
BASE_PATH
=
'
http://16.170.242.186:8080
'
;
let
BASE_PATH2
=
'
http
s://emidwife-api.onrender.com
/api/mother
'
;
let
BASE_PATH2
=
'
http
://16.171.16.144
/api/mother
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
...
...
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