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
a1126efc
Commit
a1126efc
authored
May 14, 2023
by
Ishini Kiridena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All practitioner view completed on the patient UI
parent
1e3fdf89
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
10 deletions
+40
-10
emma-frontend/App.js
emma-frontend/App.js
+1
-3
emma-frontend/components/patientscreens/allPractitioners.js
emma-frontend/components/patientscreens/allPractitioners.js
+37
-5
emma-frontend/components/patientscreens/patientMainChatView.js
...frontend/components/patientscreens/patientMainChatView.js
+1
-1
emma-frontend/env.js
emma-frontend/env.js
+1
-1
No files found.
emma-frontend/App.js
View file @
a1126efc
...
...
@@ -104,14 +104,12 @@ export default function App() {
component
=
{
PatientMainChatView
}
/
>
<
Stack
.
Screen
name
=
"
PatientAll
Practitioners
"
name
=
"
All
Practitioners
"
component
=
{
PatientAllPractitioners
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"
PatientNFTRequests
"
component
=
{
PatientNFTRequests
}
options
=
{{
headerShown
:
false
}}
/
>
<
/Stack.Navigator
>
)
:
(
...
...
emma-frontend/components/patientscreens/allPractitioners.js
View file @
a1126efc
import
React
from
"
react
"
;
import
{
View
,
Text
,
StyleSheet
}
from
"
react-native
"
;
import
React
,
{
useEffect
,
useState
}
from
"
react
"
;
import
{
View
,
Text
,
StyleSheet
,
Button
}
from
"
react-native
"
;
import
{
LOCALBACKEND
}
from
"
../../env
"
;
export
default
function
PatientAllPractitioners
({
navigation
,
router
})
{
const
[
data
,
setData
]
=
useState
([]);
useEffect
(()
=>
{
fetchData
();
});
const
fetchData
=
async
()
=>
{
try
{
const
practitionerUrl
=
LOCALBACKEND
+
"
/practitioner/allpractitioner
"
;
const
response
=
await
fetch
(
practitionerUrl
);
const
json
=
await
response
.
json
();
setData
(
json
.
data
);
}
catch
(
error
)
{
console
.
error
(
"
Error fetching data:
"
,
error
);
}
};
const
renderItem
=
(
item
)
=>
{
return
(
<
View
key
=
{
item
.
_id
}
>
<
Text
>
Full
Name
:
{
item
.
fullname
}
<
/Text
>
<
Text
>
Public
Key
:
{
item
.
publickey
}
<
/Text
>
<
Text
>
Workspace
:
{
item
.
workspace
}
<
/Text
>
<
Button
title
=
"
Request
"
onPress
=
{()
=>
handleRequest
(
item
)}
/
>
<
/View
>
);
};
const
handleRequest
=
(
item
)
=>
{
// Handle the request for the specific item by requesting the practitioner
console
.
log
(
"
Requested:
"
,
item
);
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
style
=
{
styles
.
text
}
>
All
practitioners
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
container
}
>
{
data
.
map
((
item
)
=>
renderItem
(
item
))}
<
/View
>
);
}
...
...
emma-frontend/components/patientscreens/patientMainChatView.js
View file @
a1126efc
...
...
@@ -27,7 +27,7 @@ export default function PatientMainChatView({ route }) {
const
navigateToAllPractitioners
=
()
=>
{
// Navigate to the "All practitioners" view
// Replace "AllPractitionersView" with the actual name of the view
navigation
.
navigate
(
"
PatientAll
Practitioners
"
);
navigation
.
navigate
(
"
All
Practitioners
"
);
};
const
navigateToNFTRequests
=
()
=>
{
...
...
emma-frontend/env.js
View file @
a1126efc
export
const
AES_KEY
=
"
QfTjWnZr4u7x!A%D
"
;
export
const
LOCALBACKEND
=
"
http://192.168.
1.100
:4000
"
;
export
const
LOCALBACKEND
=
"
http://192.168.
8.117
:4000
"
;
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