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
629d12f0
Commit
629d12f0
authored
May 19, 2024
by
Madiwilage Isura Eranda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change_in_ip
parent
47d33bbc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
android/app/src/main/AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+2
-1
src/screens/home/exercise/HealthFormExercise.js
src/screens/home/exercise/HealthFormExercise.js
+2
-2
src/services/auth/index.js
src/services/auth/index.js
+1
-1
src/services/exercises/index.js
src/services/exercises/index.js
+4
-4
No files found.
android/app/src/main/AndroidManifest.xml
View file @
629d12f0
...
...
@@ -14,7 +14,8 @@
android:icon=
"@mipmap/ic_launcher"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:allowBackup=
"false"
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme"
android:usesCleartextTraffic=
"true"
>
<activity
android:name=
".MainActivity"
android:label=
"@string/app_name"
...
...
src/screens/home/exercise/HealthFormExercise.js
View file @
629d12f0
...
...
@@ -67,13 +67,13 @@ const HealthFormExercise = (props) => {
userData
.
riskLevel
=
respond
.
data
.
prediction
;
userData
.
risk_level_status
=
predictionStatus
;
userData
.
is_exercises_active
=
true
;
ToastAndroid
.
show
(
`You at
${
respond
.
data
.
prediction
}
`
,
ToastAndroid
.
SHORT
);
let
responds
=
await
addInitialExercises
(
userData
.
_id
,
prediction
);
if
(
responds
.
data
)
{
try
{
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
userData
));
navigation
.
navigate
(
ROUTES
.
EXERCISE_MAIN_MENU
);
ToastAndroid
.
show
(
'
userData updated successfully !
'
,
ToastAndroid
.
SHORT
);
ToastAndroid
.
show
(
'
userData updated successfully !
'
,
ToastAndroid
.
SHORT
);
}
catch
(
error
)
{
ToastAndroid
.
show
(
'
Error updating userData !
'
,
ToastAndroid
.
SHORT
);
}
...
...
src/services/auth/index.js
View file @
629d12f0
import
axios
from
'
axios
'
;
const
BASE_PATH
=
'
http://16.171.16.144/api/mother
'
;
const
BASE_PATH
=
'
http://16.171.16.144
:8070
/api/mother
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
//signIn API Call
...
...
src/services/exercises/index.js
View file @
629d12f0
import
axios
from
"
axios
"
;
let
BASE_PATH
=
'
http://16.170.242.186:8080
'
;
let
BASE_PATH2
=
'
http://16.171.16.144
/api/mother
'
;
let
SECOND_BASE_PATH
=
'
http://16.171.16.144:8070
/api/mother
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
...
...
@@ -23,7 +23,7 @@ export let meternalHealthPredict = async (Age,SystolicBP, DiastolicBP, Blood_glu
export
let
addInitialExercises
=
async
(
id
,
riskLevel
)
=>
{
try
{
let
value
=
await
axios
.
post
(
BASE_PATH2
+
'
/initial_exercises
'
,
{
let
value
=
await
axios
.
post
(
SECOND_BASE_PATH
+
'
/initial_exercises
'
,
{
_id
:
id
,
riskLevel
:
riskLevel
})
...
...
@@ -37,7 +37,7 @@ export let addInitialExercises = async (id, riskLevel) => {
export
let
getAllExerciseDay
=
async
(
id
,
dateNum
)
=>
{
try
{
console
.
log
(
"
id
"
,
id
)
let
value
=
await
axios
.
post
(
BASE_PATH2
+
'
/get_all_exercise_day
'
,
{
let
value
=
await
axios
.
post
(
SECOND_BASE_PATH
+
'
/get_all_exercise_day
'
,
{
_id
:
id
,
day
:
dateNum
})
...
...
@@ -49,7 +49,7 @@ export let getAllExerciseDay = async (id, dateNum) => {
export
let
updateDeviceStatus
=
async
(
id
,
deviceStatus
)
=>
{
try
{
let
value
=
await
axios
.
post
(
BASE_PATH2
+
'
/update_device_status
'
,
{
let
value
=
await
axios
.
post
(
SECOND_BASE_PATH
+
'
/update_device_status
'
,
{
_id
:
id
,
deviceStatus
:
deviceStatus
})
...
...
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