Skip to content

Commit 47d7a02

Browse files
authored
Merge pull request #69 from oslabs-beta/fixRoleAssign
fixed error with assigning role to new users
2 parents 282b57a + cc76ed3 commit 47d7a02

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"react-dom": "^18.2.0",
3535
"react-error-overlay": "^6.0.11",
3636
"react-modal": "^3.15.1",
37-
"react-password-strength-bar": "^0.4.1",
3837
"react-redux": "^8.0.4",
3938
"react-router": "^6.4.1",
4039
"react-router-dom": "^6.4.1",
@@ -78,6 +77,7 @@
7877
"nodemailer": "^6.8.0",
7978
"nodemon": "^2.0.20",
8079
"react-devtools": "^4.26.0",
80+
"react-password-strength-bar": "^0.4.1",
8181
"react-test-renderer": "^18.2.0",
8282
"style-loader": "^3.3.1",
8383
"supertest": "^6.3.0",

src/components/Login.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
id='username'
9292
label='Username'
9393
variant='outlined'
94-
value= 'sysadmin'
9594
/>
9695
<br />
9796
<br />
@@ -100,7 +99,6 @@
10099
label='Password'
101100
type='password'
102101
variant='outlined'
103-
value ='belugas'
104102
/>
105103
<br />
106104
{/* * Login Button * */}

src/components/SignUp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const SignUp = () => {
5151
className='settingsForm'
5252
component= 'form'
5353
autoComplete= 'off'
54-
onSubmit={(e: any) => handleNewUser(e, e.target.roleID)}
54+
onSubmit={(e: any) => handleNewUser(e, '1')}
5555
sx={{color:'blue'}}
5656
>
5757

src/components/display/NewUserDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const NewUserDisplay = () => {
7575
className='settingsForm'
7676
component= 'form'
7777
autoComplete= 'off'
78-
onSubmit={(e: any) => handleNewUser(e, e.target.roleID)}
78+
onSubmit={(e: any) => handleNewUser(e, valueRole)}
7979
sx={{color:'blue'}}
8080
>
8181

src/components/helper/newUserHelper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as actions from '../../redux/actions/actions';
77
import React from 'react';
88

99
export const handleNewUser = (e: React.SyntheticEvent, roleID: string) => {
10+
1011
e.preventDefault();
1112
const username = (<HTMLInputElement>document.getElementById('signupUsername')).value;
1213
const password = (<HTMLInputElement>document.getElementById('signupPassword')).value;

0 commit comments

Comments
 (0)