Skip to content

Commit 53706d7

Browse files
authored
Merge pull request #3343 from fikzzzy/feature/new-roles
Update feature new roles
2 parents 9cae21e + b8593cb commit 53706d7

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

src/actions/loadUser.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import {
99
ROLE_CONNECT_COPILOT,
1010
ROLE_TOPCODER_USER,
1111
ROLE_CONNECT_MANAGER,
12-
ROLE_CONNECT_ADMIN
12+
ROLE_CONNECT_ADMIN,
13+
ROLE_ACCOUNT_EXECUTIVE,
14+
ROLE_BUSINESS_DEVELOPMENT_REPRESENTATIVE,
15+
ROLE_PROGRAM_MANAGER,
16+
ROLE_PRESALES, ROLE_PROJECT_MANAGER, ROLE_SOLUTION_ARCHITECT
1317
} from '../config/constants'
1418
import { getFreshToken, configureConnector, decodeToken } from 'tc-accounts'
1519
import { getUserProfile } from '../api/users'
@@ -55,7 +59,19 @@ export function loadUserSuccess(dispatch, token) {
5559
currentUser = _.assign(currentUser, profile)
5660
// determine user role
5761
let userRole
58-
if (_.indexOf(currentUser.roles, ROLE_ADMINISTRATOR) > -1) {
62+
if (_.indexOf(currentUser.roles, ROLE_BUSINESS_DEVELOPMENT_REPRESENTATIVE) > -1) {
63+
userRole = ROLE_BUSINESS_DEVELOPMENT_REPRESENTATIVE
64+
} else if (_.indexOf(currentUser.roles, ROLE_PRESALES) > -1) {
65+
userRole = ROLE_PRESALES
66+
} else if (_.indexOf(currentUser.roles, ROLE_ACCOUNT_EXECUTIVE) > -1) {
67+
userRole = ROLE_ACCOUNT_EXECUTIVE
68+
} else if (_.indexOf(currentUser.roles, ROLE_PROGRAM_MANAGER) > -1) {
69+
userRole = ROLE_PROGRAM_MANAGER
70+
} else if (_.indexOf(currentUser.roles, ROLE_PROJECT_MANAGER) > -1) {
71+
userRole = ROLE_PROJECT_MANAGER
72+
} else if (_.indexOf(currentUser.roles, ROLE_SOLUTION_ARCHITECT) > -1) {
73+
userRole = ROLE_SOLUTION_ARCHITECT
74+
} else if (_.indexOf(currentUser.roles, ROLE_ADMINISTRATOR) > -1) {
5975
userRole = ROLE_ADMINISTRATOR
6076
} else if (_.indexOf(currentUser.roles, ROLE_CONNECT_ADMIN) > -1) {
6177
userRole = ROLE_CONNECT_ADMIN

src/components/TeamManagement/Dialog.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ class Dialog extends React.Component {
2121
}, {
2222
title: 'Account Manager',
2323
value: 'account_manager',
24+
}, {
25+
title: 'Account Executive',
26+
value: 'account_executive',
27+
}, {
28+
title: 'Program Manager',
29+
value: 'program_manager',
30+
}, {
31+
title: 'Solution Architect',
32+
value: 'solution_architect',
33+
}, {
34+
title: 'Project Manager',
35+
value: 'project_manager',
2436
}]
2537

2638
this.handleRoles = this.handleRoles.bind(this)

src/components/TeamManagement/TeamManagement.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
}
145145

146146
.project-member-layout {
147+
flex-wrap: wrap;
147148
min-height: 60px;
148149
padding: $base-unit*2 $base-unit*4;
149150
display: flex;
@@ -247,7 +248,8 @@
247248
}
248249

249250
.member-role-container {
250-
margin-left: $base-unit*3;
251+
margin-left: $base-unit*12;
252+
width: 100%;
251253
display: flex;
252254
padding: 1px;
253255
border-radius: 5px;
@@ -473,4 +475,4 @@
473475

474476
.title-text {
475477
letter-spacing: 0.8px
476-
}
478+
}

0 commit comments

Comments
 (0)