TP-62561 | API driven teamlead role (#813)
This commit is contained in:
@@ -137,14 +137,9 @@ export const userSlice = createSlice({
|
||||
state.agentAttendance = action.payload;
|
||||
},
|
||||
setUserAccessData: (state, action) => {
|
||||
const {roles, isExternalAgent, featureFlags} = action.payload || {};
|
||||
const {roles, isExternalAgent, isFieldTeamLeadOrAgencyManager, featureFlags} = action.payload || {};
|
||||
if (roles?.length) {
|
||||
state.isTeamLead = roles.some((role: IUserRole) =>
|
||||
[
|
||||
IUserRole.ROLE_NAVI_FIELD_TEAM_LEAD,
|
||||
IUserRole.ROLE_NAVI_FIELD_EXTERNAL_TEAM_LEAD,
|
||||
].includes(role)
|
||||
);
|
||||
state.isTeamLead = isFieldTeamLeadOrAgencyManager;
|
||||
} else {
|
||||
state.isTeamLead = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user