From 5e652b58b00f23429ce77c1f8ca46d04a70b0582 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Mon, 3 Apr 2023 20:44:54 +0530 Subject: [PATCH 01/25] issue has been fixed (#1219) --- ...ge-group-edit-roles-confirm-component.html | 8 ++--- ...nage-group-edit-roles-confirm-component.ts | 34 +++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.html b/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.html index 41b02440d..b73c7347b 100644 --- a/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.html +++ b/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.html @@ -41,10 +41,10 @@

{{ serviceRoleGroup.ROLES_ADDED_TO_GROUP }}

-
+
-
@@ -62,10 +62,10 @@

{{ serviceRoleGroup.ROLES_REMOVED_FROM_GROUP}}

-
+
-
diff --git a/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts b/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts index e5805d3da..aefcc53e0 100644 --- a/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts +++ b/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts @@ -34,7 +34,9 @@ export class ManageGroupEditRolesConfirmComponent extends BaseComponent implemen groupName: string = ''; roleIds: number[] = []; addingRoles: Role[] = []; + addingOrderRoles: Role[] = []; removingRoles: Role[] = []; + removingOrderdRoles: Role[] = []; routeData: any = {}; userCount: number = 0; rolesTableHeaders = ['NAME']; @@ -68,9 +70,41 @@ export class ManageGroupEditRolesConfirmComponent extends BaseComponent implemen } else { this.titleService.setTitle(`Confirm services – Manage Groups - CCS`); } + this.getOrganisationRoles() this.initialteServiceRoleGroups() } + getOrganisationRoles() { + this.orgGroupService.getOrganisationRoles(this.organisationId).subscribe({ + next: (roleListResponse: Role[]) => { + if (roleListResponse != null) { + roleListResponse.forEach((roles:Role,index:number)=>{ + this.chanageIndexValue(roles,index) + }) + } + }, + error: (error: any) => { + } + }); + } + + + private chanageIndexValue(roles:Role,index:number){ + if(this.removingRoles.length != 0){ + let removeRole = this.removingRoles.find((f)=> f.roleKey === roles.roleKey) + if(removeRole != undefined){ + this.removingOrderdRoles.push(removeRole) + } + } + if(this.addingRoles.length != 0){ + let addingRole = this.addingRoles.find((f)=> f.roleKey === roles.roleKey) + if(addingRole != undefined){ + this.addingOrderRoles.push(addingRole) + } + } + } + + onConfirmClick() { let groupPatchRequestInfo: OrganisationGroupRequestInfo = { roleInfo: { From 198afde29eebf2ea0584f973b78710f23afb74fb Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 5 Apr 2023 18:24:21 +0530 Subject: [PATCH 02/25] PPG 212 non associated email domain check UI (#1222) * accordino and mock api integration complete * disbale condition removed * 212 ui work completed --- src/app/models/organisationGroup.ts | 14 ++ .../manage-group-edit-name-component.ts | 1 - ...nage-group-edit-roles-confirm-component.ts | 2 - .../manage-group-edit-roles-component.html | 1 - .../manage-group-edit-roles-component.ts | 8 -- ...age-group-operation-success-component.html | 63 +++++++++ ...age-group-operation-success-component.scss | 47 ++++++- ...anage-group-operation-success-component.ts | 127 +++++++++++++++--- .../manage-group-view-component.ts | 7 +- ...e-user-add-single-user-detail.component.ts | 2 + .../operation-success.component.html | 6 +- .../operation-success.component.ts | 24 +++- .../user-profile/user-profile-component.ts | 2 +- src/app/services/auth/auth.service.ts | 1 + .../wrapper/wrapper-org--group-service.ts | 14 ++ 15 files changed, 284 insertions(+), 35 deletions(-) diff --git a/src/app/models/organisationGroup.ts b/src/app/models/organisationGroup.ts index 90fb0c30e..c54157183 100644 --- a/src/app/models/organisationGroup.ts +++ b/src/app/models/organisationGroup.ts @@ -83,4 +83,18 @@ export interface GroupUser { userId: string; name: string; isAdmin: boolean; +} + +export interface pendingApprovalResponce { + currentPage: number; + groupUser: pendingApprovalGroupRole[]; + pageCount:number; + rowCount:number; +} + +export interface pendingApprovalGroupRole { + isAdmin: boolean + isPendingApproval: boolean + name: string + userId: string } \ No newline at end of file diff --git a/src/app/pages/manage-group/manage-group-edit-name/manage-group-edit-name-component.ts b/src/app/pages/manage-group/manage-group-edit-name/manage-group-edit-name-component.ts index 9b2981637..a6ccbb7e5 100644 --- a/src/app/pages/manage-group/manage-group-edit-name/manage-group-edit-name-component.ts +++ b/src/app/pages/manage-group/manage-group-edit-name/manage-group-edit-name-component.ts @@ -86,7 +86,6 @@ export class ManageGroupEditNameComponent indexOfspecialChars = indexOfspecialChars + 1 } } - debugger return indexOfGname === indexOfspecialChars ? true : false } diff --git a/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts b/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts index aefcc53e0..cfc7db94d 100644 --- a/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts +++ b/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts @@ -112,8 +112,6 @@ export class ManageGroupEditRolesConfirmComponent extends BaseComponent implemen removedRoleIds: this.removingRoles.map(rr => rr.roleId) } }; - console.log(groupPatchRequestInfo); - this.orgGroupService.patchUpdateOrganisationGroup(this.organisationId, this.editingGroupId, groupPatchRequestInfo) .subscribe( (result) => { diff --git a/src/app/pages/manage-group/manage-group-edit-roles/manage-group-edit-roles-component.html b/src/app/pages/manage-group/manage-group-edit-roles/manage-group-edit-roles-component.html index 88dc01b21..60b89855b 100644 --- a/src/app/pages/manage-group/manage-group-edit-roles/manage-group-edit-roles-component.html +++ b/src/app/pages/manage-group/manage-group-edit-roles/manage-group-edit-roles-component.html @@ -54,7 +54,6 @@

{{ 'MY_ACCOUNT_UPDATE_SUCCESS' | translate }}

-
+
The following {{showRoleView === true ? 'role': (showRoleView == false ? 'service' : '')}} will be assigned after manual validation has been conducted: @@ -97,7 +97,7 @@ || operation === operationEnum.UserUpdateWithIdamRegister">

{{ 'THE_USER' | translate }}{{ userName }}{{ 'INSTRUCTIONS_WILL_BE_EMAILED_TO_SETUP_ACCOUNT_PASSWORD' | translate }}

-
+
The following {{showRoleView === true ? 'role': (showRoleView == false ? 'service' : '')}} will be assigned after manual validation has been conducted: @@ -137,7 +137,7 @@

{{ 'USER_UPDATE_SUCCESS' | translate }}

-
+
The following {{showRoleView === true ? 'role': (showRoleView == false ? 'service' : '')}} will be assigned after manual validation has been conducted: diff --git a/src/app/pages/operation-success/operation-success.component.ts b/src/app/pages/operation-success/operation-success.component.ts index df5aef355..c29453a01 100644 --- a/src/app/pages/operation-success/operation-success.component.ts +++ b/src/app/pages/operation-success/operation-success.component.ts @@ -12,6 +12,7 @@ import { ViewportScroller } from '@angular/common'; import { Title } from '@angular/platform-browser'; import { SessionStorageKey } from 'src/app/constants/constant'; import { environment } from 'src/environments/environment'; +import { WrapperUserService } from 'src/app/services/wrapper/wrapper-user.service'; @Component({ selector: 'app-operation-success', @@ -31,14 +32,18 @@ export class OperationSuccessComponent extends BaseComponent implements OnInit { userServiceColumnsToDisplay = ['accessRoleName',] operationEnum = OperationEnum; userName: string = ''; + selectedUserName: string = ''; isOrgAdmin: boolean = false; + public showRole:boolean=false public approveRequiredRole:any=[] + public pendingRoleDetails: any = [] constructor(private router: Router, private activatedRoute: ActivatedRoute, private titleService: Title, - protected uiStore: Store, private authService: AuthService, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + protected uiStore: Store, private authService: AuthService, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, private wrapperUserService: WrapperUserService) { super(uiStore, viewportScroller, scrollHelper); this.operation = parseInt(this.activatedRoute.snapshot.paramMap.get('operation') || '0'); this.userName = sessionStorage.getItem(SessionStorageKey.OperationSuccessUserName) ?? ''; this.approveRequiredRole = this.getSelectedRole(JSON.parse(localStorage.getItem('user_approved_role') || 'null' )) + this.selectedUserName = localStorage.getItem('user_access_name') || ''; } @@ -96,6 +101,7 @@ export class OperationSuccessComponent extends BaseComponent implements OnInit { break } this.titleService.setTitle(`Success - ${area} - CCS`); + this.getPendingApprovalUserRole() } onNavigateToProfileClick() { @@ -110,6 +116,22 @@ export class OperationSuccessComponent extends BaseComponent implements OnInit { this.router.navigateByUrl("manage-users"); } + async getPendingApprovalUserRole() { + try { + this.pendingRoleDetails = await this.wrapperUserService.getPendingApprovalUserRole(this.selectedUserName) + .toPromise(); + this.pendingRoleDetails.forEach((pRole:any)=>{ + this.approveRequiredRole.forEach((aRole:any)=>{ + if(pRole.roleName === aRole.accessRoleName){ + this.showRole = true + } + }) + }) + } catch (e) { + console.error(e); + } + } + goBack():void{ window.history.back() } diff --git a/src/app/pages/user-profile/user-profile-component.ts b/src/app/pages/user-profile/user-profile-component.ts index 0104b9742..b339bca88 100644 --- a/src/app/pages/user-profile/user-profile-component.ts +++ b/src/app/pages/user-profile/user-profile-component.ts @@ -509,7 +509,7 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { }) }) localStorage.setItem('user_approved_role', JSON.stringify(matchRoles)); - + localStorage.setItem('user_access_name',this.userName); } this.submitPendingApproveRole(superAdminDomain === userDomain); } diff --git a/src/app/services/auth/auth.service.ts b/src/app/services/auth/auth.service.ts index b3aee2850..6fbab9cb6 100644 --- a/src/app/services/auth/auth.service.ts +++ b/src/app/services/auth/auth.service.ts @@ -256,6 +256,7 @@ export class AuthService { localStorage.removeItem('delegatedOrg'); localStorage.removeItem('routeRecords'); localStorage.removeItem('user_approved_role'); + localStorage.removeItem('user_access_name'); localStorage.removeItem('userEditDetails'); localStorage.removeItem('roleForGroup'); } diff --git a/src/app/services/wrapper/wrapper-org--group-service.ts b/src/app/services/wrapper/wrapper-org--group-service.ts index 46c7a015b..54a646eef 100644 --- a/src/app/services/wrapper/wrapper-org--group-service.ts +++ b/src/app/services/wrapper/wrapper-org--group-service.ts @@ -67,6 +67,20 @@ export class WrapperOrganisationGroupService { } } + + getPendingApproveOrganisationGroup(organisationId: string,groupId:number, currentPage: number, pageSize: number,isPending: boolean ): Observable { + pageSize = pageSize <= 0 ? 10 : pageSize; + const url = `${this.url}/${organisationId}/groups/${groupId}/groupusers?is-pending-approval=${isPending}¤tPage=${currentPage}&pageSize=${pageSize}`; + return this.http.get(url).pipe( + map((data: OrganisationGroupResponseInfo) => { + return data + }), catchError(error => { + return throwError(error); + }) + ); + } + + patchUpdateOrganisationGroup(organisationId: string, groupId: number, orgGroupPatchInfo: OrganisationGroupRequestInfo): Observable { if (!environment.appSetting.hideSimplifyRole) { let serviceRoleGroupInfos = { From d9a59d8d2d5b881f4735bacf95cdaea16529ec50 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc Date: Fri, 7 Apr 2023 13:56:21 +0530 Subject: [PATCH 03/25] github secret scan script added --- .github/workflows/secrets-scan.yml | 64 ++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/secrets-scan.yml diff --git a/.github/workflows/secrets-scan.yml b/.github/workflows/secrets-scan.yml new file mode 100644 index 000000000..e46820cd6 --- /dev/null +++ b/.github/workflows/secrets-scan.yml @@ -0,0 +1,64 @@ +name: Git Secrets Scan + +on: + schedule: + - cron: "0 0 * * *" + push: + branches: [main, feature/*, p3sprint/*] + +jobs: + git-secrets-scan: + name: Git Secrets Scan + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install git secrets + run: sudo apt-get update && sudo apt-get install git-secrets -y + + - name: Add custom secrets patterns + run: git secrets --add '(\bBEGIN\b).*(PRIVATE KEY\b)' + && git secrets --add 'AKIA[0-9A-Z]{16}' + && git secrets --add '[a-zA-Z0-9+/]{40}' + && git secrets --add '^ghp_[a-zA-Z0-9]{36}$' + && git secrets --add '^github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59}$' + && git secrets --add '^v[0-9]\.[0-9a-f]{40}$' + && git secrets --add '^([A-Z]|[a-z]|[0-9])+-([A-Z]|[a-z]|[0-9])+$' + && git secrets --add '[a-zA-Z0-9]{32}' + && git secrets --add 'conclavesso[0-9a-z-]{84}' + && git secrets --add '\b[a-z0-9]{80}\b' + && git secrets --add '\b[A-Z0-9]{50}\b' + && git secrets --add '\b[A-Z0-9]{58}\b' + && git secrets --add '\b[A-Za-z0-9_]{64}\b' + + - name: Run git secrets scan + run: | + git secrets --scan + + - name: Send email notification + uses: + dawidd6/action-send-mail@v3.1.0 + if: always() + + with: + server_address: ${{ secrets.SERVER_ADDRESS }} + server_port: ${{ secrets.SERVER_PORT }} + username: ${{ secrets.USER_NAME }} + password: ${{ secrets.PASSWORD }} + subject: Git Secrets Scan Results + to: "ponselvam.sakthivel@brickendon.com" + from: "secops@brickendon.com" + body: | + + Hi, + + The Git Secrets scan has completed for "${{ github.repository }}". Please review the results below: + + Scan Job URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + + Scan Status: **${{ job.status }}** + + Thank You. + Brickendon SecOps From bcd81fd160b25b8428cafd7f89f4d810b898a5db Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Fri, 7 Apr 2023 13:58:54 +0530 Subject: [PATCH 04/25] fleet bugs are fixed (#1226) --- src/app/models/organisationGroup.ts | 108 +++++++++--------- ...age-group-operation-success-component.html | 20 ++-- ...anage-group-operation-success-component.ts | 2 +- .../manage-group-view-component.ts | 28 +++-- 4 files changed, 83 insertions(+), 75 deletions(-) diff --git a/src/app/models/organisationGroup.ts b/src/app/models/organisationGroup.ts index c54157183..d9b59206f 100644 --- a/src/app/models/organisationGroup.ts +++ b/src/app/models/organisationGroup.ts @@ -1,100 +1,98 @@ export interface Group { - groupId: number; - mfaEnabled: boolean; - groupName: string; - createdDate?: string; + groupId: number; + mfaEnabled: boolean; + groupName: string; + createdDate?: string; } export interface GroupList { - organisationId: string; - groupList: Group[] + organisationId: string; + groupList: Group[]; } export interface OrganisationGroupNameInfo { - groupName?: string; + groupName?: string; } -export interface OrganisationGroupRequestInfo extends OrganisationGroupNameInfo { - roleInfo?: OrganisationGroupRolePatchInfo, - serviceRoleGroupInfo?: OrganisationGroupRolePatchInfo, - userInfo?: OrganisationGroupUserPatchInfo +export interface OrganisationGroupRequestInfo + extends OrganisationGroupNameInfo { + roleInfo?: OrganisationGroupRolePatchInfo; + serviceRoleGroupInfo?: OrganisationGroupRolePatchInfo; + userInfo?: OrganisationGroupUserPatchInfo; } - export interface OrganisationGroupRolePatchInfo { - addedRoleIds?: number[], - removedRoleIds?: number[] - addedServiceRoleGroupIds?: number[], - removedServiceRoleGroupIds?: number[] + addedRoleIds?: number[]; + removedRoleIds?: number[]; + addedServiceRoleGroupIds?: number[]; + removedServiceRoleGroupIds?: number[]; } export interface OrganisationGroupServicePatchInfo { - addedRoleIds: number[], - removedRoleIds: number[] + addedRoleIds: number[]; + removedRoleIds: number[]; } export interface OrganisationGroupUserPatchInfo { - addedUserIds: string[], - removedUserIds: string[] + addedUserIds: string[]; + removedUserIds: string[]; } export interface RoleDetail { - orgTypeEligibility?: number; - description?: string | undefined; - subscriptionTypeEligibility?: number; - tradeEligibility?: number; - enabled?: boolean; - serviceName?: string | null; - isDeleted?: boolean; + orgTypeEligibility?: number; + description?: string | undefined; + subscriptionTypeEligibility?: number; + tradeEligibility?: number; + enabled?: boolean; + serviceName?: string | null; + isDeleted?: boolean; } export interface Role extends RoleDetail { - pendingStatus?: boolean; - roleId: number; - roleKey: string; - roleName: string; + pendingStatus?: boolean; + roleId: number; + roleKey: string; + roleName: string; } export interface ServiceRoleGroup extends RoleDetail { - id: number; - key: string; - name: string; + id: number; + key: string; + name: string; } - export interface CheckBoxRoleListGridSource extends Role { - isChecked?: boolean - isDisable?: any - + isChecked?: boolean; + isDisable?: any; } export interface OrganisationGroupResponseInfo extends Group { - roles: GroupRole[], - users: GroupUser[] - serviceRoleGroups: GroupRole[], + roles: GroupRole[]; + users: GroupUser[]; + serviceRoleGroups: GroupRole[]; } export interface GroupRole { - id: number; - name: string; + id: number; + name: string; } export interface GroupUser { - userId: string; - name: string; - isAdmin: boolean; + userId: string; + name: string; + isAdmin: boolean; } export interface pendingApprovalResponce { - currentPage: number; - groupUser: pendingApprovalGroupRole[]; - pageCount:number; - rowCount:number; + currentPage: number; + groupUser: pendingApprovalGroupRole[]; + pageCount: number; + rowCount: number; } export interface pendingApprovalGroupRole { - isAdmin: boolean - isPendingApproval: boolean - name: string - userId: string -} \ No newline at end of file + isAdmin: boolean; + userPendingRoleStaus: number; + name: string; + userId: string; +} diff --git a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html index 3638a8e18..ef291c20a 100644 --- a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html +++ b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html @@ -45,7 +45,7 @@

List of users who were given access to Fleet Portal - {{accordinData.showAccordin1 == false ? 'show all' : 'hide all'}} ({{pendingVerificationUser.rowCount}}) + {{accordinData.showAccordin1 == false ? 'show all' : 'hide all'}} ({{verifiedUser.rowCount}})

@@ -57,13 +57,13 @@

+
- + [useServerPagination]="true" [serverPageCount]="verifiedUser.pageCount" + [serverPageCurrentPage]="verifiedUser.currentPage" (changeCurrentPageEvent)="setPageApprovedUsers($event)">
@@ -75,7 +75,7 @@

List of users who required additional verification for Fleet Portal access - {{accordinData.showAccordin2 == false ? 'show all' : 'hide all'}} ({{verifiedUser.rowCount}}) + {{accordinData.showAccordin2 == false ? 'show all' : 'hide all'}} ({{pendingVerificationUser.rowCount}})

@@ -87,13 +87,13 @@

+
- + [useServerPagination]="true" [serverPageCount]="pendingVerificationUser.pageCount" + [serverPageCurrentPage]="pendingVerificationUser.currentPage" (changeCurrentPageEvent)="setPagePendingUsers($event)">
diff --git a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts index aecd78dd4..3e727fa8b 100644 --- a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts +++ b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts @@ -193,7 +193,7 @@ export class ManageGroupOperationSuccessComponent } public checkAccordionStatus(){ - const isGroupOperation = [this.operationEnum.GroupRoleUpdate, this.operationEnum.GroupAdd].includes(this.operation); + const isGroupOperation = [this.operationEnum.GroupRoleUpdate, this.operationEnum.GroupAdd,this.operationEnum.GroupUserUpdate].includes(this.operation); const hasUsers = this.pendingVerificationUser.groupUser.length > 0; this.accordionStatus = isGroupOperation && hasUsers; } diff --git a/src/app/pages/manage-group/manage-group-view/manage-group-view-component.ts b/src/app/pages/manage-group/manage-group-view/manage-group-view-component.ts index ca5f5a355..5371b7634 100644 --- a/src/app/pages/manage-group/manage-group-view/manage-group-view-component.ts +++ b/src/app/pages/manage-group/manage-group-view/manage-group-view-component.ts @@ -25,14 +25,14 @@ import { environment } from 'src/environments/environment'; ], }) export class ManageGroupViewComponent extends BaseComponent implements OnInit { - public showRoleView:boolean = environment.appSetting.hideSimplifyRole + public showRoleView: boolean = environment.appSetting.hideSimplifyRole organisationId: string; group: OrganisationGroupResponseInfo; isEdit: boolean = false; editingGroupId: number = 0; routeData: any = {}; - usersTableHeaders = ['NAME', 'EMAIL','']; - usersColumnsToDisplay = ['name', 'userId','isPendingApproval']; + usersTableHeaders = ['NAME', 'EMAIL', '']; + usersColumnsToDisplay = ['name', 'userId', 'userPendingRoleStaus']; rolesTableHeaders = ['NAME']; roesColumnsToDisplay = ['name']; detailsData = [ @@ -49,7 +49,7 @@ export class ManageGroupViewComponent extends BaseComponent implements OnInit { private orgGroupService: WrapperOrganisationGroupService, private locationStrategy: LocationStrategy, private titleService: Title, - private SharedDataService:SharedDataService + private SharedDataService: SharedDataService ) { super(uiStore, viewportScroller, scrollHelper); this.group = { @@ -58,7 +58,7 @@ export class ManageGroupViewComponent extends BaseComponent implements OnInit { groupName: '', roles: [], users: [], - serviceRoleGroups:[] + serviceRoleGroups: [] }; let queryParams = this.activatedRoute.snapshot.queryParams; let state = this.router.getCurrentNavigation()?.extras.state; @@ -88,12 +88,12 @@ export class ManageGroupViewComponent extends BaseComponent implements OnInit { .getOrganisationGroup(this.organisationId, this.editingGroupId) .subscribe( (group: OrganisationGroupResponseInfo) => { - group.roles.forEach((f:any)=>{ + group.roles.forEach((f: any) => { f.serviceView = !this.showRoleView }) this.group = group; - this.group.users.forEach((f:any) => { - f.isPendingApproval = f.isPendingApproval ? 'Pending approval for Fleet Portal' : ''; + this.group.users.forEach((f: any) => { + f.userPendingRoleStaus = this.getUserPendingRoleStausMessage(f.userPendingRoleStaus); }); }, (error) => { @@ -120,7 +120,7 @@ export class ManageGroupViewComponent extends BaseComponent implements OnInit { isEdit: this.isEdit, groupId: this.editingGroupId, roleIds: roleIds, - groupName:this.group.groupName + groupName: this.group.groupName }; this.router.navigateByUrl( 'manage-groups/edit-roles?data=' + JSON.stringify(data) @@ -161,6 +161,16 @@ export class ManageGroupViewComponent extends BaseComponent implements OnInit { this.router.navigateByUrl(`${routeUrl}`, { state: formData || {} }); } + getUserPendingRoleStausMessage(userPendingRoleStaus: any) { + if (userPendingRoleStaus === 0) { + return 'Pending approval for Fleet Portal'; + } + if ([2, 3, 4].includes(userPendingRoleStaus)) { + return 'Access denied for Fleet Portal'; + } + return ''; + } + clearSessionStorageGroupUserData() { sessionStorage.removeItem('group_existing_users'); sessionStorage.removeItem('group_added_users'); From 083f6705b2baf8cd348ff131b4f516eae05e66b7 Mon Sep 17 00:00:00 2001 From: rahulgandhijayabalan-bc <127087391+rahulgandhijayabalan-bc@users.noreply.github.com> Date: Fri, 7 Apr 2023 16:40:50 +0530 Subject: [PATCH 05/25] Update secrets-scan.yml --- .github/workflows/secrets-scan.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/secrets-scan.yml b/.github/workflows/secrets-scan.yml index e46820cd6..f25d0f786 100644 --- a/.github/workflows/secrets-scan.yml +++ b/.github/workflows/secrets-scan.yml @@ -21,17 +21,17 @@ jobs: - name: Add custom secrets patterns run: git secrets --add '(\bBEGIN\b).*(PRIVATE KEY\b)' && git secrets --add 'AKIA[0-9A-Z]{16}' - && git secrets --add '[a-zA-Z0-9+/]{40}' - && git secrets --add '^ghp_[a-zA-Z0-9]{36}$' - && git secrets --add '^github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59}$' - && git secrets --add '^v[0-9]\.[0-9a-f]{40}$' - && git secrets --add '^([A-Z]|[a-z]|[0-9])+-([A-Z]|[a-z]|[0-9])+$' - && git secrets --add '[a-zA-Z0-9]{32}' + && git secrets --add '^([A-Za-z0-9/+=]{40,})$' + && git secrets --add '^ghp_[a-zA-Z0-9]{36}' + && git secrets --add '^github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59}' + && git secrets --add '^v[0-9]\\.[0-9a-f]{40}' + && git secrets --add '[A-Za-z0-9+/]{88}==' + && git secrets --add '[A-Za-z0-9_-]{32}$' && git secrets --add 'conclavesso[0-9a-z-]{84}' - && git secrets --add '\b[a-z0-9]{80}\b' - && git secrets --add '\b[A-Z0-9]{50}\b' - && git secrets --add '\b[A-Z0-9]{58}\b' - && git secrets --add '\b[A-Za-z0-9_]{64}\b' + && git secrets --add '\\b[a-z0-9]{80}\\b' + && git secrets --add '\\b[A-Z0-9]{50}\\b' + && git secrets --add '\\b[A-Z0-9]{58}\\b' + && git secrets --add '^[a-zA-Z0-9_-]{32,64}$' - name: Run git secrets scan run: | From 4b80930725009c233c03958ad885d258c4c5e6c2 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Mon, 10 Apr 2023 19:42:20 +0530 Subject: [PATCH 06/25] issue fixed (#1229) --- ...age-group-operation-success-component.html | 2 +- ...e-user-add-single-user-detail.component.ts | 13 ++-------- .../operation-success.component.ts | 26 ++++++++++--------- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html index ef291c20a..52a410e8e 100644 --- a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html +++ b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html @@ -73,7 +73,7 @@

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 39cc9a73b..20651de2b 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 @@ -129,7 +129,7 @@ export class ManageUserAddSingleUserDetailComponent this.state = this.router.getCurrentNavigation()?.extras.state; this.ciiOrganisationId = localStorage.getItem('cii_organisation_id') || ''; localStorage.removeItem('user_approved_role'); - localStorage.removeItem('user_approved_role'); + localStorage.removeItem('user_access_name'); if (queryParams.data) { this.subscription = this.sharedDataService.userEditDetails.subscribe((data)=>{ this.routeData = JSON.parse(atob(queryParams.data)); @@ -381,15 +381,6 @@ export class ManageUserAddSingleUserDetailComponent } - // ngAfterViewChecked() { - // if (!this.errorLinkClicked) { - // // This additional check has been done to avoid always scrolling to error summary because ngAfterViewChecked is triggered with dynamic form controls - // this.scrollHelper.doScroll(); - // } else { - // this.errorLinkClicked = false; - // } - // } - scrollToAnchor(elementId: string): void { this.errorLinkClicked = true; // Making the errorLinkClicked true to avoid scrolling to the error-summary this.viewportScroller.scrollToAnchor(elementId); @@ -585,7 +576,7 @@ export class ManageUserAddSingleUserDetailComponent }) }) localStorage.setItem('user_approved_role', JSON.stringify(matchRoles)); - localStorage.setItem('user_access_name',this.userProfileResponseInfo.userName); + localStorage.setItem('user_access_name',this.userProfileRequestInfo.userName); } } diff --git a/src/app/pages/operation-success/operation-success.component.ts b/src/app/pages/operation-success/operation-success.component.ts index c29453a01..78cbe24d8 100644 --- a/src/app/pages/operation-success/operation-success.component.ts +++ b/src/app/pages/operation-success/operation-success.component.ts @@ -117,18 +117,20 @@ export class OperationSuccessComponent extends BaseComponent implements OnInit { } async getPendingApprovalUserRole() { - try { - this.pendingRoleDetails = await this.wrapperUserService.getPendingApprovalUserRole(this.selectedUserName) - .toPromise(); - this.pendingRoleDetails.forEach((pRole:any)=>{ - this.approveRequiredRole.forEach((aRole:any)=>{ - if(pRole.roleName === aRole.accessRoleName){ - this.showRole = true - } - }) - }) - } catch (e) { - console.error(e); + if(this.selectedUserName){ + try { + this.pendingRoleDetails = await this.wrapperUserService.getPendingApprovalUserRole(this.selectedUserName) + .toPromise(); + this.pendingRoleDetails.forEach((pRole:any)=>{ + this.approveRequiredRole.forEach((aRole:any)=>{ + if(pRole.roleName === aRole.accessRoleName){ + this.showRole = true + } + }) + }) + } catch (e) { + console.error(e); + } } } From 6e59b5ea6ee04968e8504a16994729537d8d528a Mon Sep 17 00:00:00 2001 From: brijrajsinh-bc <109584978+brijrajsinh-bc@users.noreply.github.com> Date: Tue, 11 Apr 2023 19:14:32 +0530 Subject: [PATCH 07/25] Typo fixed (#1231) --- src/app/models/organisationGroup.ts | 2 +- .../manage-group-view/manage-group-view-component.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/models/organisationGroup.ts b/src/app/models/organisationGroup.ts index d9b59206f..f0fa4219b 100644 --- a/src/app/models/organisationGroup.ts +++ b/src/app/models/organisationGroup.ts @@ -92,7 +92,7 @@ export interface pendingApprovalResponce { export interface pendingApprovalGroupRole { isAdmin: boolean; - userPendingRoleStaus: number; + userPendingRoleStatus: number; name: string; userId: string; } diff --git a/src/app/pages/manage-group/manage-group-view/manage-group-view-component.ts b/src/app/pages/manage-group/manage-group-view/manage-group-view-component.ts index 5371b7634..787b2ed51 100644 --- a/src/app/pages/manage-group/manage-group-view/manage-group-view-component.ts +++ b/src/app/pages/manage-group/manage-group-view/manage-group-view-component.ts @@ -32,7 +32,7 @@ export class ManageGroupViewComponent extends BaseComponent implements OnInit { editingGroupId: number = 0; routeData: any = {}; usersTableHeaders = ['NAME', 'EMAIL', '']; - usersColumnsToDisplay = ['name', 'userId', 'userPendingRoleStaus']; + usersColumnsToDisplay = ['name', 'userId', 'userPendingRoleStatus']; rolesTableHeaders = ['NAME']; roesColumnsToDisplay = ['name']; detailsData = [ @@ -93,7 +93,7 @@ export class ManageGroupViewComponent extends BaseComponent implements OnInit { }) this.group = group; this.group.users.forEach((f: any) => { - f.userPendingRoleStaus = this.getUserPendingRoleStausMessage(f.userPendingRoleStaus); + f.userPendingRoleStatus = this.getUserPendingRoleStatusMessage(f.userPendingRoleStatus); }); }, (error) => { @@ -161,11 +161,11 @@ export class ManageGroupViewComponent extends BaseComponent implements OnInit { this.router.navigateByUrl(`${routeUrl}`, { state: formData || {} }); } - getUserPendingRoleStausMessage(userPendingRoleStaus: any) { - if (userPendingRoleStaus === 0) { + getUserPendingRoleStatusMessage(userPendingRoleStatus: any) { + if (userPendingRoleStatus === 0) { return 'Pending approval for Fleet Portal'; } - if ([2, 3, 4].includes(userPendingRoleStaus)) { + if ([2, 3, 4].includes(userPendingRoleStatus)) { return 'Access denied for Fleet Portal'; } return ''; From 2bd93cabae1002a493abe7f3b9abafcfaadb22c3 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Tue, 11 Apr 2023 19:17:26 +0530 Subject: [PATCH 08/25] condtion changed (#1232) --- .../manage-group-operation-success-component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html index 52a410e8e..1e6979c62 100644 --- a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html +++ b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.html @@ -51,7 +51,7 @@

-
+

{{'NONE'| translate}}

@@ -81,7 +81,7 @@

-
+

{{'NONE'| translate}}

From 1e0a664ee6e0e1a133bd051aeb466106989d85a9 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 12 Apr 2023 19:17:47 +0530 Subject: [PATCH 09/25] table colum issue fixed (#1238) --- .../components/govuk-table/govuk-table.component.html | 4 ++-- .../components/govuk-table/govuk-table.component.scss | 3 +++ .../manage-group-operation-success-component.ts | 10 +++++++++- src/app/pages/user-profile/user-profile-component.ts | 4 ++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/app/components/govuk-table/govuk-table.component.html b/src/app/components/govuk-table/govuk-table.component.html index 03535008b..c46b12c5e 100644 --- a/src/app/components/govuk-table/govuk-table.component.html +++ b/src/app/components/govuk-table/govuk-table.component.html @@ -3,7 +3,7 @@ - {{ header | translate }} + {{ header | translate }} . . @@ -92,7 +92,7 @@

- . + . diff --git a/src/app/components/govuk-table/govuk-table.component.scss b/src/app/components/govuk-table/govuk-table.component.scss index 7e612a664..e9802a6a8 100644 --- a/src/app/components/govuk-table/govuk-table.component.scss +++ b/src/app/components/govuk-table/govuk-table.component.scss @@ -99,4 +99,7 @@ a { } .role_group_table { padding: 0px 0px 0px 0 !important; +} +.hide_dots{ + display: none; } \ No newline at end of file diff --git a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts index 3e727fa8b..43c51909e 100644 --- a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts +++ b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts @@ -120,9 +120,17 @@ export class ManageGroupOperationSuccessComponent break; } this.titleService.setTitle(`Success - ${area} - Manage Groups - CCS`); - this.getListOfUserRequiredAccess(); + this.getUserList() + } + + getUserList(){ + const isGroupOperation = [this.operationEnum.GroupRoleUpdate, this.operationEnum.GroupAdd,this.operationEnum.GroupUserUpdate].includes(this.operation); + if(isGroupOperation){ + this.getListOfUserRequiredAccess(); + } } + onNavigateToGroupClick() { let data = { isEdit: true, diff --git a/src/app/pages/user-profile/user-profile-component.ts b/src/app/pages/user-profile/user-profile-component.ts index b339bca88..7ac527ad7 100644 --- a/src/app/pages/user-profile/user-profile-component.ts +++ b/src/app/pages/user-profile/user-profile-component.ts @@ -33,8 +33,8 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { public showRoleView:boolean = environment.appSetting.hideSimplifyRole submitted!: boolean; formGroup!: FormGroup; - userGroupTableHeaders = ['GROUPS']; - userGroupColumnsToDisplay = ['group']; + userGroupTableHeaders = ['GROUPS','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.']; + userGroupColumnsToDisplay = ['group','','','','','','','','','','','','','','','','']; userServiceTableHeaders = ['NAME']; userRoleTableHeaders = ['ROLES', 'SERVICE']; userServiceColumnsToDisplay = ['accessRoleName',] From f43c9592e80a592e896219bdc4f63133507bd88a Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 13 Apr 2023 20:04:58 +0530 Subject: [PATCH 10/25] Update environment-production.ts --- src/environments/environment-production.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/environments/environment-production.ts b/src/environments/environment-production.ts index 49ae0467e..ba8292035 100644 --- a/src/environments/environment-production.ts +++ b/src/environments/environment-production.ts @@ -69,5 +69,6 @@ export const environment = { hideDelegation:true, hideBulkupload:true, hideAutoValidation:false, + hideSimplifyRole:false, }, -}; \ No newline at end of file +}; From 310c4d88bf32ba791ea57a8fc03a78cd888df497 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 13 Apr 2023 20:42:02 +0530 Subject: [PATCH 11/25] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8703bb248..224f4f4e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js -dist: focal +dist: jammy node_js: -- 12.16.1 +- 16.10 addons: chrome: stable cache: From 2b69a3a83d94249901e6e4fb95c9254680a78d0d Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 13 Apr 2023 22:53:12 +0530 Subject: [PATCH 12/25] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 224f4f4e3..7db000de7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ install: - npm install before_script: - npm install -g @angular/cli -script: npm run build +script: npm run build -- --output-hashing=all after_script: ls deploy: - provider: script From dfb6d967456de61ff8e0a752b92340a5f2dedf7e Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Fri, 14 Apr 2023 00:12:49 +0530 Subject: [PATCH 13/25] Update nginx.conf --- nginx.conf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nginx.conf b/nginx.conf index 61913bb92..7a02d73bc 100644 --- a/nginx.conf +++ b/nginx.conf @@ -51,15 +51,12 @@ http { limit_req zone=dm_post_limit burst=5; - - - - include includes/*.conf; + #include includes/*.conf; @@ -84,4 +81,4 @@ http { } } -} \ No newline at end of file +} From 0cb9c0d7dce0dec8cd5681c86cf274463829e256 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Fri, 14 Apr 2023 00:20:55 +0530 Subject: [PATCH 14/25] Update nginx.conf --- nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 7a02d73bc..49a182c56 100644 --- a/nginx.conf +++ b/nginx.conf @@ -56,7 +56,7 @@ http { - #include includes/*.conf; + include includes/*.conf; From 0da6f3f8eece3cd67fad687654692bc00f8c324d Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Mon, 17 Apr 2023 10:10:02 +0530 Subject: [PATCH 15/25] code climate fixed (#1243) --- ...nage-group-edit-roles-confirm-component.ts | 20 ++++++++----------- ...anage-group-operation-success-component.ts | 8 ++++++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts b/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts index cfc7db94d..8a42ffde9 100644 --- a/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts +++ b/src/app/pages/manage-group/manage-group-edit-roles-confirm/manage-group-edit-roles-confirm-component.ts @@ -89,20 +89,16 @@ export class ManageGroupEditRolesConfirmComponent extends BaseComponent implemen } - private chanageIndexValue(roles:Role,index:number){ - if(this.removingRoles.length != 0){ - let removeRole = this.removingRoles.find((f)=> f.roleKey === roles.roleKey) - if(removeRole != undefined){ - this.removingOrderdRoles.push(removeRole) + private chanageIndexValue(roles: Role, index: number): void { + const removeRole = this.removingRoles.find((r) => r.roleKey === roles.roleKey); + const addRole = this.addingRoles.find((r) => r.roleKey === roles.roleKey); + if (removeRole) { + this.removingOrderdRoles.push(removeRole); } - } - if(this.addingRoles.length != 0){ - let addingRole = this.addingRoles.find((f)=> f.roleKey === roles.roleKey) - if(addingRole != undefined){ - this.addingOrderRoles.push(addingRole) + if (addRole) { + this.addingOrderRoles.push(addRole); } - } - } + } onConfirmClick() { diff --git a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts index 43c51909e..79eec45b8 100644 --- a/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts +++ b/src/app/pages/manage-group/manage-group-operation-success/manage-group-operation-success-component.ts @@ -124,7 +124,7 @@ export class ManageGroupOperationSuccessComponent } getUserList(){ - const isGroupOperation = [this.operationEnum.GroupRoleUpdate, this.operationEnum.GroupAdd,this.operationEnum.GroupUserUpdate].includes(this.operation); + const isGroupOperation = this.isGroupOperation() if(isGroupOperation){ this.getListOfUserRequiredAccess(); } @@ -201,11 +201,15 @@ export class ManageGroupOperationSuccessComponent } public checkAccordionStatus(){ - const isGroupOperation = [this.operationEnum.GroupRoleUpdate, this.operationEnum.GroupAdd,this.operationEnum.GroupUserUpdate].includes(this.operation); + const isGroupOperation = this.isGroupOperation() const hasUsers = this.pendingVerificationUser.groupUser.length > 0; this.accordionStatus = isGroupOperation && hasUsers; } + private isGroupOperation(){ + return [this.operationEnum.GroupRoleUpdate, this.operationEnum.GroupAdd,this.operationEnum.GroupUserUpdate].includes(this.operation); + } + public toggleAccordion(accordin: string): void { if (accordin === 'accordin1') { this.accordinData.showAccordin1 = !this.accordinData.showAccordin1; From c55bc7acf217b4ea98893b9614a98a061348f7cd Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Mon, 17 Apr 2023 21:22:57 +0530 Subject: [PATCH 16/25] fixed in sprint8 and 9 (#1247) --- src/app/pages/home/home.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 355819d5f..0cb23a114 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -222,18 +222,16 @@ export class HomeComponent extends BaseComponent implements OnInit { } if (e.permissionName === 'DELEGATED_ACCESS' && this.isDelegation) { + if( this.systemModules.findIndex((x) => x.name === 'Delegated access') === + -1) { this.systemModules.push({ name: 'Delegated access', description: 'Manage delegated access to your approved services', route: '/delegated-access', }); + } } - // if (e.permissionName === 'MANAGE_SIGN_IN_PROVIDERS') { - // if (this.systemModules.findIndex(x => x.name === 'Manage sign in providers') === -1) { - // this.systemModules.push({ name: 'Manage sign in providers', description: 'Add and manage sign in providers', route: '/' }); - // } - // } if (e.permissionName === 'MANAGE_SUBSCRIPTIONS') { if ( this.otherModules.findIndex( From fde30b24b3d437ea7ce25e2a2ff198747ebf995f Mon Sep 17 00:00:00 2001 From: brijeshpatel-bc <108462846+brijeshpatel-bc@users.noreply.github.com> Date: Fri, 21 Apr 2023 16:08:20 +0530 Subject: [PATCH 17/25] =?UTF-8?q?Bug=205474:=20PPG=20170=20-=20User=20not?= =?UTF-8?q?=20Created=20-=20Text=20change=20from=20'You=20do=20not=20have?= =?UTF-8?q?=20permission=20to=20action=20this=20request'=20to=20'You=20don?= =?UTF-8?q?=E2=80=99t=20have=20permission=20to=20action=20this=20request'?= =?UTF-8?q?=20(#1256)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../verify-user-status/verify-user-status.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/manage-user/verify-user-status/verify-user-status.component.html b/src/app/pages/manage-user/verify-user-status/verify-user-status.component.html index 1ceb34925..2b8372f55 100644 --- a/src/app/pages/manage-user/verify-user-status/verify-user-status.component.html +++ b/src/app/pages/manage-user/verify-user-status/verify-user-status.component.html @@ -44,7 +44,7 @@

Account already created

User not created

From 2ed3b911464d3292bbf918834d8e6eab0f9300cd Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc Date: Mon, 24 Apr 2023 15:56:44 +0530 Subject: [PATCH 18/25] codeclimate encryptions added --- .github/codeclimate.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/codeclimate.yml diff --git a/.github/codeclimate.yml b/.github/codeclimate.yml new file mode 100644 index 000000000..5d918cfa4 --- /dev/null +++ b/.github/codeclimate.yml @@ -0,0 +1,24 @@ +version: "2" +checks: + argument-count: + enabled: true + complex-logic: + enabled: true + file-lines: + enabled: false + method-complexity: + enabled: true + config: + threshold: 20 + method-count: + enabled: false + method-lines: + enabled: false + nested-control-flow: + enabled: true + return-statements: + enabled: true + similar-code: + enabled: false + identical-code: + enabled: true \ No newline at end of file From fbdb558597cf5a682fda95422f64ab722a6a9a74 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 26 Apr 2023 22:02:52 +0530 Subject: [PATCH 19/25] sprint 7 changes are done (#1280) --- ...anisation-profile-registry-search.component.html | 6 ++++-- ...anisation-profile-registry-search.component.scss | 4 ++++ ...rganisation-profile-registry-search.component.ts | 12 +++++++++++- ...-organisation-registration-step-2.component.html | 6 ++++-- ...-organisation-registration-step-2.component.scss | 3 +++ ...ge-organisation-registration-step-2.component.ts | 13 ++++++++++++- src/app/shared/shared-data.service.ts | 7 ++++++- src/environments/environment.ts | 3 ++- 8 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.html b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.html index ea36d2c68..a3cba1960 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.html @@ -86,12 +86,13 @@

What type of registry do you want to add?
-
- +
+

diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.scss b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.scss index 243f067e3..c8d5b873a 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.scss +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.scss @@ -66,4 +66,8 @@ label[for="input3"] .custom_span { font-size: 16px; +} + +.govuk-radios__item.custom_radio { + min-height: auto; } \ No newline at end of file diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.ts b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.ts index 93ae519f1..7c9f75091 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.ts @@ -11,6 +11,7 @@ import { ciiService } from 'src/app/services/cii/cii.service'; import { ViewportScroller } from '@angular/common'; import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { SharedDataService } from 'src/app/shared/shared-data.service'; @Component({ selector: 'app-manage-organisation-profile-registry-search', @@ -46,7 +47,7 @@ export class ManageOrganisationRegistrySearchComponent extends BaseComponent imp constructor(private ref: ChangeDetectorRef, private formBuilder: FormBuilder, - private ciiService: ciiService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + private ciiService: ciiService, private router: Router, private route: ActivatedRoute,private SharedDataService:SharedDataService, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { super(uiStore, viewportScroller, scrollHelper); this.organisationId = parseInt(this.route.snapshot.paramMap.get('organisationId') || '0'); this.txtValue = ''; @@ -192,4 +193,13 @@ export class ManageOrganisationRegistrySearchComponent extends BaseComponent imp localStorage.setItem('scheme', this.scheme); localStorage.setItem('scheme_name', item.schemeName); } + + /** + * checking whether scheme should show or not + * @param item getting scheme from html + * @returns returning boolean true or false + */ + public checkShowStatus(item:any){ + return this.SharedDataService.checkBlockedScheme(item) + } } diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.html index 2028a31e0..493a5558a 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.html @@ -75,12 +75,13 @@

Please choose one option:
-
- +
+

diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.scss b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.scss index 49335ee62..1d1cadd97 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.scss +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.scss @@ -63,4 +63,7 @@ label[for="input3"] .custom_span { font-size: 16px; +} +.govuk-radios__item.custom_radio { + min-height: auto; } \ No newline at end of file diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.ts index dc56c0402..1edfa2738 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.ts @@ -18,6 +18,7 @@ import { ciiService } from 'src/app/services/cii/cii.service'; import { ViewportScroller } from '@angular/common'; import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { SharedDataService } from 'src/app/shared/shared-data.service'; @Component({ selector: 'app-manage-organisation-registration-step-2', @@ -64,7 +65,8 @@ export class ManageOrgRegStep2Component protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, private formBuilder: FormBuilder, - private ActivatedRoute: ActivatedRoute + private ActivatedRoute: ActivatedRoute, + private SharedDataService:SharedDataService ) { super(uiStore, viewportScroller, scrollHelper); this.txtValue = ''; @@ -226,4 +228,13 @@ export class ManageOrgRegStep2Component } }); } + + /** + * checking whether scheme should show or not + * @param item getting scheme from html + * @returns returning boolean true or false + */ + public checkShowStatus(item:any){ + return this.SharedDataService.checkBlockedScheme(item) + } } diff --git a/src/app/shared/shared-data.service.ts b/src/app/shared/shared-data.service.ts index 487d9438e..c832dc94f 100644 --- a/src/app/shared/shared-data.service.ts +++ b/src/app/shared/shared-data.service.ts @@ -1,11 +1,12 @@ import { Injectable } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; +import { environment } from 'src/environments/environment'; @Injectable({ providedIn: 'root', }) export class SharedDataService { - // public GName:any='' + public blockedScheme:any[] = environment.appSetting.blockedScheme public NominiData: BehaviorSubject = new BehaviorSubject(null); @@ -51,5 +52,9 @@ export class SharedDataService { this.selectedRoleforGroup.next(JSON.parse(localStorage.getItem('roleForGroup') || '')) } + public checkBlockedScheme(item:any){ + return !this.blockedScheme.includes(item.scheme) + } + constructor() {} } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 86b78097c..ddf6e37cf 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -65,6 +65,7 @@ export const environment = { hideDelegation: false, hideBulkupload: false, hideAutoValidation: false, - hideSimplifyRole: false + hideSimplifyRole: false, + blockedScheme: ["GB-EDU","GB-PPG"] }, }; From 4a9cf1547a20d77acba33ad7df3dcf2b36a94e77 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Wed, 26 Apr 2023 22:07:51 +0530 Subject: [PATCH 20/25] Update environment-production.ts --- src/environments/environment-production.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/environments/environment-production.ts b/src/environments/environment-production.ts index 49ae0467e..78899e006 100644 --- a/src/environments/environment-production.ts +++ b/src/environments/environment-production.ts @@ -69,5 +69,6 @@ export const environment = { hideDelegation:true, hideBulkupload:true, hideAutoValidation:false, + blockedScheme: ['GB-EDU',"GB-PPG"], }, -}; \ No newline at end of file +}; From 65e54810ed403db86bbb0d19f57bf333066e31c7 Mon Sep 17 00:00:00 2001 From: brijeshpatel-bc <108462846+brijeshpatel-bc@users.noreply.github.com> Date: Thu, 27 Apr 2023 17:58:57 +0530 Subject: [PATCH 21/25] PPON UI changes for p3sprint8 (#1271) * PPON UI changes for s8 * Task 5421: PPON -PPG 59/60-Dev -UI Changes * changes are done --------- Co-authored-by: ajithmuthukumar-bc --- .../buyer/details/details.component.html | 4 +- .../pages/buyer/details/details.component.ts | 26 ++++++++--- .../view-pending-verification.component.html | 2 +- .../view-pending-verification.component.ts | 28 +++++++++--- .../view-verified-org.component.html | 4 +- .../view-verified-org.component.ts | 28 +++++++++--- ...ion-profile-registry-search.component.html | 6 ++- ...ion-profile-registry-search.component.scss | 4 ++ ...ation-profile-registry-search.component.ts | 12 +++++- .../manage-organisation-profile.component.ts | 10 +++-- ...isation-registration-step-1.component.html | 10 ++--- ...anisation-registration-step-1.component.ts | 43 ++++++++++++++++++- ...isation-registration-step-2.component.html | 4 +- ...isation-registration-step-2.component.scss | 4 ++ ...anisation-registration-step-2.component.ts | 13 +++++- src/app/shared/shared-data.service.ts | 11 ++++- src/environments/environment.ts | 5 ++- 17 files changed, 174 insertions(+), 40 deletions(-) diff --git a/src/app/pages/buyer/details/details.component.html b/src/app/pages/buyer/details/details.component.html index 7adb1f1c8..e4b021abe 100644 --- a/src/app/pages/buyer/details/details.component.html +++ b/src/app/pages/buyer/details/details.component.html @@ -43,7 +43,7 @@

Registries

{{ getSchemaName(row.scheme) }} - {{ row.id }} + {{ getId(row.id, row.scheme) }} @@ -54,4 +54,4 @@

Registries

- \ No newline at end of file + diff --git a/src/app/pages/buyer/details/details.component.ts b/src/app/pages/buyer/details/details.component.ts index 278535ba0..8afa7fc91 100644 --- a/src/app/pages/buyer/details/details.component.ts +++ b/src/app/pages/buyer/details/details.component.ts @@ -47,18 +47,34 @@ export class BuyerDetailsComponent extends BaseComponent implements OnInit { } public getSchemaName(schema: string): string { - let selecedScheme = this.schemeData.find(s => s.scheme === schema); - if(selecedScheme?.schemeName) { - return selecedScheme?.schemeName; - } - else if (schema === 'GB-CCS') { + let selecedScheme = this.schemeData.find(s => s.scheme === schema); + if (schema === 'GB-CCS') { return 'Internal Identifier'; } + else if(selecedScheme?.schemeName) { + return selecedScheme?.schemeName; + } else { return ''; } } + public getId(id:string, schema: string): string { + if (schema === 'GB-PPG') { + return this.convertIdToHyphenId(id); + } + else { + return id; + } + } + + public convertIdToHyphenId(id:string): string { + if (id != null) { + return [id.slice(0, 3), '-', id.slice(3,6), '-', id.slice(6,9)].join('') + } + return id; + } + public onContinueClick() { if(environment.appSetting.hideAutoValidation){ this.router.navigateByUrl(`buyer/confirm/${this.selectedOrgId}`); diff --git a/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.html b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.html index 2683b9039..387a8441a 100644 --- a/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.html +++ b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.html @@ -80,7 +80,7 @@

Organisation registries

{{ getSchemaName(row.scheme) }} - {{ row.id }} + {{ getId(row.id, row.scheme) }} diff --git a/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.ts b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.ts index 680c68450..7a3808a91 100644 --- a/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.ts +++ b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.ts @@ -236,16 +236,34 @@ export class ViewPendingVerificationComponent implements OnInit { } public getSchemaName(schema: string): string { - let selecedScheme = this.schemeData.find((s) => s.scheme === schema); - if (selecedScheme?.schemeName) { - return selecedScheme?.schemeName; - } else if (schema === 'GB-CCS') { + let selecedScheme = this.schemeData.find(s => s.scheme === schema); + if (schema === 'GB-CCS') { return 'Internal Identifier'; - } else { + } + else if(selecedScheme?.schemeName) { + return selecedScheme?.schemeName; + } + else { return ''; } } + public getId(id:string, schema: string): string { + if (schema === 'GB-PPG') { + return this.convertIdToHyphenId(id); + } + else { + return id; + } + } + + public convertIdToHyphenId(id:string): string { + if (id != null) { + return [id.slice(0, 3), '-', id.slice(3,6), '-', id.slice(6,9)].join('') + } + return id; + } + getPendingVerificationOrg() { this.wrapperBuyerAndBothService.getpendingVerificationOrg( this.organisationId, diff --git a/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.html b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.html index 099c463de..eda49337d 100644 --- a/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.html +++ b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.html @@ -84,7 +84,7 @@

Organisation registries

{{ getSchemaName(row.scheme) }} - {{ row.id }} + {{ getId(row.id, row.scheme) }} @@ -125,4 +125,4 @@

Event log

(click)="nevigateViewEdit()">View / edit organisations’ right to buy status

- \ No newline at end of file + diff --git a/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.ts b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.ts index bd13324e9..70dd6386c 100644 --- a/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.ts +++ b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.ts @@ -242,16 +242,34 @@ export class ViewVerifiedOrgComponent implements OnInit { } public getSchemaName(schema: string): string { - let selecedScheme = this.schemeData.find((s) => s.scheme === schema); - if (selecedScheme?.schemeName) { - return selecedScheme?.schemeName; - } else if (schema === 'GB-CCS') { + let selecedScheme = this.schemeData.find(s => s.scheme === schema); + if (schema === 'GB-CCS') { return 'Internal Identifier'; - } else { + } + else if(selecedScheme?.schemeName) { + return selecedScheme?.schemeName; + } + else { return ''; } } + public getId(id:string, schema: string): string { + if (schema === 'GB-PPG') { + return this.convertIdToHyphenId(id); + } + else { + return id; + } + } + + public convertIdToHyphenId(id:string): string { + if (id != null) { + return [id.slice(0, 3), '-', id.slice(3,6), '-', id.slice(6,9)].join('') + } + return id; + } + public nevigateViewEdit() { let data = { companyHouseId: this.registries.identifier?.id, diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.html b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.html index ea36d2c68..a3cba1960 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.html @@ -86,12 +86,13 @@

What type of registry do you want to add?
-
- +
+ diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.scss b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.scss index 243f067e3..c8d5b873a 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.scss +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.scss @@ -66,4 +66,8 @@ label[for="input3"] .custom_span { font-size: 16px; +} + +.govuk-radios__item.custom_radio { + min-height: auto; } \ No newline at end of file diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.ts b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.ts index 93ae519f1..fa2b77248 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-search/manage-organisation-profile-registry-search.component.ts @@ -11,6 +11,7 @@ import { ciiService } from 'src/app/services/cii/cii.service'; import { ViewportScroller } from '@angular/common'; import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { SharedDataService } from 'src/app/shared/shared-data.service'; @Component({ selector: 'app-manage-organisation-profile-registry-search', @@ -46,7 +47,7 @@ export class ManageOrganisationRegistrySearchComponent extends BaseComponent imp constructor(private ref: ChangeDetectorRef, private formBuilder: FormBuilder, - private ciiService: ciiService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + private ciiService: ciiService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, private SharedDataService:SharedDataService) { super(uiStore, viewportScroller, scrollHelper); this.organisationId = parseInt(this.route.snapshot.paramMap.get('organisationId') || '0'); this.txtValue = ''; @@ -192,4 +193,13 @@ export class ManageOrganisationRegistrySearchComponent extends BaseComponent imp localStorage.setItem('scheme', this.scheme); localStorage.setItem('scheme_name', item.schemeName); } + + /** + * checking whether scheme should show or not + * @param item getting scheme from html + * @returns returning boolean true or false + */ + public checkShowStatus(item:any){ + return this.SharedDataService.checkBlockedScheme(item) + } } diff --git a/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.ts b/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.ts index d0e7c6668..12ce443a2 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.ts @@ -53,7 +53,7 @@ export class ManageOrganisationProfileComponent extends BaseComponent implements ]; submitted: boolean = false; @ViewChildren('input') inputs!: QueryList; - + pponSchema: string = 'GB-PPG'; constructor(private organisationService: WrapperOrganisationService, private ciiService: ciiService, @@ -100,7 +100,11 @@ export class ManageOrganisationProfileComponent extends BaseComponent implements await this.ciiService.getOrgDetails(ciiOrgId).toPromise().then((data: any) => { localStorage.setItem('cii_registries', JSON.stringify(data)); this.registries = data; - this.additionalIdentifiers = data.additionalIdentifiers; + data.additionalIdentifiers.forEach((Identifier: any) => { + if (Identifier.scheme != this.pponSchema) { + this.additionalIdentifiers.push(Identifier) + } + }) }).catch(e => { }); @@ -236,4 +240,4 @@ export class ManageOrganisationProfileComponent extends BaseComponent implements this.router.navigateByUrl('contact-assign/select?data=' + JSON.stringify(data)); } -} \ No newline at end of file +} diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.html index f47208dc9..a2a6a4c8a 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.html @@ -27,13 +27,9 @@

Create an account

Before you start

You will need a valid company email address and one of the following:

    -
  • Companies House registered number
  • -
  • Dun and Bradstreet number
  • -
  • Charity Commission for England and Wales number
  • -
  • Office of The Scottish Charity Regulator (OSCR) number
  • -
  • The Charity Commission for Northern Ireland number
  • -
  • National Health Service Organisations Registry number
  • -
  • Department for Education Unique Reference Number (URN)
  • + +
  • {{details.name}}
  • +

As an organisation administrator, your name and email address may be provided by CCS to employees of your organisation so that they can contact you about any registration queries.

diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.ts index 0334518e9..346bbc302 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.ts @@ -9,6 +9,7 @@ import { BaseComponent } from 'src/app/components/base/base.component'; import { Data } from 'src/app/models/data'; import { dataService } from 'src/app/services/data/data.service'; import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; +import { SharedDataService } from 'src/app/shared/shared-data.service'; import { UIState } from 'src/app/store/ui.states'; @Component({ @@ -26,14 +27,52 @@ import { UIState } from 'src/app/store/ui.states'; }) export class ManageOrgRegStep1Component extends BaseComponent implements OnInit { - constructor(private dataService: dataService, private router: Router, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { - super(uiStore,viewportScroller,scrollHelper); + constructor(private dataService: dataService, private router: Router, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, private SharedDataService:SharedDataService) { + super(uiStore,viewportScroller,scrollHelper,); } + schemeDetails = [ + { + name: 'Companies House registered number', + id: 'GB-COH', + }, + { + name: 'Dun and Bradstreet number', + id: 'US-DUN', + }, + { + name: 'Charity Commission for England and Wales number', + id: 'GB-CHC', + }, + { + name: 'Office of The Scottish Charity Regulator (OSCR) number', + id: 'GB-SC', + }, + { + name: 'The Charity Commission for Northern Ireland number', + id: 'GB-NIC', + }, + { + name: 'National Health Service Organisations Registry number', + id: 'GB-NHS', + }, + { + name: 'Department for Education Unique Reference Number (URN)', + id: 'GB-EDU', + }, + ]; ngOnInit() { } public onClick() { this.router.navigateByUrl(`manage-org/register/initial-search`); } + /** + * checking whether scheme should show or not + * @param item getting scheme from html + * @returns returning boolean true or false + */ + public checkShowStatus(item:any){ + return this.SharedDataService.checkBlockedSchemeText(item) + } } diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.html index 2028a31e0..74d5d60ba 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.html @@ -75,11 +75,12 @@

Please choose one option:
-
+
@@ -223,6 +224,7 @@

+
diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.scss b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.scss index 49335ee62..12b8476e1 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.scss +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.scss @@ -63,4 +63,8 @@ label[for="input3"] .custom_span { font-size: 16px; +} + +.govuk-radios__item.custom_radio { + min-height: auto; } \ No newline at end of file diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.ts index dc56c0402..cc6a6ea89 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-2/manage-organisation-registration-step-2.component.ts @@ -18,6 +18,7 @@ import { ciiService } from 'src/app/services/cii/cii.service'; import { ViewportScroller } from '@angular/common'; import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { SharedDataService } from 'src/app/shared/shared-data.service'; @Component({ selector: 'app-manage-organisation-registration-step-2', @@ -64,7 +65,8 @@ export class ManageOrgRegStep2Component protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, private formBuilder: FormBuilder, - private ActivatedRoute: ActivatedRoute + private ActivatedRoute: ActivatedRoute, + private SharedDataService:SharedDataService ) { super(uiStore, viewportScroller, scrollHelper); this.txtValue = ''; @@ -226,4 +228,13 @@ export class ManageOrgRegStep2Component } }); } + + /** + * checking whether scheme should show or not + * @param item getting scheme from html + * @returns returning boolean true or false + */ + public checkShowStatus(item:any){ + return this.SharedDataService.checkBlockedScheme(item) + } } diff --git a/src/app/shared/shared-data.service.ts b/src/app/shared/shared-data.service.ts index 487d9438e..8f1cf9ba9 100644 --- a/src/app/shared/shared-data.service.ts +++ b/src/app/shared/shared-data.service.ts @@ -1,11 +1,13 @@ import { Injectable } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; +import { environment } from 'src/environments/environment'; @Injectable({ providedIn: 'root', }) export class SharedDataService { - // public GName:any='' + + public blockedScheme:any[] = environment.appSetting.blockedScheme public NominiData: BehaviorSubject = new BehaviorSubject(null); @@ -51,5 +53,12 @@ export class SharedDataService { this.selectedRoleforGroup.next(JSON.parse(localStorage.getItem('roleForGroup') || '')) } + public checkBlockedScheme(item:any){ + return !this.blockedScheme.includes(item.scheme) + } + + public checkBlockedSchemeText(item:any){ + return !this.blockedScheme.includes(item) + } constructor() {} } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 86b78097c..aba7d4e00 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -65,6 +65,7 @@ export const environment = { hideDelegation: false, hideBulkupload: false, hideAutoValidation: false, - hideSimplifyRole: false + hideSimplifyRole: false, + blockedScheme: ["GB-EDU","GB-PPG"] }, -}; +}; \ No newline at end of file From 973e329c476745a70039aebbb30106e35f449e82 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 27 Apr 2023 18:13:33 +0530 Subject: [PATCH 22/25] Update environment-testing.ts --- src/environments/environment-testing.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/environments/environment-testing.ts b/src/environments/environment-testing.ts index 92599b171..ebb3880ff 100644 --- a/src/environments/environment-testing.ts +++ b/src/environments/environment-testing.ts @@ -67,5 +67,6 @@ export const environment = { hideDelegation:false, hideBulkupload:false, hideAutoValidation:false, + blockedScheme: ["GB-PPG"], }, -}; \ No newline at end of file +}; From 0305284c45ef09cbc1fb6e043ba32a9c72cf07ec Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Thu, 27 Apr 2023 18:38:14 +0530 Subject: [PATCH 23/25] changes are ready (#1291) --- ...isation-registration-step-1.component.html | 10 ++--- ...anisation-registration-step-1.component.ts | 44 ++++++++++++++++++- src/app/shared/shared-data.service.ts | 4 ++ 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.html index f47208dc9..a2a6a4c8a 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.html @@ -27,13 +27,9 @@

Create an account

Before you start

You will need a valid company email address and one of the following:

    -
  • Companies House registered number
  • -
  • Dun and Bradstreet number
  • -
  • Charity Commission for England and Wales number
  • -
  • Office of The Scottish Charity Regulator (OSCR) number
  • -
  • The Charity Commission for Northern Ireland number
  • -
  • National Health Service Organisations Registry number
  • -
  • Department for Education Unique Reference Number (URN)
  • + +
  • {{details.name}}
  • +

As an organisation administrator, your name and email address may be provided by CCS to employees of your organisation so that they can contact you about any registration queries.

diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.ts index 0334518e9..ecc62530c 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-1/manage-organisation-registration-step-1.component.ts @@ -9,6 +9,7 @@ import { BaseComponent } from 'src/app/components/base/base.component'; import { Data } from 'src/app/models/data'; import { dataService } from 'src/app/services/data/data.service'; import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; +import { SharedDataService } from 'src/app/shared/shared-data.service'; import { UIState } from 'src/app/store/ui.states'; @Component({ @@ -25,8 +26,40 @@ import { UIState } from 'src/app/store/ui.states'; changeDetection: ChangeDetectionStrategy.OnPush }) export class ManageOrgRegStep1Component extends BaseComponent implements OnInit { + + public schemeDetails = [ + { + name: 'Companies House registered number', + id: 'GB-COH', + }, + { + name: 'Dun and Bradstreet number', + id: 'US-DUN', + }, + { + name: 'Charity Commission for England and Wales number', + id: 'GB-CHC', + }, + { + name: 'Office of The Scottish Charity Regulator (OSCR) number', + id: 'GB-SC', + }, + { + name: 'The Charity Commission for Northern Ireland number', + id: 'GB-NIC', + }, + { + name: 'National Health Service Organisations Registry number', + id: 'GB-NHS', + }, + { + name: 'Department for Education Unique Reference Number (URN)', + id: 'GB-EDU', + }, + ]; + - constructor(private dataService: dataService, private router: Router, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + constructor(private dataService: dataService, private router: Router, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, private SharedDataService : SharedDataService) { super(uiStore,viewportScroller,scrollHelper); } @@ -36,4 +69,13 @@ export class ManageOrgRegStep1Component extends BaseComponent implements OnInit this.router.navigateByUrl(`manage-org/register/initial-search`); } + /** + * checking whether scheme should show or not + * @param item getting scheme from html + * @returns returning boolean true or false + */ + public checkShowStatus(item:any){ + return this.SharedDataService.checkBlockedSchemeText(item) + } + } diff --git a/src/app/shared/shared-data.service.ts b/src/app/shared/shared-data.service.ts index c832dc94f..b3aae8584 100644 --- a/src/app/shared/shared-data.service.ts +++ b/src/app/shared/shared-data.service.ts @@ -56,5 +56,9 @@ export class SharedDataService { return !this.blockedScheme.includes(item.scheme) } + public checkBlockedSchemeText(item:any){ + return !this.blockedScheme.includes(item) + } + constructor() {} } From 0eabe54155eb421d3179e04b13adaec4eec6945e Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 27 Apr 2023 21:13:41 +0530 Subject: [PATCH 24/25] un hide school registry - environment file update --- src/environments/environment-production.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environments/environment-production.ts b/src/environments/environment-production.ts index 9dc86faeb..883f1cb7a 100644 --- a/src/environments/environment-production.ts +++ b/src/environments/environment-production.ts @@ -70,6 +70,6 @@ export const environment = { hideBulkupload:true, hideAutoValidation:false, hideSimplifyRole:false, - blockedScheme: ['GB-EDU',"GB-PPG"], + blockedScheme: ["GB-PPG"], }, }; From 997517c3ad7d56556480d78645d48cb4a8686832 Mon Sep 17 00:00:00 2001 From: brijeshpatel-bc <108462846+brijeshpatel-bc@users.noreply.github.com> Date: Tue, 2 May 2023 16:04:10 +0530 Subject: [PATCH 25/25] Bug 5554: PPG- 293 - Updating Fleet role for user profile affects Group level fleet access. (Sprint 8 Bug) (#1299) --- src/app/pages/user-profile/user-profile-component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/pages/user-profile/user-profile-component.ts b/src/app/pages/user-profile/user-profile-component.ts index 7ac527ad7..3e22b5677 100644 --- a/src/app/pages/user-profile/user-profile-component.ts +++ b/src/app/pages/user-profile/user-profile-component.ts @@ -81,6 +81,7 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { hasGroupViewPermission: boolean = false; isOrgAdmin: boolean = false; private selectedRoleIds:number[] = []; + private selectedGroupIds:number[] = []; public groupHint:string='' private adminRoleKey:string= 'ORG_ADMINISTRATOR'; @ViewChildren('input') inputs!: QueryList; @@ -144,7 +145,8 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { self.findIndex( (t) => t.groupId === group.groupId && t.group === group.group ) === index - ); + ); + this.selectedGroupIds = this.userGroups.map(({ groupId }) => groupId); if (this.routeStateData != undefined) { this.formGroup.setValue({ firstName: this.routeStateData.firstName, @@ -399,6 +401,9 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { firstName: form.get('firstName')?.value, lastName: form.get('lastName')?.value, }; + if(this.isAdminUser){ + userRequest.detail.groupIds = this.selectedGroupIds; + } this.userRequest = userRequest this.checkApproveRolesSelected() } else {