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
0ad3dacc
Commit
0ad3dacc
authored
May 18, 2023
by
Kiridena I.T.K_IT19981840
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patient-menu-change' into 'master'
new menu and login completed See merge request
!47
parents
d396644d
444fea92
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
2 deletions
+61
-2
emma-frontend/App.js
emma-frontend/App.js
+2
-0
emma-frontend/components/patientscreens/patientMenu.js
emma-frontend/components/patientscreens/patientMenu.js
+50
-0
emma-frontend/components/patientscreens/registration/login.js
...-frontend/components/patientscreens/registration/login.js
+1
-1
emma-frontend/components/patientscreens/registration/regEight.js
...ontend/components/patientscreens/registration/regEight.js
+1
-1
emma-frontend/components/practitionerscreens/mainViewWithMenu.js
...ontend/components/practitionerscreens/mainViewWithMenu.js
+7
-0
No files found.
emma-frontend/App.js
View file @
0ad3dacc
...
...
@@ -26,6 +26,7 @@ import PractitionerLogin from "./components/practitionerscreens/login";
import
TreatingPatients
from
"
./components/practitionerscreens/treatingPatients
"
;
import
ReceivedNFT
from
"
./components/practitionerscreens/recievedNfts
"
;
import
NftView
from
"
./components/practitionerscreens/nft-view
"
;
import
PatientMainMenu
from
"
./components/patientscreens/patientMenu
"
;
const
Stack
=
createStackNavigator
();
...
...
@@ -136,6 +137,7 @@ export default function App() {
<
Stack
.
Screen
name
=
"
TreatingPatients
"
component
=
{
TreatingPatients
}
/
>
<
Stack
.
Screen
name
=
"
ReceivedNFT
"
component
=
{
ReceivedNFT
}
/
>
<
Stack
.
Screen
name
=
"
NftView
"
component
=
{
NftView
}
/
>
<
Stack
.
Screen
name
=
"
PatientMainMenu
"
component
=
{
PatientMainMenu
}
/
>
<
/Stack.Navigator
>
)
:
(
<
SplashScreenComponent
/>
...
...
emma-frontend/components/patientscreens/patientMenu.js
0 → 100644
View file @
0ad3dacc
import
React
from
"
react
"
;
import
{
View
,
Button
,
StyleSheet
}
from
"
react-native
"
;
export
default
function
PatientMainMenu
({
navigation
})
{
const
handlePractitioners
=
()
=>
{
navigation
.
navigate
(
"
All Practitioners
"
);
};
const
handleNftRequests
=
()
=>
{
navigation
.
navigate
(
"
PatientNFTRequests
"
);
};
const
handleChatView
=
()
=>
{
navigation
.
navigate
(
"
PatientMainChatView
"
);
};
const
handleLogout
=
()
=>
{
navigation
.
navigate
(
"
MainScreen
"
);
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
buttonContainer
}
>
<
Button
title
=
"
View Practitioners
"
onPress
=
{()
=>
handlePractitioners
()}
/
>
<
/View
>
<
View
style
=
{
styles
.
buttonContainer
}
>
<
Button
title
=
"
Chat
"
onPress
=
{()
=>
handleChatView
()}
/
>
<
/View
>
<
View
style
=
{
styles
.
buttonContainer
}
>
<
Button
title
=
"
NFT requests
"
onPress
=
{()
=>
handleNftRequests
()}
/
>
<
/View
>
<
View
style
=
{
styles
.
buttonContainer
}
>
<
Button
title
=
"
Logout
"
onPress
=
{()
=>
handleLogout
()}
/
>
<
/View
>
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
justifyContent
:
"
center
"
,
alignItems
:
"
center
"
,
},
buttonContainer
:
{
marginVertical
:
10
,
width
:
"
80%
"
,
},
});
emma-frontend/components/patientscreens/registration/login.js
View file @
0ad3dacc
...
...
@@ -24,7 +24,7 @@ export default function PatientLogin({ navigation, route }) {
});
if
(
response
.
ok
)
{
navigation
.
navigate
(
"
PatientMain
ChatView
"
);
navigation
.
navigate
(
"
PatientMain
Menu
"
);
}
else
{
// Login failed, show an error message
Alert
.
alert
(
"
Login Failed
"
,
"
Invalid username or password
"
);
...
...
emma-frontend/components/patientscreens/registration/regEight.js
View file @
0ad3dacc
...
...
@@ -149,7 +149,7 @@ export default function PatientRegEight({ navigation, route }) {
text
:
"
Close
"
,
style
:
"
cancel
"
,
onPress
:
()
=>
{
navigation
.
navigate
(
"
PatientMain
ChatView
"
);
navigation
.
navigate
(
"
PatientMain
Menu
"
);
},
},
]);
...
...
emma-frontend/components/practitionerscreens/mainViewWithMenu.js
View file @
0ad3dacc
...
...
@@ -14,6 +14,10 @@ export default function PractitionerMainView({ navigation }) {
navigation
.
navigate
(
"
ReceivedNFT
"
);
};
const
handleLogout
=
()
=>
{
navigation
.
navigate
(
"
MainScreen
"
);
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
buttonContainer
}
>
...
...
@@ -25,6 +29,9 @@ export default function PractitionerMainView({ navigation }) {
<
View
style
=
{
styles
.
buttonContainer
}
>
<
Button
title
=
"
View NFTs
"
onPress
=
{()
=>
handleView
()}
/
>
<
/View
>
<
View
style
=
{
styles
.
buttonContainer
}
>
<
Button
title
=
"
Logout
"
onPress
=
{()
=>
handleLogout
()}
/
>
<
/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