diff --git a/src/app/components/govuk-radio/govuk-radio.component.html b/src/app/components/govuk-radio/govuk-radio.component.html index f8bc73c3e..fa943a4ff 100644 --- a/src/app/components/govuk-radio/govuk-radio.component.html +++ b/src/app/components/govuk-radio/govuk-radio.component.html @@ -1,6 +1,6 @@
- + {{ details.title }}

diff --git a/src/app/components/govuk-radio/govuk-radio.component.scss b/src/app/components/govuk-radio/govuk-radio.component.scss index c6fd15cec..afdd897b0 100644 --- a/src/app/components/govuk-radio/govuk-radio.component.scss +++ b/src/app/components/govuk-radio/govuk-radio.component.scss @@ -1,6 +1,3 @@ -legend { - font-size: 19px; -} .description_para { position: relative; left: 16px; @@ -13,5 +10,8 @@ legend { left: 16px; } label { - font-weight: bold; + font-weight: bold; +} +.govuk-heading-s{ + font-family: Source Sans Pro !important; } diff --git a/src/app/pages/manage-user/manage-user-add-single-user-detail/manage-user-add-single-user-detail.component.ts b/src/app/pages/manage-user/manage-user-add-single-user-detail/manage-user-add-single-user-detail.component.ts index a86b80bac..b1690160f 100644 --- a/src/app/pages/manage-user/manage-user-add-single-user-detail/manage-user-add-single-user-detail.component.ts +++ b/src/app/pages/manage-user/manage-user-add-single-user-detail/manage-user-add-single-user-detail.component.ts @@ -300,6 +300,7 @@ export class ManageUserAddSingleUserDetailComponent } this.userTypeDetails.selectedValue = this.isAdminUser ? 'ORG_ADMINISTRATOR' : 'ORG_DEFAULT_USER'; this.oldSelectedUserType = this.isAdminUser ? 'ORG_ADMINISTRATOR' : 'ORG_DEFAULT_USER'; + this.removeDefaultUserRoleFromServiceRole(); } private patchAdminMailData() { @@ -1031,4 +1032,15 @@ private GetAssignedGroups(isGroupOfUser:any,group:any){ this.isFormUserTypeChanges = false; } } + + private removeDefaultUserRoleFromServiceRole(){ + let defaultUserRoleId = this.userTypeDetails.data.filter(x => x.key === 'ORG_DEFAULT_USER')[0].id; + this.groupsMember.data.forEach(grp => { + grp.serviceRoleGroups = grp.serviceRoleGroups.filter((item: any) => item.id !== defaultUserRoleId); + }); + this.noneGroupsMember.data.forEach(grp => { + grp.serviceRoleGroups = grp.serviceRoleGroups.filter((item: any) => item.id !== defaultUserRoleId); + }); + this.orgUserGroupRoles = this.orgUserGroupRoles.filter((item: any) => item.id !== defaultUserRoleId); + } } diff --git a/src/app/pages/user-profile/user-profile-component.ts b/src/app/pages/user-profile/user-profile-component.ts index a7172189d..f7bdcd0a6 100644 --- a/src/app/pages/user-profile/user-profile-component.ts +++ b/src/app/pages/user-profile/user-profile-component.ts @@ -233,6 +233,7 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { orgRoles.forEach((role: any) => { if (role.roleKey === this.userRoleKey || role.roleKey === this.adminRoleKey) { this.userTypeDetails.data.push({ + id: role.roleId, key: role.roleKey, name: role.roleName, description: role.description @@ -247,7 +248,7 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { } this.userTypeDetails.isGrayOut = true; this.userTypeDetails.selectedValue = this.isAdminUser ? this.adminRoleKey : this.userRoleKey; - this.userTypeDetails.description = this.isAdminUser ? 'Only another administrators can change your user type' : 'Only administrators can change your user type'; + this.userTypeDetails.description = this.isAdminUser ? 'Only another administrator can change your user type.' : 'Only an administrator can change your user type.'; //bind Roles based on User Type if (this.isAdminUser == true) { @@ -364,7 +365,7 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { 'Send messages to multiple contacts in your organisation. You can also send targeted communications to specific users.', ]; } - + this.removeDefaultUserRoleFromServiceRole(); } @@ -825,4 +826,15 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { public onUserTypeChanged(event:any){ console.log("evesssnt",event) } + + private removeDefaultUserRoleFromServiceRole(){ + let defaultUserRoleId = this.userTypeDetails.data.filter(x => x.key === 'ORG_DEFAULT_USER')[0].id; + this.groupsMember.data.forEach(grp => { + grp.serviceRoleGroups = grp.serviceRoleGroups.filter((item: any) => item.id !== defaultUserRoleId); + }); + this.noneGroupsMember.data.forEach(grp => { + grp.serviceRoleGroups = grp.serviceRoleGroups.filter((item: any) => item.id !== defaultUserRoleId); + }); + this.orgUserGroupRoles = this.orgUserGroupRoles.filter((item: any) => item.id !== defaultUserRoleId); + } }