From d31d283f999ed344d151f447ea44bd8c28251fba Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Wed, 20 Jul 2022 01:55:08 +0530 Subject: [PATCH 01/79] Update environment-NFT.ts --- src/environments/environment-NFT.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environments/environment-NFT.ts b/src/environments/environment-NFT.ts index 4b5c63c71..6d06bbb0a 100644 --- a/src/environments/environment-NFT.ts +++ b/src/environments/environment-NFT.ts @@ -2,7 +2,7 @@ export const environment = { production: true, - idam_client_id: 'IDAM', + idam_client_id: 'IDAM_ID', uri: { From e789e4fcc4dc1c7fd484af707bc1969ed4de4ada Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Fri, 19 Aug 2022 20:11:31 +0530 Subject: [PATCH 02/79] Update environment-NFT.ts --- src/environments/environment-NFT.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environments/environment-NFT.ts b/src/environments/environment-NFT.ts index 6d06bbb0a..8777a6ffa 100644 --- a/src/environments/environment-NFT.ts +++ b/src/environments/environment-NFT.ts @@ -76,7 +76,7 @@ export const environment = { enable: false, - security_log:true + security_log: false }, cookies_policy: { From 18c85d63a375fb7a6a20bf4b44bedac1f17239ff Mon Sep 17 00:00:00 2001 From: VijayHirudayasamy-bc <103512567+VijayHirudayasamy-bc@users.noreply.github.com> Date: Wed, 5 Oct 2022 14:38:49 +0100 Subject: [PATCH 03/79] patch for sprint 14 about logout issue while (#782) switching delegation organisation --- .../service/manage-delegate.service.ts | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/app/pages/manage-delegated/service/manage-delegate.service.ts b/src/app/pages/manage-delegated/service/manage-delegate.service.ts index 3c7ed0ff8..e2121bef1 100644 --- a/src/app/pages/manage-delegated/service/manage-delegate.service.ts +++ b/src/app/pages/manage-delegated/service/manage-delegate.service.ts @@ -9,11 +9,11 @@ import { AuthService } from 'src/app/services/auth/auth.service'; export class ManageDelegateService { public delegatedOrg: BehaviorSubject = new BehaviorSubject(null); - private organisationId: string; + private organisationId: string; - constructor(private AuthService:AuthService,private route: Router,) { + constructor(private AuthService: AuthService, private route: Router,) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; - } + } public ValueChanged(data: string, box: string, form: string): void { @@ -48,7 +48,7 @@ export class ManageDelegateService { } } - public SetInputFocus(inputIndex: string):void{ + public SetInputFocus(inputIndex: string): void { document.getElementById(inputIndex)?.focus(); } @@ -56,26 +56,29 @@ export class ManageDelegateService { public setDelegatedOrg(org: any): void { localStorage.setItem('delegatedOrg', org); this.delegatedOrg.next(org) - this.AuthService.renewAccessToken() + // Redirect to home page once refresh token call completed + this.AuthService.renewAccessToken('/home') this.setPermissionOrgDetails() + } - public get getDelegatedOrg():any { + public get getDelegatedOrg(): any { return localStorage.getItem('delegatedOrg'); } - public setPermissionOrgDetails(){ - this.delegatedOrg.subscribe((data)=>{ - if(data == 0 || data == null){ - localStorage.setItem('permission_organisation_id',this.organisationId); - }else{ - localStorage.setItem('permission_organisation_id',this.getDelegatedOrg); - } - setTimeout(() => { - this.route.navigateByUrl('/home'); - }, 100); + public setPermissionOrgDetails() { + this.delegatedOrg.subscribe((data) => { + if (data == 0 || data == null) { + localStorage.setItem('permission_organisation_id', this.organisationId); + } else { + localStorage.setItem('permission_organisation_id', this.getDelegatedOrg); + } + // To fix permission API issue - move this redirection to renewAccessToken method + // setTimeout(() => { + // this.route.navigateByUrl('/home'); + // }, 100); }) } - + } From be0001a6d71d98d3eb82b3f8f32c292e5de52f4a Mon Sep 17 00:00:00 2001 From: brijeshpatel-bc <108462846+brijeshpatel-bc@users.noreply.github.com> Date: Fri, 7 Oct 2022 15:15:35 +0530 Subject: [PATCH 04/79] 3773 - Hotfix sp14 - Loader issue while switching org (#792) --- src/app/interceptors/loading-indicator.interceptor.ts | 9 ++++++++- .../manage-delegated/service/manage-delegate.service.ts | 1 + src/app/services/auth/auth.service.ts | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/interceptors/loading-indicator.interceptor.ts b/src/app/interceptors/loading-indicator.interceptor.ts index 961eab288..3eb8eb59d 100644 --- a/src/app/interceptors/loading-indicator.interceptor.ts +++ b/src/app/interceptors/loading-indicator.interceptor.ts @@ -37,7 +37,14 @@ export class LoadingIndicatorInterceptor implements HttpInterceptor { intercept(req: HttpRequest, next: HttpHandler): Observable> { if (this.urlExceptions.includes(req.url) || this.urlExceptions.includes(req.url.split('?')[0])) { - this.loadingIndicatorService.isLoading.next(false); + var showLoadingIndicator = localStorage.getItem('show_loading_indicator'); + if(showLoadingIndicator == 'true') { + this.requests.push(req); + this.loadingIndicatorService.isLoading.next(true); + } + else { + this.loadingIndicatorService.isLoading.next(false); + } }else{ this.requests.push(req); this.loadingIndicatorService.isLoading.next(true); diff --git a/src/app/pages/manage-delegated/service/manage-delegate.service.ts b/src/app/pages/manage-delegated/service/manage-delegate.service.ts index e2121bef1..bf646e84e 100644 --- a/src/app/pages/manage-delegated/service/manage-delegate.service.ts +++ b/src/app/pages/manage-delegated/service/manage-delegate.service.ts @@ -57,6 +57,7 @@ export class ManageDelegateService { localStorage.setItem('delegatedOrg', org); this.delegatedOrg.next(org) // Redirect to home page once refresh token call completed + localStorage.setItem('show_loading_indicator', 'true'); this.AuthService.renewAccessToken('/home') this.setPermissionOrgDetails() diff --git a/src/app/services/auth/auth.service.ts b/src/app/services/auth/auth.service.ts index 3102731b9..31aa2edb6 100644 --- a/src/app/services/auth/auth.service.ts +++ b/src/app/services/auth/auth.service.ts @@ -85,6 +85,7 @@ export class AuthService { return this.createSession(tokenInfo.refresh_token).toPromise().then(() => { let decodedAccessToken = this.tokenService.getDecodedToken(tokenInfo.access_token); localStorage.setItem('at_exp', decodedAccessToken.exp); + localStorage.setItem('show_loading_indicator', 'false'); if (url.length > 0) { this.router.navigateByUrl(url, { replaceUrl: true }); } @@ -92,7 +93,8 @@ export class AuthService { }); }, (err) => { - this.RollbarErrorService.RollbarDebug('renewAccessTokenError:'+ JSON.stringify(err)) + localStorage.setItem('show_loading_indicator', 'false'); + this.RollbarErrorService.RollbarDebug('renewAccessTokenError:'+ JSON.stringify(err)) // This could due to invalid refresh token (refresh token rotation) if (err.error == "INVALID_CREDENTIALS" || err.error.error_description == "PENDING_PASSWORD_CHANGE" || err.error.error == 'invalid_grant' || err.error.error == 'invalid_request') { @@ -101,6 +103,7 @@ export class AuthService { } }) }).catch((error: any) => { + localStorage.setItem('show_loading_indicator', 'false'); this.RollbarErrorService.RollbarDebug('renewAccessTokenError:' + JSON.stringify(error)) if (error.status == 404) { window.location.href = this.getAuthorizedEndpoint(); From b59e42be3d8ca1e3ffb3ec36145b1a1b36104305 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 19 Oct 2022 16:51:50 +0530 Subject: [PATCH 05/79] # (#816) --- src/app/app-routing.module.ts | 42 ++-- .../manage-user-profiles-component.ts | 200 +++++++++--------- 2 files changed, 126 insertions(+), 116 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index c826994cf..b3edbc888 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -593,27 +593,27 @@ const routes: Routes = [ canActivate: [AuthGuard, RoleGuard], component: ManageUserAddSelectionComponent, }, - { - path: 'manage-users/bulk-users', - data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - pathMatch: 'full', - canActivate: [AuthGuard, RoleGuard], - component: ManageUserBulkUploadComponent, - }, - { - path: 'manage-users/bulk-users/status/:id', - data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - pathMatch: 'full', - canActivate: [AuthGuard, RoleGuard], - component: ManageUserBulkUploadStatusComponent, - }, - { - path: 'manage-users/bulk-users/migration-status/:id', - data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - pathMatch: 'full', - canActivate: [AuthGuard, RoleGuard], - component: ManageUserBulkUploadMigrationStatusComponent, - }, + // { + // path: 'manage-users/bulk-users', + // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + // pathMatch: 'full', + // canActivate: [AuthGuard, RoleGuard], + // component: ManageUserBulkUploadComponent, + // }, + // { + // path: 'manage-users/bulk-users/status/:id', + // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + // pathMatch: 'full', + // canActivate: [AuthGuard, RoleGuard], + // component: ManageUserBulkUploadStatusComponent, + // }, + // { + // path: 'manage-users/bulk-users/migration-status/:id', + // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + // pathMatch: 'full', + // canActivate: [AuthGuard, RoleGuard], + // component: ManageUserBulkUploadMigrationStatusComponent, + // }, { path: 'manage-users/add-user/details', data: { title: 'Add/Edit - Manage Users', roles: ['MANAGE_USERS'] }, diff --git a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts index 7bc4be493..6d8d270e2 100644 --- a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts +++ b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts @@ -1,107 +1,117 @@ -import { Component } from "@angular/core"; -import { OnInit } from "@angular/core"; -import { Store } from "@ngrx/store"; +import { Component } from '@angular/core'; +import { OnInit } from '@angular/core'; +import { Store } from '@ngrx/store'; import { ViewportScroller } from '@angular/common'; -import { BaseComponent } from "src/app/components/base/base.component"; -import { UIState } from "src/app/store/ui.states"; -import { FormBuilder, FormGroup, Validators } from "@angular/forms"; -import { slideAnimation } from "src/app/animations/slide.animation"; -import { User, UserGroup, UserListInfo, UserListResponse, UserProfileRequestInfo } from "src/app/models/user"; -import { WrapperUserService } from "src/app/services/wrapper/wrapper-user.service"; -import { WrapperUserContactService } from "src/app/services/wrapper/wrapper-user-contact.service"; -import { ContactPoint, UserContactInfoList } from "src/app/models/contactInfo"; -import { Router } from "@angular/router"; -import { OperationEnum } from "src/app/constants/enum"; -import { ScrollHelper } from "src/app/services/helper/scroll-helper.services"; -import { WrapperOrganisationService } from "src/app/services/wrapper/wrapper-org-service"; -import { environment } from "src/environments/environment"; -import { AuditLoggerService } from "src/app/services/postgres/logger.service"; -import { SessionStorageKey } from "src/app/constants/constant"; +import { BaseComponent } from 'src/app/components/base/base.component'; +import { UIState } from 'src/app/store/ui.states'; +import { slideAnimation } from 'src/app/animations/slide.animation'; +import {UserListInfo,UserListResponse} from 'src/app/models/user'; +import { Router } from '@angular/router'; +import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; +import { WrapperOrganisationService } from 'src/app/services/wrapper/wrapper-org-service'; +import { environment } from 'src/environments/environment'; +import { AuditLoggerService } from 'src/app/services/postgres/logger.service'; +import { SessionStorageKey } from 'src/app/constants/constant'; @Component({ - selector: 'app-manage-user-profiles', - templateUrl: './manage-user-profiles-component.html', - styleUrls: ['./manage-user-profiles-component.scss'], - animations: [ - slideAnimation({ - close: { 'transform': 'translateX(12.5rem)' }, - open: { left: '-12.5rem' } - }) - ] + selector: 'app-manage-user-profiles', + templateUrl: './manage-user-profiles-component.html', + styleUrls: ['./manage-user-profiles-component.scss'], + animations: [ + slideAnimation({ + close: { transform: 'translateX(12.5rem)' }, + open: { left: '-12.5rem' }, + }), + ], }) + export class ManageUserProfilesComponent extends BaseComponent implements OnInit { - userList: UserListResponse; - organisationId: string; - searchingUserName: string = ""; - currentPage: number = 1; - pageCount: number = 0; - pageSize: number = environment.listPageSize; - usersTableHeaders = ['NAME', 'EMAIL']; - usersColumnsToDisplay = ['name', 'userName']; - searchSumbited:boolean=false; - constructor(private wrapperOrganisationService: WrapperOrganisationService, - protected uiStore: Store, private router: Router, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, - private auditLogService: AuditLoggerService) { - super(uiStore, viewportScroller, scrollHelper); - this.organisationId = localStorage.getItem('cii_organisation_id') || ''; - this.userList = { - currentPage: this.currentPage, - pageCount: 0, - rowCount: 0, - organisationId: this.organisationId, - userList: [] - } - sessionStorage.removeItem(SessionStorageKey.ManageUserUserName); - sessionStorage.removeItem(SessionStorageKey.OperationSuccessUserName); - } + public userList: UserListResponse; + private organisationId: string; + public searchingUserName: string = ''; + public currentPage: number = 1; + public pageCount: number = 0; + public pageSize: number = environment.listPageSize; + public usersTableHeaders = ['NAME', 'EMAIL']; + public usersColumnsToDisplay = ['name', 'userName']; + public searchSumbited: boolean = false; + + constructor( + private wrapperOrganisationService: WrapperOrganisationService, + protected uiStore: Store, + private router: Router, + protected viewportScroller: ViewportScroller, + protected scrollHelper: ScrollHelper, + private auditLogService: AuditLoggerService + ) { + super(uiStore, viewportScroller, scrollHelper); + this.organisationId = localStorage.getItem('cii_organisation_id') || ''; + this.userList = { + currentPage: this.currentPage, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }; + sessionStorage.removeItem(SessionStorageKey.ManageUserUserName); + sessionStorage.removeItem(SessionStorageKey.OperationSuccessUserName); + } - async ngOnInit() { - await this.auditLogService.createLog({ - eventName: "Access", applicationName: "Manage-user-account", - referenceData: `UI-Log` - }).toPromise(); - this.getOrganisationUsers(); - } + async ngOnInit() { + await this.auditLogService + .createLog({ + eventName: 'Access', + applicationName: 'Manage-user-account', + referenceData: `UI-Log`, + }) + .toPromise(); + this.getOrganisationUsers(); + } - getOrganisationUsers() { - this.wrapperOrganisationService.getUsers(this.organisationId, this.searchingUserName, this.currentPage, this.pageSize).subscribe({ - next: (userListResponse: UserListResponse) => { - if (userListResponse != null) { - this.userList = userListResponse; - this.pageCount = this.userList.pageCount; - } - }, - error: (error: any) => { - } - }); - } + private getOrganisationUsers(): void { + this.wrapperOrganisationService.getUsers(this.organisationId,this.searchingUserName,this.currentPage,this.pageSize) + .subscribe({ + next: (userListResponse: UserListResponse) => { + if (userListResponse != null) { + this.userList = userListResponse; + this.pageCount = this.userList.pageCount; + } + }, + error: (error: any) => {}, + }); + } - onAddClick() { - this.router.navigateByUrl("manage-users/add-user-selection"); - } + public onAddClick(): void { + this.router.navigateByUrl('manage-users/add-user/details'); + } - searchTextChanged(event: any) { - this.searchingUserName = event.target.value; - } + private searchTextChanged(event: any) { + this.searchingUserName = event.target.value; + } - onSearchClick() { - this.searchSumbited=true - this.currentPage = 1; - this.getOrganisationUsers(); - } + public onSearchClick(): void { + this.searchSumbited = true; + this.currentPage = 1; + this.getOrganisationUsers(); + } - setPage(pageNumber: any) { - this.currentPage = pageNumber; - this.getOrganisationUsers(); - } + public setPage(pageNumber: any): void { + this.currentPage = pageNumber; + this.getOrganisationUsers(); + } - onEditRow(dataRow: UserListInfo) { - console.log(dataRow); - let data = { - 'isEdit': true, - 'rowData':dataRow.userName - }; - sessionStorage.setItem(SessionStorageKey.ManageUserUserName, dataRow.userName); - this.router.navigateByUrl('manage-users/add-user/details?data=' + btoa(JSON.stringify(data))); - } -} \ No newline at end of file + public onEditRow(dataRow: UserListInfo): void { + console.log(dataRow); + let data = { + isEdit: true, + rowData: dataRow.userName, + }; + sessionStorage.setItem( + SessionStorageKey.ManageUserUserName, + dataRow.userName + ); + this.router.navigateByUrl( + 'manage-users/add-user/details?data=' + btoa(JSON.stringify(data)) + ); + } +} From 8294df7d6475b73fc7f285788d254b97e5146d7e Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Thu, 20 Oct 2022 14:43:49 +0530 Subject: [PATCH 06/79] 3056-bulk-upload-change-for-sprint11 --- src/app/app-routing.module.ts | 56 +++++++++---------- .../manage-user-profiles-component.ts | 2 +- src/assets/i18n/en.json | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 3133aaf7f..9f696a49e 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -568,34 +568,34 @@ const routes: Routes = [ canActivate: [AuthGuard, RoleGuard], component: ManageUserProfilesComponent, }, - { - path: 'manage-users/add-user-selection', - data: { title: 'Select - Manage Users', roles: ['MANAGE_USERS'] }, - pathMatch: 'full', - canActivate: [AuthGuard, RoleGuard], - component: ManageUserAddSelectionComponent, - }, - { - path: 'manage-users/bulk-users', - data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - pathMatch: 'full', - canActivate: [AuthGuard, RoleGuard], - component: ManageUserBulkUploadComponent, - }, - { - path: 'manage-users/bulk-users/status/:id', - data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - pathMatch: 'full', - canActivate: [AuthGuard, RoleGuard], - component: ManageUserBulkUploadStatusComponent, - }, - { - path: 'manage-users/bulk-users/migration-status/:id', - data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - pathMatch: 'full', - canActivate: [AuthGuard, RoleGuard], - component: ManageUserBulkUploadMigrationStatusComponent, - }, + // { + // path: 'manage-users/add-user-selection', + // data: { title: 'Select - Manage Users', roles: ['MANAGE_USERS'] }, + // pathMatch: 'full', + // canActivate: [AuthGuard, RoleGuard], + // component: ManageUserAddSelectionComponent, + // }, + // { + // path: 'manage-users/bulk-users', + // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + // pathMatch: 'full', + // canActivate: [AuthGuard, RoleGuard], + // component: ManageUserBulkUploadComponent, + // }, + // { + // path: 'manage-users/bulk-users/status/:id', + // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + // pathMatch: 'full', + // canActivate: [AuthGuard, RoleGuard], + // component: ManageUserBulkUploadStatusComponent, + // }, + // { + // path: 'manage-users/bulk-users/migration-status/:id', + // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + // pathMatch: 'full', + // canActivate: [AuthGuard, RoleGuard], + // component: ManageUserBulkUploadMigrationStatusComponent, + // }, { path: 'manage-users/add-user/details', data: { title: 'Add/Edit - Manage Users', roles: ['MANAGE_USERS'] }, diff --git a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts index 7bc4be493..05e58808f 100644 --- a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts +++ b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts @@ -77,7 +77,7 @@ export class ManageUserProfilesComponent extends BaseComponent implements OnInit } onAddClick() { - this.router.navigateByUrl("manage-users/add-user-selection"); + this.router.navigateByUrl("manage-users/add-user/details"); } searchTextChanged(event: any) { diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 568495e6b..3a6998058 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -85,7 +85,7 @@ "MANAGE_YOUR_ORGANISATION_USER_ACCOUNTS": "Manage your organisation's user accounts", "MANAGE_USER_DESCRIPTION": "The next steps allow you to create new user accounts, update account details and passwords.", "SEARCH_USERS_BY_EMAIL": "Search for users", - "ADD_USERS_BTN": "Add users", + "ADD_USERS_BTN": "Add user", "ADD_USERS": "Add users", "ADD_USERS_GROUP": "Add users to group", "SELECT_DIFF_USER": "Select a different user", From 8ed39e8bcf4af58b340f59777ad6b78af672a5f9 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:53:09 +0530 Subject: [PATCH 07/79] Revert "# (#816)" This reverts commit b59e42be3d8ca1e3ffb3ec36145b1a1b36104305. --- src/app/app-routing.module.ts | 42 ++-- .../manage-user-profiles-component.ts | 200 +++++++++--------- 2 files changed, 116 insertions(+), 126 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index b3edbc888..c826994cf 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -593,27 +593,27 @@ const routes: Routes = [ canActivate: [AuthGuard, RoleGuard], component: ManageUserAddSelectionComponent, }, - // { - // path: 'manage-users/bulk-users', - // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - // pathMatch: 'full', - // canActivate: [AuthGuard, RoleGuard], - // component: ManageUserBulkUploadComponent, - // }, - // { - // path: 'manage-users/bulk-users/status/:id', - // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - // pathMatch: 'full', - // canActivate: [AuthGuard, RoleGuard], - // component: ManageUserBulkUploadStatusComponent, - // }, - // { - // path: 'manage-users/bulk-users/migration-status/:id', - // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - // pathMatch: 'full', - // canActivate: [AuthGuard, RoleGuard], - // component: ManageUserBulkUploadMigrationStatusComponent, - // }, + { + path: 'manage-users/bulk-users', + data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], + component: ManageUserBulkUploadComponent, + }, + { + path: 'manage-users/bulk-users/status/:id', + data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], + component: ManageUserBulkUploadStatusComponent, + }, + { + path: 'manage-users/bulk-users/migration-status/:id', + data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], + component: ManageUserBulkUploadMigrationStatusComponent, + }, { path: 'manage-users/add-user/details', data: { title: 'Add/Edit - Manage Users', roles: ['MANAGE_USERS'] }, diff --git a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts index 6d8d270e2..7bc4be493 100644 --- a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts +++ b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts @@ -1,117 +1,107 @@ -import { Component } from '@angular/core'; -import { OnInit } from '@angular/core'; -import { Store } from '@ngrx/store'; +import { Component } from "@angular/core"; +import { OnInit } from "@angular/core"; +import { Store } from "@ngrx/store"; import { ViewportScroller } from '@angular/common'; -import { BaseComponent } from 'src/app/components/base/base.component'; -import { UIState } from 'src/app/store/ui.states'; -import { slideAnimation } from 'src/app/animations/slide.animation'; -import {UserListInfo,UserListResponse} from 'src/app/models/user'; -import { Router } from '@angular/router'; -import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; -import { WrapperOrganisationService } from 'src/app/services/wrapper/wrapper-org-service'; -import { environment } from 'src/environments/environment'; -import { AuditLoggerService } from 'src/app/services/postgres/logger.service'; -import { SessionStorageKey } from 'src/app/constants/constant'; +import { BaseComponent } from "src/app/components/base/base.component"; +import { UIState } from "src/app/store/ui.states"; +import { FormBuilder, FormGroup, Validators } from "@angular/forms"; +import { slideAnimation } from "src/app/animations/slide.animation"; +import { User, UserGroup, UserListInfo, UserListResponse, UserProfileRequestInfo } from "src/app/models/user"; +import { WrapperUserService } from "src/app/services/wrapper/wrapper-user.service"; +import { WrapperUserContactService } from "src/app/services/wrapper/wrapper-user-contact.service"; +import { ContactPoint, UserContactInfoList } from "src/app/models/contactInfo"; +import { Router } from "@angular/router"; +import { OperationEnum } from "src/app/constants/enum"; +import { ScrollHelper } from "src/app/services/helper/scroll-helper.services"; +import { WrapperOrganisationService } from "src/app/services/wrapper/wrapper-org-service"; +import { environment } from "src/environments/environment"; +import { AuditLoggerService } from "src/app/services/postgres/logger.service"; +import { SessionStorageKey } from "src/app/constants/constant"; @Component({ - selector: 'app-manage-user-profiles', - templateUrl: './manage-user-profiles-component.html', - styleUrls: ['./manage-user-profiles-component.scss'], - animations: [ - slideAnimation({ - close: { transform: 'translateX(12.5rem)' }, - open: { left: '-12.5rem' }, - }), - ], + selector: 'app-manage-user-profiles', + templateUrl: './manage-user-profiles-component.html', + styleUrls: ['./manage-user-profiles-component.scss'], + animations: [ + slideAnimation({ + close: { 'transform': 'translateX(12.5rem)' }, + open: { left: '-12.5rem' } + }) + ] }) - export class ManageUserProfilesComponent extends BaseComponent implements OnInit { - public userList: UserListResponse; - private organisationId: string; - public searchingUserName: string = ''; - public currentPage: number = 1; - public pageCount: number = 0; - public pageSize: number = environment.listPageSize; - public usersTableHeaders = ['NAME', 'EMAIL']; - public usersColumnsToDisplay = ['name', 'userName']; - public searchSumbited: boolean = false; - - constructor( - private wrapperOrganisationService: WrapperOrganisationService, - protected uiStore: Store, - private router: Router, - protected viewportScroller: ViewportScroller, - protected scrollHelper: ScrollHelper, - private auditLogService: AuditLoggerService - ) { - super(uiStore, viewportScroller, scrollHelper); - this.organisationId = localStorage.getItem('cii_organisation_id') || ''; - this.userList = { - currentPage: this.currentPage, - pageCount: 0, - rowCount: 0, - organisationId: this.organisationId, - userList: [], - }; - sessionStorage.removeItem(SessionStorageKey.ManageUserUserName); - sessionStorage.removeItem(SessionStorageKey.OperationSuccessUserName); - } + userList: UserListResponse; + organisationId: string; + searchingUserName: string = ""; + currentPage: number = 1; + pageCount: number = 0; + pageSize: number = environment.listPageSize; + usersTableHeaders = ['NAME', 'EMAIL']; + usersColumnsToDisplay = ['name', 'userName']; + searchSumbited:boolean=false; + constructor(private wrapperOrganisationService: WrapperOrganisationService, + protected uiStore: Store, private router: Router, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, + private auditLogService: AuditLoggerService) { + super(uiStore, viewportScroller, scrollHelper); + this.organisationId = localStorage.getItem('cii_organisation_id') || ''; + this.userList = { + currentPage: this.currentPage, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [] + } + sessionStorage.removeItem(SessionStorageKey.ManageUserUserName); + sessionStorage.removeItem(SessionStorageKey.OperationSuccessUserName); + } - async ngOnInit() { - await this.auditLogService - .createLog({ - eventName: 'Access', - applicationName: 'Manage-user-account', - referenceData: `UI-Log`, - }) - .toPromise(); - this.getOrganisationUsers(); - } + async ngOnInit() { + await this.auditLogService.createLog({ + eventName: "Access", applicationName: "Manage-user-account", + referenceData: `UI-Log` + }).toPromise(); + this.getOrganisationUsers(); + } - private getOrganisationUsers(): void { - this.wrapperOrganisationService.getUsers(this.organisationId,this.searchingUserName,this.currentPage,this.pageSize) - .subscribe({ - next: (userListResponse: UserListResponse) => { - if (userListResponse != null) { - this.userList = userListResponse; - this.pageCount = this.userList.pageCount; - } - }, - error: (error: any) => {}, - }); - } + getOrganisationUsers() { + this.wrapperOrganisationService.getUsers(this.organisationId, this.searchingUserName, this.currentPage, this.pageSize).subscribe({ + next: (userListResponse: UserListResponse) => { + if (userListResponse != null) { + this.userList = userListResponse; + this.pageCount = this.userList.pageCount; + } + }, + error: (error: any) => { + } + }); + } - public onAddClick(): void { - this.router.navigateByUrl('manage-users/add-user/details'); - } + onAddClick() { + this.router.navigateByUrl("manage-users/add-user-selection"); + } - private searchTextChanged(event: any) { - this.searchingUserName = event.target.value; - } + searchTextChanged(event: any) { + this.searchingUserName = event.target.value; + } - public onSearchClick(): void { - this.searchSumbited = true; - this.currentPage = 1; - this.getOrganisationUsers(); - } + onSearchClick() { + this.searchSumbited=true + this.currentPage = 1; + this.getOrganisationUsers(); + } - public setPage(pageNumber: any): void { - this.currentPage = pageNumber; - this.getOrganisationUsers(); - } + setPage(pageNumber: any) { + this.currentPage = pageNumber; + this.getOrganisationUsers(); + } - public onEditRow(dataRow: UserListInfo): void { - console.log(dataRow); - let data = { - isEdit: true, - rowData: dataRow.userName, - }; - sessionStorage.setItem( - SessionStorageKey.ManageUserUserName, - dataRow.userName - ); - this.router.navigateByUrl( - 'manage-users/add-user/details?data=' + btoa(JSON.stringify(data)) - ); - } -} + onEditRow(dataRow: UserListInfo) { + console.log(dataRow); + let data = { + 'isEdit': true, + 'rowData':dataRow.userName + }; + sessionStorage.setItem(SessionStorageKey.ManageUserUserName, dataRow.userName); + this.router.navigateByUrl('manage-users/add-user/details?data=' + btoa(JSON.stringify(data))); + } +} \ No newline at end of file From 8670494f5af655e1d0f311e9e683d47dabb448f7 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Mon, 31 Oct 2022 19:15:43 +0530 Subject: [PATCH 08/79] 2071 auto validation UI (#831) * # * # * # * # * # * changes are updated * # * # --- src/app/app-routing.module.ts | 55 ++++++ src/app/app.module.ts | 18 +- .../govuk-table/govuk-table.component.html | 4 +- src/app/pages/home/home.component.ts | 6 +- ...buyer-both-requests-success.component.html | 28 +++ ...buyer-both-requests-success.component.scss | 16 ++ ...er-both-requests-success.component.spec.ts | 25 +++ .../buyer-both-requests-success.component.ts | 46 +++++ .../buyer-both-requests.component.html | 67 +++++++ .../buyer-both-requests.component.scss | 4 + .../buyer-both-requests.component.spec.ts | 25 +++ .../buyer-both-requests.component.ts | 173 ++++++++++++++++++ .../confirm-accept.component.html | 37 ++++ .../confirm-accept.component.scss | 4 + .../confirm-accept.component.spec.ts | 25 +++ .../confirm-accept.component.ts | 45 +++++ .../confirm-decline.component.html | 37 ++++ .../confirm-decline.component.scss | 4 + .../confirm-decline.component.spec.ts | 25 +++ .../confirm-decline.component.ts | 48 +++++ .../remove-right-to-buy.component.html | 37 ++++ .../remove-right-to-buy.component.scss | 4 + .../remove-right-to-buy.component.spec.ts | 25 +++ .../remove-right-to-buy.component.ts | 27 +++ .../success-right-to-buy.component.html | 29 +++ .../success-right-to-buy.component.scss | 12 ++ .../success-right-to-buy.component.spec.ts | 25 +++ .../success-right-to-buy.component.ts | 15 ++ .../view-pending-verification.component.html | 101 ++++++++++ .../view-pending-verification.component.scss | 12 ++ ...iew-pending-verification.component.spec.ts | 25 +++ .../view-pending-verification.component.ts | 142 ++++++++++++++ .../view-verified-org.component.html | 98 ++++++++++ .../view-verified-org.component.scss | 15 ++ .../view-verified-org.component.spec.ts | 25 +++ .../view-verified-org.component.ts | 140 ++++++++++++++ .../wrapper/wrapper-buyer-both.service.ts | 95 ++++++++++ src/index.html | 2 +- 38 files changed, 1516 insertions(+), 5 deletions(-) create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.html create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.scss create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.spec.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.scss create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.spec.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.html create mode 100644 src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.scss create mode 100644 src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.spec.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.html create mode 100644 src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.scss create mode 100644 src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.spec.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.html create mode 100644 src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.scss create mode 100644 src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.spec.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html create mode 100644 src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.scss create mode 100644 src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.spec.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.html create mode 100644 src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.scss create mode 100644 src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.spec.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.html create mode 100644 src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.scss create mode 100644 src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.spec.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.ts create mode 100644 src/app/services/wrapper/wrapper-buyer-both.service.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index c826994cf..07c7d09ca 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -125,6 +125,14 @@ import { DelegatedUserActivationComponent } from './pages/manage-delegated/landi import { DelegatedOrganisationComponent } from './pages/manage-delegated/user/delegated-organisation/delegated-organisation.component'; import { TermsConditionsComponent } from './components/terms-conditions/terms-conditions.component'; import { ForgotPasswordErrorComponent } from './pages/forgot-password-error/forgot-password-error.component'; +import { BuyerBothRequestsComponent } from './pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component'; +import { ConfirmDeclineComponent } from './pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component'; +import { BuyerBothRequestsSuccessComponent } from './pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component'; +import { ConfirmAcceptComponent } from './pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component'; +import { ViewPendingVerificationComponent } from './pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component'; +import { ViewVerifiedOrgComponent } from './pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component'; +import { RemoveRightToBuyComponent } from './pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component'; +import { SuccessRightToBuyComponent } from './pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component'; const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, @@ -1009,6 +1017,53 @@ const routes: Routes = [ pathMatch: 'full', component: DelegatedErrorComponent, }, + { + path: 'manage-buyer-both', + data: { title: 'Manage Buyer status Requests' }, + pathMatch: 'full', + component: BuyerBothRequestsComponent, + }, + { + path: 'confirm-decline', + data: { title: 'Decline right to buy status' }, + pathMatch: 'full', + component: ConfirmDeclineComponent, + }, + { + path: 'confirm-accept', + data: { title: 'Approve right to buy status' }, + pathMatch: 'full', + component: ConfirmAcceptComponent, + }, + { + path: 'pending-verification', + data: { title: 'Manage Buyer status requests - View request' }, + pathMatch: 'full', + component: ViewPendingVerificationComponent, + }, + { + path: 'verified-organisations', + data: { title: 'Manage Buyer status requests - View Buyer status for the organisation' }, + pathMatch: 'full', + component: ViewVerifiedOrgComponent, + }, + { + path: 'remove-right-to-buy', + data: { title: 'Remove right to buy status' }, + pathMatch: 'full', + component: RemoveRightToBuyComponent, + }, + { + path: 'remove-right-to-buy-success', + data: { title: 'Remove right to buy status – success' }, + pathMatch: 'full', + component: SuccessRightToBuyComponent, + }, + { + path: 'buyer-and-both-success', + pathMatch: 'full', + component: BuyerBothRequestsSuccessComponent, + }, { path: 'terms-of-use', data: { title: 'Terms of Use' }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 814e54f95..b909ac681 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -175,6 +175,14 @@ import { DelegatedUserActivationComponent } from './pages/manage-delegated/landi import { DelegatedOrganisationComponent } from './pages/manage-delegated/user/delegated-organisation/delegated-organisation.component'; import { TermsConditionsComponent } from './components/terms-conditions/terms-conditions.component'; import { ForgotPasswordErrorComponent } from './pages/forgot-password-error/forgot-password-error.component'; +import { BuyerBothRequestsComponent } from './pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component'; +import { ConfirmDeclineComponent } from './pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component'; +import { BuyerBothRequestsSuccessComponent } from './pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component'; +import { ConfirmAcceptComponent } from './pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component'; +import { ViewPendingVerificationComponent } from './pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component'; +import { ViewVerifiedOrgComponent } from './pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component'; +import { RemoveRightToBuyComponent } from './pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component'; +import { SuccessRightToBuyComponent } from './pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component'; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http); @@ -315,7 +323,15 @@ export function createTranslateLoader(http: HttpClient) { DelegatedUserActivationComponent, DelegatedOrganisationComponent, TermsConditionsComponent, - ForgotPasswordErrorComponent + ForgotPasswordErrorComponent, + BuyerBothRequestsComponent, + ConfirmDeclineComponent, + BuyerBothRequestsSuccessComponent, + ConfirmAcceptComponent, + ViewPendingVerificationComponent, + ViewVerifiedOrgComponent, + RemoveRightToBuyComponent, + SuccessRightToBuyComponent ], imports: [ // BrowserModule, diff --git a/src/app/components/govuk-table/govuk-table.component.html b/src/app/components/govuk-table/govuk-table.component.html index 23eae8651..bd1f2af41 100644 --- a/src/app/components/govuk-table/govuk-table.component.html +++ b/src/app/components/govuk-table/govuk-table.component.html @@ -20,7 +20,7 @@ ? 'navigation-text' : '' ]"> - {{ dataKey == 'endDate' ? (dataRow[dataKey] | date: 'dd/MM/yyyy') : dataRow[dataKey] }} + {{ dataKey == 'endDate' ? (dataRow[dataKey] | date: 'dd/MM/yyyy') : dataKey == 'dateofRegistration' ? (dataRow[dataKey] | date: 'dd/MM/yyyy') : dataRow[dataKey] }} @@ -29,7 +29,7 @@ diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 96aca7572..fdfd825cc 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -202,9 +202,13 @@ export class HomeComponent extends BaseComponent implements OnInit { description: 'Support for users of other organisations', route: '/org-support/search', }); + this.otherModules.push({ + name: 'Manage Buyer status requests', + description: 'Verify and approve or decline Buyer status requests', + route: '/manage-buyer-both', + }); } } - } getModuleElementId(moduleName: string) { diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.html b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.html new file mode 100644 index 000000000..fae05b78e --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.html @@ -0,0 +1,28 @@ +
+
+ +
\ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.scss b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.scss new file mode 100644 index 000000000..0508548eb --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.scss @@ -0,0 +1,16 @@ +.header-bread-align { + margin-bottom: 30px !important; + margin-top: 30px !important; + } + .header-bread-align { + margin-bottom: 30px !important; + margin-top: 30px !important; + } + .navigation-text{ + margin-bottom: 100px; + font-size: 19px; + color: #005ea5; +} +a { + text-decoration: underline; +} \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.spec.ts b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.spec.ts new file mode 100644 index 000000000..39d278eef --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BuyerBothRequestsSuccessComponent } from './buyer-both-requests-success.component'; + +describe('BuyerBothRequestsSuccessComponent', () => { + let component: BuyerBothRequestsSuccessComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ BuyerBothRequestsSuccessComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(BuyerBothRequestsSuccessComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.ts b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.ts new file mode 100644 index 000000000..6504bbe46 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component.ts @@ -0,0 +1,46 @@ +import { Component, OnInit } from '@angular/core'; +import { Title } from '@angular/platform-browser'; +import { ActivatedRoute, Router } from '@angular/router'; + +@Component({ + selector: 'app-buyer-both-requests-success', + templateUrl: './buyer-both-requests-success.component.html', + styleUrls: ['./buyer-both-requests-success.component.scss'], +}) +export class BuyerBothRequestsSuccessComponent implements OnInit { + public routeDetails:any; + constructor(private route: ActivatedRoute, private router: Router, private titleService: Title) { + this.route.queryParams.subscribe((para: any) => { + this.routeDetails = JSON.parse(atob(para.data)); + console.log("this.routeDetails",this.routeDetails) + switch (this.routeDetails.status) { + case "accept": { + this.titleService.setTitle( + `${ 'Accept right to buy status – success' } - CCS` + ); + break; + } + case 'decline': { + this.titleService.setTitle( + `${ 'Decline right to buy status – success' } - CCS` + ); + break; + } + default: { + //statements; + break; + } + } + }); + } + + ngOnInit(): void {} + + public returnToRequests() { + this.router.navigateByUrl('manage-buyer-both'); + } + + public returnToDashBoard() { + this.router.navigateByUrl('home'); + } +} diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html new file mode 100644 index 000000000..af74ed29f --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html @@ -0,0 +1,67 @@ +
+
+ +
+
+ \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.scss b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.scss new file mode 100644 index 000000000..7ff372e4b --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.scss @@ -0,0 +1,4 @@ +.header-bread-align { + margin-bottom: 30px !important; + margin-top: 30px !important; + } \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.spec.ts b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.spec.ts new file mode 100644 index 000000000..bff1ec627 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BuyerBothRequestsComponent } from './buyer-both-requests.component'; + +describe('BuyerBothRequestsComponent', () => { + let component: BuyerBothRequestsComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ BuyerBothRequestsComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(BuyerBothRequestsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.ts b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.ts new file mode 100644 index 000000000..2b52197e1 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.ts @@ -0,0 +1,173 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { UserListResponse } from 'src/app/models/user'; +import { WrapperBuyerBothService } from 'src/app/services/wrapper/wrapper-buyer-both.service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-buyer-both-requests', + templateUrl: './buyer-both-requests.component.html', + styleUrls: ['./buyer-both-requests.component.scss'], +}) +export class BuyerBothRequestsComponent implements OnInit { + public searchText: string = ''; + public searchSumbited: boolean = false; + public tabConfig = { + pendingOrg: true, + verifiedOrg: false, + }; + private organisationId: string = ''; + public pendingVerificationBuyerAndBoth: any = { + currentPage: 1, + pageCount: 0, + pageSize: environment.listPageSize, + usersTableHeaders: ['Organisation name ', 'Organisation type ', 'Date of registration'], + usersColumnsToDisplay: [ + 'organisatioName', + 'organisationType', + 'dateofRegistration', + ], + userList: '', + pageName: 'Contactadmin', + hyperTextrray: ['Decline', 'Accept', 'View'], + }; + + public verifiedBuyerAndBoth: any = { + currentPage: 1, + pageCount: 0, + pageSize: environment.listPageSize, + usersTableHeaders: ['Organisation name ', 'Organisation type ', 'Date of registration'], + usersColumnsToDisplay: [ + 'organisatioName', + 'organisationType', + 'dateofRegistration', + ], + userList: '', + pageName: 'Contactadmin', + hyperTextrray: ['View'], + }; + constructor( + private router: Router, + private wrapperBuyerAndBothService:WrapperBuyerBothService, + ) { + this.organisationId = localStorage.getItem('cii_organisation_id') || ''; + this.pendingVerificationBuyerAndBoth.userList = { + currentPage: this.pendingVerificationBuyerAndBoth.currentPage, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }; + this.verifiedBuyerAndBoth.userList = { + currentPage: this.pendingVerificationBuyerAndBoth.currentPage, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }; + } + + ngOnInit() { + this.tabChanged(sessionStorage.getItem('activetab') || 'pendingOrg'); + this.getPendingVerificationOrg(); + } + + public onSearchClick(): void { + this.searchSumbited = true; + this.getPendingVerificationOrg(); + } + + public onLinkClick(data: any): void { + if (data.event.target.innerText === 'Decline') { + this.router.navigateByUrl( + 'confirm-decline?data=' + btoa(JSON.stringify(data)) + ); + } else if (data.event.target.innerText === 'Accept') { + this.router.navigateByUrl( + 'confirm-accept?data=' + btoa(JSON.stringify(data)) + ); + } else { + this.router.navigateByUrl( + 'pending-verification?data=' + btoa(JSON.stringify(data)) + ); + } + } + + public OnClickView(event: any) { + let data = { + header: 'View expired delegated access', + Description: '', + Breadcrumb: 'View expired delegated access', + status: '003', + event: event, + }; + this.router.navigateByUrl( + 'verified-organisations?data=' + btoa(JSON.stringify(data)) + ); + } + + setPagecurrentUsers(pageNumber: any) { + this.pendingVerificationBuyerAndBoth.currentPage = pageNumber; + this.getPendingVerificationOrg(); + } + + setPageexpiredUsers(pageNumber: any) { + this.verifiedBuyerAndBoth.currentPage = pageNumber; + this.geVerifiedOrg(); + } + + getPendingVerificationOrg() { + this.wrapperBuyerAndBothService.getpendingVerificationOrg( + this.organisationId, + this.searchText, + this.pendingVerificationBuyerAndBoth.currentPage, + this.pendingVerificationBuyerAndBoth.pageSize + ).subscribe({ + next: (userListResponse: UserListResponse) => { + if (userListResponse != null) { + this.pendingVerificationBuyerAndBoth.userList = userListResponse; + this.pendingVerificationBuyerAndBoth.pageCount = + this.pendingVerificationBuyerAndBoth.userList.pageCount; + } + this.geVerifiedOrg() + }, + error: (error: any) => { + // this.router.navigateByUrl('delegated-error'); + }, + }); + } + + geVerifiedOrg() { + this.wrapperBuyerAndBothService.getVerifiedOrg( + this.organisationId, + this.searchText, + this.verifiedBuyerAndBoth.currentPage, + this.verifiedBuyerAndBoth.pageSize + ).subscribe({ + next: (userListResponse: UserListResponse) => { + if (userListResponse != null) { + this.verifiedBuyerAndBoth.userList = userListResponse; + this.verifiedBuyerAndBoth.pageCount = + this.verifiedBuyerAndBoth.userList.pageCount; + } + }, + error: (error: any) => { + this.router.navigateByUrl('delegated-error'); + }, + }); + } + + public tabChanged(activetab: string): void { + if (activetab === 'verifiedOrg') { + this.tabConfig.pendingOrg = false; + this.tabConfig.verifiedOrg = true; + } else { + this.tabConfig.pendingOrg = true; + this.tabConfig.verifiedOrg = false; + } + } + + ngOnDestroy(): void { + sessionStorage.removeItem('activetab'); + } +} diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.html b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.html new file mode 100644 index 000000000..03744952e --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.html @@ -0,0 +1,37 @@ +
+
+ +
\ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.scss b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.scss new file mode 100644 index 000000000..7ff372e4b --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.scss @@ -0,0 +1,4 @@ +.header-bread-align { + margin-bottom: 30px !important; + margin-top: 30px !important; + } \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.spec.ts b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.spec.ts new file mode 100644 index 000000000..223a9d2fa --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmAcceptComponent } from './confirm-accept.component'; + +describe('ConfirmAcceptComponent', () => { + let component: ConfirmAcceptComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ConfirmAcceptComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfirmAcceptComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.ts b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.ts new file mode 100644 index 000000000..458cfbfd5 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.ts @@ -0,0 +1,45 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; + +@Component({ + selector: 'app-confirm-accept', + templateUrl: './confirm-accept.component.html', + styleUrls: ['./confirm-accept.component.scss'] +}) +export class ConfirmAcceptComponent implements OnInit { + + private organisationId: string; + + constructor(private route: ActivatedRoute, private router: Router) { + this.organisationId = localStorage.getItem('cii_organisation_id') || ''; + } + + ngOnInit(): void { + this.route.queryParams.subscribe((para: any) => { + let RouteData = JSON.parse(atob(para.data)); + }); + } + + public confirm(): void { + // let UserSelectedinfo:any; + // this.DelegatedService.createDelegatedUser(UserSelectedinfo).subscribe({ + // next: (roleListResponse: any) => { + // this.router.navigateByUrl('buyer-and-both-success'); + // }, + // error: (error: any) => { + // this.route.navigateByUrl('delegated-error') + // }, + // }); + let data = { + status: 'accept', + }; + this.router.navigateByUrl( + 'buyer-and-both-success?data=' + btoa(JSON.stringify(data)) + ); + } + + public Back(): void { + window.history.back(); + } + +} diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.html b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.html new file mode 100644 index 000000000..84a41b2c0 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.html @@ -0,0 +1,37 @@ +
+
+ +
\ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.scss b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.scss new file mode 100644 index 000000000..7ff372e4b --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.scss @@ -0,0 +1,4 @@ +.header-bread-align { + margin-bottom: 30px !important; + margin-top: 30px !important; + } \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.spec.ts b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.spec.ts new file mode 100644 index 000000000..fec4712f4 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmDeclineComponent } from './confirm-decline.component'; + +describe('ConfirmDeclineComponent', () => { + let component: ConfirmDeclineComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ConfirmDeclineComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfirmDeclineComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.ts b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.ts new file mode 100644 index 000000000..0759e3893 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.ts @@ -0,0 +1,48 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { Title } from '@angular/platform-browser'; +import { ActivatedRoute, Router } from '@angular/router'; +import { Role } from 'src/app/models/organisationGroup'; +import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; +import { WrapperUserDelegatedService } from 'src/app/services/wrapper/wrapper-user-delegated.service'; + +@Component({ + selector: 'app-confirm-decline', + templateUrl: './confirm-decline.component.html', + styleUrls: ['./confirm-decline.component.scss'], +}) +export class ConfirmDeclineComponent implements OnInit { + private organisationId: string; + + constructor(private route: ActivatedRoute, private router: Router) { + this.organisationId = localStorage.getItem('cii_organisation_id') || ''; + } + + ngOnInit(): void { + this.route.queryParams.subscribe((para: any) => { + let RouteData = JSON.parse(atob(para.data)); + }); + } + + public confirmAndDecline(): void { + // let UserSelectedinfo:any; + // this.DelegatedService.createDelegatedUser(UserSelectedinfo).subscribe({ + // next: (roleListResponse: any) => { + // this.router.navigateByUrl('buyer-and-both-success'); + // }, + // error: (error: any) => { + // this.route.navigateByUrl('delegated-error') + // }, + // }); + let data = { + status: 'decline', + }; + this.router.navigateByUrl( + 'buyer-and-both-success?data=' + btoa(JSON.stringify(data)) + ); + } + + public Back(): void { + window.history.back(); + } +} diff --git a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.html b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.html new file mode 100644 index 000000000..f7ecf0582 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.html @@ -0,0 +1,37 @@ +
+
+ +
\ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.scss b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.scss new file mode 100644 index 000000000..7ff372e4b --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.scss @@ -0,0 +1,4 @@ +.header-bread-align { + margin-bottom: 30px !important; + margin-top: 30px !important; + } \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.spec.ts b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.spec.ts new file mode 100644 index 000000000..538ceb476 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RemoveRightToBuyComponent } from './remove-right-to-buy.component'; + +describe('RemoveRightToBuyComponent', () => { + let component: RemoveRightToBuyComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ RemoveRightToBuyComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(RemoveRightToBuyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts new file mode 100644 index 000000000..e7f53170a --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; + +@Component({ + selector: 'app-remove-right-to-buy', + templateUrl: './remove-right-to-buy.component.html', + styleUrls: ['./remove-right-to-buy.component.scss'] +}) +export class RemoveRightToBuyComponent implements OnInit { + + constructor(private router:Router) { } + + ngOnInit(): void { + } + + public Back():void { + window.history.back(); + } + public confirm(){ + let data = { + status: 'remove', + }; + this.router.navigateByUrl( + 'remove-right-to-buy-success?data=' + btoa(JSON.stringify(data)) + ); + } +} diff --git a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html new file mode 100644 index 000000000..731bb2929 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html @@ -0,0 +1,29 @@ +
+
+ +
+
\ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.scss b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.scss new file mode 100644 index 000000000..4bb89446c --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.scss @@ -0,0 +1,12 @@ +.header-bread-align { + margin-bottom: 30px !important; + margin-top: 30px !important; + } + .navigation-text{ + margin-bottom: 100px; + font-size: 19px; + color: #005ea5; +} +a { + text-decoration: underline; +} \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.spec.ts b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.spec.ts new file mode 100644 index 000000000..3f6b0a307 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SuccessRightToBuyComponent } from './success-right-to-buy.component'; + +describe('SuccessRightToBuyComponent', () => { + let component: SuccessRightToBuyComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ SuccessRightToBuyComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(SuccessRightToBuyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.ts b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.ts new file mode 100644 index 000000000..131cf528e --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-success-right-to-buy', + templateUrl: './success-right-to-buy.component.html', + styleUrls: ['./success-right-to-buy.component.scss'] +}) +export class SuccessRightToBuyComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} 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 new file mode 100644 index 000000000..ccb50956f --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.html @@ -0,0 +1,101 @@ +
+
+ +
\ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.scss b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.scss new file mode 100644 index 000000000..fe6cca1ea --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.scss @@ -0,0 +1,12 @@ +.header-bread-align { + margin-bottom: 30px !important; + margin-top: 30px !important; + } + .remove_element { + color: transparent; +} + +.navigation-text{ + text-decoration: underline; + color: #005ea5; +} \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.spec.ts b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.spec.ts new file mode 100644 index 000000000..e460381fa --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ViewPendingVerificationComponent } from './view-pending-verification.component'; + +describe('ViewPendingVerificationComponent', () => { + let component: ViewPendingVerificationComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ViewPendingVerificationComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ViewPendingVerificationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 000000000..7eee5f0be --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.ts @@ -0,0 +1,142 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-view-pending-verification', + templateUrl: './view-pending-verification.component.html', + styleUrls: ['./view-pending-verification.component.scss'], +}) +export class ViewPendingVerificationComponent implements OnInit { + private organisationId: string = ''; + pageName = 'Contactadmin'; + public organisationAdministrator = { + usersTableHeaders: ['Name', 'Email address', 'Role'], + usersColumnsToDisplay: ['name', 'email', 'role'], + currentPage: 1, + pageCount: 0, + pageSize: environment.listPageSize, + userListResponse: { + currentPage: 0, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }, + }; + + public eventLog = { + usersTableHeaders: ['Owner', 'Event', 'Date'], + usersColumnsToDisplay: ['name', 'email', 'role'], + currentPage: 1, + pageCount: 0, + pageSize: environment.listPageSize, + userListResponse: { + currentPage: 0, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }, + }; + + constructor( + private WrapperOrganisationGroupService: WrapperOrganisationGroupService,private router:Router + ) { + this.organisationId = localStorage.getItem('cii_organisation_id') || ''; + this.organisationAdministrator.userListResponse = { + currentPage: this.organisationAdministrator.currentPage, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }; + this.eventLog.userListResponse = { + currentPage: this.eventLog.currentPage, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }; + } + + ngOnInit() { + this.getOrganisationUsers(); + } + + public openEmailWindow(data: any): void { + let AdminEmail = 'mailto:' + data.userName; + window.location.href = AdminEmail; + } + + public getOrganisationUsers() { + this.WrapperOrganisationGroupService.getUsersAdmin( + this.organisationId, + this.organisationAdministrator.currentPage, + this.organisationAdministrator.pageSize + ).subscribe({ + next: (response: any) => { + if (response != null) { + this.organisationAdministrator.userListResponse = response; + this.organisationAdministrator.userListResponse.userList.forEach( + (f: any) => { + f.role = 'Admin'; + f.email = f.userName; // the common component expect the field as email + } + ); + this.organisationAdministrator.pageCount = + this.organisationAdministrator.userListResponse.pageCount; + this.getEventLogDetails() + + } + }, + error: (error: any) => {}, + }); + } + + public setPageOrganisationAdministrator(pageNumber: any) { + this.organisationAdministrator.currentPage = pageNumber; + this.getOrganisationUsers(); + } + + public getEventLogDetails():void{ + this.WrapperOrganisationGroupService.getUsersAdmin( + this.organisationId, + this.eventLog.currentPage, + this.eventLog.pageSize + ).subscribe({ + next: (response: any) => { + if (response != null) { + this.eventLog.userListResponse = response; + this.eventLog.userListResponse.userList.forEach( + (f: any) => { + f.role = 'Admin'; + f.email = f.userName; // the common component expect the field as email + } + ); + this.eventLog.pageCount = + this.eventLog.userListResponse.pageCount; + } + }, + error: (error: any) => {}, + }); + } + + goBack() { + window.history.back(); + } + + public acceptRightToBuy(){ + let data = {} + this.router.navigateByUrl( + 'confirm-accept?data=' + btoa(JSON.stringify(data)) + ); + } + public declineRightToBuy(){ + let data = {} + this.router.navigateByUrl( + 'confirm-decline?data=' + btoa(JSON.stringify(data)) + ); + } +} 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 new file mode 100644 index 000000000..36d34eef8 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.html @@ -0,0 +1,98 @@ +
+
+ +
\ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.scss b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.scss new file mode 100644 index 000000000..1ca27997d --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.scss @@ -0,0 +1,15 @@ +.header-bread-align { + margin-bottom: 30px !important; + margin-top: 30px !important; + } + .remove_element { + color: transparent; +} + +.navigation-text{ + text-decoration: underline; + color: #005ea5; +} +a { + text-decoration: underline; +} \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.spec.ts b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.spec.ts new file mode 100644 index 000000000..9d0dfb697 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ViewVerifiedOrgComponent } from './view-verified-org.component'; + +describe('ViewVerifiedOrgComponent', () => { + let component: ViewVerifiedOrgComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ViewVerifiedOrgComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ViewVerifiedOrgComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 000000000..30f1b6c19 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.ts @@ -0,0 +1,140 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-view-verified-org', + templateUrl: './view-verified-org.component.html', + styleUrls: ['./view-verified-org.component.scss'] +}) +export class ViewVerifiedOrgComponent implements OnInit { + private organisationId: string = ''; + pageName = 'Contactadmin'; + public organisationAdministrator = { + usersTableHeaders: ['Name', 'Email address', 'Role'], + usersColumnsToDisplay: ['name', 'email', 'role'], + currentPage: 1, + pageCount: 0, + pageSize: environment.listPageSize, + userListResponse: { + currentPage: 0, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }, + }; + + public eventLog = { + usersTableHeaders: ['Owner', 'Event', 'Date'], + usersColumnsToDisplay: ['name', 'email', 'role'], + currentPage: 1, + pageCount: 0, + pageSize: environment.listPageSize, + userListResponse: { + currentPage: 0, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }, + }; + + constructor( + private WrapperOrganisationGroupService: WrapperOrganisationGroupService, + private router:Router + ) { + this.organisationId = localStorage.getItem('cii_organisation_id') || ''; + this.organisationAdministrator.userListResponse = { + currentPage: this.organisationAdministrator.currentPage, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }; + this.eventLog.userListResponse = { + currentPage: this.eventLog.currentPage, + pageCount: 0, + rowCount: 0, + organisationId: this.organisationId, + userList: [], + }; + } + + ngOnInit() { + this.getOrganisationUsers(); + } + + public openEmailWindow(data: any): void { + let AdminEmail = 'mailto:' + data.userName; + window.location.href = AdminEmail; + } + + public getOrganisationUsers() { + this.WrapperOrganisationGroupService.getUsersAdmin( + this.organisationId, + this.organisationAdministrator.currentPage, + this.organisationAdministrator.pageSize + ).subscribe({ + next: (response: any) => { + if (response != null) { + this.organisationAdministrator.userListResponse = response; + this.organisationAdministrator.userListResponse.userList.forEach( + (f: any) => { + f.role = 'Admin'; + f.email = f.userName; // the common component expect the field as email + } + ); + this.organisationAdministrator.pageCount = + this.organisationAdministrator.userListResponse.pageCount; + this.getEventLogDetails() + + } + }, + error: (error: any) => {}, + }); + } + + public setPageOrganisationAdministrator(pageNumber: any) { + this.organisationAdministrator.currentPage = pageNumber; + this.getOrganisationUsers(); + } + + public getEventLogDetails():void{ + this.WrapperOrganisationGroupService.getUsersAdmin( + this.organisationId, + this.eventLog.currentPage, + this.eventLog.pageSize + ).subscribe({ + next: (response: any) => { + if (response != null) { + this.eventLog.userListResponse = response; + this.eventLog.userListResponse.userList.forEach( + (f: any) => { + f.role = 'Admin'; + f.email = f.userName; // the common component expect the field as email + } + ); + this.eventLog.pageCount = + this.eventLog.userListResponse.pageCount; + } + }, + error: (error: any) => {}, + }); + } + + + public removeRightToBuy():void{ + let data = { + id:'123456' + } + this.router.navigateByUrl( + 'remove-right-to-buy?data=' + btoa(JSON.stringify(data)) + ); + } + goBack() { + sessionStorage.setItem('activetab','verifiedOrg') + window.history.back(); + } +} diff --git a/src/app/services/wrapper/wrapper-buyer-both.service.ts b/src/app/services/wrapper/wrapper-buyer-both.service.ts new file mode 100644 index 000000000..f9400c467 --- /dev/null +++ b/src/app/services/wrapper/wrapper-buyer-both.service.ts @@ -0,0 +1,95 @@ +import { HttpClient, HttpHeaders } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable, throwError } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; +import { delegateduser } from 'src/app/models/delegated.model'; +import { UserListResponse } from 'src/app/models/user'; +import { environment } from 'src/environments/environment'; + + +@Injectable({ + providedIn: 'root' +}) +export class WrapperBuyerBothService { + private org=`${environment.uri.api.isApiGateWayEnabled ? + environment.uri.api.wrapper.apiGatewayEnabled.organisation : environment.uri.api.wrapper.apiGatewayDisabled.organisation}`; + private users=`${environment.uri.api.isApiGateWayEnabled ? + environment.uri.api.wrapper.apiGatewayEnabled.user : environment.uri.api.wrapper.apiGatewayDisabled.user}` + + + constructor(private http: HttpClient) { } + + + public pendingVerification = { + "organisationId": "474281654063910288", + "userList": [ + { + organisatioName : "Dreams Tech", + organisationType : "buyer", + dateofRegistration: "2022-10-11T00:00:00" + }, + { + organisatioName : "Dreams Guys", + organisationType : "Both", + dateofRegistration: "2022-10-11T00:00:00" + }, + { + organisatioName: "Brickendon", + organisationType: "Both", + dateofRegistration: "2022-10-11T00:00:00" + } + ], + "currentPage": 1, + "pageCount": 1, + "rowCount": 1 + } + + public VerifiedOrg = { + "organisationId": "474281654063910288", + "userList": [ + { + organisatioName : "srishit innovative", + organisationType : "buyer", + dateofRegistration: "2022-10-11T00:00:00" + }, + { + organisatioName : "sunvis softwares", + organisationType : "Both", + dateofRegistration: "2022-10-11T00:00:00" + }, + { + organisatioName: "rounds edge", + organisationType: "Both", + dateofRegistration: "2022-10-11T00:00:00" + } + ], + "currentPage": 1, + "pageCount": 1, + "rowCount": 1 + } + + getpendingVerificationOrg(organisationId: string, searchString: string, currentPage: number, pageSize: number, includeSelf: boolean = false): Observable { + pageSize = pageSize <= 0 ? 10 : pageSize; + const url = `${this.org}/${organisationId}/users?currentPage=${currentPage}&pageSize=${pageSize}&search-string=${encodeURIComponent(searchString)}&include-self=${includeSelf}&delegated-only=${true}&delegated-expired-only=${false}`; + return this.http.get(url).pipe( + map((data: UserListResponse) => { + return this.pendingVerification + }), catchError(error => { + return throwError(error); + }) + ); + } + + getVerifiedOrg(organisationId: string, searchString: string, currentPage: number, pageSize: number, includeSelf: boolean = false): Observable { + pageSize = pageSize <= 0 ? 10 : pageSize; + const url = `${this.org}/${organisationId}/users?currentPage=${currentPage}&pageSize=${pageSize}&search-string=${encodeURIComponent(searchString)}&include-self=${includeSelf}&delegated-only=${true}&delegated-expired-only=${false}`; + return this.http.get(url).pipe( + map((data: UserListResponse) => { + return this.VerifiedOrg + }), catchError(error => { + return throwError(error); + }) + ); + } + +} diff --git a/src/index.html b/src/index.html index 80a515be5..0c56f7b9f 100644 --- a/src/index.html +++ b/src/index.html @@ -354,4 +354,4 @@ - + \ No newline at end of file From 9fbd68ce87fe42ecb52be2ab2e29400e735eb805 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Wed, 2 Nov 2022 15:08:55 +0530 Subject: [PATCH 09/79] auth guard and role guard update --- src/app/app-routing.module.ts | 25 +++++++++++++------ .../buyer/confirm/confirm.component.html | 2 +- src/app/pages/home/home.component.ts | 10 ++++---- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 07c7d09ca..005517db5 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1019,49 +1019,60 @@ const routes: Routes = [ }, { path: 'manage-buyer-both', - data: { title: 'Manage Buyer status Requests' }, + data: { title: 'Manage Buyer status Requests',roles: ['MANAGE_SUBSCRIPTIONS'] }, pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], component: BuyerBothRequestsComponent, }, { path: 'confirm-decline', - data: { title: 'Decline right to buy status' }, + data: { title: 'Decline right to buy status', + roles: ['MANAGE_SUBSCRIPTIONS'] }, pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], component: ConfirmDeclineComponent, + }, { path: 'confirm-accept', - data: { title: 'Approve right to buy status' }, + data: { title: 'Approve right to buy status',roles: ['MANAGE_SUBSCRIPTIONS'] }, pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], component: ConfirmAcceptComponent, }, { path: 'pending-verification', - data: { title: 'Manage Buyer status requests - View request' }, + data: { title: 'Manage Buyer status requests - View request',roles: ['MANAGE_SUBSCRIPTIONS'] }, pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], component: ViewPendingVerificationComponent, }, { path: 'verified-organisations', - data: { title: 'Manage Buyer status requests - View Buyer status for the organisation' }, + data: { title: 'Manage Buyer status requests - View Buyer status for the organisation' ,roles: ['MANAGE_SUBSCRIPTIONS']}, pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], component: ViewVerifiedOrgComponent, }, { path: 'remove-right-to-buy', - data: { title: 'Remove right to buy status' }, + data: { title: 'Remove right to buy status',roles: ['MANAGE_SUBSCRIPTIONS'] }, pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], component: RemoveRightToBuyComponent, }, { path: 'remove-right-to-buy-success', - data: { title: 'Remove right to buy status – success' }, + data: { title: 'Remove right to buy status – success',roles: ['MANAGE_SUBSCRIPTIONS'] }, pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], component: SuccessRightToBuyComponent, }, { path: 'buyer-and-both-success', pathMatch: 'full', + data: { roles: ['MANAGE_SUBSCRIPTIONS'] }, + canActivate: [AuthGuard, RoleGuard], component: BuyerBothRequestsSuccessComponent, }, { diff --git a/src/app/pages/buyer/confirm/confirm.component.html b/src/app/pages/buyer/confirm/confirm.component.html index b9f6e5afd..34dca0352 100644 --- a/src/app/pages/buyer/confirm/confirm.component.html +++ b/src/app/pages/buyer/confirm/confirm.component.html @@ -25,7 +25,7 @@

- Is this organisation a verified buyer for CCS? + Update organisation type
diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index fdfd825cc..ea8850d6b 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -190,6 +190,11 @@ export class HomeComponent extends BaseComponent implements OnInit { route: '/buyer/search', }); } + this.otherModules.push({ + name: 'Manage Buyer status requests', + description: 'Verify and approve or decline Buyer status requests', + route: '/manage-buyer-both', + }); } if (e.permissionName === 'ORG_USER_SUPPORT') { if ( @@ -202,11 +207,6 @@ export class HomeComponent extends BaseComponent implements OnInit { description: 'Support for users of other organisations', route: '/org-support/search', }); - this.otherModules.push({ - name: 'Manage Buyer status requests', - description: 'Verify and approve or decline Buyer status requests', - route: '/manage-buyer-both', - }); } } } From d326254e5100830373e64d9f431cdb8cbe7a657e Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 2 Nov 2022 21:04:08 +0530 Subject: [PATCH 10/79] 3046 issues fixed (#836) * 3046 issues fixed * environment changes updated --- .../manage-organisation-profile.component.html | 4 ++-- .../manage-organisation-profile.component.ts | 1 + ...nage-user-add-single-user-detail.component.html | 4 ++-- ...manage-user-add-single-user-detail.component.ts | 2 ++ .../pages/user-profile/user-profile-component.ts | 7 ++++++- .../wrapper/wrapper-configuration.service.ts | 14 +++++++++----- src/environments/environment.ts | 4 +++- 7 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.html b/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.html index af7eff2c9..f684ea366 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.html @@ -51,8 +51,8 @@

{{ 'BUYER_SUPPLIER_TYPE' | translate }}

{{ 'SIGN_IN_PROVIDER'| translate }}
- A sign in provider gives users the option to use a different service to sign in. Sign in providers are set at an - organisational level. Any updates applied here will apply to all of your organisation’s users + {{ idpStatus == false ? 'A sign in provider gives users the option to use a different service to sign in. Sign in providers are set at an + organisational level. Any updates applied here will apply to all of your organisation’s users' : (idpStatus == true ? 'Users can only use a User ID and password to sign in. You may be able to allow additional sign-in methods in the future.' : '')}}
{{ 'ERROR_PREFIX' | translate }} 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 bf1287a20..d0e7c6668 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 @@ -45,6 +45,7 @@ export class ManageOrganisationProfileComponent extends BaseComponent implements changedIdpList: { id: number, enabled: boolean, connectionName: string, name: string }[] = []; ccsContactUrl: string = environment.uri.ccsContactUrl; schemeData: any[] = []; + public idpStatus = environment.appSetting.hideIDP public detailsData: any = [ 'Send messages to multiple contacts in your organisation. You can also send targeted communications to specific users.', "Manage information about your organisation's specific business locations. For instance, you can add details about your head office and additional sites to organise deliveries.", diff --git a/src/app/pages/manage-user/manage-user-add-single-user-detail/manage-user-add-single-user-detail.component.html b/src/app/pages/manage-user/manage-user-add-single-user-detail/manage-user-add-single-user-detail.component.html index 65dbef49a..54cc26f9c 100644 --- a/src/app/pages/manage-user/manage-user-add-single-user-detail/manage-user-add-single-user-detail.component.html +++ b/src/app/pages/manage-user/manage-user-add-single-user-detail/manage-user-add-single-user-detail.component.html @@ -291,9 +291,9 @@

{{ 'SIGN_IN_PROVIDER'| translate }} 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 b6b2dd484..7bfd5a997 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 @@ -27,6 +27,7 @@ import { FormBaseComponent } from 'src/app/components/form-base/form-base.compon import { SessionStorageKey } from 'src/app/constants/constant'; import { PatternService } from 'src/app/shared/pattern.service'; import { WrapperConfigurationService } from 'src/app/services/wrapper/wrapper-configuration.service'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-manage-user-add-single-user-detail', @@ -53,6 +54,7 @@ export class ManageUserAddSingleUserDetailComponent state: any; hasGroupViewPermission: boolean = false; mfaAdminValidationError: boolean = false; + public idpStatus = environment.appSetting.hideIDP public detailsData: any = [ 'Add additional security steps to make an account more secure. Additional security needs to be enabled for all admin users. This can be accessed using a personal or work digital device.', 'Groups allow you to manage large numbers of users all at once. Roles can be applied to groups to organise user’s more efficiently and allow bulk access to relevant services where it is required.', diff --git a/src/app/pages/user-profile/user-profile-component.ts b/src/app/pages/user-profile/user-profile-component.ts index 9bead56b7..99ad44381 100644 --- a/src/app/pages/user-profile/user-profile-component.ts +++ b/src/app/pages/user-profile/user-profile-component.ts @@ -23,6 +23,7 @@ import { FormBaseComponent } from 'src/app/components/form-base/form-base.compon import { SessionStorageKey } from 'src/app/constants/constant'; import { PatternService } from 'src/app/shared/pattern.service'; import { isBoolean } from 'lodash'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-user-profile', @@ -116,10 +117,14 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { let user = await this.userService.getUser(this.userName).toPromise(); if (user != null) { this.canChangePassword = user.detail.canChangePassword; - this.identityProviderDisplayName = + if(!environment.appSetting.hideIDP){ + this.identityProviderDisplayName = user.detail.identityProviders ?.map((idp) => idp.identityProviderDisplayName) .join(',') || ''; + }else { + this.identityProviderDisplayName = 'User ID and password' + } this.userGroups = user.detail.userGroups || []; this.userGroups = this.userGroups.filter( (group, index, self) => diff --git a/src/app/services/wrapper/wrapper-configuration.service.ts b/src/app/services/wrapper/wrapper-configuration.service.ts index aefd1a2d6..9976fc80c 100644 --- a/src/app/services/wrapper/wrapper-configuration.service.ts +++ b/src/app/services/wrapper/wrapper-configuration.service.ts @@ -31,12 +31,16 @@ export class WrapperConfigurationService { const url = `${this.url}/identity-providers`; return this.http.get(url, this.options).pipe( map((data: IdentityProvider[]) => { + if(environment.appSetting.hideIDP){ data.map((f: IdentityProvider) => { - if (f.name === 'User ID and password') { - tempData.push(f) - } - }) - return tempData; + if (f.name === 'User ID and password') { + tempData.push(f) + } + }) + return tempData; + } else { + return data + } }), catchError(error => { return throwError(error); }) diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 225fa422e..04e80aaef 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -59,5 +59,7 @@ export const environment = { __cf_bm : 30 }, }, + appSetting: { + hideIDP:true, + }, }; - From 8d68605285941071ba1657c3cae155d7c8a0381e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Nov 2022 11:05:31 +0530 Subject: [PATCH 11/79] p2sprint16 dev release --- src/environments/environment-development.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/environments/environment-development.ts b/src/environments/environment-development.ts index e9a300a96..22d1fa7d4 100644 --- a/src/environments/environment-development.ts +++ b/src/environments/environment-development.ts @@ -63,4 +63,7 @@ export const environment = { __cf_bm: 30 }, }, + appSetting: { + hideIDP:true, + }, }; From 777861b872f02f4835bc4299198299261af59091 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 3 Nov 2022 13:24:20 +0530 Subject: [PATCH 12/79] Update environment-development.ts --- src/environments/environment-development.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/environments/environment-development.ts b/src/environments/environment-development.ts index e9a300a96..f029bf981 100644 --- a/src/environments/environment-development.ts +++ b/src/environments/environment-development.ts @@ -63,4 +63,7 @@ export const environment = { __cf_bm: 30 }, }, + appSetting: { + hideIDP:true, + }, }; From add7f5ecbdda88911163463856ab3981333f829e Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 3 Nov 2022 13:24:49 +0530 Subject: [PATCH 13/79] Update environment-development.ts --- src/environments/environment-development.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/environments/environment-development.ts b/src/environments/environment-development.ts index f029bf981..e9a300a96 100644 --- a/src/environments/environment-development.ts +++ b/src/environments/environment-development.ts @@ -63,7 +63,4 @@ export const environment = { __cf_bm: 30 }, }, - appSetting: { - hideIDP:true, - }, }; From 58fc0d15d4ced3245900a12e63652a8c6b207ad4 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 3 Nov 2022 13:25:22 +0530 Subject: [PATCH 14/79] Update environment-testing.ts --- src/environments/environment-testing.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/environments/environment-testing.ts b/src/environments/environment-testing.ts index 05317fc3f..2b9d44f68 100644 --- a/src/environments/environment-testing.ts +++ b/src/environments/environment-testing.ts @@ -60,5 +60,8 @@ export const environment = { auth0: 3, __cf_bm: 30 }, - } + }, + appSetting: { + hideIDP:true, + }, }; From f88caf56fc94d3344899fdb38d59d492aeb9b455 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 3 Nov 2022 13:40:37 +0530 Subject: [PATCH 15/79] Update nginx.conf --- nginx.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index a90dfbbbc..cd83d5172 100644 --- a/nginx.conf +++ b/nginx.conf @@ -66,7 +66,9 @@ http { error_page 404 /index.html; } - + location ~ .html$ { + add_header Cache-Control no-cache; + } add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; add_header X-XSS-Protection "1; mode=block"; From 57e2fcb23bba7e8aef15e09f09f41d5d97d48a35 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 3 Nov 2022 13:41:12 +0530 Subject: [PATCH 16/79] Update nginx.conf --- nginx.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index a90dfbbbc..0595a17b1 100644 --- a/nginx.conf +++ b/nginx.conf @@ -67,7 +67,9 @@ http { } - + location ~ .html$ { + add_header Cache-Control no-cache; + } add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; add_header X-XSS-Protection "1; mode=block"; add_header X-Frame-Options "SAMEORIGIN"; From f690b6e5c26111dbdecc59cab8f5a3e442e441fe Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Fri, 4 Nov 2022 16:17:18 +0530 Subject: [PATCH 17/79] # --- .../pages/buyer/confirm/confirm.component.html | 18 ++++++++++++++++-- .../pages/buyer/confirm/confirm.component.ts | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/app/pages/buyer/confirm/confirm.component.html b/src/app/pages/buyer/confirm/confirm.component.html index 34dca0352..85d850c2b 100644 --- a/src/app/pages/buyer/confirm/confirm.component.html +++ b/src/app/pages/buyer/confirm/confirm.component.html @@ -39,7 +39,7 @@

(click)="onSelect(true)" />

@@ -53,7 +53,21 @@

(click)="onSelect(false)" /> +

+
+ +
diff --git a/src/app/pages/buyer/confirm/confirm.component.ts b/src/app/pages/buyer/confirm/confirm.component.ts index b124d4318..a61f66868 100644 --- a/src/app/pages/buyer/confirm/confirm.component.ts +++ b/src/app/pages/buyer/confirm/confirm.component.ts @@ -186,7 +186,7 @@ export class BuyerConfirmComponent extends BaseComponent implements OnInit { hasChanges: (this.organisation.rightToBuy === this.verified && this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0) ? false : true }; localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); - this.router.navigateByUrl(`buyer/confirm-changes/${this.organisation.ciiOrganisationId}`); + // this.router.navigateByUrl(`buyer/confirm-changes/${this.organisation.ciiOrganisationId}`); } public onCancelClick() { From c81c1411ebf6f6801210aff3767e461f8891ab59 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Sat, 5 Nov 2022 19:31:51 +0530 Subject: [PATCH 18/79] # --- .../buyer/confirm/confirm.component.html | 22 ++++--------------- .../pages/buyer/confirm/confirm.component.ts | 2 +- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/app/pages/buyer/confirm/confirm.component.html b/src/app/pages/buyer/confirm/confirm.component.html index 85d850c2b..ce821365f 100644 --- a/src/app/pages/buyer/confirm/confirm.component.html +++ b/src/app/pages/buyer/confirm/confirm.component.html @@ -25,7 +25,7 @@

- Update organisation type + Is this organisation a verified buyer for CCS?
@@ -39,7 +39,7 @@

(click)="onSelect(true)" />

@@ -53,21 +53,7 @@

(click)="onSelect(false)" /> -

-
- -
@@ -340,4 +326,4 @@

Cancel

-

+

\ No newline at end of file diff --git a/src/app/pages/buyer/confirm/confirm.component.ts b/src/app/pages/buyer/confirm/confirm.component.ts index a61f66868..b124d4318 100644 --- a/src/app/pages/buyer/confirm/confirm.component.ts +++ b/src/app/pages/buyer/confirm/confirm.component.ts @@ -186,7 +186,7 @@ export class BuyerConfirmComponent extends BaseComponent implements OnInit { hasChanges: (this.organisation.rightToBuy === this.verified && this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0) ? false : true }; localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); - // this.router.navigateByUrl(`buyer/confirm-changes/${this.organisation.ciiOrganisationId}`); + this.router.navigateByUrl(`buyer/confirm-changes/${this.organisation.ciiOrganisationId}`); } public onCancelClick() { From a74b182d2a48de5bdc41dcc3992c12f635666154 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Tue, 8 Nov 2022 12:39:59 +0530 Subject: [PATCH 19/79] manage service elegibity changes --- src/app/app-routing.module.ts | 19 ++ src/app/app.module.ts | 6 +- .../confirm-changes/confirm.component.ts | 2 +- .../confirm-org-type.component.html | 130 +++++++++++++ .../confirm-org-type.component.scss | 0 .../confirm-org-type.component.spec.ts | 25 +++ .../confirm-org-type.component.ts | 74 ++++++++ .../pages/buyer/details/details.component.ts | 2 +- .../update-org-type.component.html | 179 ++++++++++++++++++ .../update-org-type.component.scss | 0 .../update-org-type.component.spec.ts | 25 +++ .../update-org-type.component.ts | 155 +++++++++++++++ .../services/wrapper/wrapper-org-service.ts | 11 ++ 13 files changed, 625 insertions(+), 3 deletions(-) create mode 100644 src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html create mode 100644 src/app/pages/buyer/confirm-org-type/confirm-org-type.component.scss create mode 100644 src/app/pages/buyer/confirm-org-type/confirm-org-type.component.spec.ts create mode 100644 src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts create mode 100644 src/app/pages/buyer/update-org-type/update-org-type.component.html create mode 100644 src/app/pages/buyer/update-org-type/update-org-type.component.scss create mode 100644 src/app/pages/buyer/update-org-type/update-org-type.component.spec.ts create mode 100644 src/app/pages/buyer/update-org-type/update-org-type.component.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 005517db5..b3eec261d 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -133,6 +133,8 @@ import { ViewPendingVerificationComponent } from './pages/manage-buyer-and-both- import { ViewVerifiedOrgComponent } from './pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component'; import { RemoveRightToBuyComponent } from './pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component'; import { SuccessRightToBuyComponent } from './pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component'; +import { UpdateOrgTypeComponent } from './pages/buyer/update-org-type/update-org-type.component'; +import { ConfirmOrgTypeComponent } from './pages/buyer/confirm-org-type/confirm-org-type.component'; const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, @@ -700,6 +702,13 @@ const routes: Routes = [ canActivate: [AuthGuard, RoleGuard], component: BuyerConfirmComponent, }, + { + path: 'update-org-type/confirm/:id', + data: { title: 'Review - Manage Buyers', roles: ['MANAGE_SUBSCRIPTIONS'] }, + pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], + component: UpdateOrgTypeComponent, + }, { path: 'buyer/confirm-changes/:id', data: { @@ -710,6 +719,16 @@ const routes: Routes = [ canActivate: [AuthGuard, RoleGuard], component: BuyerConfirmChangesComponent, }, + { + path: 'update-org-type/confirm-changes/:id', + data: { + title: 'Confirm Changes - Manage Buyers', + roles: ['MANAGE_SUBSCRIPTIONS'], + }, + pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], + component: ConfirmOrgTypeComponent, + }, { path: 'buyer/error', data: { title: 'Error - Manage Buyers', roles: ['MANAGE_SUBSCRIPTIONS'] }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index b909ac681..f1480b1e8 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -183,6 +183,8 @@ import { ViewPendingVerificationComponent } from './pages/manage-buyer-and-both- import { ViewVerifiedOrgComponent } from './pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component'; import { RemoveRightToBuyComponent } from './pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component'; import { SuccessRightToBuyComponent } from './pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component'; +import { UpdateOrgTypeComponent } from './pages/buyer/update-org-type/update-org-type.component'; +import { ConfirmOrgTypeComponent } from './pages/buyer/confirm-org-type/confirm-org-type.component'; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http); @@ -331,7 +333,9 @@ export function createTranslateLoader(http: HttpClient) { ViewPendingVerificationComponent, ViewVerifiedOrgComponent, RemoveRightToBuyComponent, - SuccessRightToBuyComponent + SuccessRightToBuyComponent, + UpdateOrgTypeComponent, + ConfirmOrgTypeComponent ], imports: [ // BrowserModule, diff --git a/src/app/pages/buyer/confirm-changes/confirm.component.ts b/src/app/pages/buyer/confirm-changes/confirm.component.ts index fd515aef4..884ff7dff 100644 --- a/src/app/pages/buyer/confirm-changes/confirm.component.ts +++ b/src/app/pages/buyer/confirm-changes/confirm.component.ts @@ -51,7 +51,7 @@ export class BuyerConfirmChangesComponent extends BaseComponent { public onSubmitClick() { const model = { - isBuyer: this.changes.rightToBuy, + orgType:parseInt(this.changes.orgType), rolesToDelete: this.changes.toDelete, rolesToAdd: this.changes.toAdd, }; diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html new file mode 100644 index 000000000..44afd0157 --- /dev/null +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html @@ -0,0 +1,130 @@ + +
+
+
    +
  1. + {{ 'ADMINISTRATOR_DASHBOARD' | translate}} +
  2. +
  3. + Manage service eligibility +
  4. +
  5. + Confirm service roles changes for the organisation +
  6. +
+
+

Confirm service roles changes for the organisation

+ +
+
+ Right to buy status +
+
+ +
+
+ Default service roles available for this organisation +
+
+ +
+
+ Additional service roles available for this organisation +
+
+ +
+
+
+
+
+ +
+
+ + +
+
+ Organisation type +
+
+ + +
+
+ Service roles you are adding to this organisation +
+ +
+ +
+
+
+ Service roles you are removing from this organisation +
+ +
+ +
+
+
+
+
+
+ + +
+
+
\ No newline at end of file diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.scss b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.spec.ts b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.spec.ts new file mode 100644 index 000000000..f3193f60a --- /dev/null +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmOrgTypeComponent } from './confirm-org-type.component'; + +describe('ConfirmOrgTypeComponent', () => { + let component: ConfirmOrgTypeComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ConfirmOrgTypeComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfirmOrgTypeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts new file mode 100644 index 000000000..552d6bdc2 --- /dev/null +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts @@ -0,0 +1,74 @@ +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ViewEncapsulation } from '@angular/core'; +import { Store } from '@ngrx/store'; +import { ActivatedRoute, Router } from '@angular/router'; + +import { BaseComponent } from 'src/app/components/base/base.component'; +import { slideAnimation } from 'src/app/animations/slide.animation'; +import { UIState } from 'src/app/store/ui.states'; +import { OrganisationService } from 'src/app/services/postgres/organisation.service'; +import { Observable } from 'rxjs'; +import { share } from 'rxjs/operators'; +import { WrapperOrganisationService } from 'src/app/services/wrapper/wrapper-org-service'; +import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; +import { ViewportScroller } from '@angular/common'; + +@Component({ + selector: 'app-confirm-org-type', + templateUrl: './confirm-org-type.component.html', + styleUrls: ['./confirm-org-type.component.scss'], + animations: [ + slideAnimation({ + close: { 'transform': 'translateX(12.5rem)' }, + open: { left: '-12.5rem' } + }) + ], + encapsulation: ViewEncapsulation.None, + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class ConfirmOrgTypeComponent extends BaseComponent { + public org: any; + public org$!: Observable; + public changes: any; + + constructor(private cf: ChangeDetectorRef, private organisationService: OrganisationService, + private wrapperOrgService: WrapperOrganisationService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, + protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + super(uiStore,viewportScroller,scrollHelper); + this.route.params.subscribe(params => { + if (params.id) { + this.org$ = this.organisationService.getById(params.id).pipe(share()); + this.org$.subscribe({ + next: data => { + this.org = data; + this.changes = JSON.parse(localStorage.getItem(`mse_org_${this.org.ciiOrganisationId}`)+''); + console.log("this.changes",this.changes) + } + }); + } + }); + } + + public onSubmitClick() { + const model = { + orgType:parseInt(this.changes.orgType), + rolesToDelete: this.changes.toDelete, + rolesToAdd: this.changes.toAdd, + }; + this.wrapperOrgService.updateOrgRoles(this.org.ciiOrganisationId, JSON.stringify(model)).toPromise().then(() => { + localStorage.removeItem(`mse_org_${this.org.ciiOrganisationId}`); + this.router.navigateByUrl(`buyer/success`); + }).catch(error => { + console.log(error); + this.router.navigateByUrl(`buyer/error`); + }); + } + + public onCancelClick() { + this.router.navigateByUrl('buyer/search'); + } + + public onBackClick() { + localStorage.removeItem(`mse_org_${this.org.ciiOrganisationId}`); + this.router.navigateByUrl('update-org-type/confirm/' + this.org.ciiOrganisationId); + } +} diff --git a/src/app/pages/buyer/details/details.component.ts b/src/app/pages/buyer/details/details.component.ts index c48110555..242360ec9 100644 --- a/src/app/pages/buyer/details/details.component.ts +++ b/src/app/pages/buyer/details/details.component.ts @@ -59,7 +59,7 @@ export class BuyerDetailsComponent extends BaseComponent implements OnInit { } public onContinueClick() { - this.router.navigateByUrl(`buyer/confirm/${this.selectedOrgId}`); + this.router.navigateByUrl(`update-org-type/confirm/${this.selectedOrgId}`); } public onCancelClick() { diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.html b/src/app/pages/buyer/update-org-type/update-org-type.component.html new file mode 100644 index 000000000..f7fe888c4 --- /dev/null +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.html @@ -0,0 +1,179 @@ + +
+
+
    +
  1. + {{ + "ADMINISTRATOR_DASHBOARD" | translate + }} +
  2. +
  3. + Manage service eligibility +
  4. +
  5. + Review service roles for the organisation +
  6. +
+
+

+ Review service roles for the organisation +

+
+
+ + Update organisation type + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+ + Roles for this organisation, select/unselect where appropriate + +
+ +
+ + +
+
+
+ + Service roles for this organisation, select/unselect where appropriate + +
+ +
+ + +
+
+
+
+
+
+ + +
+
\ No newline at end of file diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.scss b/src/app/pages/buyer/update-org-type/update-org-type.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.spec.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.spec.ts new file mode 100644 index 000000000..0a8b74de0 --- /dev/null +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { UpdateOrgTypeComponent } from './update-org-type.component'; + +describe('UpdateOrgTypeComponent', () => { + let component: UpdateOrgTypeComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ UpdateOrgTypeComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(UpdateOrgTypeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts new file mode 100644 index 000000000..d357e9e11 --- /dev/null +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -0,0 +1,155 @@ +import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Store } from '@ngrx/store'; +import { ActivatedRoute, Router } from '@angular/router'; + +import { BaseComponent } from 'src/app/components/base/base.component'; +import { slideAnimation } from 'src/app/animations/slide.animation'; +import { UIState } from 'src/app/store/ui.states'; +import { OrganisationService } from 'src/app/services/postgres/organisation.service'; +import { Observable } from 'rxjs'; +import { share } from 'rxjs/operators'; +import { Role } from 'src/app/models/organisationGroup'; +import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; +import { WrapperConfigurationService } from 'src/app/services/wrapper/wrapper-configuration.service'; +import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; +import { ViewportScroller } from '@angular/common'; +import { WrapperOrganisationService } from 'src/app/services/wrapper/wrapper-org-service'; +@Component({ + selector: 'app-update-org-type', + templateUrl: './update-org-type.component.html', + styleUrls: ['./update-org-type.component.scss'], + animations: [ + slideAnimation({ + close: { 'transform': 'translateX(12.5rem)' }, + open: { left: '-12.5rem' } + }) + ], + encapsulation: ViewEncapsulation.None +}) +export class UpdateOrgTypeComponent implements OnInit { + + public organisation: any; + public org$!: Observable; + userProfileForm: FormGroup; + orgRoles: Role[]; + roles: Role[]; + public orgEligableRoles$!: Observable; + public orgRoles$!: Observable; + eRoles: Role[]; + rolesToAdd: Role[]; + rolesToDelete: Role[]; + adminSelectionMode : string = ""; + + constructor(private formBuilder: FormBuilder, private organisationService: OrganisationService,private WrapperOrganisationService:WrapperOrganisationService, + private wrapperConfigService: WrapperConfigurationService, private router: Router, private route: ActivatedRoute, + protected uiStore: Store, private organisationGroupService: WrapperOrganisationGroupService, + protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + this.orgRoles = []; + this.eRoles = []; + this.roles = []; + this.userProfileForm = this.formBuilder.group({ + userTitle: ['', null], + }); + this.rolesToAdd = []; + this.rolesToDelete = []; + } + + ngOnInit() { + this.route.params.subscribe(params => { + if (params.id) { + this.org$ = this.organisationService.getById(params.id).pipe(share()); + this.org$.subscribe({ + next: data => { + this.organisation = data; + this.adminSelectionMode = data.supplierBuyerType.toString(); + this.getOrgRoles(); + } + }); + } + }); + } + + public onSelect(type: number) { + this.rolesToAdd = []; + this.rolesToDelete = []; + this.roles.forEach((f:any)=>{ + if(f.autoValidationRoleTypeEligibility.length != 0){ + f.autoValidationRoleTypeEligibility.forEach((x:any)=>{ + if(x == type){ + f.enabled = true + this.rolesToAdd.push(f); + } + }) + } + }) + } + + onChange(event: any, defaultValue: any, role: any) { + if (defaultValue === true && !event.target.checked) { + this.rolesToDelete.push(role); + } + else if (defaultValue == true && event.target.checked) { + const index = this.rolesToDelete.indexOf(role); + if (index > -1) { + this.rolesToDelete.splice(index, 1); + } + } + if (defaultValue === false && event.target.checked) { + this.rolesToAdd.push(role); + } + else if (defaultValue == false && !event.target.checked) { + const index = this.rolesToAdd.indexOf(role); + if (index > -1) { + this.rolesToAdd.splice(index, 1); + } + } + } + + public onSubmitClick() { + let selection = { + org: this.organisation, + toDelete: this.rolesToDelete, + toAdd: this.rolesToAdd, + orgType:this.adminSelectionMode, + hasChanges: (this.organisation.supplierBuyerType === this.adminSelectionMode && this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0) ? false : true + }; + this.WrapperOrganisationService.getAutoValidationStatus(this.organisation.ciiOrganisationId).toPromise().then(() => { + localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); + this.router.navigateByUrl(`update-org-type/confirm-changes/${this.organisation.ciiOrganisationId}`) + }).catch(error => { + console.log(error); + }); + } + + public onCancelClick() { + localStorage.removeItem(`mse_org_${this.organisation.ciiOrganisationId}`); + this.router.navigateByUrl('buyer/search'); + } + + getOrgRoles(){ + this.orgRoles$ = this.wrapperConfigService.getRoles().pipe(share()); + this.orgRoles$.subscribe({ + next: (orgRoles: Role[]) => { + this.roles = orgRoles; + this.orgEligableRoles$ = this.organisationGroupService.getGroupOrganisationRoles(this.organisation.ciiOrganisationId).pipe(share()); + this.orgEligableRoles$.subscribe({ + next: (eRoles: Role[]) => { + this.roles.forEach((r) => { + r.enabled = eRoles.some(x => x.roleName == r.roleName && x.serviceName == r.serviceName); + }); + this.eRoles = eRoles; + setTimeout(() => { + }, 100); + }, + error: (err: any) => { + console.log(err) + } + }); + }, + error: (err: any) => { + console.log(err) + } + }); + } +} diff --git a/src/app/services/wrapper/wrapper-org-service.ts b/src/app/services/wrapper/wrapper-org-service.ts index 7d3c96b73..6cac7cc3c 100644 --- a/src/app/services/wrapper/wrapper-org-service.ts +++ b/src/app/services/wrapper/wrapper-org-service.ts @@ -51,4 +51,15 @@ export class WrapperOrganisationService { }) ); } + + getAutoValidationStatus(organisationId: string) { + const url = `${this.url}/${organisationId}/autovalidate`; + return this.http.get(url).pipe( + map((data: OrganisationDto) => { + return data; + }), catchError(error => { + return throwError(error); + }) + ); + } } \ No newline at end of file From d71fc5499520d0b53baee8c3412e2a70ce01cacf Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Wed, 9 Nov 2022 10:57:58 +0530 Subject: [PATCH 20/79] pre tick concept complete --- .../confirm-org-type.component.html | 9 +- .../update-org-type.component.html | 213 +++++++++--------- .../update-org-type.component.ts | 32 ++- 3 files changed, 145 insertions(+), 109 deletions(-) diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html index 44afd0157..4579411bd 100644 --- a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html @@ -50,11 +50,12 @@

Confirm service roles changes for the or Organisation type
- - + +
- Service roles you are adding to this organisation + Service roles you are adding to this organisation – this section to be included only if any service roles were added +
@@ -87,7 +88,7 @@

Confirm service roles changes for the or

- Service roles you are removing from this organisation + Service roles you are removing from this organisation - this section to be included only if any service roles were removed
diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.html b/src/app/pages/buyer/update-org-type/update-org-type.component.html index f7fe888c4..eb632bdba 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.html +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.html @@ -28,23 +28,23 @@

Update organisation type
-
+
+ [(ngModel)]="adminSelectionMode" (click)="onSelect(0)"/>
-
+
+ [(ngModel)]="adminSelectionMode" (click)="onSelect(1)" />
-
+
+ [(ngModel)]="adminSelectionMode" (click)="onSelect(2)" /> @@ -52,96 +52,51 @@

-
-
- - Roles for this organisation, select/unselect where appropriate - -
- -
- - -
-
-
- - Service roles for this organisation, select/unselect where appropriate - -
- -
- -
+ > +
+ +
+ + Service roles for this organisation, select/unselect where appropriate + +
+ +
+ + +
+
+
+ +
+
+ + + +
+
+ Organisation type: +
+
+ + +
+
+ Service roles you are assigning to this organisation: + +
+ +
+ +
+
+
+ Service roles you are unassigning from this organisation: + +
+ +
+ +
+
+
+
+
+
+
+ Organisation type: +
+
+ + +
+
+ Roles which will be assigned after manual validation is completed: + +
+ +
+ +
+
+
+ Service roles you have assigned to this organisation: + +
+ +
+ +
+
+
+ Service roles you have unassigned from this organisation: + +
+ +
+ +
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.scss b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.scss new file mode 100644 index 000000000..dd1ec954d --- /dev/null +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.scss @@ -0,0 +1,13 @@ +.navigation-text { + margin-bottom: 100px; + font-size: 19px; + color: #005ea5 !important; +} +a { + text-decoration: underline; +} + +h1 { + margin-bottom: 30px !important; + margin-top: 30px !important; +} \ No newline at end of file diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.spec.ts b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.spec.ts new file mode 100644 index 000000000..eeb154c4a --- /dev/null +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AutoValidationBuyerSuccessComponent } from './auto-validation-buyer-success.component'; + +describe('AutoValidationBuyerSuccessComponent', () => { + let component: AutoValidationBuyerSuccessComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ AutoValidationBuyerSuccessComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(AutoValidationBuyerSuccessComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts new file mode 100644 index 000000000..d2c9b29f2 --- /dev/null +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts @@ -0,0 +1,74 @@ +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ViewEncapsulation } from '@angular/core'; +import { Store } from '@ngrx/store'; +import { ActivatedRoute, Router } from '@angular/router'; + +import { BaseComponent } from 'src/app/components/base/base.component'; +import { slideAnimation } from 'src/app/animations/slide.animation'; +import { UIState } from 'src/app/store/ui.states'; +import { OrganisationService } from 'src/app/services/postgres/organisation.service'; +import { Observable } from 'rxjs'; +import { share } from 'rxjs/operators'; +import { WrapperOrganisationService } from 'src/app/services/wrapper/wrapper-org-service'; +import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; +import { ViewportScroller } from '@angular/common'; +@Component({ + selector: 'app-auto-validation-buyer-success', + templateUrl: './auto-validation-buyer-success.component.html', + styleUrls: ['./auto-validation-buyer-success.component.scss'], + animations: [ + slideAnimation({ + close: { 'transform': 'translateX(12.5rem)' }, + open: { left: '-12.5rem' } + }) + ], + encapsulation: ViewEncapsulation.None, + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class AutoValidationBuyerSuccessComponent extends BaseComponent { + + public org: any; + public org$!: Observable; + public changes: any; + + constructor(private cf: ChangeDetectorRef, private organisationService: OrganisationService, + private wrapperOrgService: WrapperOrganisationService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, + protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + super(uiStore,viewportScroller,scrollHelper); + this.route.params.subscribe(params => { + if (params.id) { + this.org$ = this.organisationService.getById(params.id).pipe(share()); + this.org$.subscribe({ + next: data => { + this.org = data; + this.changes = JSON.parse(localStorage.getItem(`mse_org_${this.org.ciiOrganisationId}`)+''); + console.log("this.changessuccess",this.changes) + } + }); + } + }); + } + + public onSubmitClick() { + const model = { + orgType:parseInt(this.changes.orgType), + rolesToDelete: this.changes.toDelete, + rolesToAdd: this.changes.toAdd, + }; + this.wrapperOrgService.updateOrgRoles(this.org.ciiOrganisationId, JSON.stringify(model),'roles').toPromise().then(() => { + localStorage.removeItem(`mse_org_${this.org.ciiOrganisationId}`); + this.router.navigateByUrl(`update-org-type/buyer-success`); + }).catch(error => { + console.log(error); + this.router.navigateByUrl(`buyer/error`); + }); + } + + public onCancelClick() { + this.router.navigateByUrl('buyer/search'); + } + + public onBackClick() { + localStorage.removeItem(`mse_org_${this.org.ciiOrganisationId}`); + this.router.navigateByUrl('update-org-type/confirm/' + this.org.ciiOrganisationId); + } +} diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html index 4579411bd..5b39ecbca 100644 --- a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html @@ -45,16 +45,16 @@

Confirm service roles changes for the or -
+
- Organisation type + Organisation type:
- +
- Service roles you are adding to this organisation – this section to be included only if any service roles were added + Service roles you are assigning to this organisation:
@@ -88,7 +88,121 @@

Confirm service roles changes for the or

- Service roles you are removing from this organisation - this section to be included only if any service roles were removed + Service roles you are unassigning from this organisation: + +
+ +
+ +
+
+
+ +
+
+
+ Organisation type: +
+
+ + +
+
+ Service roles which will be assigned after manual validation is completed: + +
+ +
+ +
+
+
+ Service roles you are assigning to this organisation: + +
+ +
+ +
+
+
+ Service roles you are unassigning from this organisation: +
diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts index dde606be4..7f1aadcc0 100644 --- a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts @@ -54,9 +54,8 @@ export class ConfirmOrgTypeComponent extends BaseComponent { rolesToDelete: this.changes.toDelete, rolesToAdd: this.changes.toAdd, }; - this.wrapperOrgService.updateOrgRoles(this.org.ciiOrganisationId, JSON.stringify(model),'switch').toPromise().then(() => { - localStorage.removeItem(`mse_org_${this.org.ciiOrganisationId}`); - this.router.navigateByUrl(`buyer/success`); + this.wrapperOrgService.updateOrgRoles(this.org.ciiOrganisationId, JSON.stringify(model),'roles').toPromise().then(() => { + this.router.navigateByUrl(`update-org-type/buyer-success/${this.org.ciiOrganisationId}`); }).catch(error => { console.log(error); this.router.navigateByUrl(`buyer/error`); diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index afe2f6cb9..b77a716d6 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -132,21 +132,33 @@ export class UpdateOrgTypeComponent implements OnInit { } public onSubmitClick() { + let autoValidationStatus:any; let selection = { org: this.organisation, toDelete: this.rolesToDelete, toAdd: this.rolesToAdd, orgType:this.adminSelectionMode, - hasChanges: (this.organisation.supplierBuyerType === this.adminSelectionMode && this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0) ? false : true + hasChanges: (this.organisation.supplierBuyerType === this.adminSelectionMode && this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0) ? false : true, + autoValidate:true }; - this.WrapperOrganisationService.getAutoValidationStatus(this.organisation.ciiOrganisationId).toPromise().then(() => { - localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); - this.router.navigateByUrl(`update-org-type/confirm-changes/${this.organisation.ciiOrganisationId}`) - }).catch(error => { - console.log(error); - }); + debugger + if((this.adminSelectionMode == '1' || this.adminSelectionMode == '2' ) && this.organisation.supplierBuyerType == '0'){ + this.WrapperOrganisationService.getAutoValidationStatus(this.organisation.ciiOrganisationId).toPromise().then((responce:any) => { + selection.autoValidate = responce.autoValidationSuccess + localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); + this.router.navigateByUrl(`update-org-type/confirm-changes/${this.organisation.ciiOrganisationId}`) + }).catch(error => { + console.log(error); + }); + } else { + localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); + this.router.navigateByUrl(`update-org-type/confirm-changes/${this.organisation.ciiOrganisationId}`) + } } + + + public onCancelClick() { localStorage.removeItem(`mse_org_${this.organisation.ciiOrganisationId}`); this.router.navigateByUrl('buyer/search'); From 283bc9372216d26195f8e955a7197353ab97a41e Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Thu, 10 Nov 2022 14:55:21 +0530 Subject: [PATCH 24/79] design issues fixed --- .../auto-validation-buyer-success.component.html | 4 ++-- .../buyer/confirm-org-type/confirm-org-type.component.html | 4 ++-- .../buyer/confirm-org-type/confirm-org-type.component.scss | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html index d984c4797..125c6a57a 100644 --- a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html @@ -53,7 +53,7 @@

You have successfully saved the changes<

- Service roles you are assigning to this organisation: + Service roles you have assigned to this organisation:
@@ -87,7 +87,7 @@

You have successfully saved the changes<

- Service roles you are unassigning from this organisation: + Service roles you have unassigned from this organisation
diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html index 5b39ecbca..7c9b151cf 100644 --- a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html @@ -51,7 +51,7 @@

Confirm service roles changes for the or
- +
Service roles you are assigning to this organisation: @@ -130,7 +130,7 @@

Confirm service roles changes for the or
- +
Service roles which will be assigned after manual validation is completed: diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.scss b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.scss index e69de29bb..84e4071d6 100644 --- a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.scss +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.scss @@ -0,0 +1,4 @@ +h1 { + margin-bottom: 30px !important; + margin-top: 30px !important; +} \ No newline at end of file From 67a03aad01adae560e7daec6c0f0d3bf1ad5b9bc Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Thu, 10 Nov 2022 17:17:14 +0530 Subject: [PATCH 25/79] roles display condtions complete --- .../update-org-type.component.html | 11 +++------ .../update-org-type.component.ts | 24 ++++++++++++++++--- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.html b/src/app/pages/buyer/update-org-type/update-org-type.component.html index eb632bdba..d876ec77c 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.html +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.html @@ -64,12 +64,7 @@

+ *ngIf="role.subscriptionTypeEligibility === 0 && role.orgTypeEligibility !== 0 && tradeEligibilityStatus(role)"> class="govuk-checkboxes__item" *ngIf=" role.subscriptionTypeEligibility === 1 && - role.tradeEligibility !== 0 && - role.orgTypeEligibility !== 0 + role.orgTypeEligibility !== 0 && + tradeEligibilityStatus(role) " > { selection.autoValidate = responce.autoValidationSuccess @@ -176,7 +195,6 @@ export class UpdateOrgTypeComponent implements OnInit { r.enabled = eRoles.some(x => x.roleName == r.roleName && x.serviceName == r.serviceName); }); this.eRoles = eRoles; - localStorage.setItem('defaultRole',JSON.stringify(this.roles)); setTimeout(() => { this.onSelect(this.adminSelectionMode) }, 100); From 24cd57db85d691d63c25a9c831ce5c8e2a9b9b65 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Mon, 14 Nov 2022 10:01:43 +0530 Subject: [PATCH 26/79] confirmation page auto validation config --- ...to-validation-buyer-success.component.html | 6 +- ...auto-validation-buyer-success.component.ts | 32 ++++------ .../confirm-org-type.component.html | 6 +- .../confirm-org-type.component.ts | 3 +- .../update-org-type.component.ts | 60 +++++++++++++++---- 5 files changed, 64 insertions(+), 43 deletions(-) diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html index 125c6a57a..98feeb09d 100644 --- a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html @@ -129,13 +129,13 @@

You have successfully saved the changes<
- +
- Roles which will be assigned after manual validation is completed: + Roles which will be assigned after manual validation is completed:
- +
\ 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 c48110555..242360ec9 100644 --- a/src/app/pages/buyer/details/details.component.ts +++ b/src/app/pages/buyer/details/details.component.ts @@ -59,7 +59,7 @@ export class BuyerDetailsComponent extends BaseComponent implements OnInit { } public onContinueClick() { - this.router.navigateByUrl(`buyer/confirm/${this.selectedOrgId}`); + this.router.navigateByUrl(`update-org-type/confirm/${this.selectedOrgId}`); } public onCancelClick() { diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.html b/src/app/pages/buyer/update-org-type/update-org-type.component.html new file mode 100644 index 000000000..d876ec77c --- /dev/null +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.html @@ -0,0 +1,183 @@ + +
+
+
    +
  1. + {{ + "ADMINISTRATOR_DASHBOARD" | translate + }} +
  2. +
  3. + Manage service eligibility +
  4. +
  5. + Review service roles for the organisation +
  6. +
+
+

+ Review service roles for the organisation +

+
+
+ + Update organisation type + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+ + Roles for this organisation, select/unselect where appropriate + +
+ +
+ + +
+
+
+ + Service roles for this organisation, select/unselect where appropriate + +
+ +
+ + +
+
+
+
+
+
+ + +
+
\ No newline at end of file diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.scss b/src/app/pages/buyer/update-org-type/update-org-type.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.spec.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.spec.ts new file mode 100644 index 000000000..0a8b74de0 --- /dev/null +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { UpdateOrgTypeComponent } from './update-org-type.component'; + +describe('UpdateOrgTypeComponent', () => { + let component: UpdateOrgTypeComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ UpdateOrgTypeComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(UpdateOrgTypeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts new file mode 100644 index 000000000..10e078fcb --- /dev/null +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -0,0 +1,246 @@ +import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Store } from '@ngrx/store'; +import { ActivatedRoute, Router } from '@angular/router'; + +import { BaseComponent } from 'src/app/components/base/base.component'; +import { slideAnimation } from 'src/app/animations/slide.animation'; +import { UIState } from 'src/app/store/ui.states'; +import { OrganisationService } from 'src/app/services/postgres/organisation.service'; +import { Observable } from 'rxjs'; +import { share } from 'rxjs/operators'; +import { Role } from 'src/app/models/organisationGroup'; +import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; +import { WrapperConfigurationService } from 'src/app/services/wrapper/wrapper-configuration.service'; +import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; +import { ViewportScroller } from '@angular/common'; +import { WrapperOrganisationService } from 'src/app/services/wrapper/wrapper-org-service'; +@Component({ + selector: 'app-update-org-type', + templateUrl: './update-org-type.component.html', + styleUrls: ['./update-org-type.component.scss'], + animations: [ + slideAnimation({ + close: { 'transform': 'translateX(12.5rem)' }, + open: { left: '-12.5rem' } + }) + ], + encapsulation: ViewEncapsulation.None +}) +export class UpdateOrgTypeComponent implements OnInit { + + public organisation: any; + public org$!: Observable; + userProfileForm: FormGroup; + orgRoles: Role[]; + roles: Role[]; + public orgEligableRoles$!: Observable; + public orgRoles$!: Observable; + eRoles: Role[]; + rolesToAdd: Role[]; + rolesToAddAutoValidation: Role[] | any; + rolesToDelete: Role[]; + adminSelectionMode : string = ""; + constructor(private formBuilder: FormBuilder, private organisationService: OrganisationService,private WrapperOrganisationService:WrapperOrganisationService, + private wrapperConfigService: WrapperConfigurationService, private router: Router, private route: ActivatedRoute, + protected uiStore: Store, private organisationGroupService: WrapperOrganisationGroupService, + protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + this.orgRoles = []; + this.eRoles = []; + this.roles = []; + this.userProfileForm = this.formBuilder.group({ + userTitle: ['', null], + }); + this.rolesToAdd = []; + this.rolesToDelete = []; + } + + ngOnInit() { + this.route.params.subscribe(params => { + if (params.id) { + this.org$ = this.organisationService.getById(params.id).pipe(share()); + this.org$.subscribe({ + next: data => { + this.organisation = data; + this.adminSelectionMode = data.supplierBuyerType.toString(); + this.getOrgRoles(); + } + }); + } + }); + } + +/** + * select radio button + * @param type supplier, buyer, both + * supplier = 0 + * buyer = 1 + * both = 2 + */ + public onSelect(type: string | number) { + const buyerRemoveList=['EL_JNR_SUPPLIER','EL_SNR_SUPPLIER','JAEGGER_SUPPLIER'] + const supplierRemoveList=['JAEGGER_BUYER','ACCESS_CAAAC_CLIENT','CAT_USER','ACCESS_FP_CLIENT','FP_USER'] + this.rolesToAdd = []; + this.rolesToDelete = []; + this.rolesToAddAutoValidation = [] + this.roles = JSON.parse((localStorage.getItem('defaultRole')) || '') + //buyer roles hidden + if(type == 1){ + buyerRemoveList.map((removeRoleKey:any)=>{ + this.roles.map((buyerRoles,index)=>{ + if(buyerRoles.roleKey == removeRoleKey){ + this.rolesToDelete.push(buyerRoles); + this.roles.splice(index,1) + } + }) + }) + } + // supplier roles hidden + else if(type == 0){ + supplierRemoveList.map((removeRoleKey:any)=>{ + this.roles.map((buyerRoles,index)=>{ + if(buyerRoles.roleKey == removeRoleKey && buyerRoles.enabled === false){ + this.roles.splice(index,1) + } + }) + }) + } + + // pre- tick for all type + this.roles.forEach((f:any)=>{ + if(f.autoValidationRoleTypeEligibility.length != 0){ + f.autoValidationRoleTypeEligibility.forEach((x:any)=>{ + if(x == type && f.enabled == false){ + f.enabled = true + f.autoValidate = true + this.rolesToAdd.push(f); + this.rolesToAddAutoValidation?.push(f) + } + }) + } + }) + } + +/** + * trade elegibity checking for all listed roles + * @param role getting from html when *ngFor happen + * @returns return boolean value based on condtion + */ + public tradeEligibilityStatus(role:any){ + if(this.adminSelectionMode == '0'){ + if(role.tradeEligibility == '0' || role.tradeEligibility == '2'){ + return true + } + } else if (this.adminSelectionMode == '1'){ + if(role.tradeEligibility == '1' || role.tradeEligibility == '2'){ + return true + } + } + else if (this.adminSelectionMode == '2'){ + if(role.tradeEligibility == '0' || role.tradeEligibility == '1' || role.tradeEligibility == '2'){ + return true + } + } + return false + } + + +/** + * Check box evenets + * @param event oberverving HTML DOM event + * @param defaultValue Init Value + * @param role object of role + */ + public onChange(event: any, defaultValue: any, role: any) { + if(role.autoValidate === true && !event.target.checked){ + const index = this.rolesToAddAutoValidation?.indexOf(role); + this.rolesToAddAutoValidation?.splice(index,1) + } + else if (defaultValue === true && !event.target.checked) { + this.rolesToDelete.push(role); + } + else if (defaultValue == true && event.target.checked) { + const index = this.rolesToDelete.indexOf(role); + if (index > -1) { + this.rolesToDelete.splice(index, 1); + } + } + if (defaultValue === false && event.target.checked) { + this.rolesToAdd.push(role); + } + else if (defaultValue == false && !event.target.checked) { + const index = this.rolesToAdd.indexOf(role); + if (index > -1) { + this.rolesToAdd.splice(index, 1); + } + } + } + + /** + * On submit save call. + */ + public onSubmitClick() { + let selection = { + org: this.organisation, + toDelete: this.rolesToDelete, + toAdd: this.rolesToAdd, + toAutoValid : this.rolesToAddAutoValidation, + orgType:this.adminSelectionMode, + hasChanges: (this.organisation.supplierBuyerType === this.adminSelectionMode && this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0) ? false : true, + autoValidate:true + }; + if((this.adminSelectionMode == '1' || this.adminSelectionMode == '2' ) && this.organisation.supplierBuyerType == '0'){ + this.WrapperOrganisationService.getAutoValidationStatus(this.organisation.ciiOrganisationId).toPromise().then((responce:any) => { + selection.autoValidate = responce.autoValidationSuccess + localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); + this.router.navigateByUrl(`update-org-type/confirm-changes/${this.organisation.ciiOrganisationId}`) + }).catch(error => { + console.log(error); + }); + } else { + localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); + this.router.navigateByUrl(`update-org-type/confirm-changes/${this.organisation.ciiOrganisationId}`) + } + } + + +/** + * cancel button call , removing all the local storage details + */ + public onCancelClick() { + localStorage.removeItem(`mse_org_${this.organisation.ciiOrganisationId}`); + this.router.navigateByUrl('buyer/search'); + } + + + /** + * getting all roles and find elegible role call. + */ + public getOrgRoles(){ + this.orgRoles$ = this.wrapperConfigService.getRoles().pipe(share()); + this.orgRoles$.subscribe({ + next: (orgRoles: Role[]) => { + this.roles = orgRoles; + this.orgEligableRoles$ = this.organisationGroupService.getGroupOrganisationRoles(this.organisation.ciiOrganisationId).pipe(share()); + this.orgEligableRoles$.subscribe({ + next: (eRoles: Role[]) => { + this.roles.forEach((r) => { + r.enabled = eRoles.some(x => x.roleName == r.roleName && x.serviceName == r.serviceName); + }); + this.eRoles = eRoles; + localStorage.setItem('defaultRole',JSON.stringify(this.roles)) + setTimeout(() => { + this.onSelect(this.adminSelectionMode) + }, 100); + }, + error: (err: any) => { + console.log(err) + } + }); + }, + error: (err: any) => { + console.log(err) + } + }); + } +} diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index fdfd825cc..ea8850d6b 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -190,6 +190,11 @@ export class HomeComponent extends BaseComponent implements OnInit { route: '/buyer/search', }); } + this.otherModules.push({ + name: 'Manage Buyer status requests', + description: 'Verify and approve or decline Buyer status requests', + route: '/manage-buyer-both', + }); } if (e.permissionName === 'ORG_USER_SUPPORT') { if ( @@ -202,11 +207,6 @@ export class HomeComponent extends BaseComponent implements OnInit { description: 'Support for users of other organisations', route: '/org-support/search', }); - this.otherModules.push({ - name: 'Manage Buyer status requests', - description: 'Verify and approve or decline Buyer status requests', - route: '/manage-buyer-both', - }); } } } diff --git a/src/app/services/wrapper/wrapper-org-service.ts b/src/app/services/wrapper/wrapper-org-service.ts index 7d3c96b73..e6795fbc4 100644 --- a/src/app/services/wrapper/wrapper-org-service.ts +++ b/src/app/services/wrapper/wrapper-org-service.ts @@ -41,9 +41,9 @@ export class WrapperOrganisationService { ); } - updateOrgRoles(ciiOrgId: string, json: string | null): Observable { + updateOrgRoles(ciiOrgId: string, json: string | null,type:string): Observable { const body = JSON.parse(json + ''); - return this.http.put(`${this.url}/${ciiOrgId}/roles`, body).pipe( + return this.http.put(`${this.url}/${ciiOrgId}/${type}`, body).pipe( map((data: any) => { return data; }), catchError(error => { @@ -51,4 +51,15 @@ export class WrapperOrganisationService { }) ); } + + getAutoValidationStatus(organisationId: string) { + const url = `${this.url}/${organisationId}/autovalidate`; + return this.http.get(url).pipe( + map((data: OrganisationDto) => { + return data; + }), catchError(error => { + return throwError(error); + }) + ); + } } \ No newline at end of file From 712acf242101882a80d6abe9e8836c3b144d1062 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Tue, 15 Nov 2022 18:23:19 +0530 Subject: [PATCH 28/79] mse issue and ui issue fixed (#860) --- .../update-org-type/update-org-type.component.html | 6 +++--- .../update-org-type/update-org-type.component.ts | 12 +++++++++--- .../success-right-to-buy.component.html | 4 ++-- .../view-verified-org.component.html | 4 ++++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.html b/src/app/pages/buyer/update-org-type/update-org-type.component.html index d876ec77c..9d651e063 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.html +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.html @@ -30,21 +30,21 @@

+ [(ngModel)]="adminSelectionMode" (click)="onSelect(0,'html')"/>
+ [(ngModel)]="adminSelectionMode" (click)="onSelect(1,'html')" />
+ [(ngModel)]="adminSelectionMode" (click)="onSelect(2,'html')" /> diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index 10e078fcb..4d622456f 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -77,7 +77,7 @@ export class UpdateOrgTypeComponent implements OnInit { * buyer = 1 * both = 2 */ - public onSelect(type: string | number) { + public onSelect(type: string | number,accessfrom:string) { const buyerRemoveList=['EL_JNR_SUPPLIER','EL_SNR_SUPPLIER','JAEGGER_SUPPLIER'] const supplierRemoveList=['JAEGGER_BUYER','ACCESS_CAAAC_CLIENT','CAT_USER','ACCESS_FP_CLIENT','FP_USER'] this.rolesToAdd = []; @@ -105,8 +105,14 @@ export class UpdateOrgTypeComponent implements OnInit { }) }) } + + if(accessfrom === "html"){ + this.preTickRoles(type) + } + } + - // pre- tick for all type + public preTickRoles(type:any):void{ this.roles.forEach((f:any)=>{ if(f.autoValidationRoleTypeEligibility.length != 0){ f.autoValidationRoleTypeEligibility.forEach((x:any)=>{ @@ -230,7 +236,7 @@ export class UpdateOrgTypeComponent implements OnInit { this.eRoles = eRoles; localStorage.setItem('defaultRole',JSON.stringify(this.roles)) setTimeout(() => { - this.onSelect(this.adminSelectionMode) + this.onSelect(this.adminSelectionMode,'none') }, 100); }, error: (err: any) => { diff --git a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html index 731bb2929..dc74cc192 100644 --- a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html +++ b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html @@ -19,9 +19,9 @@

You have removed the right to buy for the organisation Organisation name

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 36d34eef8..6740363b9 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 @@ -34,6 +34,10 @@

Organisation details

Date of registration:30-01-1997

+

+ Right to buy status:Approved +

Organisation Administrator(s)

From 9a205df80b9996b980dc1e423268c260ed778c0b Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Tue, 15 Nov 2022 19:34:43 +0530 Subject: [PATCH 29/79] pre-tick blocks (#861) --- .../pages/buyer/update-org-type/update-org-type.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index 4d622456f..f6c8eb467 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -106,7 +106,7 @@ export class UpdateOrgTypeComponent implements OnInit { }) } - if(accessfrom === "html"){ + if(accessfrom === "html" && type != this.adminSelectionMode){ this.preTickRoles(type) } } @@ -192,7 +192,7 @@ export class UpdateOrgTypeComponent implements OnInit { toAdd: this.rolesToAdd, toAutoValid : this.rolesToAddAutoValidation, orgType:this.adminSelectionMode, - hasChanges: (this.organisation.supplierBuyerType === this.adminSelectionMode && this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0) ? false : true, + hasChanges: (this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0 && this.organisation.supplierBuyerType == this.adminSelectionMode) ? false : true, autoValidate:true }; if((this.adminSelectionMode == '1' || this.adminSelectionMode == '2' ) && this.organisation.supplierBuyerType == '0'){ From b9a457ea3b35232edd64f2e285789a17b952bed5 Mon Sep 17 00:00:00 2001 From: chudasama brijrajsinh Date: Fri, 18 Nov 2022 16:50:09 +0530 Subject: [PATCH 30/79] Manage Buyer status requests get audits api integration --- src/app/models/organisation.ts | 13 ++++ .../buyer-both-requests.component.html | 4 +- .../buyer-both-requests.component.ts | 66 +++++++++++------- .../wrapper/wrapper-buyer-both.service.ts | 69 +++---------------- 4 files changed, 66 insertions(+), 86 deletions(-) diff --git a/src/app/models/organisation.ts b/src/app/models/organisation.ts index 55cbfa440..843804548 100644 --- a/src/app/models/organisation.ts +++ b/src/app/models/organisation.ts @@ -1,5 +1,6 @@ import { UserTitleEnum } from "../constants/enum"; import { Address } from "./contactDetail"; +import { PaginationInfo } from "./paginationInfo"; export interface OrganisationRegisterDto { ciiDetails: CiiOrganisationDto; @@ -70,4 +71,16 @@ export interface OrganisationSearchDto{ ciiOrganisationId: string; organisationUri: string; legalName: string; +} + +export interface OrganisationAuditList +{ + organisationName: string; + organisationType: number; + organisationTypeName: string; + dateOfRegistration: Date; +} + +export interface OrganisationAuditListResponse extends PaginationInfo { + organisationAuditList: OrganisationAuditList[]; } \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html index af74ed29f..4b1177c0e 100644 --- a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html @@ -46,7 +46,7 @@

Manage Buyer status r
- Manage Buyer status r
- { - if (userListResponse != null) { - this.pendingVerificationBuyerAndBoth.userList = userListResponse; - this.pendingVerificationBuyerAndBoth.pageCount = - this.pendingVerificationBuyerAndBoth.userList.pageCount; + next: (orgListResponse: OrganisationAuditListResponse) => { + if (orgListResponse != null) { + this.pendingVerificationBuyerAndBoth.organisationAuditList = orgListResponse; + this.pendingVerificationBuyerAndBoth.pageCount = orgListResponse.pageCount; + this.assignOrgTypeName(orgListResponse); } this.geVerifiedOrg() }, @@ -144,11 +146,11 @@ export class BuyerBothRequestsComponent implements OnInit { this.verifiedBuyerAndBoth.currentPage, this.verifiedBuyerAndBoth.pageSize ).subscribe({ - next: (userListResponse: UserListResponse) => { - if (userListResponse != null) { - this.verifiedBuyerAndBoth.userList = userListResponse; - this.verifiedBuyerAndBoth.pageCount = - this.verifiedBuyerAndBoth.userList.pageCount; + next: (orgListResponse: OrganisationAuditListResponse) => { + if (orgListResponse != null) { + this.verifiedBuyerAndBoth.organisationAuditList = orgListResponse; + this.verifiedBuyerAndBoth.pageCount = orgListResponse.pageCount; + this.assignOrgTypeName(orgListResponse); } }, error: (error: any) => { @@ -167,6 +169,20 @@ export class BuyerBothRequestsComponent implements OnInit { } } + private assignOrgTypeName(orgListResponse: OrganisationAuditListResponse): void{ + orgListResponse.organisationAuditList.forEach(org => { + if(org.organisationType == 0){ + this.translate.get('SUPPLIER_TYPE').subscribe(val => org.organisationTypeName = val); + } + else if(org.organisationType == 1){ + this.translate.get('BUYER_TYPE').subscribe(val => org.organisationTypeName = val); + } + else if(org.organisationType == 2){ + this.translate.get('BUYER_AND_SUPPLIER_TYPE').subscribe(val => org.organisationTypeName = val); + } + }); + } + ngOnDestroy(): void { sessionStorage.removeItem('activetab'); } diff --git a/src/app/services/wrapper/wrapper-buyer-both.service.ts b/src/app/services/wrapper/wrapper-buyer-both.service.ts index f9400c467..27e50ac0f 100644 --- a/src/app/services/wrapper/wrapper-buyer-both.service.ts +++ b/src/app/services/wrapper/wrapper-buyer-both.service.ts @@ -2,8 +2,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; -import { delegateduser } from 'src/app/models/delegated.model'; -import { UserListResponse } from 'src/app/models/user'; +import { OrganisationAuditListResponse } from 'src/app/models/organisation'; import { environment } from 'src/environments/environment'; @@ -19,61 +18,13 @@ export class WrapperBuyerBothService { constructor(private http: HttpClient) { } - - public pendingVerification = { - "organisationId": "474281654063910288", - "userList": [ - { - organisatioName : "Dreams Tech", - organisationType : "buyer", - dateofRegistration: "2022-10-11T00:00:00" - }, - { - organisatioName : "Dreams Guys", - organisationType : "Both", - dateofRegistration: "2022-10-11T00:00:00" - }, - { - organisatioName: "Brickendon", - organisationType: "Both", - dateofRegistration: "2022-10-11T00:00:00" - } - ], - "currentPage": 1, - "pageCount": 1, - "rowCount": 1 - } - - public VerifiedOrg = { - "organisationId": "474281654063910288", - "userList": [ - { - organisatioName : "srishit innovative", - organisationType : "buyer", - dateofRegistration: "2022-10-11T00:00:00" - }, - { - organisatioName : "sunvis softwares", - organisationType : "Both", - dateofRegistration: "2022-10-11T00:00:00" - }, - { - organisatioName: "rounds edge", - organisationType: "Both", - dateofRegistration: "2022-10-11T00:00:00" - } - ], - "currentPage": 1, - "pageCount": 1, - "rowCount": 1 - } - getpendingVerificationOrg(organisationId: string, searchString: string, currentPage: number, pageSize: number, includeSelf: boolean = false): Observable { + debugger; pageSize = pageSize <= 0 ? 10 : pageSize; - const url = `${this.org}/${organisationId}/users?currentPage=${currentPage}&pageSize=${pageSize}&search-string=${encodeURIComponent(searchString)}&include-self=${includeSelf}&delegated-only=${true}&delegated-expired-only=${false}`; - return this.http.get(url).pipe( - map((data: UserListResponse) => { - return this.pendingVerification + const url = `${this.org}/audits?currentPage=${currentPage}&pageSize=${pageSize}&search-string=${encodeURIComponent(searchString)}&pending-only=true`; + return this.http.get(url).pipe( + map((data: OrganisationAuditListResponse) => { + return data }), catchError(error => { return throwError(error); }) @@ -82,10 +33,10 @@ export class WrapperBuyerBothService { getVerifiedOrg(organisationId: string, searchString: string, currentPage: number, pageSize: number, includeSelf: boolean = false): Observable { pageSize = pageSize <= 0 ? 10 : pageSize; - const url = `${this.org}/${organisationId}/users?currentPage=${currentPage}&pageSize=${pageSize}&search-string=${encodeURIComponent(searchString)}&include-self=${includeSelf}&delegated-only=${true}&delegated-expired-only=${false}`; - return this.http.get(url).pipe( - map((data: UserListResponse) => { - return this.VerifiedOrg + const url = `${this.org}/audits?currentPage=${currentPage}&pageSize=${pageSize}&search-string=${encodeURIComponent(searchString)}&pending-only=false`; + return this.http.get(url).pipe( + map((data: OrganisationAuditListResponse) => { + return data }), catchError(error => { return throwError(error); }) From a506c0f89c512ec130bf55fca3ec2faf2b9a9607 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Mon, 21 Nov 2022 19:15:44 +0530 Subject: [PATCH 31/79] Auto validation api integration UI (#871) * Update environment-production.ts * Update environment-pre-production.ts * Update environment-production.ts * Update environment-pre-production.ts * changes for sprint 11 (#823) * 3046 issues fixed * environment changes updated * 3043-added-content (#843) * deleagtion tile hide and bulk upload page hide complete (#848) * sprint13 changes deleagtion and bulk upload hide (#850) * Update environment-pre-production.ts * Update environment-pre-production.ts * Update environment-production.ts * Hide idps in sprint13 branch (#855) * idps hide manage org and manage user * did a changes in org and user pages * un assign list issue fixed * env are updated * # * idps updated Co-authored-by: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> --- .../pages/buyer/details/details.component.ts | 7 +- .../update-org-type.component.ts | 4 +- src/app/pages/home/home.component.ts | 5 +- .../delegated-organisation.component.ts | 9 +- ...manage-organisation-profile.component.html | 4 +- ...-bulk-upload-migration-status.component.ts | 9 +- ...anage-user-bulk-upload-status.component.ts | 5 + .../manage-user-bulk-upload.component.ts | 6 +- .../manage-user-profiles-component.html | 2 +- .../manage-user-profiles-component.ts | 6 + .../user-profile/user-profile-component.html | 1 + src/app/services/auth/role.guard.ts | 8 +- src/assets/i18n/en.json | 2 +- src/environments/environment-NFT.ts | 206 +++++++++-------- src/environments/environment-development.ts | 8 +- .../environment-pre-production.ts | 215 +++++++++--------- src/environments/environment-production.ts | 10 +- src/environments/environment-sandbox.ts | 9 +- src/environments/environment-testing.ts | 10 +- src/environments/environment-training.ts | 8 +- src/environments/environment-uat.ts | 10 +- src/environments/environment.ts | 12 +- 22 files changed, 324 insertions(+), 232 deletions(-) diff --git a/src/app/pages/buyer/details/details.component.ts b/src/app/pages/buyer/details/details.component.ts index 242360ec9..b9d198f1b 100644 --- a/src/app/pages/buyer/details/details.component.ts +++ b/src/app/pages/buyer/details/details.component.ts @@ -9,6 +9,7 @@ import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services'; import { ViewportScroller } from '@angular/common'; import { WrapperOrganisationService } from 'src/app/services/wrapper/wrapper-org-service'; import { CiiAdditionalIdentifier, CiiOrgIdentifiersDto } from 'src/app/models/org'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-buyer-details', @@ -59,7 +60,11 @@ export class BuyerDetailsComponent extends BaseComponent implements OnInit { } public onContinueClick() { - this.router.navigateByUrl(`update-org-type/confirm/${this.selectedOrgId}`); + if(environment.appSetting.hideAutoValidation){ + this.router.navigateByUrl(`buyer/confirm/${this.selectedOrgId}`); + }else { + this.router.navigateByUrl(`update-org-type/confirm/${this.selectedOrgId}`); + } } public onCancelClick() { diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index f6c8eb467..98bac10f1 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -89,7 +89,9 @@ export class UpdateOrgTypeComponent implements OnInit { buyerRemoveList.map((removeRoleKey:any)=>{ this.roles.map((buyerRoles,index)=>{ if(buyerRoles.roleKey == removeRoleKey){ - this.rolesToDelete.push(buyerRoles); + if(accessfrom === "html"){ + this.rolesToDelete.push(buyerRoles); + } this.roles.splice(index,1) } }) diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index ea8850d6b..654666def 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -31,6 +31,7 @@ import { WrapperUserDelegatedService } from 'src/app/services/wrapper/wrapper-us styleUrls: ['./home.component.scss'], }) export class HomeComponent extends BaseComponent implements OnInit { + isDelegation:boolean=!environment.appSetting.hideDelegation public orgDetails: any = '' systemModules: SystemModule[] = []; ccsModules: SystemModule[] = []; @@ -165,7 +166,7 @@ export class HomeComponent extends BaseComponent implements OnInit { } } - if (e.permissionName === 'DELEGATED_ACCESS') { + if (e.permissionName === 'DELEGATED_ACCESS' && this.isDelegation) { this.systemModules.push({ name: 'Delegated access', description: 'Manage delegated access to your approved services', @@ -218,7 +219,7 @@ export class HomeComponent extends BaseComponent implements OnInit { public getDelegatedOrganisation(): void { this.delegatedApiService.getDeligatedOrg().subscribe({ next: (data: any) => { - if(data.detail.delegatedOrgs.length > 0){ + if(data.detail.delegatedOrgs.length > 0 && this.isDelegation){ this.systemModules.push({ name: 'Manage my delegated access', description: 'Switch between your primary and delegating Organisation', diff --git a/src/app/pages/manage-delegated/user/delegated-organisation/delegated-organisation.component.ts b/src/app/pages/manage-delegated/user/delegated-organisation/delegated-organisation.component.ts index 77e5e297f..48f684703 100644 --- a/src/app/pages/manage-delegated/user/delegated-organisation/delegated-organisation.component.ts +++ b/src/app/pages/manage-delegated/user/delegated-organisation/delegated-organisation.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { WrapperUserDelegatedService } from 'src/app/services/wrapper/wrapper-user-delegated.service'; +import { environment } from 'src/environments/environment'; import { ManageDelegateService } from '../../service/manage-delegate.service'; @Component({ @@ -15,12 +16,18 @@ export class DelegatedOrganisationComponent implements OnInit { public secondaryRoleSelected: any; private roleData:any; private roleInfo: any; + private isDeleagation:boolean=environment.appSetting.hideDelegation constructor( private route: Router, private activatedRoute: ActivatedRoute, private delegatedService: WrapperUserDelegatedService, private DelegateService: ManageDelegateService - ) {} + ) { + if(this.isDeleagation === true){ + this.route.navigateByUrl('/home'); + return + } + } ngOnInit(): void { if ( diff --git a/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.html b/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.html index f684ea366..7cf0ac8d4 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-profile/manage-organisation-profile.component.html @@ -61,9 +61,9 @@

{{ 'BUYER_SUPPLIER_TYPE' | translate }}

+ id="orgRoleControl_{{idp.id}}" [attr.disabled] = "true">
diff --git a/src/app/pages/manage-user/manage-user-bulk-upload-migration-status/manage-user-bulk-upload-migration-status.component.ts b/src/app/pages/manage-user/manage-user-bulk-upload-migration-status/manage-user-bulk-upload-migration-status.component.ts index 2e33515fe..a8f071f96 100644 --- a/src/app/pages/manage-user/manage-user-bulk-upload-migration-status/manage-user-bulk-upload-migration-status.component.ts +++ b/src/app/pages/manage-user/manage-user-bulk-upload-migration-status/manage-user-bulk-upload-migration-status.component.ts @@ -4,6 +4,7 @@ import * as moment from 'moment'; import { BulkUploadStatus } from 'src/app/constants/enum'; import { BulkUploadFileContentRowDetails, BulkUploadResponse, BulkUploadSummaryGridInfo } from 'src/app/models/bulkUploadResponse'; import { BulkUploadService } from 'src/app/services/postgres/bulk-upload.service'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-manage-user-bulk-upload-migration-status', @@ -20,9 +21,13 @@ export class ManageUserBulkUploadMigrationStatusComponent implements OnInit { detailTableHeaders = ['IDENTIFIER_ID', "SCHEME_ID", "RIGHT_TO_BUY", "USER_EMAIL", "TITLE", "FIRST_NAME", "LAST_NAME", "ROLES", "STATUS", "STATUS_DESCRIPTION"]; detailColumnsToDisplay = ['identifierId', 'schemeId', 'rightToBuy', 'email', 'title', 'firstName', 'lastName', 'roles', 'status', 'statusDescription']; detailGridInfoList: BulkUploadFileContentRowDetails[] = []; - + isBulkUpload = environment.appSetting.hideBulkupload constructor(private router: Router, private activatedRoute: ActivatedRoute, private bulkUploadService: BulkUploadService) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; + if(this.isBulkUpload){ + this.router.navigateByUrl('home'); + return + } } ngOnInit() { @@ -87,4 +92,4 @@ export class ManageUserBulkUploadMigrationStatusComponent implements OnInit { this.detailGridInfoList = bulkUploadResponse.bulkUploadMigrationReportDetails.bulkUploadFileContentRowList; } -} +} \ No newline at end of file diff --git a/src/app/pages/manage-user/manage-user-bulk-upload-status/manage-user-bulk-upload-status.component.ts b/src/app/pages/manage-user/manage-user-bulk-upload-status/manage-user-bulk-upload-status.component.ts index 9fe621c81..49b3e3758 100644 --- a/src/app/pages/manage-user/manage-user-bulk-upload-status/manage-user-bulk-upload-status.component.ts +++ b/src/app/pages/manage-user/manage-user-bulk-upload-status/manage-user-bulk-upload-status.component.ts @@ -23,8 +23,13 @@ export class ManageUserBulkUploadStatusComponent implements OnInit { errorTableHeaders = ['ERROR_HEADING', "ERROR_DESCRIPTION"]; errorColumnsToDisplay = ['errorHeading', 'errorDescription']; errorsGridInfoList: BulkUploadErrorsGridInfo[] = []; + isBulkUpload = environment.appSetting.hideBulkupload constructor(private router: Router, private activatedRoute: ActivatedRoute, private bulkUploadService: BulkUploadService) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; + if(this.isBulkUpload){ + this.router.navigateByUrl('home'); + return + } } ngOnInit() { diff --git a/src/app/pages/manage-user/manage-user-bulk-upload/manage-user-bulk-upload.component.ts b/src/app/pages/manage-user/manage-user-bulk-upload/manage-user-bulk-upload.component.ts index 6a406f9ef..f901785ad 100644 --- a/src/app/pages/manage-user/manage-user-bulk-upload/manage-user-bulk-upload.component.ts +++ b/src/app/pages/manage-user/manage-user-bulk-upload/manage-user-bulk-upload.component.ts @@ -23,11 +23,15 @@ export class ManageUserBulkUploadComponent { maxFileSize: number = environment.bulkUploadMaxFileSizeInBytes / (1024 * 1024); bulkUploadTemplateUrl: string; @ViewChildren('input') inputs!: QueryList; - + isBulkUpload = environment.appSetting.hideBulkupload constructor(private router: Router, private bulkUploadService: BulkUploadService, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper,) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; this.bulkUploadTemplateUrl = environment.bulkUploadTemplateFileUrl; + if(this.isBulkUpload){ + this.router.navigateByUrl('home'); + return + } } setFocus(inputIndex: number) { diff --git a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.html b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.html index bdb93a4c4..5e32927b3 100644 --- a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.html +++ b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.html @@ -17,7 +17,7 @@

{{ 'MANAGE_YOUR_ORGANISATION_USER_ACCOUN
diff --git a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts index 7bc4be493..749a5edcb 100644 --- a/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts +++ b/src/app/pages/manage-user/manage-user-profiles/manage-user-profiles-component.ts @@ -39,6 +39,7 @@ export class ManageUserProfilesComponent extends BaseComponent implements OnInit usersTableHeaders = ['NAME', 'EMAIL']; usersColumnsToDisplay = ['name', 'userName']; searchSumbited:boolean=false; + public isBulkUpload=environment.appSetting.hideBulkupload constructor(private wrapperOrganisationService: WrapperOrganisationService, protected uiStore: Store, private router: Router, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, private auditLogService: AuditLoggerService) { @@ -78,6 +79,11 @@ export class ManageUserProfilesComponent extends BaseComponent implements OnInit onAddClick() { this.router.navigateByUrl("manage-users/add-user-selection"); + if(!this.isBulkUpload){ + this.router.navigateByUrl("manage-users/add-user-selection"); + } else { + this.router.navigateByUrl("manage-users/add-user/details"); + } } searchTextChanged(event: any) { diff --git a/src/app/pages/user-profile/user-profile-component.html b/src/app/pages/user-profile/user-profile-component.html index d660b67fc..004d0259d 100644 --- a/src/app/pages/user-profile/user-profile-component.html +++ b/src/app/pages/user-profile/user-profile-component.html @@ -107,6 +107,7 @@

{{"SIGN_IN_PROVIDER"| translate}} : {{identityProviderDisplayName}}

+

-

You have declined the right to buy status for organisation Organisation name

-

You have accepted the right to buy status for the organisation Organisation name

+

You have declined the right to buy status for organisation {{routeDetails.organisationName}}

+

You have accepted the right to buy status for the organisation {{routeDetails.organisationName}}

Return to Manage Buyer status requests

diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.html b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.html index 03744952e..03882d2bf 100644 --- a/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.html +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.html @@ -17,7 +17,7 @@
-

Confirm you want to accept right to buy status for the organisation Organisation name

+

Confirm you want to accept right to buy status for the organisation {{routeDetails.organisationName}}

The organisation administrator(s) will be notified that the right to buy status was approved for the organisation diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.ts b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.ts index 458cfbfd5..cd1b61691 100644 --- a/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.ts +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component.ts @@ -1,5 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; +import { ManualValidationStatus } from 'src/app/constants/enum'; +import { WrapperBuyerBothService } from 'src/app/services/wrapper/wrapper-buyer-both.service'; @Component({ selector: 'app-confirm-accept', @@ -9,29 +11,32 @@ import { ActivatedRoute, Router } from '@angular/router'; export class ConfirmAcceptComponent implements OnInit { private organisationId: string; + public routeDetails:any; - constructor(private route: ActivatedRoute, private router: Router) { + constructor(private route: ActivatedRoute, private router: Router, + private wrapperBuyerAndBothService:WrapperBuyerBothService) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; } ngOnInit(): void { this.route.queryParams.subscribe((para: any) => { - let RouteData = JSON.parse(atob(para.data)); + this.routeDetails = JSON.parse(atob(para.data)); }); } public confirm(): void { - // let UserSelectedinfo:any; - // this.DelegatedService.createDelegatedUser(UserSelectedinfo).subscribe({ - // next: (roleListResponse: any) => { - // this.router.navigateByUrl('buyer-and-both-success'); - // }, - // error: (error: any) => { - // this.route.navigateByUrl('delegated-error') - // }, - // }); + this.wrapperBuyerAndBothService.manualValidation(this.routeDetails.organisationId, ManualValidationStatus.approve).subscribe({ + next: (response: any) => { + this.router.navigateByUrl('buyer-and-both-success'); + }, + error: (error: any) => { + this.router.navigateByUrl('buyer-and-both-fail'); + }, + }); let data = { status: 'accept', + organisationId: this.routeDetails.organisationId, + organisationName: this.routeDetails.organisationName }; this.router.navigateByUrl( 'buyer-and-both-success?data=' + btoa(JSON.stringify(data)) diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.html b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.html index 84a41b2c0..abb2ac304 100644 --- a/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.html +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.html @@ -17,7 +17,7 @@

-

Confirm you want to decline right to buy status for organisation Organisation name

+

Confirm you want to decline right to buy status for organisation {{routeDetails.organisationName}}

The organisation’s administrator(s) will be notified that the right to buy status was declined. diff --git a/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.ts b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.ts index 0759e3893..a434f5714 100644 --- a/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.ts +++ b/src/app/pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component.ts @@ -2,7 +2,9 @@ import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; +import { ManualValidationStatus } from 'src/app/constants/enum'; import { Role } from 'src/app/models/organisationGroup'; +import { WrapperBuyerBothService } from 'src/app/services/wrapper/wrapper-buyer-both.service'; import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; import { WrapperUserDelegatedService } from 'src/app/services/wrapper/wrapper-user-delegated.service'; @@ -13,29 +15,32 @@ import { WrapperUserDelegatedService } from 'src/app/services/wrapper/wrapper-us }) export class ConfirmDeclineComponent implements OnInit { private organisationId: string; + public routeDetails:any; - constructor(private route: ActivatedRoute, private router: Router) { + constructor(private route: ActivatedRoute, private router: Router, + private wrapperBuyerAndBothService:WrapperBuyerBothService) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; } ngOnInit(): void { this.route.queryParams.subscribe((para: any) => { - let RouteData = JSON.parse(atob(para.data)); + this.routeDetails = JSON.parse(atob(para.data)); }); } public confirmAndDecline(): void { - // let UserSelectedinfo:any; - // this.DelegatedService.createDelegatedUser(UserSelectedinfo).subscribe({ - // next: (roleListResponse: any) => { - // this.router.navigateByUrl('buyer-and-both-success'); - // }, - // error: (error: any) => { - // this.route.navigateByUrl('delegated-error') - // }, - // }); + this.wrapperBuyerAndBothService.manualValidation(this.routeDetails.organisationId, ManualValidationStatus.decline).subscribe({ + next: (response: any) => { + this.router.navigateByUrl('buyer-and-both-success'); + }, + error: (error: any) => { + this.router.navigateByUrl('buyer-and-both-fail'); + }, + }); let data = { status: 'decline', + organisationId: this.routeDetails.organisationId, + organisationName: this.routeDetails.organisationName }; this.router.navigateByUrl( 'buyer-and-both-success?data=' + btoa(JSON.stringify(data)) 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 ccb50956f..d3ab4314a 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 @@ -16,7 +16,7 @@

-

View organisations’ Buyer status request

+

View organisation's Buyer status request

View the details of the organisation that is pending the manual verification process for buyer status. If you want to accept this organisation as a verified buyer, please use ‘Accept buyer status’ button on the bottom of this page. @@ -25,14 +25,14 @@

View organisations’

Organisation details

- Organisation name:Dream Guys + Organisation name:{{routeDetails.organisationName}}

- Organisation type:Both + Organisation type:{{routeDetails.organisationTypeName}}

Date of registration:30-01-1997 + class="govuk-!-margin-left-2">{{routeDetails.dateOfRegistration}}

@@ -65,10 +65,15 @@

Organisation registries

- Companies House - 10745577 + {{ getSchemaName(registries.identifier?.scheme||'') }} + {{ registries.identifier?.id}} Primary + + {{ getSchemaName(row.scheme) }} + {{ row.id }} + +
@@ -80,11 +85,11 @@

Event log

- + (changeCurrentPageEvent)="setPageOrganisationEventLogs($event)">
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 7eee5f0be..a6abe171c 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 @@ -1,7 +1,11 @@ import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; +import { CiiAdditionalIdentifier, CiiOrgIdentifiersDto } from 'src/app/models/org'; +import { WrapperBuyerBothService } from 'src/app/services/wrapper/wrapper-buyer-both.service'; import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; import { environment } from 'src/environments/environment'; +import { ciiService } from 'src/app/services/cii/cii.service'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'app-view-pending-verification', @@ -10,7 +14,12 @@ import { environment } from 'src/environments/environment'; }) export class ViewPendingVerificationComponent implements OnInit { private organisationId: string = ''; - pageName = 'Contactadmin'; + pageName = 'View request'; + public routeDetails:any; + public registries: CiiOrgIdentifiersDto; + public additionalIdentifiers?: CiiAdditionalIdentifier[]; + schemeData: any[] = []; + public organisationAdministrator = { usersTableHeaders: ['Name', 'Email address', 'Role'], usersColumnsToDisplay: ['name', 'email', 'role'], @@ -28,21 +37,22 @@ export class ViewPendingVerificationComponent implements OnInit { public eventLog = { usersTableHeaders: ['Owner', 'Event', 'Date'], - usersColumnsToDisplay: ['name', 'email', 'role'], + usersColumnsToDisplay: ['owner', 'event', 'date'], currentPage: 1, pageCount: 0, pageSize: environment.listPageSize, - userListResponse: { + organisationAuditEventListResponse: { currentPage: 0, pageCount: 0, rowCount: 0, organisationId: this.organisationId, - userList: [], + organisationAuditEventList: [], }, }; - constructor( - private WrapperOrganisationGroupService: WrapperOrganisationGroupService,private router:Router + constructor(private route: ActivatedRoute, private wrapperBuyerAndBothService:WrapperBuyerBothService, + private WrapperOrganisationGroupService: WrapperOrganisationGroupService,private router:Router, + private ciiService: ciiService, private translate: TranslateService ) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; this.organisationAdministrator.userListResponse = { @@ -52,17 +62,26 @@ export class ViewPendingVerificationComponent implements OnInit { organisationId: this.organisationId, userList: [], }; - this.eventLog.userListResponse = { + this.eventLog.organisationAuditEventListResponse = { currentPage: this.eventLog.currentPage, pageCount: 0, rowCount: 0, organisationId: this.organisationId, - userList: [], + organisationAuditEventList: [], }; + this.registries = {}; } - ngOnInit() { - this.getOrganisationUsers(); + async ngOnInit() { + this.route.queryParams.subscribe(async (para: any) => { + this.routeDetails = JSON.parse(atob(para.data)); + this.schemeData = await this.ciiService.getSchemes().toPromise() as any[]; + this.registries = await this.ciiService.getOrgDetails(this.routeDetails.organisationId, true).toPromise(); + if (this.registries != undefined) { + this.additionalIdentifiers = this.registries?.additionalIdentifiers; + } + this.getOrganisationUsers(); + }); } public openEmailWindow(data: any): void { @@ -72,9 +91,10 @@ export class ViewPendingVerificationComponent implements OnInit { public getOrganisationUsers() { this.WrapperOrganisationGroupService.getUsersAdmin( - this.organisationId, + this.routeDetails.organisationId, this.organisationAdministrator.currentPage, - this.organisationAdministrator.pageSize + this.organisationAdministrator.pageSize, + true ).subscribe({ next: (response: any) => { if (response != null) { @@ -87,9 +107,8 @@ export class ViewPendingVerificationComponent implements OnInit { ); this.organisationAdministrator.pageCount = this.organisationAdministrator.userListResponse.pageCount; - this.getEventLogDetails() - } + this.getEventLogDetails(); }, error: (error: any) => {}, }); @@ -100,23 +119,43 @@ export class ViewPendingVerificationComponent implements OnInit { this.getOrganisationUsers(); } + public setPageOrganisationEventLogs(pageNumber: any) { + this.eventLog.currentPage = pageNumber; + this.getEventLogDetails(); + } + public getEventLogDetails():void{ - this.WrapperOrganisationGroupService.getUsersAdmin( - this.organisationId, + this.wrapperBuyerAndBothService.getOrgEventLogs( + this.routeDetails.organisationId, this.eventLog.currentPage, this.eventLog.pageSize ).subscribe({ next: (response: any) => { if (response != null) { - this.eventLog.userListResponse = response; - this.eventLog.userListResponse.userList.forEach( + this.eventLog.organisationAuditEventListResponse = response; + this.eventLog.organisationAuditEventListResponse.organisationAuditEventList.forEach( (f: any) => { - f.role = 'Admin'; - f.email = f.userName; // the common component expect the field as email - } - ); + f.owner = (f.firstName ?? '') + ' ' + (f.lastName ?? '') +' ' + (f.actionedBy ?? ''); + if(f.event?.toUpperCase() == "ORGROLEASSIGNED" || f.event?.toUpperCase() == "ORGROLEUNASSIGNED" || + f.event?.toUpperCase() == "ADMINROLEASSIGNED" || f.event?.toUpperCase() == "ADMINROLEUNASSIGNED") + { + this.translate.get(f.event).subscribe(val => f.event = val); + if(f.event.includes('[RoleName]')){ + if(f.role?.length > 0){ + f.event = f.event.replace('[RoleName]', f.role); + } + else{ + f.event = f.event.replace('[RoleName]', 'None'); + f.event = f.event.replace('[RoleName]', 'None'); + } + } + } + else{ + this.translate.get(f.event).subscribe(val => f.event = val); + } + }); this.eventLog.pageCount = - this.eventLog.userListResponse.pageCount; + this.eventLog.organisationAuditEventListResponse.pageCount; } }, error: (error: any) => {}, @@ -128,15 +167,34 @@ export class ViewPendingVerificationComponent implements OnInit { } public acceptRightToBuy(){ - let data = {} + let data = { + organisationId: this.routeDetails.organisationId, + organisationName: this.routeDetails.organisationName + } this.router.navigateByUrl( 'confirm-accept?data=' + btoa(JSON.stringify(data)) ); } public declineRightToBuy(){ - let data = {} + let data = { + organisationId: this.routeDetails.organisationId, + organisationName: this.routeDetails.organisationName + } this.router.navigateByUrl( 'confirm-decline?data=' + btoa(JSON.stringify(data)) ); } + + 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') { + return 'Internal Identifier'; + } + else { + return ''; + } + } } 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 6740363b9..d62668756 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 @@ -16,29 +16,27 @@
-

View organisations’ Buyer status

+

View organisation's Buyer status

-

+

View details of organisations’ Buyer status

Organisation details

- Organisation name:Dream Guys + Organisation name:{{routeDetails.event.organisationName}}

- Organisation type:Both + Organisation type:{{routeDetails.event.organisationTypeName}}

- Date of registration:30-01-1997 + Date of registration:{{routeDetails.event.dateOfRegistration}}

- Right to buy status:Approved + Right to buy status:{{routeDetails.event.rightToBuy ? 'Approved' : 'Declined'}}

-
+

Organisation Administrator(s)

@@ -52,51 +50,57 @@

Organisation Administrator(s)

-

-
-

Organisation registries

-
-
-
- - - - - - - - - - - - - - - -
RegistryID.
Companies House10745577Primary
+
+

Organisation registries

+
+
+
+ + + + + + + + + + + + + + + + + + + + +
RegistryID.
{{ + getSchemaName(registries.identifier?.scheme||'') }}{{ registries.identifier?.id}}Primary
{{ getSchemaName(row.scheme) }}{{ row.id }}
+
-
-
-

Event log

-
-
-
- +
+

Event log

+
+
+
+ +
-
-
- - -
-
-
\ No newline at end of file +
+ + +
+
+
\ 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 30f1b6c19..001484b96 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 @@ -1,7 +1,11 @@ import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; +import { CiiAdditionalIdentifier, CiiOrgIdentifiersDto } from 'src/app/models/org'; +import { WrapperBuyerBothService } from 'src/app/services/wrapper/wrapper-buyer-both.service'; import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; import { environment } from 'src/environments/environment'; +import { ciiService } from 'src/app/services/cii/cii.service'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'app-view-verified-org', @@ -11,6 +15,11 @@ import { environment } from 'src/environments/environment'; export class ViewVerifiedOrgComponent implements OnInit { private organisationId: string = ''; pageName = 'Contactadmin'; + public routeDetails:any; + public registries: CiiOrgIdentifiersDto; + public additionalIdentifiers?: CiiAdditionalIdentifier[]; + schemeData: any[] = []; + public organisationAdministrator = { usersTableHeaders: ['Name', 'Email address', 'Role'], usersColumnsToDisplay: ['name', 'email', 'role'], @@ -28,22 +37,22 @@ export class ViewVerifiedOrgComponent implements OnInit { public eventLog = { usersTableHeaders: ['Owner', 'Event', 'Date'], - usersColumnsToDisplay: ['name', 'email', 'role'], + usersColumnsToDisplay: ['owner', 'event', 'date'], currentPage: 1, pageCount: 0, pageSize: environment.listPageSize, - userListResponse: { + organisationAuditEventListResponse: { currentPage: 0, pageCount: 0, rowCount: 0, organisationId: this.organisationId, - userList: [], + organisationAuditEventList: [], }, }; - constructor( + constructor(private route: ActivatedRoute, private wrapperBuyerAndBothService:WrapperBuyerBothService, private WrapperOrganisationGroupService: WrapperOrganisationGroupService, - private router:Router + private router:Router, private ciiService: ciiService, private translate: TranslateService ) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; this.organisationAdministrator.userListResponse = { @@ -53,17 +62,26 @@ export class ViewVerifiedOrgComponent implements OnInit { organisationId: this.organisationId, userList: [], }; - this.eventLog.userListResponse = { + this.eventLog.organisationAuditEventListResponse = { currentPage: this.eventLog.currentPage, pageCount: 0, rowCount: 0, organisationId: this.organisationId, - userList: [], + organisationAuditEventList: [], }; + this.registries = {}; } - ngOnInit() { - this.getOrganisationUsers(); + async ngOnInit() { + this.route.queryParams.subscribe(async (para: any) => { + this.routeDetails = JSON.parse(atob(para.data)); + this.schemeData = await this.ciiService.getSchemes().toPromise() as any[]; + this.registries = await this.ciiService.getOrgDetails(this.routeDetails.event.organisationId, true).toPromise(); + if (this.registries != undefined) { + this.additionalIdentifiers = this.registries?.additionalIdentifiers; + } + this.getOrganisationUsers(); + }); } public openEmailWindow(data: any): void { @@ -73,9 +91,10 @@ export class ViewVerifiedOrgComponent implements OnInit { public getOrganisationUsers() { this.WrapperOrganisationGroupService.getUsersAdmin( - this.organisationId, + this.routeDetails.event.organisationId, this.organisationAdministrator.currentPage, - this.organisationAdministrator.pageSize + this.organisationAdministrator.pageSize, + true ).subscribe({ next: (response: any) => { if (response != null) { @@ -88,9 +107,8 @@ export class ViewVerifiedOrgComponent implements OnInit { ); this.organisationAdministrator.pageCount = this.organisationAdministrator.userListResponse.pageCount; - this.getEventLogDetails() - } + this.getEventLogDetails(); }, error: (error: any) => {}, }); @@ -101,23 +119,42 @@ export class ViewVerifiedOrgComponent implements OnInit { this.getOrganisationUsers(); } + public setPageOrganisationEventLogs(pageNumber: any) { + this.eventLog.currentPage = pageNumber; + this.getEventLogDetails(); + } + public getEventLogDetails():void{ - this.WrapperOrganisationGroupService.getUsersAdmin( - this.organisationId, + this.wrapperBuyerAndBothService.getOrgEventLogs( + this.routeDetails.event.organisationId, this.eventLog.currentPage, this.eventLog.pageSize ).subscribe({ next: (response: any) => { if (response != null) { - this.eventLog.userListResponse = response; - this.eventLog.userListResponse.userList.forEach( + this.eventLog.organisationAuditEventListResponse = response; + this.eventLog.organisationAuditEventListResponse.organisationAuditEventList.forEach( (f: any) => { - f.role = 'Admin'; - f.email = f.userName; // the common component expect the field as email - } - ); + f.owner = (f.firstName ?? '') + ' ' + (f.lastName ?? '') +' ' + (f.actionedBy ?? ''); + if(f.event?.toUpperCase() == "ORGROLEASSIGNED" || f.event?.toUpperCase() == "ORGROLEUNASSIGNED" || + f.event?.toUpperCase() == "ADMINROLEASSIGNED" || f.event?.toUpperCase() == "ADMINROLEUNASSIGNED") + { + this.translate.get(f.event).subscribe(val => f.event = val); + if(f.event.includes('[RoleName]')){ + if(f.role?.length > 0){ + f.event = f.event.replace('[RoleName]', f.role); + } + else{ + f.event = f.event.replace('[RoleName]', 'None'); + } + } + } + else{ + this.translate.get(f.event).subscribe(val => f.event = val); + } + }); this.eventLog.pageCount = - this.eventLog.userListResponse.pageCount; + this.eventLog.organisationAuditEventListResponse.pageCount; } }, error: (error: any) => {}, @@ -137,4 +174,17 @@ export class ViewVerifiedOrgComponent implements OnInit { sessionStorage.setItem('activetab','verifiedOrg') window.history.back(); } + + 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') { + return 'Internal Identifier'; + } + else { + return ''; + } + } } diff --git a/src/app/services/wrapper/wrapper-buyer-both.service.ts b/src/app/services/wrapper/wrapper-buyer-both.service.ts index 27e50ac0f..b308467bc 100644 --- a/src/app/services/wrapper/wrapper-buyer-both.service.ts +++ b/src/app/services/wrapper/wrapper-buyer-both.service.ts @@ -2,7 +2,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; -import { OrganisationAuditListResponse } from 'src/app/models/organisation'; +import { OrganisationAuditEventListResponse, OrganisationAuditListResponse } from 'src/app/models/organisation'; import { environment } from 'src/environments/environment'; @@ -19,7 +19,6 @@ export class WrapperBuyerBothService { constructor(private http: HttpClient) { } getpendingVerificationOrg(organisationId: string, searchString: string, currentPage: number, pageSize: number, includeSelf: boolean = false): Observable { - debugger; pageSize = pageSize <= 0 ? 10 : pageSize; const url = `${this.org}/audits?currentPage=${currentPage}&pageSize=${pageSize}&search-string=${encodeURIComponent(searchString)}&pending-only=true`; return this.http.get(url).pipe( @@ -42,5 +41,26 @@ export class WrapperBuyerBothService { }) ); } - + + getOrgEventLogs(organisationId: string, currentPage: number, pageSize: number): Observable { + pageSize = pageSize <= 0 ? 10 : pageSize; + const url = `${this.org}/${organisationId}/auditevents?currentPage=${currentPage}&pageSize=${pageSize}`; + return this.http.get(url).pipe( + map((data: OrganisationAuditEventListResponse) => { + return data + }), catchError(error => { + return throwError(error); + }) + ); + } + + manualValidation(ciiOrgId: string, status:number): Observable { + return this.http.put(`${this.org}/${ciiOrgId}/manualvalidate?status=${status}`, '').pipe( + map((data: any) => { + return data; + }), catchError(error => { + return throwError(error); + }) + ); + } } diff --git a/src/app/services/wrapper/wrapper-org--group-service.ts b/src/app/services/wrapper/wrapper-org--group-service.ts index 5156500e4..4ae48456b 100644 --- a/src/app/services/wrapper/wrapper-org--group-service.ts +++ b/src/app/services/wrapper/wrapper-org--group-service.ts @@ -171,9 +171,12 @@ export class WrapperOrganisationGroupService { ); } - getUsersAdmin(organisationId: string, currentPage: number, pageSize: number): Observable { + getUsersAdmin(organisationId: string, currentPage: number, pageSize: number, includeUnverifiedAdmin: boolean = false): Observable { pageSize = pageSize <= 0 ? 10 : pageSize; - const url = `${this.url}/${organisationId}/users?currentPage=${currentPage}&pageSize=${pageSize}&isAdmin=true&include-self=true`; + let url = `${this.url}/${organisationId}/users?currentPage=${currentPage}&pageSize=${pageSize}&isAdmin=true&include-self=true`; + if(includeUnverifiedAdmin){ + url += "&include-unverified-admin=true"; + } return this.http.get(url).pipe( map((data: UserListResponse) => { return data; @@ -182,4 +185,6 @@ export class WrapperOrganisationGroupService { }) ); } + + } \ No newline at end of file diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 3a6998058..89c87333e 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -321,5 +321,24 @@ "CONFIRM_REMOVE_SIGN_IN_PROVIDER": "Confirm you want to remove sign-in providers", "DO_YOU_WANT_TO_PROCEED": "Do you want to proceed?", "YES_DELETE_BTN": "Yes", - "NO_DELETE_BTN": "No" + "NO_DELETE_BTN": "No", + "OrgRoleAssigned": "Assignment of [RoleName] role", + "OrgRoleUnassigned": "Unassignment of [RoleName] role", + "AdminRoleAssigned": "Assignment of [RoleName] role", + "AdminRoleUnassigned": "Unassignment of [RoleName] role", + "ManualAcceptationRightToBuy": "Manual acceptation of right to buy status", + "ManualDeclineRightToBuy": "Manual decline of right to buy status", + "AutomaticAcceptationRightToBuy": "Automatic acceptation of right to buy status", + "AutomaticDeclineRightToBuy": "Automatic decline of right to buy status", + "OrganisationTypeBuyerToSupplier": "Organisation type changed from buyer to supplier", + "OrganisationTypeBuyerToBoth": "Organisation type changed from buyer to both", + "OrganisationTypeBothToSupplier": "Organisation type changed from both to supplier", + "OrganisationTypeBothToBuyer": "Organisation type changed from buyer to buyer", + "OrganisationTypeSupplierToBoth": "Organisation type changed from supplier to both", + "OrganisationTypeSupplierToBuyer": "Organisation type changed from supplier to buyer", + "NotRecognizedAsVerifiedBuyer": "Organisation not recognized as verified buyer in autovalidation process", + "OrganisationRegistrationTypeBuyer": "Organisation registration Type of organisation: Buyer", + "OrganisationRegistrationTypeBoth": "Organisation registration Type of organisation: Both", + "InactiveOrganisationRemoved": "Organisation has been removed from PPG due to lack of account activation within 36 hours", + "ManualRemoveRightToBuy": "Manual removal of right to buy status" } \ No newline at end of file From eac4aba52275db57bb4886797bb520dd8c22703e Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 23 Nov 2022 11:18:03 +0530 Subject: [PATCH 34/79] 4016 mse bugs (#877) * 4016-bugs-fixed * auto validation success part updated * typo changes --- .../confirm-org-type.component.html | 10 ++++----- .../update-org-type.component.html | 21 ++++++++++++++++--- .../update-org-type.component.scss | 3 +++ .../update-org-type.component.ts | 13 ++++++++---- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html index cdcca4d64..7361b4187 100644 --- a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.html @@ -17,19 +17,19 @@

Confirm service roles changes for the or
- Right to buy status + Organisation type:
- Default service roles available for this organisation + Service roles you are assigning to this organisation:
- Additional service roles available for this organisation + Service roles you are unassigning from this organisation:
@@ -51,7 +51,7 @@

Confirm service roles changes for the or
- +
Service roles you are assigning to this organisation: @@ -130,7 +130,7 @@

Confirm service roles changes for the or
- +
Service roles which will be assigned after manual validation is completed: diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.html b/src/app/pages/buyer/update-org-type/update-org-type.component.html index 9d651e063..3b2e3ff4b 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.html +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.html @@ -22,6 +22,18 @@

Review service roles for the organisation

+
+
+

+ Important +

+
+
+

+ This organisation is currently awaiting verification of its buyer status. You won't be able to make any changes to the roles assigned to this organisation until the verification process is complete. +

+
+
@@ -30,21 +42,21 @@

+ [(ngModel)]="adminSelectionMode" (click)="onSelect(0,'html')" [attr.disabled]="autoValidationPending"/>
+ [(ngModel)]="adminSelectionMode" (click)="onSelect(1,'html')" [attr.disabled]="autoValidationPending" />
+ [(ngModel)]="adminSelectionMode" (click)="onSelect(2,'html')" [attr.disabled]="autoValidationPending"/> @@ -72,6 +84,7 @@

(change)="onChange($event, role?.enabled, role)" class="govuk-checkboxes__input" id="orgRoleControl_{{ role.roleId }}" + [attr.disabled]="autoValidationPending" />

@@ -94,6 +92,7 @@

Event log

+
diff --git a/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.scss b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.scss index fe6cca1ea..05c5273b6 100644 --- a/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.scss +++ b/src/app/pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component.scss @@ -9,4 +9,7 @@ .navigation-text{ text-decoration: underline; color: #005ea5; +} +.govuk-valign-top{ + vertical-align: top; } \ No newline at end of file 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 d62668756..c793a4519 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 @@ -31,7 +31,7 @@

Organisation details

Organisation type:{{routeDetails.event.organisationTypeName}}

- Date of registration:{{routeDetails.event.dateOfRegistration}} + Date of registration:{{routeDetails.event.dateOfRegistration | date: 'dd/MM/yyyy'}}
{{routeDetails.event.dateOfRegistration | date: 'HH:mm'}}

Right to buy status:{{routeDetails.event.rightToBuy ? 'Approved' : 'Declined'}} @@ -96,6 +96,7 @@

Event log

+
diff --git a/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.scss b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.scss index 1ca27997d..3e8fe36e2 100644 --- a/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.scss +++ b/src/app/pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component.scss @@ -12,4 +12,7 @@ } a { text-decoration: underline; +} +.govuk-valign-top{ + vertical-align: top; } \ No newline at end of file From 1ec5fe8104a6423c0e7fb8e6ebcbe2adad811797 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 23 Nov 2022 16:41:55 +0530 Subject: [PATCH 37/79] local machine error fixed (#881) --- src/app/pages/buyer/update-org-type/update-org-type.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index 744cc8a96..35b46feea 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -42,6 +42,7 @@ export class UpdateOrgTypeComponent implements OnInit { rolesToDelete: Role[]; adminSelectionMode : string = ""; public routeData:any={} + public autoValidationPending:any=null constructor(private formBuilder: FormBuilder, private organisationService: OrganisationService,private WrapperOrganisationService:WrapperOrganisationService, private wrapperConfigService: WrapperConfigurationService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, private organisationGroupService: WrapperOrganisationGroupService, From 195a9f4b0ec1a381c00edf2f37e8d2d3c4b58b44 Mon Sep 17 00:00:00 2001 From: brijrajsinh-bc <109584978+brijrajsinh-bc@users.noreply.github.com> Date: Wed, 23 Nov 2022 19:26:27 +0530 Subject: [PATCH 38/79] Auto validation manage service elegibilty UI (#883) * View buyer status approve, reject, Api integration * Remove conflict text * Manage Buyer status request approval, declined flow change * Event logs changes * buyer status request log type and role name fixes Co-authored-by: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> --- src/app/models/organisation.ts | 2 + .../view-pending-verification.component.ts | 36 +++++++++++--- .../view-verified-org.component.ts | 47 ++++++++++++++++--- 3 files changed, 72 insertions(+), 13 deletions(-) diff --git a/src/app/models/organisation.ts b/src/app/models/organisation.ts index 2a5e096ca..9779fda26 100644 --- a/src/app/models/organisation.ts +++ b/src/app/models/organisation.ts @@ -96,6 +96,8 @@ export interface OrganisationAuditEventList owner: string; event: string; date: Date; + role: string; + roleKey: string; } export interface OrganisationAuditEventListResponse extends PaginationInfo { 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 6a189f257..ab283d190 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 @@ -152,14 +152,36 @@ export class ViewPendingVerificationComponent implements OnInit { f.event?.toUpperCase() == "ADMINROLEASSIGNED" || f.event?.toUpperCase() == "ADMINROLEUNASSIGNED") { this.translate.get(f.event).subscribe(val => f.event = val); - if(f.event.includes('[RoleName]')){ - if(f.role?.length > 0){ - f.event = f.event.replace('[RoleName]', f.role); - } - else{ - f.event = f.event.replace('[RoleName]', 'None'); - f.event = f.event.replace('[RoleName]', 'None'); + if(f.event.includes('[RoleName]')) + { + var role = f.role; + switch (f.roleKey){ + case 'CAT_USER': { + role = 'Contract Award Service (CAS) - add service'; + break; + } + case 'ACCESS_CAAAC_CLIENT': { + role ='Contract Award Service (CAS) - add to dashboard'; + break; + } + case 'JAEGGER_SUPPLIER': { + role = 'eSourcing Service as a supplier'; + break; + } + case 'JAEGGER_BUYER': { + role = 'eSourcing Service as a buyer'; + break; + } + case 'JAGGAER_USER': { + role = 'eSourcing Service - add service'; + break; + } + case 'ACCESS_JAGGAER': { + role = 'eSourcing Service - add to dashboard'; + break; + } } + f.event = f.event.replace('[RoleName]', role); } } else{ 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 eed743a15..739cf11dc 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 @@ -140,17 +140,52 @@ export class ViewVerifiedOrgComponent implements OnInit { this.eventLog.organisationAuditEventListResponse.organisationAuditEventList.forEach( (f: any) => { f.owner = (f.firstName ?? '') + ' ' + (f.lastName ?? '') +' ' + (f.actionedBy ?? ''); + if(f.owner.trim() == ''){ + if(f.event?.toUpperCase() == "INACTIVEORGANISATIONREMOVED"){ + f.owner = "Automatic organisation removal"; + } + else if(f.actioned?.toUpperCase() == "AUTOVALIDATION"){ + f.owner = "Autovalidation"; + } + else if(f.actioned?.toUpperCase() == "JOB"){ + f.owner = "Job"; + } + } + if(f.event?.toUpperCase() == "ORGROLEASSIGNED" || f.event?.toUpperCase() == "ORGROLEUNASSIGNED" || f.event?.toUpperCase() == "ADMINROLEASSIGNED" || f.event?.toUpperCase() == "ADMINROLEUNASSIGNED") { this.translate.get(f.event).subscribe(val => f.event = val); - if(f.event.includes('[RoleName]')){ - if(f.role?.length > 0){ - f.event = f.event.replace('[RoleName]', f.role); - } - else{ - f.event = f.event.replace('[RoleName]', 'None'); + if(f.event.includes('[RoleName]')) + { + var role = f.role; + switch (f.roleKey){ + case 'CAT_USER': { + role = 'Contract Award Service (CAS) - add service'; + break; + } + case 'ACCESS_CAAAC_CLIENT': { + role ='Contract Award Service (CAS) - add to dashboard'; + break; + } + case 'JAEGGER_SUPPLIER': { + role = 'eSourcing Service as a supplier'; + break; + } + case 'JAEGGER_BUYER': { + role = 'eSourcing Service as a buyer'; + break; + } + case 'JAGGAER_USER': { + role = 'eSourcing Service - add service'; + break; + } + case 'ACCESS_JAGGAER': { + role = 'eSourcing Service - add to dashboard'; + break; + } } + f.event = f.event.replace('[RoleName]', role); } } else{ From b5c4bc8ef06008423400d776a0315f9d86690f1b Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Thu, 24 Nov 2022 11:55:15 +0530 Subject: [PATCH 39/79] 4016 mse bugs (#885) * 4016-bugs-fixed * auto validation success part updated * typo changes --- .../update-org-type/update-org-type.component.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index 35b46feea..ff711f963 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -41,8 +41,7 @@ export class UpdateOrgTypeComponent implements OnInit { rolesToAddAutoValidation: Role[] | any; rolesToDelete: Role[]; adminSelectionMode : string = ""; - public routeData:any={} - public autoValidationPending:any=null + public autoValidationPending = null; constructor(private formBuilder: FormBuilder, private organisationService: OrganisationService,private WrapperOrganisationService:WrapperOrganisationService, private wrapperConfigService: WrapperConfigurationService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, private organisationGroupService: WrapperOrganisationGroupService, @@ -80,7 +79,7 @@ export class UpdateOrgTypeComponent implements OnInit { * buyer = 1 * both = 2 */ - public onSelect(type: string | number,accessfrom:string) { + public onSelect(type: string | number,accessFrom:string) { const buyerRemoveList=['EL_JNR_SUPPLIER','EL_SNR_SUPPLIER','JAEGGER_SUPPLIER'] const supplierRemoveList=['JAEGGER_BUYER','ACCESS_CAAAC_CLIENT','CAT_USER','ACCESS_FP_CLIENT','FP_USER'] this.rolesToAdd = []; @@ -92,7 +91,7 @@ export class UpdateOrgTypeComponent implements OnInit { buyerRemoveList.map((removeRoleKey:any)=>{ this.roles.map((buyerRoles,index)=>{ if(buyerRoles.roleKey == removeRoleKey){ - if(accessfrom === "html"){ + if(accessFrom === "html" && buyerRoles.enabled){ this.rolesToDelete.push(buyerRoles); } this.roles.splice(index,1) @@ -104,14 +103,17 @@ export class UpdateOrgTypeComponent implements OnInit { else if(type == 0){ supplierRemoveList.map((removeRoleKey:any)=>{ this.roles.map((buyerRoles,index)=>{ - if(buyerRoles.roleKey == removeRoleKey && buyerRoles.enabled === false){ + if(buyerRoles.roleKey == removeRoleKey){ + if(accessFrom === "html" && buyerRoles.enabled){ + this.rolesToDelete.push(buyerRoles); + } this.roles.splice(index,1) } }) }) } - if(accessfrom === "html" && type != this.adminSelectionMode){ + if(accessFrom === "html" && type != this.adminSelectionMode){ this.preTickRoles(type) } } @@ -166,6 +168,7 @@ export class UpdateOrgTypeComponent implements OnInit { if(role.autoValidate === true && !event.target.checked){ const index = this.rolesToAddAutoValidation?.indexOf(role); this.rolesToAddAutoValidation?.splice(index,1) + this.rolesToAdd.splice(index, 1); } else if (defaultValue === true && !event.target.checked) { this.rolesToDelete.push(role); From 48cc832cc67575f4186742d74842a46a2bd8e843 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Thu, 24 Nov 2022 12:09:08 +0530 Subject: [PATCH 40/79] Accessibility issue in autovalidation UI (#886) * local machine error fixed * bug fixing --- src/app/app-routing.module.ts | 22 +++-- src/app/app.module.ts | 4 +- .../govuk-table/govuk-table.component.html | 18 +++- .../govuk-table/govuk-table.component.scss | 3 + .../buyer-both-error.component.html | 19 ++++ .../buyer-both-error.component.scss | 0 .../buyer-both-error.component.spec.ts | 25 ++++++ .../buyer-both-error.component.ts | 15 ++++ .../buyer-both-requests.component.html | 4 +- .../remove-right-to-buy.component.html | 2 +- .../remove-right-to-buy.component.ts | 26 ++++-- .../success-right-to-buy.component.html | 2 +- .../success-right-to-buy.component.ts | 9 +- .../view-pending-verification.component.html | 5 +- .../view-pending-verification.component.ts | 4 +- .../view-verified-org.component.html | 13 ++- .../view-verified-org.component.ts | 87 ++++++++++++------- 17 files changed, 198 insertions(+), 60 deletions(-) create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.html create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.scss create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.spec.ts create mode 100644 src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 4225b05b9..b7f6eca7e 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -125,17 +125,18 @@ import { DelegatedUserActivationComponent } from './pages/manage-delegated/landi import { DelegatedOrganisationComponent } from './pages/manage-delegated/user/delegated-organisation/delegated-organisation.component'; import { TermsConditionsComponent } from './components/terms-conditions/terms-conditions.component'; import { ForgotPasswordErrorComponent } from './pages/forgot-password-error/forgot-password-error.component'; -import { BuyerBothRequestsComponent } from './pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component'; -import { ConfirmDeclineComponent } from './pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component'; -import { BuyerBothRequestsSuccessComponent } from './pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component'; -import { ConfirmAcceptComponent } from './pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component'; import { ViewPendingVerificationComponent } from './pages/manage-buyer-and-both-requests/view-pending-verification/view-pending-verification.component'; import { ViewVerifiedOrgComponent } from './pages/manage-buyer-and-both-requests/view-verified-org/view-verified-org.component'; -import { RemoveRightToBuyComponent } from './pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component'; -import { SuccessRightToBuyComponent } from './pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component'; import { UpdateOrgTypeComponent } from './pages/buyer/update-org-type/update-org-type.component'; -import { ConfirmOrgTypeComponent } from './pages/buyer/confirm-org-type/confirm-org-type.component'; import { AutoValidationBuyerSuccessComponent } from './pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component'; +import { ConfirmOrgTypeComponent } from './pages/buyer/confirm-org-type/confirm-org-type.component'; +import { ConfirmDeclineComponent } from './pages/manage-buyer-and-both-requests/confirm-decline/confirm-decline.component'; +import { BuyerBothRequestsComponent } from './pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component'; +import { ConfirmAcceptComponent } from './pages/manage-buyer-and-both-requests/confirm-accept/confirm-accept.component'; +import { RemoveRightToBuyComponent } from './pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component'; +import { SuccessRightToBuyComponent } from './pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component'; +import { BuyerBothRequestsSuccessComponent } from './pages/manage-buyer-and-both-requests/buyer-both-requests-success/buyer-both-requests-success.component'; +import { BuyerBothErrorComponent } from './pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component'; const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, @@ -1102,6 +1103,13 @@ const routes: Routes = [ canActivate: [AuthGuard, RoleGuard], component: BuyerBothRequestsSuccessComponent, }, + { + path: 'buyer-and-both-fail', + pathMatch: 'full', + data: { roles: ['MANAGE_SUBSCRIPTIONS'] }, + canActivate: [AuthGuard, RoleGuard], + component: BuyerBothErrorComponent, + }, { path: 'terms-of-use', data: { title: 'Terms of Use' }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 820084f97..bb66f9e9a 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -186,6 +186,7 @@ import { SuccessRightToBuyComponent } from './pages/manage-buyer-and-both-reques import { UpdateOrgTypeComponent } from './pages/buyer/update-org-type/update-org-type.component'; import { ConfirmOrgTypeComponent } from './pages/buyer/confirm-org-type/confirm-org-type.component'; import { AutoValidationBuyerSuccessComponent } from './pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component'; +import { BuyerBothErrorComponent } from './pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component'; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http); @@ -337,7 +338,8 @@ export function createTranslateLoader(http: HttpClient) { SuccessRightToBuyComponent, UpdateOrgTypeComponent, ConfirmOrgTypeComponent, - AutoValidationBuyerSuccessComponent + AutoValidationBuyerSuccessComponent, + BuyerBothErrorComponent ], imports: [ // BrowserModule, diff --git a/src/app/components/govuk-table/govuk-table.component.html b/src/app/components/govuk-table/govuk-table.component.html index b227c516c..896e957aa 100644 --- a/src/app/components/govuk-table/govuk-table.component.html +++ b/src/app/components/govuk-table/govuk-table.component.html @@ -5,8 +5,8 @@ {{ header | translate }} - - + . + . @@ -20,9 +20,19 @@ ? 'navigation-text' : '' ]"> - {{ findDateKey(dataKey) ? (dataRow[dataKey] | date: 'dd/MM/yyyy') : dataRow[dataKey] }} + + {{dataRow[dataKey] | date: 'dd/MM/yyyy'}}
+ {{ dataRow[dataKey] | date: 'HH:mm'}} +
+ + {{ dataKey == 'owner' ? dataRow['firstName'] + dataRow['lastName'] : dataRow[dataKey]}} +
+ {{dataRow['actionedBy']}} +
+ + {{dataRow[dataKey]}} +
- {{ dataRow[dataKey] | date: 'HH:mm'}}
diff --git a/src/app/components/govuk-table/govuk-table.component.scss b/src/app/components/govuk-table/govuk-table.component.scss index 2236ec61c..d550ef969 100644 --- a/src/app/components/govuk-table/govuk-table.component.scss +++ b/src/app/components/govuk-table/govuk-table.component.scss @@ -76,4 +76,7 @@ a { display: flex; justify-content: space-between; gap: 20px; +} +.govuk-link-adjust { + color: transparent; } \ No newline at end of file diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.html b/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.html new file mode 100644 index 000000000..329d79b10 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.html @@ -0,0 +1,19 @@ + diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.scss b/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.spec.ts b/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.spec.ts new file mode 100644 index 000000000..8d4790d06 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BuyerBothErrorComponent } from './buyer-both-error.component'; + +describe('BuyerBothErrorComponent', () => { + let component: BuyerBothErrorComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ BuyerBothErrorComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(BuyerBothErrorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.ts b/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.ts new file mode 100644 index 000000000..f59723cd5 --- /dev/null +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-buyer-both-error', + templateUrl: './buyer-both-error.component.html', + styleUrls: ['./buyer-both-error.component.scss'] +}) +export class BuyerBothErrorComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html index 4b1177c0e..9f6a41dd4 100644 --- a/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html +++ b/src/app/pages/manage-buyer-and-both-requests/buyer-both-requests/buyer-both-requests.component.html @@ -32,12 +32,12 @@

Manage Buyer status r
  • - + Buyer status pending
  • - + Approved / declined Buyer status requests
  • diff --git a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.html b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.html index f7ecf0582..c640ba670 100644 --- a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.html +++ b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.html @@ -17,7 +17,7 @@
-

Confirm you want to Remove right to buy status for organisation Organisation name

+

Confirm you want to Remove right to buy status for organisation {{routeDetails.orgName}}

The organisation administrator(s) will be notified that the right to buy status was removed for the organisation. diff --git a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts index e7f53170a..228cb16b9 100644 --- a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts +++ b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts @@ -1,5 +1,7 @@ import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; +import { ManualValidationStatus } from 'src/app/constants/enum'; +import { WrapperBuyerBothService } from 'src/app/services/wrapper/wrapper-buyer-both.service'; @Component({ selector: 'app-remove-right-to-buy', @@ -8,9 +10,14 @@ import { Router } from '@angular/router'; }) export class RemoveRightToBuyComponent implements OnInit { - constructor(private router:Router) { } + constructor(private router:Router,private route: ActivatedRoute,private wrapperBuyerAndBothService:WrapperBuyerBothService) { } + public routeDetails:any = {} ngOnInit(): void { + this.route.queryParams.subscribe(async (para: any) => { + this.routeDetails = JSON.parse(atob(para.data)); + }) + } public Back():void { @@ -19,9 +26,18 @@ export class RemoveRightToBuyComponent implements OnInit { public confirm(){ let data = { status: 'remove', + orgName: this.routeDetails.orgName }; - this.router.navigateByUrl( - 'remove-right-to-buy-success?data=' + btoa(JSON.stringify(data)) - ); + this.wrapperBuyerAndBothService.manualValidation(this.routeDetails.id, ManualValidationStatus.decline).subscribe({ + next: (response: any) => { + this.router.navigateByUrl( + 'remove-right-to-buy-success?data=' + btoa(JSON.stringify(data)) + ); + }, + error: (error: any) => { + this.router.navigateByUrl('buyer-and-both-fail'); + }, + }); + } } diff --git a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html index dc74cc192..76a6cc049 100644 --- a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html +++ b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.html @@ -17,7 +17,7 @@

You have removed the right to buy for the organisation - Organisation name

+ {{routeDetails.orgName}}

Return to Manage Buyer status requests

diff --git a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.ts b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.ts index 131cf528e..6a8be4844 100644 --- a/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.ts +++ b/src/app/pages/manage-buyer-and-both-requests/success-right-to-buy/success-right-to-buy.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; @Component({ selector: 'app-success-right-to-buy', @@ -7,9 +8,13 @@ import { Component, OnInit } from '@angular/core'; }) export class SuccessRightToBuyComponent implements OnInit { - constructor() { } - + constructor(private router:Router,private route: ActivatedRoute) { } + + public routeDetails:any = {} ngOnInit(): void { + this.route.queryParams.subscribe(async (para: any) => { + this.routeDetails = JSON.parse(atob(para.data)); + }) } } 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 d5f0fb647..000bd14f6 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 @@ -16,7 +16,7 @@
-

View organisation's Buyer status request

+

View organisations’ Buyer status request

View the details of the organisation that is pending the manual verification process for buyer status. If you want to accept this organisation as a verified buyer, please use ‘Accept buyer status’ button on the bottom of this page. @@ -84,8 +84,7 @@

Event log

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 ab283d190..dc59f3437 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 @@ -80,8 +80,10 @@ export class ViewPendingVerificationComponent implements OnInit { if (this.registries != undefined) { this.additionalIdentifiers = this.registries?.additionalIdentifiers; } - this.getOrganisationUsers(); }); + setTimeout(() => { + this.getOrganisationUsers(); + }, 10); } public openEmailWindow(data: any): void { 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 c793a4519..d46ebf0f7 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 @@ -16,7 +16,7 @@
-

View organisation's Buyer status

+

View organisations’ Buyer status

View details of organisations’ Buyer status @@ -88,8 +88,8 @@

Event log

@@ -97,11 +97,16 @@

Event log


-
+
+
\ 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 739cf11dc..a42f44cc8 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 @@ -1,25 +1,29 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { CiiAdditionalIdentifier, CiiOrgIdentifiersDto } from 'src/app/models/org'; +import { + CiiAdditionalIdentifier, + CiiOrgIdentifiersDto, +} from 'src/app/models/org'; import { WrapperBuyerBothService } from 'src/app/services/wrapper/wrapper-buyer-both.service'; import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; import { environment } from 'src/environments/environment'; import { ciiService } from 'src/app/services/cii/cii.service'; import { TranslateService } from '@ngx-translate/core'; +import { ManualValidationStatus } from 'src/app/constants/enum'; @Component({ selector: 'app-view-verified-org', templateUrl: './view-verified-org.component.html', - styleUrls: ['./view-verified-org.component.scss'] + styleUrls: ['./view-verified-org.component.scss'], }) export class ViewVerifiedOrgComponent implements OnInit { private organisationId: string = ''; pageName = 'Contactadmin'; - public routeDetails:any; + public routeDetails: any; public registries: CiiOrgIdentifiersDto; public additionalIdentifiers?: CiiAdditionalIdentifier[]; schemeData: any[] = []; - + public organisationAdministrator = { usersTableHeaders: ['Name', 'Email address', 'Role'], usersColumnsToDisplay: ['name', 'email', 'role'], @@ -50,9 +54,13 @@ export class ViewVerifiedOrgComponent implements OnInit { }, }; - constructor(private route: ActivatedRoute, private wrapperBuyerAndBothService:WrapperBuyerBothService, + constructor( + private route: ActivatedRoute, + private wrapperBuyerAndBothService: WrapperBuyerBothService, private WrapperOrganisationGroupService: WrapperOrganisationGroupService, - private router:Router, private ciiService: ciiService, private translate: TranslateService + private router: Router, + private ciiService: ciiService, + private translate: TranslateService ) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; this.organisationAdministrator.userListResponse = { @@ -74,17 +82,25 @@ export class ViewVerifiedOrgComponent implements OnInit { async ngOnInit() { this.route.queryParams.subscribe(async (para: any) => { - this.routeDetails = JSON.parse(atob(para.data)); - this.schemeData = await this.ciiService.getSchemes().toPromise() as any[]; - await this.ciiService.getOrgDetails(this.routeDetails.event.organisationId, true).toPromise() - .then((data:any) => { - this.registries = data; - if (this.registries != undefined) { - this.additionalIdentifiers = this.registries?.additionalIdentifiers; - } - }) - .catch((err) => {console.log('err', err);}); - this.getOrganisationUsers(); + this.routeDetails = JSON.parse(atob(para.data)); + this.schemeData = (await this.ciiService + .getSchemes() + .toPromise()) as any[]; + await this.ciiService + .getOrgDetails(this.routeDetails.event.organisationId, true) + .toPromise() + .then((data: any) => { + this.registries = data; + if (this.registries != undefined) { + this.additionalIdentifiers = this.registries?.additionalIdentifiers; + } + setTimeout(() => { + this.getOrganisationUsers(); + }, 10); + }) + .catch((err) => { + console.log('err', err); + }); }); } @@ -127,7 +143,7 @@ export class ViewVerifiedOrgComponent implements OnInit { this.eventLog.currentPage = pageNumber; this.getEventLogDetails(); } - + public getEventLogDetails():void{ this.wrapperBuyerAndBothService.getOrgEventLogs( this.routeDetails.event.organisationId, @@ -200,30 +216,43 @@ export class ViewVerifiedOrgComponent implements OnInit { }); } - - public removeRightToBuy():void{ + public removeRightToBuy(): void { let data = { - id:'123456' - } + id: this.routeDetails.event.organisationId, + status :ManualValidationStatus.decline, + orgName : this.routeDetails.event.organisationName + }; this.router.navigateByUrl( 'remove-right-to-buy?data=' + btoa(JSON.stringify(data)) ); } + goBack() { - sessionStorage.setItem('activetab','verifiedOrg') + sessionStorage.setItem('activetab', 'verifiedOrg'); window.history.back(); } public getSchemaName(schema: string): string { - let selecedScheme = this.schemeData.find(s => s.scheme === schema); - if(selecedScheme?.schemeName) { + let selecedScheme = this.schemeData.find((s) => s.scheme === schema); + if (selecedScheme?.schemeName) { return selecedScheme?.schemeName; - } - else if (schema === 'GB-CCS') { + } else if (schema === 'GB-CCS') { return 'Internal Identifier'; - } - else { + } else { return ''; } } + + public nevigateViewEdit() { + let data = { + companyHouseId: this.registries.identifier?.id, + Id: this.routeDetails.event.organisationId, + }; + window.open( + environment.uri.web.dashboard + + '/update-org-type/confirm?data=' + + btoa(JSON.stringify(data)), + '_blank' + ); + } } From 84dc56b7d31f977c0a1a75b7008dcba6fb029653 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Thu, 24 Nov 2022 12:57:21 +0530 Subject: [PATCH 41/79] build error fixes (#888) --- src/app/pages/buyer/update-org-type/update-org-type.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index ff711f963..2026df8eb 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -42,6 +42,7 @@ export class UpdateOrgTypeComponent implements OnInit { rolesToDelete: Role[]; adminSelectionMode : string = ""; public autoValidationPending = null; + public routeData:any= {} constructor(private formBuilder: FormBuilder, private organisationService: OrganisationService,private WrapperOrganisationService:WrapperOrganisationService, private wrapperConfigService: WrapperConfigurationService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, private organisationGroupService: WrapperOrganisationGroupService, From 4dcb0e181eedcd16461b7c36711a9fd322a73bf3 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Thu, 24 Nov 2022 21:35:47 +0530 Subject: [PATCH 42/79] Auto validation ajith (#890) * # * table issue fixed * fixed four bugs --- .../govuk-table/govuk-table.component.html | 20 +++++++++++++------ .../govuk-table/govuk-table.component.ts | 5 +++++ ...to-validation-buyer-success.component.html | 6 +++--- ...auto-validation-buyer-success.component.ts | 1 + .../confirm-changes/confirm.component.ts | 1 - .../update-org-type.component.ts | 1 + .../remove-right-to-buy.component.ts | 2 +- .../view-pending-verification.component.html | 4 ++-- .../view-pending-verification.component.ts | 3 +++ .../view-verified-org.component.html | 6 +++--- .../view-verified-org.component.ts | 8 +++++--- 11 files changed, 38 insertions(+), 19 deletions(-) diff --git a/src/app/components/govuk-table/govuk-table.component.html b/src/app/components/govuk-table/govuk-table.component.html index 896e957aa..ebb823974 100644 --- a/src/app/components/govuk-table/govuk-table.component.html +++ b/src/app/components/govuk-table/govuk-table.component.html @@ -20,17 +20,25 @@ ? 'navigation-text' : '' ]"> + + {{dataRow[dataKey] | date: 'dd/MM/yyyy'}}
- {{ dataRow[dataKey] | date: 'HH:mm'}} + {{ dataRow[dataKey] | date: 'HH:mm'}}
- {{ dataKey == 'owner' ? dataRow['firstName'] + dataRow['lastName'] : dataRow[dataKey]}} -
- {{dataRow['actionedBy']}} -
+ + {{ dataRow['firstName']}} {{ dataRow['lastName'] }} +
+ {{dataRow['actionedBy']}} +
+ + {{ dataRow[dataKey] }} + + + - {{dataRow[dataKey]}} + {{dataRow[dataKey]}}
diff --git a/src/app/components/govuk-table/govuk-table.component.ts b/src/app/components/govuk-table/govuk-table.component.ts index f7893e262..a97c261b7 100644 --- a/src/app/components/govuk-table/govuk-table.component.ts +++ b/src/app/components/govuk-table/govuk-table.component.ts @@ -28,6 +28,7 @@ export class GovUKTableComponent extends BaseComponent implements OnInit { @Input() pageName?: string; @Input() hyperLinkArray?:string[]; @Input() hyperArrayVisible?:boolean; + @Input() eventLog?:boolean; @Output() hyperLinkClickEvent = new EventEmitter(); @Output() checkBoxClickEvent = new EventEmitter(); @Output() radioClickEvent = new EventEmitter(); @@ -50,6 +51,7 @@ export class GovUKTableComponent extends BaseComponent implements OnInit { } ngOnChanges() { + console.log("event",this.eventLog) if (this.useClientPagination) { this.pageCount = Math.ceil(this.data.length / this.pageSize); this.totalPagesArray = Array(this.pageCount).fill(0).map((x, i) => i + 1); @@ -104,6 +106,9 @@ export class GovUKTableComponent extends BaseComponent implements OnInit { public findDateKey(key:string){ + // if(!this.eventLog){{ + // return true + // }} switch(key) { case 'endDate': { return true diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html index 98feeb09d..dcc86884e 100644 --- a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html @@ -50,7 +50,7 @@

You have successfully saved the changes<
- +
Service roles you have assigned to this organisation: @@ -87,7 +87,7 @@

You have successfully saved the changes<

- Service roles you have unassigned from this organisation + Service roles you have unassigned from this organisation:
@@ -129,7 +129,7 @@

You have successfully saved the changes<
- +
Roles which will be assigned after manual validation is completed: diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts index 34f21279d..6a8196c1a 100644 --- a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts @@ -40,6 +40,7 @@ export class AutoValidationBuyerSuccessComponent implements OnDestroy { next: data => { this.org = data; this.changes = JSON.parse(localStorage.getItem(`mse_org_${this.org.ciiOrganisationId}`)+''); + console.log("this.changes",this.changes) if(!this.changes){ this.router.navigateByUrl('home'); return diff --git a/src/app/pages/buyer/confirm-changes/confirm.component.ts b/src/app/pages/buyer/confirm-changes/confirm.component.ts index 662822a46..1d2a47328 100644 --- a/src/app/pages/buyer/confirm-changes/confirm.component.ts +++ b/src/app/pages/buyer/confirm-changes/confirm.component.ts @@ -42,7 +42,6 @@ export class BuyerConfirmChangesComponent extends BaseComponent { next: data => { this.org = data; this.changes = JSON.parse(localStorage.getItem(`mse_org_${this.org.ciiOrganisationId}`)+''); - console.log("this.changes",this.changes) } }); } diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index 2026df8eb..84c52e144 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -65,6 +65,7 @@ export class UpdateOrgTypeComponent implements OnInit { this.org$.subscribe({ next: data => { this.organisation = data; + this.autoValidationPending = data.isAutovalidationPending this.adminSelectionMode = data.supplierBuyerType.toString(); this.getOrgRoles(); } diff --git a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts index 228cb16b9..71123f30a 100644 --- a/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts +++ b/src/app/pages/manage-buyer-and-both-requests/remove-right-to-buy/remove-right-to-buy.component.ts @@ -28,7 +28,7 @@ export class RemoveRightToBuyComponent implements OnInit { status: 'remove', orgName: this.routeDetails.orgName }; - this.wrapperBuyerAndBothService.manualValidation(this.routeDetails.id, ManualValidationStatus.decline).subscribe({ + this.wrapperBuyerAndBothService.manualValidation(this.routeDetails.id, ManualValidationStatus.remove).subscribe({ next: (response: any) => { this.router.navigateByUrl( 'remove-right-to-buy-success?data=' + btoa(JSON.stringify(data)) 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 000bd14f6..2843418af 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 @@ -25,10 +25,10 @@

View organisations’

Organisation details

- Organisation name:{{routeDetails.organisationName}} + Organisation name :{{routeDetails.organisationName}}

- Organisation type:{{routeDetails.organisationTypeName}} + Organisation type   :{{routeDetails.organisationTypeName}}

Date of registration:{{routeDetails.dateOfRegistration | date: 'dd/MM/yyyy'}}
{{routeDetails.dateOfRegistration | date: 'HH:mm'}}
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 dc59f3437..d7bb40c09 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 @@ -139,6 +139,7 @@ export class ViewPendingVerificationComponent implements OnInit { (f: any) => { f.owner = (f.firstName ?? '') + ' ' + (f.lastName ?? '') +' ' + (f.actionedBy ?? ''); if(f.owner.trim() == ''){ + f.defaultOwnerChanges = true if(f.event?.toUpperCase() == "INACTIVEORGANISATIONREMOVED"){ f.owner = "Automatic organisation removal"; } @@ -148,6 +149,8 @@ export class ViewPendingVerificationComponent implements OnInit { else if(f.actioned?.toUpperCase() == "JOB"){ f.owner = "Job"; } + } else { + f.defaultOwnerChanges = false; } if(f.event?.toUpperCase() == "ORGROLEASSIGNED" || f.event?.toUpperCase() == "ORGROLEUNASSIGNED" || 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 d46ebf0f7..6869fcfb6 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 @@ -25,16 +25,16 @@

View organisations’

Organisation details

- Organisation name:{{routeDetails.event.organisationName}} + Organisation name :{{routeDetails.event.organisationName}}

- Organisation type:{{routeDetails.event.organisationTypeName}} + Organisation type   :{{routeDetails.event.organisationTypeName}}

Date of registration:{{routeDetails.event.dateOfRegistration | date: 'dd/MM/yyyy'}}
{{routeDetails.event.dateOfRegistration | date: 'HH:mm'}}

- Right to buy status:{{routeDetails.event.rightToBuy ? 'Approved' : 'Declined'}} + Right to buy status :{{routeDetails.event.rightToBuy ? 'Approved' : 'Declined'}}

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 a42f44cc8..a5790be1b 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 @@ -22,8 +22,7 @@ export class ViewVerifiedOrgComponent implements OnInit { public routeDetails: any; public registries: CiiOrgIdentifiersDto; public additionalIdentifiers?: CiiAdditionalIdentifier[]; - schemeData: any[] = []; - + public schemeData: any[] = []; public organisationAdministrator = { usersTableHeaders: ['Name', 'Email address', 'Role'], usersColumnsToDisplay: ['name', 'email', 'role'], @@ -157,6 +156,7 @@ export class ViewVerifiedOrgComponent implements OnInit { (f: any) => { f.owner = (f.firstName ?? '') + ' ' + (f.lastName ?? '') +' ' + (f.actionedBy ?? ''); if(f.owner.trim() == ''){ + f.defaultOwnerChanges = true if(f.event?.toUpperCase() == "INACTIVEORGANISATIONREMOVED"){ f.owner = "Automatic organisation removal"; } @@ -166,7 +166,9 @@ export class ViewVerifiedOrgComponent implements OnInit { else if(f.actioned?.toUpperCase() == "JOB"){ f.owner = "Job"; } - } + } else { + f.defaultOwnerChanges = false; + } if(f.event?.toUpperCase() == "ORGROLEASSIGNED" || f.event?.toUpperCase() == "ORGROLEUNASSIGNED" || f.event?.toUpperCase() == "ADMINROLEASSIGNED" || f.event?.toUpperCase() == "ADMINROLEUNASSIGNED") From d6fe243c9ebdcc0e72bf848de72aaf4a353d499c Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Fri, 25 Nov 2022 11:28:14 +0530 Subject: [PATCH 43/79] auto validation pending bug fixed (#893) --- .../buyer/update-org-type/update-org-type.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index 84c52e144..f5e824ad5 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -41,7 +41,7 @@ export class UpdateOrgTypeComponent implements OnInit { rolesToAddAutoValidation: Role[] | any; rolesToDelete: Role[]; adminSelectionMode : string = ""; - public autoValidationPending = null; + public autoValidationPending:any = null; public routeData:any= {} constructor(private formBuilder: FormBuilder, private organisationService: OrganisationService,private WrapperOrganisationService:WrapperOrganisationService, private wrapperConfigService: WrapperConfigurationService, private router: Router, private route: ActivatedRoute, @@ -67,6 +67,11 @@ export class UpdateOrgTypeComponent implements OnInit { this.organisation = data; this.autoValidationPending = data.isAutovalidationPending this.adminSelectionMode = data.supplierBuyerType.toString(); + if(data.isAutovalidationPending === true){ + this.autoValidationPending = true + } else{ + this.autoValidationPending = null + } this.getOrgRoles(); } }); From 5cdfeba6ef6795a06367cf164b2449c3b9642c87 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Fri, 25 Nov 2022 14:17:03 +0530 Subject: [PATCH 44/79] 4039 confirmation page issue mse (#895) * auto validation pending bug fixed * 4039 issues fixed * # * # * # --- src/app/components/govuk-table/govuk-table.component.ts | 5 ----- .../auto-validation-buyer-success.component.ts | 1 - .../buyer/update-org-type/update-org-type.component.ts | 9 +++++++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/app/components/govuk-table/govuk-table.component.ts b/src/app/components/govuk-table/govuk-table.component.ts index a97c261b7..f7893e262 100644 --- a/src/app/components/govuk-table/govuk-table.component.ts +++ b/src/app/components/govuk-table/govuk-table.component.ts @@ -28,7 +28,6 @@ export class GovUKTableComponent extends BaseComponent implements OnInit { @Input() pageName?: string; @Input() hyperLinkArray?:string[]; @Input() hyperArrayVisible?:boolean; - @Input() eventLog?:boolean; @Output() hyperLinkClickEvent = new EventEmitter(); @Output() checkBoxClickEvent = new EventEmitter(); @Output() radioClickEvent = new EventEmitter(); @@ -51,7 +50,6 @@ export class GovUKTableComponent extends BaseComponent implements OnInit { } ngOnChanges() { - console.log("event",this.eventLog) if (this.useClientPagination) { this.pageCount = Math.ceil(this.data.length / this.pageSize); this.totalPagesArray = Array(this.pageCount).fill(0).map((x, i) => i + 1); @@ -106,9 +104,6 @@ export class GovUKTableComponent extends BaseComponent implements OnInit { public findDateKey(key:string){ - // if(!this.eventLog){{ - // return true - // }} switch(key) { case 'endDate': { return true diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts index 6a8196c1a..34f21279d 100644 --- a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.ts @@ -40,7 +40,6 @@ export class AutoValidationBuyerSuccessComponent implements OnDestroy { next: data => { this.org = data; this.changes = JSON.parse(localStorage.getItem(`mse_org_${this.org.ciiOrganisationId}`)+''); - console.log("this.changes",this.changes) if(!this.changes){ this.router.navigateByUrl('home'); return diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index f5e824ad5..54eb2c408 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -213,6 +213,15 @@ export class UpdateOrgTypeComponent implements OnInit { if((this.adminSelectionMode == '1' || this.adminSelectionMode == '2' ) && this.organisation.supplierBuyerType == '0'){ this.WrapperOrganisationService.getAutoValidationStatus(this.organisation.ciiOrganisationId).toPromise().then((responce:any) => { selection.autoValidate = responce.autoValidationSuccess + let preTickRemoved:any=[] + if(!responce.autoValidationSuccess){ + this.rolesToAdd.forEach((f:any)=>{ + if(!f.autoValidate){ + preTickRemoved.push(f) + } + }) + selection.toAdd = preTickRemoved + } localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); let data = { ciiOrganisationId:this.organisation.ciiOrganisationId, From 9ede1cac7187c90553a74b04775b92327be4c1ef Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Fri, 25 Nov 2022 14:20:58 +0530 Subject: [PATCH 45/79] Update environment-sandbox.ts --- src/environments/environment-sandbox.ts | 44 ++++++++++++++----------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/src/environments/environment-sandbox.ts b/src/environments/environment-sandbox.ts index 2f69a0eef..4c7d53082 100644 --- a/src/environments/environment-sandbox.ts +++ b/src/environments/environment-sandbox.ts @@ -41,24 +41,28 @@ export const environment = { environment: 'sandbox' }, cookies_policy: { - essentialcookies: { - notify_admin_session: 20, - cookie_policy: 1, - ccs_sso_visitedsites: 60, - opbs: 60, - ccs_sso: 60, - conclave: 60, - XSRF_TOKEN: 30, - XSRF_TOKEN_SVR: 30, - AspNetCore_Antiforgery_GWNWkbbyKbw: 30 + essentialcookies: { + notify_admin_session: 20, + cookie_policy: 1, + ccs_sso_visitedsites: 60, + opbs: 60, + ccs_sso: 60, + conclave: 60, + XSRF_TOKEN: 30, + XSRF_TOKEN_SVR: 30, + AspNetCore_Antiforgery_GWNWkbbyKbw: 30 + }, + Auth0cookies: { + auth0_compat: 3, + did_compat: 6, + did: 6, + auth0: 3, + __cf_bm: 30 + }, }, - Auth0cookies: { - auth0_compat: 3, - did_compat: 6, - did: 6, - auth0: 3, - __cf_bm: 30 - }, - } -}; - + appSetting: { + hideIDP:false, + hideDelegation:false, + hideBulkupload:false + }, + }; From f47d4cdccc1f21b83ae2a3a2e6875e19355fbdf0 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Fri, 25 Nov 2022 15:58:32 +0530 Subject: [PATCH 46/79] Update app-routing.module.ts --- src/app/app-routing.module.ts | 56 +++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index ca4eaeab7..14bbd3697 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -586,34 +586,34 @@ const routes: Routes = [ canActivate: [AuthGuard, RoleGuard], component: ManageUserProfilesComponent, }, - // { - // path: 'manage-users/add-user-selection', - // data: { title: 'Select - Manage Users', roles: ['MANAGE_USERS'] }, - // pathMatch: 'full', - // canActivate: [AuthGuard, RoleGuard], - // component: ManageUserAddSelectionComponent, - // }, - // { - // path: 'manage-users/bulk-users', - // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - // pathMatch: 'full', - // canActivate: [AuthGuard, RoleGuard], - // component: ManageUserBulkUploadComponent, - // }, - // { - // path: 'manage-users/bulk-users/status/:id', - // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - // pathMatch: 'full', - // canActivate: [AuthGuard, RoleGuard], - // component: ManageUserBulkUploadStatusComponent, - // }, - // { - // path: 'manage-users/bulk-users/migration-status/:id', - // data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, - // pathMatch: 'full', - // canActivate: [AuthGuard, RoleGuard], - // component: ManageUserBulkUploadMigrationStatusComponent, - // }, + { + path: 'manage-users/add-user-selection', + data: { title: 'Select - Manage Users', roles: ['MANAGE_USERS'] }, + pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], + component: ManageUserAddSelectionComponent, + }, + { + path: 'manage-users/bulk-users', + data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], + component: ManageUserBulkUploadComponent, + }, + { + path: 'manage-users/bulk-users/status/:id', + data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], + component: ManageUserBulkUploadStatusComponent, + }, + { + path: 'manage-users/bulk-users/migration-status/:id', + data: { title: 'Bulk Upload - Manage Users', roles: ['MANAGE_USERS'] }, + pathMatch: 'full', + canActivate: [AuthGuard, RoleGuard], + component: ManageUserBulkUploadMigrationStatusComponent, + }, { path: 'manage-users/add-user/details', data: { title: 'Add/Edit - Manage Users', roles: ['MANAGE_USERS'] }, From 2ff647165eec57a49802e556fc40ec74ca213f54 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Fri, 25 Nov 2022 20:47:59 +0530 Subject: [PATCH 47/79] issue fixed (#898) --- .../view-pending-verification.component.html | 5 +- .../view-pending-verification.component.ts | 225 ++++++++++-------- .../view-verified-org.component.html | 7 +- .../view-verified-org.component.ts | 15 +- 4 files changed, 150 insertions(+), 102 deletions(-) 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 2843418af..bc396485a 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 @@ -50,7 +50,7 @@

Organisation Administrator(s)

Organisation registries

-
+
@@ -77,6 +77,9 @@

Organisation registries

+

+ There are no matching results. +

Event log

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 d7bb40c09..fd1acb4dd 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 @@ -1,6 +1,9 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { CiiAdditionalIdentifier, CiiOrgIdentifiersDto } from 'src/app/models/org'; +import { + CiiAdditionalIdentifier, + CiiOrgIdentifiersDto, +} from 'src/app/models/org'; import { WrapperBuyerBothService } from 'src/app/services/wrapper/wrapper-buyer-both.service'; import { WrapperOrganisationGroupService } from 'src/app/services/wrapper/wrapper-org--group-service'; import { environment } from 'src/environments/environment'; @@ -15,7 +18,7 @@ import { TranslateService } from '@ngx-translate/core'; export class ViewPendingVerificationComponent implements OnInit { private organisationId: string = ''; pageName = 'View request'; - public routeDetails:any; + public routeDetails: any; public registries: CiiOrgIdentifiersDto; public additionalIdentifiers?: CiiAdditionalIdentifier[]; schemeData: any[] = []; @@ -50,9 +53,13 @@ export class ViewPendingVerificationComponent implements OnInit { }, }; - constructor(private route: ActivatedRoute, private wrapperBuyerAndBothService:WrapperBuyerBothService, - private WrapperOrganisationGroupService: WrapperOrganisationGroupService,private router:Router, - private ciiService: ciiService, private translate: TranslateService + constructor( + private route: ActivatedRoute, + private wrapperBuyerAndBothService: WrapperBuyerBothService, + private WrapperOrganisationGroupService: WrapperOrganisationGroupService, + private router: Router, + private ciiService: ciiService, + private translate: TranslateService ) { this.organisationId = localStorage.getItem('cii_organisation_id') || ''; this.organisationAdministrator.userListResponse = { @@ -73,17 +80,28 @@ export class ViewPendingVerificationComponent implements OnInit { } async ngOnInit() { - this.route.queryParams.subscribe(async (para: any) => { - this.routeDetails = JSON.parse(atob(para.data)); - this.schemeData = await this.ciiService.getSchemes().toPromise() as any[]; - this.registries = await this.ciiService.getOrgDetails(this.routeDetails.organisationId, true).toPromise(); - if (this.registries != undefined) { - this.additionalIdentifiers = this.registries?.additionalIdentifiers; - } + this.route.queryParams.subscribe(async (para: any) => { + this.routeDetails = JSON.parse(atob(para.data)); + this.schemeData = (await this.ciiService + .getSchemes() + .toPromise()) as any[]; + await this.ciiService + .getOrgDetails(this.routeDetails.event.organisationId, true) + .toPromise() + .then((data: any) => { + this.getOrganisationUsers(); + this.registries = data; + if (this.registries != undefined) { + this.additionalIdentifiers = this.registries?.additionalIdentifiers; + } + }) + .catch((err) => { + this.additionalIdentifiers = undefined + this.getOrganisationUsers(); + console.log('err', err); + }); }); - setTimeout(() => { - this.getOrganisationUsers(); - }, 10); + } public openEmailWindow(data: any): void { @@ -99,6 +117,7 @@ export class ViewPendingVerificationComponent implements OnInit { true ).subscribe({ next: (response: any) => { + console.log("response",response) if (response != null) { this.organisationAdministrator.userListResponse = response; this.organisationAdministrator.userListResponse.userList.forEach( @@ -112,7 +131,13 @@ export class ViewPendingVerificationComponent implements OnInit { } this.getEventLogDetails(); }, - error: (error: any) => {}, + error: (error: any) => { + this.getEventLogDetails(); + if(error.status === 404){ + this.organisationAdministrator.userListResponse.userList = [] + } + console.log("error",error) + }, }); } @@ -126,113 +151,123 @@ export class ViewPendingVerificationComponent implements OnInit { this.getEventLogDetails(); } - public getEventLogDetails():void{ - this.wrapperBuyerAndBothService.getOrgEventLogs( - this.routeDetails.organisationId, - this.eventLog.currentPage, - this.eventLog.pageSize - ).subscribe({ - next: (response: any) => { - if (response != null) { - this.eventLog.organisationAuditEventListResponse = response; - this.eventLog.organisationAuditEventListResponse.organisationAuditEventList.forEach( - (f: any) => { - f.owner = (f.firstName ?? '') + ' ' + (f.lastName ?? '') +' ' + (f.actionedBy ?? ''); - if(f.owner.trim() == ''){ - f.defaultOwnerChanges = true - if(f.event?.toUpperCase() == "INACTIVEORGANISATIONREMOVED"){ - f.owner = "Automatic organisation removal"; - } - else if(f.actioned?.toUpperCase() == "AUTOVALIDATION"){ - f.owner = "Autovalidation"; - } - else if(f.actioned?.toUpperCase() == "JOB"){ - f.owner = "Job"; + public getEventLogDetails(): void { + this.wrapperBuyerAndBothService + .getOrgEventLogs( + this.routeDetails.organisationId, + this.eventLog.currentPage, + this.eventLog.pageSize + ) + .subscribe({ + next: (response: any) => { + if (response != null) { + this.eventLog.organisationAuditEventListResponse = response; + this.eventLog.organisationAuditEventListResponse.organisationAuditEventList.forEach( + (f: any) => { + f.owner = + (f.firstName ?? '') + + ' ' + + (f.lastName ?? '') + + ' ' + + (f.actionedBy ?? ''); + if (f.owner.trim() == '') { + f.defaultOwnerChanges = true; + if (f.event?.toUpperCase() == 'INACTIVEORGANISATIONREMOVED') { + f.owner = 'Automatic organisation removal'; + } else if (f.actioned?.toUpperCase() == 'AUTOVALIDATION') { + f.owner = 'Autovalidation'; + } else if (f.actioned?.toUpperCase() == 'JOB') { + f.owner = 'Job'; + } + } else { + f.defaultOwnerChanges = false; } - } else { - f.defaultOwnerChanges = false; - } - if(f.event?.toUpperCase() == "ORGROLEASSIGNED" || f.event?.toUpperCase() == "ORGROLEUNASSIGNED" || - f.event?.toUpperCase() == "ADMINROLEASSIGNED" || f.event?.toUpperCase() == "ADMINROLEUNASSIGNED") - { - this.translate.get(f.event).subscribe(val => f.event = val); - if(f.event.includes('[RoleName]')) - { - var role = f.role; - switch (f.roleKey){ - case 'CAT_USER': { - role = 'Contract Award Service (CAS) - add service'; - break; - } - case 'ACCESS_CAAAC_CLIENT': { - role ='Contract Award Service (CAS) - add to dashboard'; - break; - } - case 'JAEGGER_SUPPLIER': { - role = 'eSourcing Service as a supplier'; - break; - } - case 'JAEGGER_BUYER': { - role = 'eSourcing Service as a buyer'; - break; - } - case 'JAGGAER_USER': { - role = 'eSourcing Service - add service'; - break; - } - case 'ACCESS_JAGGAER': { - role = 'eSourcing Service - add to dashboard'; - break; + if ( + f.event?.toUpperCase() == 'ORGROLEASSIGNED' || + f.event?.toUpperCase() == 'ORGROLEUNASSIGNED' || + f.event?.toUpperCase() == 'ADMINROLEASSIGNED' || + f.event?.toUpperCase() == 'ADMINROLEUNASSIGNED' + ) { + this.translate + .get(f.event) + .subscribe((val) => (f.event = val)); + if (f.event.includes('[RoleName]')) { + var role = f.role; + switch (f.roleKey) { + case 'CAT_USER': { + role = 'Contract Award Service (CAS) - add service'; + break; + } + case 'ACCESS_CAAAC_CLIENT': { + role = + 'Contract Award Service (CAS) - add to dashboard'; + break; + } + case 'JAEGGER_SUPPLIER': { + role = 'eSourcing Service as a supplier'; + break; + } + case 'JAEGGER_BUYER': { + role = 'eSourcing Service as a buyer'; + break; + } + case 'JAGGAER_USER': { + role = 'eSourcing Service - add service'; + break; + } + case 'ACCESS_JAGGAER': { + role = 'eSourcing Service - add to dashboard'; + break; + } } + f.event = f.event.replace('[RoleName]', role); } - f.event = f.event.replace('[RoleName]', role); + } else { + this.translate + .get(f.event) + .subscribe((val) => (f.event = val)); } } - else{ - this.translate.get(f.event).subscribe(val => f.event = val); - } - }); - this.eventLog.pageCount = - this.eventLog.organisationAuditEventListResponse.pageCount; - } - }, - error: (error: any) => {}, - }); + ); + this.eventLog.pageCount = + this.eventLog.organisationAuditEventListResponse.pageCount; + } + }, + error: (error: any) => {}, + }); } goBack() { window.history.back(); } - public acceptRightToBuy(){ + public acceptRightToBuy() { let data = { organisationId: this.routeDetails.organisationId, - organisationName: this.routeDetails.organisationName - } + organisationName: this.routeDetails.organisationName, + }; this.router.navigateByUrl( 'confirm-accept?data=' + btoa(JSON.stringify(data)) ); } - public declineRightToBuy(){ + public declineRightToBuy() { let data = { organisationId: this.routeDetails.organisationId, - organisationName: this.routeDetails.organisationName - } + organisationName: this.routeDetails.organisationName, + }; this.router.navigateByUrl( 'confirm-decline?data=' + btoa(JSON.stringify(data)) ); } public getSchemaName(schema: string): string { - let selecedScheme = this.schemeData.find(s => s.scheme === schema); - if(selecedScheme?.schemeName) { + let selecedScheme = this.schemeData.find((s) => s.scheme === schema); + if (selecedScheme?.schemeName) { return selecedScheme?.schemeName; - } - else if (schema === 'GB-CCS') { + } else if (schema === 'GB-CCS') { return 'Internal Identifier'; - } - else { + } else { return ''; } } 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 6869fcfb6..adfca68fb 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 @@ -23,7 +23,7 @@

View organisations’

-

Organisation details

+

Organisation details

Organisation name :{{routeDetails.event.organisationName}}

@@ -52,7 +52,7 @@

Organisation Administrator(s)

Organisation registries

-
+
@@ -80,6 +80,9 @@

Organisation registries

+

+ There are no matching results. +

Event log

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 a5790be1b..7cee77384 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 @@ -89,15 +89,16 @@ export class ViewVerifiedOrgComponent implements OnInit { .getOrgDetails(this.routeDetails.event.organisationId, true) .toPromise() .then((data: any) => { + this.getOrganisationUsers(); this.registries = data; + console.log("this.registries",this.registries) if (this.registries != undefined) { this.additionalIdentifiers = this.registries?.additionalIdentifiers; } - setTimeout(() => { - this.getOrganisationUsers(); - }, 10); }) .catch((err) => { + this.additionalIdentifiers = undefined + this.getOrganisationUsers(); console.log('err', err); }); }); @@ -127,9 +128,15 @@ export class ViewVerifiedOrgComponent implements OnInit { this.organisationAdministrator.pageCount = this.organisationAdministrator.userListResponse.pageCount; } + this.getEventLogDetails(); + }, + error: (error: any) => { this.getEventLogDetails(); + if(error.status === 404){ + this.organisationAdministrator.userListResponse.userList = [] + } + console.log("error",error) }, - error: (error: any) => {}, }); } From 2573b37348cc8059377cf1d521ac2ca6066e3fb6 Mon Sep 17 00:00:00 2001 From: VijayHirudayasamy-bc <103512567+VijayHirudayasamy-bc@users.noreply.github.com> Date: Tue, 29 Nov 2022 08:28:15 +0000 Subject: [PATCH 48/79] Log text has been updated (#900) --- src/assets/i18n/en.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 89c87333e..ae586fd00 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -333,7 +333,7 @@ "OrganisationTypeBuyerToSupplier": "Organisation type changed from buyer to supplier", "OrganisationTypeBuyerToBoth": "Organisation type changed from buyer to both", "OrganisationTypeBothToSupplier": "Organisation type changed from both to supplier", - "OrganisationTypeBothToBuyer": "Organisation type changed from buyer to buyer", + "OrganisationTypeBothToBuyer": "Organisation type changed from both to buyer", "OrganisationTypeSupplierToBoth": "Organisation type changed from supplier to both", "OrganisationTypeSupplierToBuyer": "Organisation type changed from supplier to buyer", "NotRecognizedAsVerifiedBuyer": "Organisation not recognized as verified buyer in autovalidation process", @@ -341,4 +341,4 @@ "OrganisationRegistrationTypeBoth": "Organisation registration Type of organisation: Both", "InactiveOrganisationRemoved": "Organisation has been removed from PPG due to lack of account activation within 36 hours", "ManualRemoveRightToBuy": "Manual removal of right to buy status" -} \ No newline at end of file +} From 28e9ac03d45a78996a6db0ef8c5a0c65142757d5 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 30 Nov 2022 13:11:39 +0530 Subject: [PATCH 49/79] 4047, 4048 , 4050 issues are fixed (#902) --- .../view-pending-verification.component.html | 4 ++-- .../view-pending-verification.component.ts | 9 +++++---- .../view-verified-org/view-verified-org.component.html | 2 +- .../view-verified-org/view-verified-org.component.ts | 5 +++-- 4 files changed, 11 insertions(+), 9 deletions(-) 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 bc396485a..9d4e5b855 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 @@ -95,9 +95,9 @@

Event log


-
+
+ (click)="acceptRightToBuy()">Accept right to buy status
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 fd1acb4dd..ae41c12fc 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 @@ -17,7 +17,7 @@ import { TranslateService } from '@ngx-translate/core'; }) export class ViewPendingVerificationComponent implements OnInit { private organisationId: string = ''; - pageName = 'View request'; + pageName = 'Contactadmin'; public routeDetails: any; public registries: CiiOrgIdentifiersDto; public additionalIdentifiers?: CiiAdditionalIdentifier[]; @@ -52,7 +52,7 @@ export class ViewPendingVerificationComponent implements OnInit { organisationAuditEventList: [], }, }; - + public isDeletedOrg:boolean = false constructor( private route: ActivatedRoute, private wrapperBuyerAndBothService: WrapperBuyerBothService, @@ -86,7 +86,7 @@ export class ViewPendingVerificationComponent implements OnInit { .getSchemes() .toPromise()) as any[]; await this.ciiService - .getOrgDetails(this.routeDetails.event.organisationId, true) + .getOrgDetails(this.routeDetails.organisationId, true) .toPromise() .then((data: any) => { this.getOrganisationUsers(); @@ -97,6 +97,7 @@ export class ViewPendingVerificationComponent implements OnInit { }) .catch((err) => { this.additionalIdentifiers = undefined + this.isDeletedOrg = true; this.getOrganisationUsers(); console.log('err', err); }); @@ -117,7 +118,6 @@ export class ViewPendingVerificationComponent implements OnInit { true ).subscribe({ next: (response: any) => { - console.log("response",response) if (response != null) { this.organisationAdministrator.userListResponse = response; this.organisationAdministrator.userListResponse.userList.forEach( @@ -135,6 +135,7 @@ export class ViewPendingVerificationComponent implements OnInit { this.getEventLogDetails(); if(error.status === 404){ this.organisationAdministrator.userListResponse.userList = [] + this.isDeletedOrg = true; } console.log("error",error) }, 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 adfca68fb..c44dab733 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 @@ -102,7 +102,7 @@

Event log


+ (click)="removeRightToBuy()" *ngIf="!isDeletedOrg">Remove right to buy status
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 7cee77384..077eddc74 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 @@ -52,7 +52,7 @@ export class ViewVerifiedOrgComponent implements OnInit { organisationAuditEventList: [], }, }; - + public isDeletedOrg:boolean = false constructor( private route: ActivatedRoute, private wrapperBuyerAndBothService: WrapperBuyerBothService, @@ -91,13 +91,13 @@ export class ViewVerifiedOrgComponent implements OnInit { .then((data: any) => { this.getOrganisationUsers(); this.registries = data; - console.log("this.registries",this.registries) if (this.registries != undefined) { this.additionalIdentifiers = this.registries?.additionalIdentifiers; } }) .catch((err) => { this.additionalIdentifiers = undefined + this.isDeletedOrg = true; this.getOrganisationUsers(); console.log('err', err); }); @@ -134,6 +134,7 @@ export class ViewVerifiedOrgComponent implements OnInit { this.getEventLogDetails(); if(error.status === 404){ this.organisationAdministrator.userListResponse.userList = [] + this.isDeletedOrg = true; } console.log("error",error) }, From bc7f3277bb95c8adb82fe008ab073b3114d9827f Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Thu, 1 Dec 2022 12:43:42 +0530 Subject: [PATCH 50/79] roles un-assign updated (#905) --- .../buyer/update-org-type/update-org-type.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index 54eb2c408..182b94fd7 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -215,6 +215,15 @@ export class UpdateOrgTypeComponent implements OnInit { selection.autoValidate = responce.autoValidationSuccess let preTickRemoved:any=[] if(!responce.autoValidationSuccess){ + if(this.organisation.supplierBuyerType == '0' && this.adminSelectionMode == '1'){ + this.roles.forEach((role)=>{ + if(role.roleKey == 'ACCESS_JAGGAER' || role.roleKey == 'JAGGAER_USER'){ + selection.toDelete.push(role) + selection.toAutoValid.push(role) + } + }) + } + this.rolesToAdd.forEach((f:any)=>{ if(!f.autoValidate){ preTickRemoved.push(f) From 61b1e36c33354fafc2ee4ff6a3a47cb5524f5766 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Thu, 1 Dec 2022 20:25:05 +0530 Subject: [PATCH 51/79] revert code+ (#907) --- .../update-org-type/update-org-type.component.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index 182b94fd7..f85ef6fbd 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -215,14 +215,14 @@ export class UpdateOrgTypeComponent implements OnInit { selection.autoValidate = responce.autoValidationSuccess let preTickRemoved:any=[] if(!responce.autoValidationSuccess){ - if(this.organisation.supplierBuyerType == '0' && this.adminSelectionMode == '1'){ - this.roles.forEach((role)=>{ - if(role.roleKey == 'ACCESS_JAGGAER' || role.roleKey == 'JAGGAER_USER'){ - selection.toDelete.push(role) - selection.toAutoValid.push(role) - } - }) - } + // if(this.organisation.supplierBuyerType == '0' && this.adminSelectionMode == '1'){ + // this.roles.forEach((role)=>{ + // if(role.roleKey == 'ACCESS_JAGGAER' || role.roleKey == 'JAGGAER_USER'){ + // selection.toDelete.push(role) + // selection.toAutoValid.push(role) + // } + // }) + // } this.rolesToAdd.forEach((f:any)=>{ if(!f.autoValidate){ From f7b19e689dae771d79640de3f05bf865be3ce1d9 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Fri, 2 Dec 2022 11:20:25 +0530 Subject: [PATCH 52/79] code removed (#911) --- .../update-org-type.component.ts | 35 ++++++++++++++----- .../view-verified-org.component.html | 2 +- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index f85ef6fbd..06794cbcf 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -139,6 +139,21 @@ export class UpdateOrgTypeComponent implements OnInit { }) } }) + + if(this.organisation.supplierBuyerType == '0' && type == '1'){ + let ACCESS_JAGGAER = this.rolesToAddAutoValidation.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') + let JAGGAER_USER = this.rolesToAddAutoValidation.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') + if(ACCESS_JAGGAER === undefined){ + let accessJagger:any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') + this.rolesToAddAutoValidation?.push(accessJagger) + accessJagger.autoValidate = true + } + if(JAGGAER_USER === undefined){ + let jaggerUser:any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') + this.rolesToAddAutoValidation?.push(jaggerUser) + jaggerUser.autoValidate = true + } + } } /** @@ -215,14 +230,18 @@ export class UpdateOrgTypeComponent implements OnInit { selection.autoValidate = responce.autoValidationSuccess let preTickRemoved:any=[] if(!responce.autoValidationSuccess){ - // if(this.organisation.supplierBuyerType == '0' && this.adminSelectionMode == '1'){ - // this.roles.forEach((role)=>{ - // if(role.roleKey == 'ACCESS_JAGGAER' || role.roleKey == 'JAGGAER_USER'){ - // selection.toDelete.push(role) - // selection.toAutoValid.push(role) - // } - // }) - // } + if(this.organisation.supplierBuyerType == '0' && this.adminSelectionMode == '1'){ + let ACCESS_JAGGAER = selection.toDelete.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') + let JAGGAER_USER = selection.toDelete.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') + if(ACCESS_JAGGAER === undefined){ + let accessJagger:any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') + selection.toDelete.push(accessJagger) + } + if(JAGGAER_USER === undefined){ + let jaggerUser:any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') + selection.toDelete.push(jaggerUser) + } + } this.rolesToAdd.forEach((f:any)=>{ if(!f.autoValidate){ 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 c44dab733..723585a12 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 @@ -109,7 +109,7 @@

Event log

\ No newline at end of file From 5960d17b0d25ab1a2241f1c3458a71639b626bbc Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Mon, 5 Dec 2022 12:04:28 +0530 Subject: [PATCH 53/79] 4060 role issue fixed (#913) * 4060 role issue fixed * service roles added --- src/app/models/organisationGroup.ts | 1 + .../update-org-type.component.html | 8 +- .../update-org-type.component.ts | 317 +++++++++++------- 3 files changed, 192 insertions(+), 134 deletions(-) diff --git a/src/app/models/organisationGroup.ts b/src/app/models/organisationGroup.ts index e5976f4f3..49d473a6d 100644 --- a/src/app/models/organisationGroup.ts +++ b/src/app/models/organisationGroup.ts @@ -38,6 +38,7 @@ export interface Role { tradeEligibility?: number; enabled?: boolean; serviceName?:string | null; + isDeleted?:boolean; } export interface CheckBoxRoleListGridSource extends Role{ diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.html b/src/app/pages/buyer/update-org-type/update-org-type.component.html index 3b2e3ff4b..74c020a88 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.html +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.html @@ -25,12 +25,12 @@

- Important + Organisation Under Review

- This organisation is currently awaiting verification of its buyer status. You won't be able to make any changes to the roles assigned to this organisation until the verification process is complete. + This organisation is currently awaiting verification of its buyer status. You won't be able to manage this organisation's eligibility until the verification process is complete.

@@ -76,7 +76,7 @@

+ *ngIf="role.subscriptionTypeEligibility === 0 && role.orgTypeEligibility !== 0 && tradeEligibilityStatus(role) && role.isDeleted !== true"> , private organisationGroupService: WrapperOrganisationGroupService, + protected uiStore: Store, private organisationGroupService: WrapperOrganisationGroupService, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { this.orgRoles = []; this.eRoles = []; @@ -67,9 +67,9 @@ export class UpdateOrgTypeComponent implements OnInit { this.organisation = data; this.autoValidationPending = data.isAutovalidationPending this.adminSelectionMode = data.supplierBuyerType.toString(); - if(data.isAutovalidationPending === true){ - this.autoValidationPending = true - } else{ + if (data.isAutovalidationPending === true) { + this.autoValidationPending = true + } else { this.autoValidationPending = null } this.getOrgRoles(); @@ -79,117 +79,175 @@ export class UpdateOrgTypeComponent implements OnInit { }); } -/** - * select radio button - * @param type supplier, buyer, both - * supplier = 0 - * buyer = 1 - * both = 2 - */ - public onSelect(type: string | number,accessFrom:string) { - const buyerRemoveList=['EL_JNR_SUPPLIER','EL_SNR_SUPPLIER','JAEGGER_SUPPLIER'] - const supplierRemoveList=['JAEGGER_BUYER','ACCESS_CAAAC_CLIENT','CAT_USER','ACCESS_FP_CLIENT','FP_USER'] - this.rolesToAdd = []; - this.rolesToDelete = []; - this.rolesToAddAutoValidation = [] - this.roles = JSON.parse((localStorage.getItem('defaultRole')) || '') - //buyer roles hidden - if(type == 1){ - buyerRemoveList.map((removeRoleKey:any)=>{ - this.roles.map((buyerRoles,index)=>{ - if(buyerRoles.roleKey == removeRoleKey){ - if(accessFrom === "html" && buyerRoles.enabled){ - this.rolesToDelete.push(buyerRoles); - } - this.roles.splice(index,1) - } + /** + * select radio button + * @param type supplier, buyer, both + * supplier = 0 + * buyer = 1 + * both = 2 + */ + public onSelect(type: string | number, accessFrom: string) { + const buyerRemoveList = ['EL_JNR_SUPPLIER', 'EL_SNR_SUPPLIER', 'JAEGGER_SUPPLIER'] + const supplierRemoveList = ['JAEGGER_BUYER', 'ACCESS_CAAAC_CLIENT', 'CAT_USER', 'ACCESS_FP_CLIENT', 'FP_USER'] + this.rolesToAddAutoValidation = [] + this.roles.forEach(object => { + delete object.isDeleted + }); + + //buyer roles hidden + if (type == 1) { + buyerRemoveList.map((removeRoleKey: any) => { + this.roles.map((buyerRoles: any, index) => { + if (buyerRoles.roleKey == removeRoleKey) { + if (accessFrom === "html" && buyerRoles.enabled) { + let alreadyExist: any = this.rolesToDelete.find((element: { roleKey: any; }) => element.roleKey == buyerRoles.roleKey) + if (alreadyExist === undefined) { + this.rolesToDelete.push(buyerRoles); + } + } + buyerRoles.isDeleted = true + } + }) + }) + + //buyer roles removing if those roles available in roles Add array + buyerRemoveList.map((removeRoleKey: any) => { + this.rolesToAdd.map((buyerRoles: any, index) => { + if (buyerRoles.roleKey == removeRoleKey) { + if (accessFrom === "html") { + this.rolesToAdd.splice(index, 1) + } + } + }) + }) + + //buyer roles removing if those roles available in roles Delete array + buyerRemoveList.map((removeRoleKey: any) => { + this.rolesToDelete.map((buyerRoles: any, index) => { + if (buyerRoles.roleKey == removeRoleKey) { + if (accessFrom === "html") { + this.rolesToDelete.splice(index, 1); + } + } + }) }) - }) } + // supplier roles hidden - else if(type == 0){ - supplierRemoveList.map((removeRoleKey:any)=>{ - this.roles.map((buyerRoles,index)=>{ - if(buyerRoles.roleKey == removeRoleKey){ - if(accessFrom === "html" && buyerRoles.enabled){ - this.rolesToDelete.push(buyerRoles); + else if (type == 0) { + supplierRemoveList.map((removeRoleKey: any) => { + this.roles.map((buyerRoles, index) => { + if (buyerRoles.roleKey == removeRoleKey) { + if (accessFrom === "html" && buyerRoles.enabled) { + let alreadyExist: any = this.rolesToDelete.find((element: { roleKey: any; }) => element.roleKey == buyerRoles.roleKey) + if (alreadyExist === undefined) { + this.rolesToDelete.push(buyerRoles); + } + } + buyerRoles.isDeleted = true + } + }) + }) + + //supllier roles removing if those roles available in roles Add array + supplierRemoveList.map((removeRoleKey: any) => { + this.rolesToAdd.map((buyerRoles, index) => { + if (buyerRoles.roleKey == removeRoleKey) { + if (accessFrom === "html") { + this.rolesToAdd.splice(index, 1) + } + } + }) + }) + + //supllier roles removing if those roles available in roles Delete + supplierRemoveList.map((removeRoleKey: any) => { + this.rolesToDelete.map((buyerRoles, index) => { + if (buyerRoles.roleKey == removeRoleKey) { + if (accessFrom === "html") { + this.rolesToDelete.splice(index, 1); + } } - this.roles.splice(index,1) - } }) }) } - - if(accessFrom === "html" && type != this.adminSelectionMode){ + + + + + if (accessFrom === "html" && type != this.adminSelectionMode) { this.preTickRoles(type) } } - - public preTickRoles(type:any):void{ - this.roles.forEach((f:any)=>{ - if(f.autoValidationRoleTypeEligibility.length != 0){ - f.autoValidationRoleTypeEligibility.forEach((x:any)=>{ - if(x == type && f.enabled == false){ - f.enabled = true - f.autoValidate = true - this.rolesToAdd.push(f); - this.rolesToAddAutoValidation?.push(f) - } + /** + * pre-ticking default roles based on API responce + * @param type organisation type getting from HTML + */ + public preTickRoles(type: any): void { + this.roles.forEach((f: any) => { + if (f.autoValidationRoleTypeEligibility.length != 0) { + f.autoValidationRoleTypeEligibility.forEach((x: any) => { + if (x == type && f.enabled == false) { + f.enabled = true + f.autoValidate = true + this.rolesToAdd.push(f); + this.rolesToAddAutoValidation?.push(f) + } }) } - }) + }) - if(this.organisation.supplierBuyerType == '0' && type == '1'){ - let ACCESS_JAGGAER = this.rolesToAddAutoValidation.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') - let JAGGAER_USER = this.rolesToAddAutoValidation.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') - if(ACCESS_JAGGAER === undefined){ - let accessJagger:any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') - this.rolesToAddAutoValidation?.push(accessJagger) - accessJagger.autoValidate = true - } - if(JAGGAER_USER === undefined){ - let jaggerUser:any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') - this.rolesToAddAutoValidation?.push(jaggerUser) - jaggerUser.autoValidate = true + if (this.organisation.supplierBuyerType == '0' && type == '1') { + let ACCESS_JAGGAER = this.rolesToAddAutoValidation.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') + let JAGGAER_USER = this.rolesToAddAutoValidation.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') + if (ACCESS_JAGGAER === undefined) { + let accessJagger: any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') + this.rolesToAddAutoValidation?.push(accessJagger) + accessJagger.autoValidate = true + } + if (JAGGAER_USER === undefined) { + let jaggerUser: any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') + this.rolesToAddAutoValidation?.push(jaggerUser) + jaggerUser.autoValidate = true } } } -/** - * trade elegibity checking for all listed roles - * @param role getting from html when *ngFor happen - * @returns return boolean value based on condtion - */ - public tradeEligibilityStatus(role:any){ - if(this.adminSelectionMode == '0'){ - if(role.tradeEligibility == '0' || role.tradeEligibility == '2'){ + /** + * trade elegibity checking for all listed roles + * @param role getting from html when *ngFor happen + * @returns return boolean value based on condtion + */ + public tradeEligibilityStatus(role: any) { + if (this.adminSelectionMode == '0') { + if (role.tradeEligibility == '0' || role.tradeEligibility == '2') { return true } - } else if (this.adminSelectionMode == '1'){ - if(role.tradeEligibility == '1' || role.tradeEligibility == '2'){ + } else if (this.adminSelectionMode == '1') { + if (role.tradeEligibility == '1' || role.tradeEligibility == '2') { return true } } - else if (this.adminSelectionMode == '2'){ - if(role.tradeEligibility == '0' || role.tradeEligibility == '1' || role.tradeEligibility == '2'){ - return true - } + else if (this.adminSelectionMode == '2') { + if (role.tradeEligibility == '0' || role.tradeEligibility == '1' || role.tradeEligibility == '2') { + return true + } } return false } -/** - * Check box evenets - * @param event oberverving HTML DOM event - * @param defaultValue Init Value - * @param role object of role - */ + /** + * Check box evenets + * @param event oberverving HTML DOM event + * @param defaultValue Init Value + * @param role object of role + */ public onChange(event: any, defaultValue: any, role: any) { - if(role.autoValidate === true && !event.target.checked){ + if (role.autoValidate === true && !event.target.checked) { const index = this.rolesToAddAutoValidation?.indexOf(role); - this.rolesToAddAutoValidation?.splice(index,1) + this.rolesToAddAutoValidation?.splice(index, 1) this.rolesToAdd.splice(index, 1); } else if (defaultValue === true && !event.target.checked) { @@ -220,59 +278,59 @@ export class UpdateOrgTypeComponent implements OnInit { org: this.organisation, toDelete: this.rolesToDelete, toAdd: this.rolesToAdd, - toAutoValid : this.rolesToAddAutoValidation, - orgType:this.adminSelectionMode, + toAutoValid: this.rolesToAddAutoValidation, + orgType: this.adminSelectionMode, hasChanges: (this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0 && this.organisation.supplierBuyerType == this.adminSelectionMode) ? false : true, - autoValidate:true + autoValidate: true }; - if((this.adminSelectionMode == '1' || this.adminSelectionMode == '2' ) && this.organisation.supplierBuyerType == '0'){ - this.WrapperOrganisationService.getAutoValidationStatus(this.organisation.ciiOrganisationId).toPromise().then((responce:any) => { - selection.autoValidate = responce.autoValidationSuccess - let preTickRemoved:any=[] - if(!responce.autoValidationSuccess){ - if(this.organisation.supplierBuyerType == '0' && this.adminSelectionMode == '1'){ + if ((this.adminSelectionMode == '1' || this.adminSelectionMode == '2') && this.organisation.supplierBuyerType == '0') { + this.WrapperOrganisationService.getAutoValidationStatus(this.organisation.ciiOrganisationId).toPromise().then((responce: any) => { + selection.autoValidate = responce.autoValidationSuccess + let preTickRemoved: any = [] + if (!responce.autoValidationSuccess) { + if (this.organisation.supplierBuyerType == '0' && this.adminSelectionMode == '1') { let ACCESS_JAGGAER = selection.toDelete.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') - let JAGGAER_USER = selection.toDelete.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') - if(ACCESS_JAGGAER === undefined){ - let accessJagger:any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') + let JAGGAER_USER = selection.toDelete.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') + if (ACCESS_JAGGAER === undefined) { + let accessJagger: any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'ACCESS_JAGGAER') selection.toDelete.push(accessJagger) - } - if(JAGGAER_USER === undefined){ - let jaggerUser:any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') + } + if (JAGGAER_USER === undefined) { + let jaggerUser: any = this.roles.find((element: { roleKey: any; }) => element.roleKey == 'JAGGAER_USER') selection.toDelete.push(jaggerUser) - } } + } - this.rolesToAdd.forEach((f:any)=>{ - if(!f.autoValidate){ + this.rolesToAdd.forEach((f: any) => { + if (!f.autoValidate) { preTickRemoved.push(f) } }) selection.toAdd = preTickRemoved - } - localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); - let data = { - ciiOrganisationId:this.organisation.ciiOrganisationId, - companyHouseId:this.routeData.companyHouseId, - } - this.router.navigateByUrl(`update-org-type/confirm-changes?data=`+ btoa(JSON.stringify(data))) - }).catch(error => { - console.log(error); - }); - } else { - let data = { - ciiOrganisationId:this.organisation.ciiOrganisationId, - companyHouseId:this.routeData.companyHouseId, } - localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); - this.router.navigateByUrl(`update-org-type/confirm-changes?data=`+ btoa(JSON.stringify(data))) - } + localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); + let data = { + ciiOrganisationId: this.organisation.ciiOrganisationId, + companyHouseId: this.routeData.companyHouseId, + } + this.router.navigateByUrl(`update-org-type/confirm-changes?data=` + btoa(JSON.stringify(data))) + }).catch(error => { + console.log(error); + }); + } else { + let data = { + ciiOrganisationId: this.organisation.ciiOrganisationId, + companyHouseId: this.routeData.companyHouseId, + } + localStorage.setItem(`mse_org_${this.organisation.ciiOrganisationId}`, JSON.stringify(selection)); + this.router.navigateByUrl(`update-org-type/confirm-changes?data=` + btoa(JSON.stringify(data))) + } } -/** - * cancel button call , removing all the local storage details - */ + /** + * cancel button call , removing all the local storage details + */ public onCancelClick() { localStorage.removeItem(`mse_org_${this.organisation.ciiOrganisationId}`); this.router.navigateByUrl('buyer/search'); @@ -282,7 +340,7 @@ export class UpdateOrgTypeComponent implements OnInit { /** * getting all roles and find elegible role call. */ - public getOrgRoles(){ + public getOrgRoles() { this.orgRoles$ = this.wrapperConfigService.getRoles().pipe(share()); this.orgRoles$.subscribe({ next: (orgRoles: Role[]) => { @@ -294,9 +352,8 @@ export class UpdateOrgTypeComponent implements OnInit { r.enabled = eRoles.some(x => x.roleName == r.roleName && x.serviceName == r.serviceName); }); this.eRoles = eRoles; - localStorage.setItem('defaultRole',JSON.stringify(this.roles)) setTimeout(() => { - this.onSelect(this.adminSelectionMode,'none') + this.onSelect(this.adminSelectionMode, 'none') }, 100); }, error: (err: any) => { From d3f245737e8730b457f88e8bfde6dbc24bf5aaa8 Mon Sep 17 00:00:00 2001 From: brijeshpatel-bc <108462846+brijeshpatel-bc@users.noreply.github.com> Date: Mon, 5 Dec 2022 15:50:29 +0530 Subject: [PATCH 54/79] Bug 4069: Issue with removing roles when changing organisation type from supplier to buyer or both in auto validation fail scenario and manually accepting the validation (#916) --- .../pages/buyer/confirm-org-type/confirm-org-type.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts index 3d9d56201..2827655a6 100644 --- a/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts +++ b/src/app/pages/buyer/confirm-org-type/confirm-org-type.component.ts @@ -53,8 +53,10 @@ export class ConfirmOrgTypeComponent extends BaseComponent { orgType:parseInt(this.changes.orgType), rolesToDelete: this.changes.toDelete, rolesToAdd: this.changes.toAdd, + rolesToAutoValid: this.changes.toAutoValid, companyHouseId:this.routeData.companyHouseId }; + this.wrapperOrgService.updateOrgRoles(this.org.ciiOrganisationId, JSON.stringify(model),'switch').toPromise().then(() => { this.router.navigateByUrl(`update-org-type/buyer-success/${this.org.ciiOrganisationId}`); }).catch(error => { From 269e074a80db99f14711f07120d06c968f638e9a Mon Sep 17 00:00:00 2001 From: VijayHirudayasamy-bc <103512567+VijayHirudayasamy-bc@users.noreply.github.com> Date: Mon, 5 Dec 2022 12:12:00 +0000 Subject: [PATCH 55/79] comments from json files are removed (#915) --- e2e/tsconfig.json | 1 - tsconfig.app.json | 1 - tsconfig.json | 1 - tsconfig.spec.json | 1 - tsconfig.worker.json | 1 - 5 files changed, 5 deletions(-) diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json index 0782539c0..a82df00ee 100644 --- a/e2e/tsconfig.json +++ b/e2e/tsconfig.json @@ -1,4 +1,3 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ { "extends": "../tsconfig.json", "compilerOptions": { diff --git a/tsconfig.app.json b/tsconfig.app.json index 82d91dc4a..f758d9820 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -1,4 +1,3 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ { "extends": "./tsconfig.json", "compilerOptions": { diff --git a/tsconfig.json b/tsconfig.json index 7d49b4dc8..ac4c770d7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,3 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ { "compileOnSave": false, "compilerOptions": { diff --git a/tsconfig.spec.json b/tsconfig.spec.json index 092345b02..04463b781 100644 --- a/tsconfig.spec.json +++ b/tsconfig.spec.json @@ -1,4 +1,3 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ { "extends": "./tsconfig.json", "compilerOptions": { diff --git a/tsconfig.worker.json b/tsconfig.worker.json index 22dc45408..1c8cc55ed 100644 --- a/tsconfig.worker.json +++ b/tsconfig.worker.json @@ -1,4 +1,3 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ { "extends": "./tsconfig.json", "compilerOptions": { From 81561e6862659f5d71ca6913cded2e6e1246dcb1 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Tue, 6 Dec 2022 13:18:42 +0530 Subject: [PATCH 56/79] 4076 and 4077 issue fixed (#920) --- .../update-org-type.component.ts | 86 ++++++++++++------- 1 file changed, 53 insertions(+), 33 deletions(-) diff --git a/src/app/pages/buyer/update-org-type/update-org-type.component.ts b/src/app/pages/buyer/update-org-type/update-org-type.component.ts index 2beac99a5..eab65562e 100644 --- a/src/app/pages/buyer/update-org-type/update-org-type.component.ts +++ b/src/app/pages/buyer/update-org-type/update-org-type.component.ts @@ -90,33 +90,17 @@ export class UpdateOrgTypeComponent implements OnInit { const buyerRemoveList = ['EL_JNR_SUPPLIER', 'EL_SNR_SUPPLIER', 'JAEGGER_SUPPLIER'] const supplierRemoveList = ['JAEGGER_BUYER', 'ACCESS_CAAAC_CLIENT', 'CAT_USER', 'ACCESS_FP_CLIENT', 'FP_USER'] this.rolesToAddAutoValidation = [] - this.roles.forEach(object => { - delete object.isDeleted - }); - - //buyer roles hidden + this.roles.forEach((role)=>{ + delete role.isDeleted + }) if (type == 1) { - buyerRemoveList.map((removeRoleKey: any) => { - this.roles.map((buyerRoles: any, index) => { - if (buyerRoles.roleKey == removeRoleKey) { - if (accessFrom === "html" && buyerRoles.enabled) { - let alreadyExist: any = this.rolesToDelete.find((element: { roleKey: any; }) => element.roleKey == buyerRoles.roleKey) - if (alreadyExist === undefined) { - this.rolesToDelete.push(buyerRoles); - } - } - buyerRoles.isDeleted = true - } - }) - }) - //buyer roles removing if those roles available in roles Add array buyerRemoveList.map((removeRoleKey: any) => { this.rolesToAdd.map((buyerRoles: any, index) => { if (buyerRoles.roleKey == removeRoleKey) { if (accessFrom === "html") { this.rolesToAdd.splice(index, 1) - } + } } }) }) @@ -131,27 +115,38 @@ export class UpdateOrgTypeComponent implements OnInit { } }) }) - } - - // supplier roles hidden - else if (type == 0) { + supplierRemoveList.map((removeRoleKey: any) => { - this.roles.map((buyerRoles, index) => { + this.rolesToDelete.map((buyerRoles:any, index) => { if (buyerRoles.roleKey == removeRoleKey) { - if (accessFrom === "html" && buyerRoles.enabled) { + if (accessFrom === "html") { + this.rolesToDelete.splice(index, 1); + } + } + }) + }) + + //buyer roles hidden + buyerRemoveList.map((removeRoleKey: any) => { + this.roles.map((buyerRoles: any, index) => { + if (buyerRoles.roleKey == removeRoleKey) { + if (accessFrom === "html" && buyerRoles.enabled && this.organisation.supplierBuyerType != 1) { let alreadyExist: any = this.rolesToDelete.find((element: { roleKey: any; }) => element.roleKey == buyerRoles.roleKey) - if (alreadyExist === undefined) { + if (alreadyExist == undefined) { this.rolesToDelete.push(buyerRoles); + } } buyerRoles.isDeleted = true } }) }) + } + else if (type == 0) { //supllier roles removing if those roles available in roles Add array supplierRemoveList.map((removeRoleKey: any) => { - this.rolesToAdd.map((buyerRoles, index) => { + this.rolesToAdd.map((buyerRoles:any, index) => { if (buyerRoles.roleKey == removeRoleKey) { if (accessFrom === "html") { this.rolesToAdd.splice(index, 1) @@ -162,7 +157,7 @@ export class UpdateOrgTypeComponent implements OnInit { //supllier roles removing if those roles available in roles Delete supplierRemoveList.map((removeRoleKey: any) => { - this.rolesToDelete.map((buyerRoles, index) => { + this.rolesToDelete.map((buyerRoles:any, index) => { if (buyerRoles.roleKey == removeRoleKey) { if (accessFrom === "html") { this.rolesToDelete.splice(index, 1); @@ -170,11 +165,32 @@ export class UpdateOrgTypeComponent implements OnInit { } }) }) - } - - + buyerRemoveList.map((removeRoleKey: any) => { + this.rolesToDelete.map((buyerRoles:any, index) => { + if (buyerRoles.roleKey == removeRoleKey) { + if (accessFrom === "html") { + this.rolesToDelete.splice(index, 1); + } + } + }) + }) + // supplier roles hidden + supplierRemoveList.map((removeRoleKey: any) => { + this.roles.map((buyerRoles:any, index) => { + if (buyerRoles.roleKey == removeRoleKey) { + if (accessFrom === "html" && buyerRoles.enabled && this.organisation.supplierBuyerType != 0) { + let alreadyExist: any = this.rolesToDelete.find((element: { roleKey: any; }) => element.roleKey == buyerRoles.roleKey) + if (alreadyExist === undefined) { + this.rolesToDelete.push(buyerRoles); + } + } + buyerRoles.isDeleted = true + } + }) + }) + } if (accessFrom === "html" && type != this.adminSelectionMode) { this.preTickRoles(type) } @@ -189,9 +205,12 @@ export class UpdateOrgTypeComponent implements OnInit { if (f.autoValidationRoleTypeEligibility.length != 0) { f.autoValidationRoleTypeEligibility.forEach((x: any) => { if (x == type && f.enabled == false) { + let alreadyExist: any = this.rolesToAdd.find((element: { roleKey: any; }) => element.roleKey == f.roleKey) f.enabled = true f.autoValidate = true - this.rolesToAdd.push(f); + if (alreadyExist === undefined) { + this.rolesToAdd.push(f); + } this.rolesToAddAutoValidation?.push(f) } }) @@ -283,6 +302,7 @@ export class UpdateOrgTypeComponent implements OnInit { hasChanges: (this.rolesToAdd.length === 0 && this.rolesToDelete.length === 0 && this.organisation.supplierBuyerType == this.adminSelectionMode) ? false : true, autoValidate: true }; + console.log("selection",selection) if ((this.adminSelectionMode == '1' || this.adminSelectionMode == '2') && this.organisation.supplierBuyerType == '0') { this.WrapperOrganisationService.getAutoValidationStatus(this.organisation.ciiOrganisationId).toPromise().then((responce: any) => { selection.autoValidate = responce.autoValidationSuccess From 8f8d6bdbe697df62813b027bdce931bbddd29b25 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 7 Dec 2022 15:52:19 +0530 Subject: [PATCH 57/79] sandbox conflicts on env files --- src/environments/environment-NFT.ts | 206 ++++++++--------- src/environments/environment-development.ts | 6 + .../environment-pre-production.ts | 212 +++++++++--------- src/environments/environment-production.ts | 47 ++-- src/environments/environment-sandbox.ts | 49 ++-- src/environments/environment-testing.ts | 10 +- src/environments/environment-training.ts | 8 +- src/environments/environment-uat.ts | 53 ++--- src/environments/environment.ts | 10 +- 9 files changed, 316 insertions(+), 285 deletions(-) diff --git a/src/environments/environment-NFT.ts b/src/environments/environment-NFT.ts index 62c0158e3..934004eee 100644 --- a/src/environments/environment-NFT.ts +++ b/src/environments/environment-NFT.ts @@ -1,105 +1,111 @@ export const environment = { - production: true, - - idam_client_id: 'IDAM', - - uri: { - - api: { - - isApiGateWayEnabled: true, - - security: 'https://nft.api.crowncommercial.gov.uk', - - postgres: 'https://nft.api.crowncommercial.gov.uk/core', - - //cii: 'https://conclave-cii-integration-brash-shark-mk.london.cloudapps.digital', - - wrapper: { - - apiGatewayEnabled: { - - user: 'https://nft.api.crowncommercial.gov.uk/user-profiles', - - organisation: 'https://nft.api.crowncommercial.gov.uk/organisation-profiles', - - contact: 'https://nft.api.crowncommercial.gov.uk/contacts', - - configuration: 'https://nft.api.crowncommercial.gov.uk/configurations', - - }, - - apiGatewayDisabled: { - - user: 'https://NFT-api-wrapper.london.cloudapps.digital/users', - - organisation: 'https://NFT-api-wrapper.london.cloudapps.digital/organisations', - - contact: 'https://NFT-api-wrapper.london.cloudapps.digital/contacts', - - configuration: 'https://NFT-api-wrapper.london.cloudapps.digital/configurations', - - } - + production: true, + + idam_client_id: 'IDAM', + + uri: { + + api: { + + isApiGateWayEnabled: true, + + security: 'https://nft.api.crowncommercial.gov.uk', + + postgres: 'https://nft.api.crowncommercial.gov.uk/core', + + //cii: 'https://conclave-cii-integration-brash-shark-mk.london.cloudapps.digital', + + wrapper: { + + apiGatewayEnabled: { + + user: 'https://nft.api.crowncommercial.gov.uk/user-profiles', + + organisation: 'https://nft.api.crowncommercial.gov.uk/organisation-profiles', + + contact: 'https://nft.api.crowncommercial.gov.uk/contacts', + + configuration: 'https://nft.api.crowncommercial.gov.uk/configurations', + + }, + + apiGatewayDisabled: { + + user: 'https://NFT-api-wrapper.london.cloudapps.digital/users', + + organisation: 'https://NFT-api-wrapper.london.cloudapps.digital/organisations', + + contact: 'https://NFT-api-wrapper.london.cloudapps.digital/contacts', + + configuration: 'https://NFT-api-wrapper.london.cloudapps.digital/configurations', + } - - }, - - web: { - - dashboard: 'https://nft.identify.crowncommercial.gov.uk' - - }, - - ccsContactUrl: "https://www.crowncommercial.gov.uk/contact" - + + } + }, - - googleTagMangerId: 'GTM', - - cookieExpirationTimeInMinutes: 525600, - - bulkUploadPollingFrequencyInSeconds: 5, - - bulkUploadMaxFileSizeInBytes:1048576, - - bulkUploadTemplateFileUrl: 'BUCKET_URL', - - usedPasswordThreshold: 5, //This value should be changed when Auth0 password history policy changed, - - listPageSize: 10, - - rollbar: { - - key: 'ROLLBAR', - - enable: true, - - security_log: false, - - environment: 'nft' - + + web: { + + dashboard: 'https://nft.identify.crowncommercial.gov.uk' + }, - cookies_policy: { - essentialcookies: { - notify_admin_session: 20, - cookie_policy: 1, - ccs_sso_visitedsites: 60, - opbs: 60, - ccs_sso: 60, - conclave: 60, - XSRF_TOKEN: 30, - XSRF_TOKEN_SVR: 30, - AspNetCore_Antiforgery_GWNWkbbyKbw: 30 - }, - Auth0cookies: { - auth0_compat: 3, - did_compat: 6, - did: 6, - auth0: 3, - __cf_bm: 30 - }, - } - - }; + + ccsContactUrl: "https://www.crowncommercial.gov.uk/contact" + + }, + + googleTagMangerId: 'GTM', + + cookieExpirationTimeInMinutes: 525600, + + bulkUploadPollingFrequencyInSeconds: 5, + + bulkUploadMaxFileSizeInBytes:1048576, + + bulkUploadTemplateFileUrl: 'BUCKET_URL', + + usedPasswordThreshold: 5, //This value should be changed when Auth0 password history policy changed, + + listPageSize: 10, + + rollbar: { + + key: 'ROLLBAR', + + enable: true, + + security_log: false, + + environment: 'nft' + + }, + cookies_policy: { + essentialcookies: { + notify_admin_session: 20, + cookie_policy: 1, + ccs_sso_visitedsites: 60, + opbs: 60, + ccs_sso: 60, + conclave: 60, + XSRF_TOKEN: 30, + XSRF_TOKEN_SVR: 30, + AspNetCore_Antiforgery_GWNWkbbyKbw: 30 + }, + Auth0cookies: { + auth0_compat: 3, + did_compat: 6, + did: 6, + auth0: 3, + __cf_bm: 30 + }, + }, + appSetting: { + hideIDP:false, + hideDelegation:false, + hideBulkupload:false, + hideAutoValidation:false, + }, + +}; \ No newline at end of file diff --git a/src/environments/environment-development.ts b/src/environments/environment-development.ts index e9a300a96..57736ce5c 100644 --- a/src/environments/environment-development.ts +++ b/src/environments/environment-development.ts @@ -63,4 +63,10 @@ export const environment = { __cf_bm: 30 }, }, + appSetting: { + hideIDP:false, + hideDelegation:false, + hideBulkupload:false, + hideAutoValidation:false, + }, }; diff --git a/src/environments/environment-pre-production.ts b/src/environments/environment-pre-production.ts index e6baa5a19..19b5a8faa 100644 --- a/src/environments/environment-pre-production.ts +++ b/src/environments/environment-pre-production.ts @@ -1,113 +1,115 @@ export const environment = { - production: false, - - idam_client_id: 'IDAM_ID', - - uri: { - - api: { - - isApiGateWayEnabled: true, - - security: 'https://pre.api.crowncommercial.gov.uk', - - //security: 'https://pre.api.crowncommercial.gov.uk', - - postgres: 'https://pre.api.crowncommercial.gov.uk/core', - - //postgres: 'https://pre.api.crowncommercial.gov.uk/core', - - wrapper: { - - apiGatewayEnabled: { - - user: 'https://pre.api.crowncommercial.gov.uk/user-profiles', - - organisation: 'https://pre.api.crowncommercial.gov.uk/organisation-profiles', - - contact: 'https://pre.api.crowncommercial.gov.uk/contacts', - - configuration: 'https://pre.api.crowncommercial.gov.uk/configurations', - - }, - - apiGatewayDisabled: { - - user: 'https://preprod-api-wrapper.london.cloudapps.digital/users', - - organisation: 'https://preprod-api-wrapper.london.cloudapps.digital/organisations', - - contact: 'https://preprod-api-wrapper.london.cloudapps.digital/contacts', - - configuration: 'https://preprod-api-wrapper.london.cloudapps.digital/configurations', - - } - - } - - }, - - web: { - - //dashboard: 'https://preprod-ccs-sso.london.cloudapps.digital' - - dashboard: 'https://preprod.identify.crowncommercial.gov.uk' - - }, - - ccsContactUrl: "https://www.crowncommercial.gov.uk/contact" - - }, - - googleTagMangerId: 'GTM', - - bulkUploadPollingFrequencyInSeconds: 5, + production: false, + + idam_client_id: 'IDAM_ID', + + uri: { + + api: { + + isApiGateWayEnabled: true, + + security: 'https://pre.api.crowncommercial.gov.uk', + + //security: 'https://pre.api.crowncommercial.gov.uk', + + postgres: 'https://pre.api.crowncommercial.gov.uk/core', + + //postgres: 'https://pre.api.crowncommercial.gov.uk/core', + + wrapper: { + + apiGatewayEnabled: { + + user: 'https://pre.api.crowncommercial.gov.uk/user-profiles', + + organisation: 'https://pre.api.crowncommercial.gov.uk/organisation-profiles', + + contact: 'https://pre.api.crowncommercial.gov.uk/contacts', + + configuration: 'https://pre.api.crowncommercial.gov.uk/configurations', + + }, + + apiGatewayDisabled: { + + user: 'https://preprod-api-wrapper.london.cloudapps.digital/users', + + organisation: 'https://preprod-api-wrapper.london.cloudapps.digital/organisations', + + contact: 'https://preprod-api-wrapper.london.cloudapps.digital/contacts', + + configuration: 'https://preprod-api-wrapper.london.cloudapps.digital/configurations', + + } + + } + + }, + + web: { + + //dashboard: 'https://preprod-ccs-sso.london.cloudapps.digital' + + dashboard: 'https://preprod.identify.crowncommercial.gov.uk' + + }, + + ccsContactUrl: "https://www.crowncommercial.gov.uk/contact" + + }, + + googleTagMangerId: 'GTM', + + bulkUploadPollingFrequencyInSeconds: 5, + + cookieExpirationTimeInMinutes: 525600, + + bulkUploadMaxFileSizeInBytes:1048576, + + bulkUploadTemplateFileUrl: 'BUCKET_URL', + + usedPasswordThreshold: 5, //This value should be changed when Auth0 password history policy changed, + + listPageSize: 10, + + rollbar: { + + key: 'ROLLBAR', + + enable: true, + + security_log:false, + + environment: 'pre-production' - cookieExpirationTimeInMinutes: 525600, - - bulkUploadMaxFileSizeInBytes:1048576, - - bulkUploadTemplateFileUrl: 'BUCKET_URL', - - usedPasswordThreshold: 5, //This value should be changed when Auth0 password history policy changed, - - listPageSize: 10, - - rollbar: { - - key: 'ROLLBAR', - - enable: false, - - security_log:false, - - environment:'preprod-ccs-sso' }, + cookies_policy: { - essentialcookies: { - notify_admin_session: 20, - cookie_policy: 1, - ccs_sso_visitedsites :30, - opbs :30, - ccs_sso:30, - conclave:30, - XSRF_TOKEN:30, - XSRF_TOKEN_SVR:30, - AspNetCore_Antiforgery_GWNWkbbyKbw:30 - }, - Auth0cookies: { - auth0_compat : 3, - did_compat : 6, - did : 6, - auth0 : 3, - __cf_bm : 30 - }, + essentialcookies: { + notify_admin_session: 20, + cookie_policy: 1, + ccs_sso_visitedsites: 60, + opbs: 60, + ccs_sso: 60, + conclave: 60, + XSRF_TOKEN: 30, + XSRF_TOKEN_SVR: 30, + AspNetCore_Antiforgery_GWNWkbbyKbw: 30 + }, + Auth0cookies: { + auth0_compat: 3, + did_compat: 6, + did: 6, + auth0: 3, + __cf_bm: 30 + }, }, appSetting: { - hideIDP:true, - hideDelegation:true, - hideBulkupload:true - }, + hideIDP:false, + hideDelegation:false, + hideBulkupload:false, + hideAutoValidation:false, + }, }; - diff --git a/src/environments/environment-production.ts b/src/environments/environment-production.ts index 667b38fb0..29bfdd27f 100644 --- a/src/environments/environment-production.ts +++ b/src/environments/environment-production.ts @@ -34,38 +34,39 @@ export const environment = { cookieExpirationTimeInMinutes: 525600, bulkUploadPollingFrequencyInSeconds: 5, bulkUploadMaxFileSizeInBytes:1048576, - bulkUploadTemplateFileUrl: 'BUCKET_URL', // Put the publicly accessible url of the template file + bulkUploadTemplateFileUrl: 'https://paas-s3-broker-prod-lon-9422de6a-c312-4407-87ae-119e5a09db78.s3.amazonaws.com/Templates/DataMigrationTemplate.csv', // Put the publicly accessible url of the template file usedPasswordThreshold: 5, //This value should be changed when Auth0 password history policy changed, listPageSize: 10, rollbar: { key: 'ROLLBAR', - enable: false, - security_log: false, - environment:'prod-ccs-sso' - } , + enable : true, + security_log:false, + environment: 'production' + }, cookies_policy: { essentialcookies: { - notify_admin_session: 20, - cookie_policy: 1, - ccs_sso_visitedsites :30, - opbs :30, - ccs_sso:30, - conclave:30, - XSRF_TOKEN:30, - XSRF_TOKEN_SVR:30, - AspNetCore_Antiforgery_GWNWkbbyKbw:30 + notify_admin_session: 20, + cookie_policy: 1, + ccs_sso_visitedsites: 60, + opbs: 60, + ccs_sso: 60, + conclave: 60, + XSRF_TOKEN: 30, + XSRF_TOKEN_SVR: 30, + AspNetCore_Antiforgery_GWNWkbbyKbw: 30 }, Auth0cookies: { - auth0_compat : 3, - did_compat : 6, - did : 6, - auth0 : 3, - __cf_bm : 30 + auth0_compat: 3, + did_compat: 6, + did: 6, + auth0: 3, + __cf_bm: 30 }, }, appSetting: { - hideIDP:true, - hideDelegation:true, - hideBulkupload:true - }, + hideIDP:false, + hideDelegation:false, + hideBulkupload:false, + hideAutoValidation:false, + }, }; \ No newline at end of file diff --git a/src/environments/environment-sandbox.ts b/src/environments/environment-sandbox.ts index 4c7d53082..11abb4224 100644 --- a/src/environments/environment-sandbox.ts +++ b/src/environments/environment-sandbox.ts @@ -41,28 +41,29 @@ export const environment = { environment: 'sandbox' }, cookies_policy: { - essentialcookies: { - notify_admin_session: 20, - cookie_policy: 1, - ccs_sso_visitedsites: 60, - opbs: 60, - ccs_sso: 60, - conclave: 60, - XSRF_TOKEN: 30, - XSRF_TOKEN_SVR: 30, - AspNetCore_Antiforgery_GWNWkbbyKbw: 30 - }, - Auth0cookies: { - auth0_compat: 3, - did_compat: 6, - did: 6, - auth0: 3, - __cf_bm: 30 - }, + essentialcookies: { + notify_admin_session: 20, + cookie_policy: 1, + ccs_sso_visitedsites: 60, + opbs: 60, + ccs_sso: 60, + conclave: 60, + XSRF_TOKEN: 30, + XSRF_TOKEN_SVR: 30, + AspNetCore_Antiforgery_GWNWkbbyKbw: 30 }, - appSetting: { - hideIDP:false, - hideDelegation:false, - hideBulkupload:false - }, - }; + Auth0cookies: { + auth0_compat: 3, + did_compat: 6, + did: 6, + auth0: 3, + __cf_bm: 30 + }, + }, + appSetting: { + hideIDP:false, + hideDelegation:false, + hideBulkupload:false, + hideAutoValidation:false, + }, +}; diff --git a/src/environments/environment-testing.ts b/src/environments/environment-testing.ts index 05317fc3f..40f16eefc 100644 --- a/src/environments/environment-testing.ts +++ b/src/environments/environment-testing.ts @@ -60,5 +60,11 @@ export const environment = { auth0: 3, __cf_bm: 30 }, - } -}; + }, + appSetting: { + hideIDP:false, + hideDelegation:false, + hideBulkupload:false, + hideAutoValidation:false, + }, +}; \ No newline at end of file diff --git a/src/environments/environment-training.ts b/src/environments/environment-training.ts index e98e35c6b..2ff0ec71f 100644 --- a/src/environments/environment-training.ts +++ b/src/environments/environment-training.ts @@ -98,6 +98,12 @@ export const environment = { auth0: 3, __cf_bm: 30 }, - } + }, + appSetting: { + hideIDP:false, + hideDelegation:false, + hideBulkupload:false, + hideAutoValidation:false, + }, }; \ No newline at end of file diff --git a/src/environments/environment-uat.ts b/src/environments/environment-uat.ts index e5c0daa01..75d72ce31 100644 --- a/src/environments/environment-uat.ts +++ b/src/environments/environment-uat.ts @@ -40,33 +40,34 @@ export const environment = { listPageSize: 10, rollbar: { key: 'ROLLBAR', - enable: false, + enable: true, security_log:false, - environment: 'uat-ccs-sso' + environment: 'uat' }, cookies_policy: { - essentialcookies: { - notify_admin_session: 20, - cookie_policy: 1, - ccs_sso_visitedsites: 60, - opbs: 60, - ccs_sso: 60, - conclave: 60, - XSRF_TOKEN: 30, - XSRF_TOKEN_SVR: 30, - AspNetCore_Antiforgery_GWNWkbbyKbw: 30 - }, - Auth0cookies: { - auth0_compat: 3, - did_compat: 6, - did: 6, - auth0: 3, - __cf_bm: 30 - }, + essentialcookies: { + notify_admin_session: 20, + cookie_policy: 1, + ccs_sso_visitedsites: 60, + opbs: 60, + ccs_sso: 60, + conclave: 60, + XSRF_TOKEN: 30, + XSRF_TOKEN_SVR: 30, + AspNetCore_Antiforgery_GWNWkbbyKbw: 30 }, - appSetting: { - hideIDP:false, - hideDelegation:false, - hideBulkupload:false - }, - }; \ No newline at end of file + Auth0cookies: { + auth0_compat: 3, + did_compat: 6, + did: 6, + auth0: 3, + __cf_bm: 30 + }, + }, + appSetting: { + hideIDP:false, + hideDelegation:false, + hideBulkupload:false, + hideAutoValidation:false, + }, +}; \ No newline at end of file diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 8aedad30c..ab2beda48 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -60,8 +60,10 @@ export const environment = { }, }, appSetting: { - hideIDP:true, - hideDelegation:true, - hideBulkupload:true - }, + hideIDP:false, + hideDelegation:false, + hideBulkupload:false, + hideAutoValidation:false, + }, }; + From 7496b0e79560764cd89f83cc2aa98332e12dde6b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 7 Dec 2022 15:53:53 +0530 Subject: [PATCH 58/79] sandbox conflicts on user-profile.html --- .../user-profile/user-profile-component.html | 400 +++++++++--------- 1 file changed, 200 insertions(+), 200 deletions(-) diff --git a/src/app/pages/user-profile/user-profile-component.html b/src/app/pages/user-profile/user-profile-component.html index dbe0ced79..311b3b760 100644 --- a/src/app/pages/user-profile/user-profile-component.html +++ b/src/app/pages/user-profile/user-profile-component.html @@ -1,215 +1,215 @@ -

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
For whomTaskRoles to tick
+ Organisational Administrators of Public Procurement Gateway (PPG) + Add an additional PPG administrator +
    +
  • Organisation Administrator - Dashboard Service
  • +
+
Add user to PPG +
    +
  • Organisation User - Dashboard Service
  • +
+
+ Buyers + Enable Contract Award Service +
    +
  • eSourcing Service as a buyer
  • +
  • Contract Award Service (CAS) - add service
  • +
  • Contract Award Service (CAS) - add to dashboard
  • +
  • eSourcing Service - add service
  • +
+
Enable eSourcing +
    +
  • eSourcing Service as a buyer +
  • +
  • eSourcing Service - add service +
  • +
  • eSourcing Service - add to dashboard +
  • +
+
SuppliersEnable eSourcing +
    +
  • eSourcing Service as a supplier
  • +
  • eSourcing Service - add service
  • +
  • eSourcing Service - add to dashboard
  • +
+
+
+
+
+
Date: Wed, 14 Dec 2022 16:26:29 +0530 Subject: [PATCH 65/79] Task 4154: CON-2405 - Incorrect 'Administrator' dashboard labels for org users (#944) * Task 4154: CON-2405 - Incorrect 'Administrator' dashboard labels for org users * Task 4154: CON-2405 - Incorrect 'Administrator' dashboard labels for org users --- src/app/pages/user-profile/user-profile-component.html | 4 ++-- src/app/pages/user-profile/user-profile-component.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/pages/user-profile/user-profile-component.html b/src/app/pages/user-profile/user-profile-component.html index 9d4d2cd46..cb401fe83 100644 --- a/src/app/pages/user-profile/user-profile-component.html +++ b/src/app/pages/user-profile/user-profile-component.html @@ -3,10 +3,10 @@
  1. - + {{ 'ADMINISTRATOR_DASHBOARD' | translate }} - + {{"PUBLIC_PROCUREMENT_GATEWAY_DASHBOARD" | translate}}
  2. diff --git a/src/app/pages/user-profile/user-profile-component.ts b/src/app/pages/user-profile/user-profile-component.ts index 2235d4e9b..3072eb183 100644 --- a/src/app/pages/user-profile/user-profile-component.ts +++ b/src/app/pages/user-profile/user-profile-component.ts @@ -70,7 +70,8 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { assignedRoleDataList: any[] = []; routeStateData: any = {}; hasGroupViewPermission: boolean = false; - + isOrgAdmin: boolean = false; + @ViewChildren('input') inputs!: QueryList; constructor( @@ -106,6 +107,7 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit { } async ngOnInit() { + this.isOrgAdmin = JSON.parse(localStorage.getItem('isOrgAdmin') || 'false'); sessionStorage.removeItem(SessionStorageKey.UserContactUsername); await this.auditLogService .createLog({ From 7cd9eea52daebd22df403f687857010fc284c624 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Wed, 14 Dec 2022 20:43:21 +0530 Subject: [PATCH 66/79] Update environment-testing.ts --- src/environments/environment-testing.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/environments/environment-testing.ts b/src/environments/environment-testing.ts index 40f16eefc..03d5c1127 100644 --- a/src/environments/environment-testing.ts +++ b/src/environments/environment-testing.ts @@ -62,9 +62,9 @@ export const environment = { }, }, appSetting: { - hideIDP:false, + hideIDP:true, hideDelegation:false, hideBulkupload:false, hideAutoValidation:false, }, -}; \ No newline at end of file +}; From 6edff6ffc3cf9559f778265b1a24d221275b112b Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Fri, 16 Dec 2022 16:55:04 +0530 Subject: [PATCH 67/79] 1938 angular page is completed (#953) * 1938 angular page is completed * auth0 page and open angular page changes updated --- Auth0Templates/Mfa.html | 17 +++- src/app/app.module.ts | 4 +- .../cookies-settings.component.html | 92 +++++++++++++------ .../cookies-settings.component.scss | 3 + .../cookies-settings.component.ts | 11 ++- .../terms-conditions.component.html | 17 +++- .../terms-conditions.component.ts | 16 ++-- .../accessibility-statement.component.html | 11 ++- .../accessibility-statement.component.ts | 15 ++- .../change-password.component.html | 15 +++ .../change-password.component.ts | 3 + src/app/pages/error/error.component.html | 13 +++ src/app/pages/error/error.component.ts | 1 + .../forgot-password.component.html | 10 ++ .../forgot-password.component.scss | 3 + .../forgot-password.component.ts | 5 + .../find-your-administrator.component.html | 23 ++++- ...ion-profile-registry-delete.component.html | 14 ++- ...tion-profile-registry-error.component.html | 25 +++++ ...ation-registration-add-user.component.html | 32 ++++++- ...tion-additional-identifiers.component.html | 31 +++++++ ...ion-registration-buyer-type.component.html | 28 +++++- ...sation-registration-confirm.component.html | 34 +++++++ ...tration-error-details-wrong.component.html | 32 ++++++- ...egistration-error-not-found.component.html | 30 +++++- ...n-error-not-my-organisation.component.html | 32 ++++++- ...ror-username-already-exists.component.html | 35 ++++++- ...anisation-registration-type.component.html | 23 ++++- ...isation-registration-step-1.component.html | 13 ++- ...isation-registration-step-2.component.html | 27 +++++- ...isation-registration-step-3.component.html | 33 ++++++- ...organisation-not-registered.component.html | 20 +++- ...age-reg-organisation-search.component.html | 14 ++- ...-organisation-status-exists.component.html | 29 +++++- ...reg-organisation-status-new.component.html | 17 +++- .../pages/nominate/nominate.component.html | 23 ++++- .../org-support/error/error.component.html | 21 ++++- src/assets/i18n/en.json | 25 ++++- src/styles.scss | 5 +- 39 files changed, 717 insertions(+), 85 deletions(-) diff --git a/Auth0Templates/Mfa.html b/Auth0Templates/Mfa.html index a61ec2fed..a35ecaf7f 100644 --- a/Auth0Templates/Mfa.html +++ b/Auth0Templates/Mfa.html @@ -672,10 +672,19 @@
-
-
-
- Back +
+
+
+
+
    +
  1. + Sign in +
  2. +
  3. + Additional security +
  4. +
+

Sign in using additional diff --git a/src/app/app.module.ts b/src/app/app.module.ts index bb66f9e9a..87cfce595 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -187,6 +187,7 @@ import { UpdateOrgTypeComponent } from './pages/buyer/update-org-type/update-org import { ConfirmOrgTypeComponent } from './pages/buyer/confirm-org-type/confirm-org-type.component'; import { AutoValidationBuyerSuccessComponent } from './pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component'; import { BuyerBothErrorComponent } from './pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component'; +import { AccessibilityStatementComponent } from './pages/accessibility-statement/accessibility-statement.component'; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http); @@ -339,7 +340,8 @@ export function createTranslateLoader(http: HttpClient) { UpdateOrgTypeComponent, ConfirmOrgTypeComponent, AutoValidationBuyerSuccessComponent, - BuyerBothErrorComponent + BuyerBothErrorComponent, + AccessibilityStatementComponent ], imports: [ // BrowserModule, diff --git a/src/app/components/cookies-settings/cookies-settings.component.html b/src/app/components/cookies-settings/cookies-settings.component.html index a2b58e819..119c4b051 100644 --- a/src/app/components/cookies-settings/cookies-settings.component.html +++ b/src/app/components/cookies-settings/cookies-settings.component.html @@ -1,19 +1,39 @@
-

- Success -

+

+ Success +

-

- You’ve set your cookie preferences. Go back to the page you were looking at. -

+

+ You’ve set your cookie preferences. Go back to + the page you were looking at. +

-
+

+ @@ -21,11 +41,13 @@

Cookies

Cookies are small files saved on your phone, tablet or computer when you visit a website.

-

We use cookies to make the Public Procurement Gateway work and collect information about how you use our service.

+

We use cookies to make the Public Procurement Gateway work and collect information + about how you use our service.

Essential cookies

- Essential cookies keep your information secure while you use the Public Procurement Gateway. We do not need to ask permission to use them. + Essential cookies keep your information secure while you use the Public Procurement Gateway. We do + not need to ask permission to use them.

@@ -101,23 +123,27 @@

Essential cookies

- + - +
did_compatFallback cookie for anomaly detection on browsers that don’t support the sameSite=None attribute.Fallback cookie for anomaly detection on browsers that + don’t support the sameSite=None attribute. {{did_compat}} hr
_cf_bm This cookie is used by our authentication service Auth0 to distinguish between humans and bots. In this way, valid reports on the use of the website can be created.This cookie is used by our authentication service Auth0 to + distinguish between humans and bots. In this way, valid reports on the use of the + website can be created. {{_cf_bm}} min
-

Analytics cookies (optional)

+

Analytics cookies (optional)

Google Analytics

- With your permission, we use Google Analytics to collect data about how you use the Public Procurement Gateway. This information helps us to improve our service. + With your permission, we use Google Analytics to collect data about how you use the Public + Procurement Gateway. This information helps us to improve our service.

Google is not allowed to use or share our analytics data with anyone. @@ -127,7 +153,8 @@

Google Analytics

  • how you got to the Public Procurement Gateway
  • -
  • the pages you visit on the Public Procurement Gateway and how long you spend on them
  • +
  • the pages you visit on the Public Procurement Gateway and how long you spend on them +
  • any errors you see while using the Public Procurement Gateway
@@ -142,17 +169,20 @@

Google Analytics

_ga - This helps us count how many people visit CCS by tracking if you’ve visited before. + This helps us count how many people visit CCS by + tracking if you’ve visited before. 2 yrs _gid - This helps us count how many people visit CCS by tracking if you’ve visited before. + This helps us count how many people visit CCS by + tracking if you’ve visited before. 24 hrs _gat_UA-47046847-22 - This helps us count how many people visit CCS by tracking if you’ve visited before. + This helps us count how many people visit CCS by + tracking if you’ve visited before. 1 min @@ -170,7 +200,8 @@

Google Analytics

-
@@ -178,7 +209,8 @@

Google Analytics

-
@@ -192,7 +224,9 @@

Google Analytics

Glass box

- We use Glassbox software to collect information about how you use the Public Procurement Gateway. We do this to help make sure the site is meeting the needs of its users and to help us make improvements. + We use Glassbox software to collect information about how you use the Public Procurement + Gateway. We do this to help make sure the site is meeting the needs of its users and to help + us make improvements.

Glassbox stores information about: @@ -204,7 +238,8 @@

Glass box

  • Scrolls
  • - We don’t collect or store your personal information (e.g. your name or address) so this information can’t be used to identify who you are. + We don’t collect or store your personal information (e.g. your name or address) so this + information can’t be used to identify who you are.

    We don’t allow Glassbox to use or share our analytics data. @@ -221,7 +256,8 @@

    Glass box

    _cls_s - The session identifying cookie. It also indicates if the visitor is new or existing. + The session identifying + cookie. It also indicates if the visitor is new or existing.
    • 0: New @@ -235,7 +271,8 @@

      Glass box

      _cls_v - The visitor identifying cookie. + The visitor identifying + cookie. 2 yrs @@ -253,7 +290,8 @@

      Glass box

      -
    @@ -261,14 +299,16 @@

    Glass box

    -
    - +
    diff --git a/src/app/components/cookies-settings/cookies-settings.component.scss b/src/app/components/cookies-settings/cookies-settings.component.scss index 03c2002ed..66d326160 100644 --- a/src/app/components/cookies-settings/cookies-settings.component.scss +++ b/src/app/components/cookies-settings/cookies-settings.component.scss @@ -148,4 +148,7 @@ table th{ } .cookiestable-padding { padding-left: 20px !important ; +} +a { + text-decoration: underline; } \ No newline at end of file diff --git a/src/app/components/cookies-settings/cookies-settings.component.ts b/src/app/components/cookies-settings/cookies-settings.component.ts index 1b7ebd50b..39df530bf 100644 --- a/src/app/components/cookies-settings/cookies-settings.component.ts +++ b/src/app/components/cookies-settings/cookies-settings.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; import { CookiesService } from 'src/app/shared/cookies.service'; import { environment } from 'src/environments/environment'; @@ -31,13 +32,18 @@ export class CookiesSettingsComponent implements OnInit { } private ppg_cookies_preferences_set: string = this.CookiesService.getCookie('ppg_cookies_preferences_set'); private ppg_cookies_policy: string = this.CookiesService.getCookie('ppg_cookies_policy'); - constructor(private CookiesService: CookiesService) { } + public userName = ''; + public isOrgAdmin: boolean = false; + constructor(private CookiesService: CookiesService,private router: Router) { + this.isOrgAdmin = JSON.parse(localStorage.getItem('isOrgAdmin') || 'false'); + this.userName = localStorage.getItem('user_name') || ''; + } ngOnInit(): void { this.cookiesValue = JSON.parse(this.ppg_cookies_policy) if (this.ppg_cookies_preferences_set == "true") { this.cookiesValue = JSON.parse(this.ppg_cookies_policy) - } + } } public OnSubmit() { @@ -68,4 +74,5 @@ export class CookiesSettingsComponent implements OnInit { const element = document.getElementById("govuk-notification-banner-title"); element?.scrollIntoView(); } + } diff --git a/src/app/components/terms-conditions/terms-conditions.component.html b/src/app/components/terms-conditions/terms-conditions.component.html index aeaa034e8..b7c2dd7d9 100644 --- a/src/app/components/terms-conditions/terms-conditions.component.html +++ b/src/app/components/terms-conditions/terms-conditions.component.html @@ -4,12 +4,19 @@ diff --git a/src/app/components/terms-conditions/terms-conditions.component.ts b/src/app/components/terms-conditions/terms-conditions.component.ts index 457181ca4..edef4439f 100644 --- a/src/app/components/terms-conditions/terms-conditions.component.ts +++ b/src/app/components/terms-conditions/terms-conditions.component.ts @@ -8,18 +8,16 @@ import { Router } from '@angular/router'; styleUrls: ['./terms-conditions.component.scss'], }) export class TermsConditionsComponent implements OnInit { - private userName = localStorage.getItem('user_name') || ''; - constructor(private router: Router, private scroller: ViewportScroller) {} + public userName = '' + public isOrgAdmin: boolean = false; + + constructor(private router: Router, private scroller: ViewportScroller) { + this.isOrgAdmin = JSON.parse(localStorage.getItem('isOrgAdmin') || 'false'); + this.userName = localStorage.getItem('user_name') || ''; + } ngOnInit(): void {} - public backToHome(): void { - if (this.userName) { - this.router.navigateByUrl(`home`); - } else { - window.location.href = 'https://www.crowncommercial.gov.uk'; - } - } public scrollContent(id: string): void { document.getElementById(id)?.scrollIntoView({ diff --git a/src/app/pages/accessibility-statement/accessibility-statement.component.html b/src/app/pages/accessibility-statement/accessibility-statement.component.html index ae70faff3..eb566926c 100644 --- a/src/app/pages/accessibility-statement/accessibility-statement.component.html +++ b/src/app/pages/accessibility-statement/accessibility-statement.component.html @@ -2,7 +2,16 @@
    1. - Home + + {{ 'ADMINISTRATOR_DASHBOARD' | translate }} + + + {{"PUBLIC_PROCUREMENT_GATEWAY_DASHBOARD" | translate}} + + + {{"REGITERATION_HOME" | translate}} +
    2. Accessibility statement diff --git a/src/app/pages/accessibility-statement/accessibility-statement.component.ts b/src/app/pages/accessibility-statement/accessibility-statement.component.ts index 9cdf73e4c..e9f07a129 100644 --- a/src/app/pages/accessibility-statement/accessibility-statement.component.ts +++ b/src/app/pages/accessibility-statement/accessibility-statement.component.ts @@ -14,9 +14,13 @@ public representingTag={ KeyboardLevelA:'', PageTitledLevelA:'' } -private userName = localStorage.getItem('user_name') || ''; +public userName = ''; +public isOrgAdmin: boolean = false; - constructor(private router: Router) { } + constructor(private router: Router) { + this.isOrgAdmin = JSON.parse(localStorage.getItem('isOrgAdmin') || 'false'); + this.userName = localStorage.getItem('user_name') || ''; + } ngOnInit(): void { } @@ -25,11 +29,4 @@ private userName = localStorage.getItem('user_name') || ''; window.print() } - public navigateToHome():void{ - if(this.userName){ - this.router.navigateByUrl(`home`); - }else{ - window.location.href='https://www.crowncommercial.gov.uk'; - } - } } diff --git a/src/app/pages/change-password/change-password.component.html b/src/app/pages/change-password/change-password.component.html index f2b5f08b2..e7b3bb702 100644 --- a/src/app/pages/change-password/change-password.component.html +++ b/src/app/pages/change-password/change-password.component.html @@ -1,6 +1,21 @@
      +

      {{ 'CHANGE_YOUR_PASSWORD' | translate }}

    3. - {{ 'ORG_ALREADY_REG' | translate }} + {{ 'ORG_ALREADY_REG' | translate }}
    4. {{ 'NOTIFICATION_SENT' | translate }} From 09b1205c30eda869d505705d035417573dfd8065 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Tue, 20 Dec 2022 15:30:08 +0530 Subject: [PATCH 72/79] regiteration flow and 4217 issue fixed (#964) --- .../forgot-password.component.html | 2 +- .../forgot-password.component.ts | 5 - ...ation-registration-add-user.component.html | 101 +++++++++++------- ...isation-registration-add-user.component.ts | 28 ++++- ...tion-additional-identifiers.component.html | 4 + ...ration-additional-identifiers.component.ts | 5 +- ...ation-registration-buyer-type.component.ts | 2 +- ...sation-registration-confirm.component.html | 14 ++- ...nisation-registration-confirm.component.ts | 40 +++++-- ...tration-error-details-wrong.component.html | 4 + ...istration-error-details-wrong.component.ts | 5 +- ...egistration-error-not-found.component.html | 4 + ...-registration-error-not-found.component.ts | 2 + ...n-error-not-my-organisation.component.html | 4 + ...ion-error-not-my-organisation.component.ts | 4 +- ...isation-registration-step-2.component.html | 3 + ...anisation-registration-step-2.component.ts | 15 ++- ...isation-registration-step-3.component.html | 3 + ...anisation-registration-step-3.component.ts | 7 ++ ...g-organisation-admin-notify.component.html | 31 +++++- ...reg-organisation-admin-notify.component.ts | 11 +- ...-organisation-status-exists.component.html | 4 + ...eg-organisation-status-exists.component.ts | 12 ++- .../nominate-success.component.html | 4 +- .../nominate-success.component.ts | 6 +- src/app/pages/nominate/nominate.component.ts | 1 + 26 files changed, 246 insertions(+), 75 deletions(-) diff --git a/src/app/pages/forgot-password/forgot-password.component.html b/src/app/pages/forgot-password/forgot-password.component.html index 4a9ca05b5..4421f2cb0 100644 --- a/src/app/pages/forgot-password/forgot-password.component.html +++ b/src/app/pages/forgot-password/forgot-password.component.html @@ -3,7 +3,7 @@
      1. - Home + Home
      2. Forgot password diff --git a/src/app/pages/forgot-password/forgot-password.component.ts b/src/app/pages/forgot-password/forgot-password.component.ts index d7528f22f..2ca9edcf4 100644 --- a/src/app/pages/forgot-password/forgot-password.component.ts +++ b/src/app/pages/forgot-password/forgot-password.component.ts @@ -92,9 +92,4 @@ export class ForgotPasswordComponent extends BaseComponent implements OnInit { public onCancelClick() { this.router.navigateByUrl('login'); } - - - goBack() { - window.history.back(); - } } diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-add-user/manage-organisation-registration-add-user.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-add-user/manage-organisation-registration-add-user.component.html index 51823f979..e96d8e539 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-add-user/manage-organisation-registration-add-user.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-add-user/manage-organisation-registration-add-user.component.html @@ -4,33 +4,50 @@ @@ -93,11 +110,11 @@

        There is a prob Error:Enter your first name - Error:{{ 'ENTER_NAME_WITHOUT_NUM_SPECIAL' | translate }} - - + Error:{{ 'ENTER_NAME_WITHOUT_NUM_SPECIAL' | translate }} + +

      There is a prob Error:Enter your last name - Error:{{ 'ENTER_NAME_WITHOUT_NUM_SPECIAL' | translate }} - + *ngIf="submitted && !formGroup.controls.lastName.errors?.required && formGroup.controls.lastName.invalid"> + Error:{{ 'ENTER_NAME_WITHOUT_NUM_SPECIAL' | translate }} + @@ -118,15 +135,17 @@

      There is a prob
      - + Error:Enter your email - Error:Enter an email address in the correct format, like name@example.com + *ngIf="submitted && !formGroup.controls.email.errors?.required && formGroup.controls.email.invalid"> + Error:Enter an email address in the correct format, like + name@example.com -
      diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-add-user/manage-organisation-registration-add-user.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-add-user/manage-organisation-registration-add-user.component.ts index f12f40944..da0215872 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-add-user/manage-organisation-registration-add-user.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-add-user/manage-organisation-registration-add-user.component.ts @@ -23,12 +23,14 @@ export class ManageOrgRegAddUserComponent extends BaseComponent implements OnIni submitted: boolean = false; userTitleEnum = UserTitleEnum; ciiOrganisationInfo: CiiOrganisationDto; + public pageAccessMode:any; + public buyerFlow:any; @ViewChildren('input') inputs!: QueryList; constructor(private formBuilder: FormBuilder, private organisationService: OrganisationService, private PatternService:PatternService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, - protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper,private ActivatedRoute: ActivatedRoute) { super(uiStore, viewportScroller, scrollHelper); this.formGroup = this.formBuilder.group({ @@ -37,6 +39,15 @@ private PatternService:PatternService, email: ['', Validators.compose([Validators.required, Validators.pattern(this.PatternService.emailPattern)])], }); this.ciiOrganisationInfo = {} + this.ActivatedRoute.queryParams.subscribe((para: any) => { + if(para.data != undefined){ + this.pageAccessMode = JSON.parse(atob(para.data)); + } else { + this.pageAccessMode = null + } + }); + this.buyerFlow = localStorage.getItem('organisation_type') ?? ''; + } ngOnInit() { @@ -78,7 +89,7 @@ private PatternService:PatternService, .subscribe({ next: () => { localStorage.setItem('brickendon_org_reg_email_address', organisationRegisterDto.adminUserName); - this.router.navigateByUrl(`manage-org/register/confirm`); + this.router.navigateByUrl(`/manage-org/register/confirm?data=` + btoa(JSON.stringify(this.pageAccessMode))); }, error: (err: any) => { if (err.status == 404) { @@ -126,12 +137,21 @@ private PatternService:PatternService, return form.valid; } - goBack() { - window.history.back(); + public goConfirmOrgPage():void{ + const schemeDetails = JSON.parse(localStorage.getItem('schemeDetails') || ''); + this.router.navigateByUrl( + `manage-org/register/search/${schemeDetails.scheme}?id=${encodeURIComponent( + schemeDetails.schemeID + )}` + ); } public onClickNominate(){ this.router.navigateByUrl(`/nominate?data=` + btoa(JSON.stringify(0))); } + public goBack(){ + window.history.back() + } + } diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-additional-identifiers/manage-organisation-registration-additional-identifiers.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-additional-identifiers/manage-organisation-registration-additional-identifiers.component.html index 3b43ec03d..30042638b 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-additional-identifiers/manage-organisation-registration-additional-identifiers.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-additional-identifiers/manage-organisation-registration-additional-identifiers.component.html @@ -19,6 +19,10 @@
    5. {{ 'ORG_TYPE' | translate }}
    6. +
    7. + {{ 'BUYER_TYPE_BC' | + translate }} +
    8. {{ 'ORG_DETAILS' | translate }}
    9. diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-additional-identifiers/manage-organisation-registration-additional-identifiers.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-additional-identifiers/manage-organisation-registration-additional-identifiers.component.ts index ef6bb552e..d0ab1f31b 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-additional-identifiers/manage-organisation-registration-additional-identifiers.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-additional-identifiers/manage-organisation-registration-additional-identifiers.component.ts @@ -32,9 +32,12 @@ export class ManageOrgRegAdditionalIdentifiersComponent extends BaseComponent im public additionalIdentifiers: any[] = new Array(); public routeParams!: any; public organisation!:any; + public buyerFlow:any constructor(private ciiService: ciiService, private router: Router, private route: ActivatedRoute, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { super(uiStore,viewportScroller,scrollHelper); + this.buyerFlow = localStorage.getItem('organisation_type') ?? ''; + } ngOnInit() { @@ -58,7 +61,7 @@ export class ManageOrgRegAdditionalIdentifiersComponent extends BaseComponent im const org = JSON.parse(localStorage.getItem('cii_organisation')+''); org.additionalIdentifiers = this.selectedIdentifiers; localStorage.setItem('cii_organisation', JSON.stringify(org)); - this.router.navigateByUrl('manage-org/register/user'); + this.router.navigateByUrl(`manage-org/register/user?data=` + btoa(JSON.stringify(2))); } public onChange(event: any, additionalIdentifier: any) { diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-buyer-type/manage-organisation-registration-buyer-type.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-buyer-type/manage-organisation-registration-buyer-type.component.ts index e018e488c..cbbad5b3f 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-buyer-type/manage-organisation-registration-buyer-type.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-buyer-type/manage-organisation-registration-buyer-type.component.ts @@ -42,6 +42,6 @@ export class ManageOrgRegBuyerTypeComponent extends BaseComponent implements OnI public onSubmit() { localStorage.setItem("manage-org_buyer_type", this.defaultChoice); //this.router.navigateByUrl(`manage-org/register/start`); - this.router.navigateByUrl(`manage-org/register/search`); + this.router.navigateByUrl(`manage-org/register/search?data=` + btoa(JSON.stringify(3))); } } diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-confirm/manage-organisation-registration-confirm.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-confirm/manage-organisation-registration-confirm.component.html index c094b8bdb..a9a6ea59c 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-confirm/manage-organisation-registration-confirm.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-confirm/manage-organisation-registration-confirm.component.html @@ -20,14 +20,24 @@
    10. {{ 'ORG_TYPE' | translate }}
    11. +
    12. + {{ 'BUYER_TYPE_BC' | + translate }} +
    13. {{ 'ORG_DETAILS' | translate }}
    14. - {{ 'CONFIRM_ORG_DETAILS' | translate }} + {{ 'CONFIRM_ORG_DETAILS' | translate }} +
    15. +
    16. + {{ 'WRONG_ORG_DETAILS' | translate }} +
    17. +
    18. + {{ 'ADD_REG' | translate }}
    19. - {{ 'CREATE_ADMIN_ACC' | translate }} + {{ 'CREATE_ADMIN_ACC' | translate }}
    20. {{ 'CONFIRM_EMAIL' | translate }} diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-confirm/manage-organisation-registration-confirm.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-confirm/manage-organisation-registration-confirm.component.ts index 6d0e2e77c..1bfb6635c 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-confirm/manage-organisation-registration-confirm.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-confirm/manage-organisation-registration-confirm.component.ts @@ -17,15 +17,25 @@ import { UIState } from 'src/app/store/ui.states'; templateUrl: './manage-organisation-registration-confirm.component.html', styleUrls: ['./manage-organisation-registration-confirm.component.scss'] }) -export class ManageOrgRegConfirmComponent extends BaseComponent implements OnInit, OnDestroy { - +export class ManageOrgRegConfirmComponent extends BaseComponent implements OnInit { + public pageAccessMode:any; public emailAddress: string = ''; public resendActivationEmailMode: boolean = false; + public buyerFlow:any constructor(private userService: UserService, private route: ActivatedRoute, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, - private router: Router) { + private router: Router,private ActivatedRoute: ActivatedRoute) { super(uiStore, viewportScroller, scrollHelper); + this.ActivatedRoute.queryParams.subscribe((para: any) => { + if(para.data != undefined){ + this.pageAccessMode = JSON.parse(atob(para.data)); + } else { + this.pageAccessMode = null + } + }); + this.buyerFlow = localStorage.getItem('organisation_type') ?? ''; + } ngOnInit() { @@ -39,12 +49,28 @@ export class ManageOrgRegConfirmComponent extends BaseComponent implements OnIni }); } - ngOnDestroy(): void { - localStorage.removeItem('schemeDetails') + + resendActivationLink() { + this.router.navigateByUrl('manage-org/register/confirm?rs'); } + public goConfirmOrgPage():void{ + const schemeDetails = JSON.parse(localStorage.getItem('schemeDetails') || ''); + this.router.navigateByUrl( + `manage-org/register/search/${schemeDetails.scheme}?id=${encodeURIComponent( + schemeDetails.schemeID + )}` + ); + } - resendActivationLink() { - this.router.navigateByUrl('manage-org/register/confirm?rs'); + public goToRegSchema():void{ + const schemeDetails = JSON.parse(localStorage.getItem('cii_scheme') || ''); + this.router.navigateByUrl( + 'manage-org/register/search/' + + schemeDetails.scheme + + '/' + + schemeDetails.id + + '/additional-identifiers' + ); } } diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-error-details-wrong/manage-organisation-registration-error-details-wrong.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-error-details-wrong/manage-organisation-registration-error-details-wrong.component.html index 6d4fe5962..a1cecac53 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-error-details-wrong/manage-organisation-registration-error-details-wrong.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-error-details-wrong/manage-organisation-registration-error-details-wrong.component.html @@ -22,6 +22,10 @@
    21. {{ 'ORG_TYPE' | translate }}
    22. +
    23. + {{ 'BUYER_TYPE_BC' | + translate }} +
    24. {{ 'ORG_DETAILS' | translate }}
    25. diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-error-details-wrong/manage-organisation-registration-error-details-wrong.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-error-details-wrong/manage-organisation-registration-error-details-wrong.component.ts index 5d9655f0e..29262ff04 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-error-details-wrong/manage-organisation-registration-error-details-wrong.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-error-details-wrong/manage-organisation-registration-error-details-wrong.component.ts @@ -25,13 +25,14 @@ import { UIState } from 'src/app/store/ui.states'; changeDetection: ChangeDetectionStrategy.OnPush }) export class ManageOrgRegDetailsWrongComponent extends BaseComponent { - + public buyerFlow:any constructor(private dataService: dataService, private router: Router, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { super(uiStore, viewportScroller, scrollHelper); + this.buyerFlow = localStorage.getItem('organisation_type') ?? ''; } onContinueClick() { - this.router.navigateByUrl(`manage-org/register/user`); + this.router.navigateByUrl(`/manage-org/register/user?data=` + btoa(JSON.stringify(0))); } goBack() { diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-error-not-found/manage-organisation-registration-error-not-found.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-error-not-found/manage-organisation-registration-error-not-found.component.html index 97a45507b..27a6b8b70 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-error-not-found/manage-organisation-registration-error-not-found.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-error-not-found/manage-organisation-registration-error-not-found.component.html @@ -20,6 +20,10 @@
    26. {{ 'ORG_TYPE' | translate }}
    27. +
    28. + {{ 'BUYER_TYPE_BC' | + translate }} +
    29. {{ 'ORG_DETAILS' | translate }}
    30. diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-error-not-found/manage-organisation-registration-error-not-found.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-error-not-found/manage-organisation-registration-error-not-found.component.ts index e6183c5ad..b8cd7f880 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-error-not-found/manage-organisation-registration-error-not-found.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-error-not-found/manage-organisation-registration-error-not-found.component.ts @@ -25,9 +25,11 @@ import { UIState } from 'src/app/store/ui.states'; changeDetection: ChangeDetectionStrategy.OnPush }) export class ManageOrgRegErrorNotFoundComponent extends BaseComponent implements OnInit { + public buyerFlow:any constructor(private dataService: dataService, private router: Router, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { super(uiStore,viewportScroller,scrollHelper); + this.buyerFlow = localStorage.getItem('organisation_type') ?? ''; } ngOnInit() { } diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-error-not-my-organisation/manage-organisation-registration-error-not-my-organisation.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-error-not-my-organisation/manage-organisation-registration-error-not-my-organisation.component.html index 73845640d..6e91d89c2 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-error-not-my-organisation/manage-organisation-registration-error-not-my-organisation.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-error-not-my-organisation/manage-organisation-registration-error-not-my-organisation.component.html @@ -20,6 +20,10 @@
    31. {{ 'ORG_TYPE' | translate }}
    32. +
    33. + {{ 'BUYER_TYPE_BC' | + translate }} +
    34. {{ 'ORG_DETAILS' | translate }}
    35. diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-error-not-my-organisation/manage-organisation-registration-error-not-my-organisation.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-error-not-my-organisation/manage-organisation-registration-error-not-my-organisation.component.ts index e327907c7..2d5b19f0e 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-error-not-my-organisation/manage-organisation-registration-error-not-my-organisation.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-error-not-my-organisation/manage-organisation-registration-error-not-my-organisation.component.ts @@ -25,9 +25,11 @@ import { UIState } from 'src/app/store/ui.states'; changeDetection: ChangeDetectionStrategy.OnPush }) export class ManageOrgRegOrgNotFoundComponent extends BaseComponent implements OnInit { - + public buyerFlow:any constructor(private dataService: dataService, private router: Router, protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { super(uiStore, viewportScroller, scrollHelper); + this.buyerFlow = localStorage.getItem('organisation_type') ?? ''; + } goBack() { 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 d555deb45..38c493c35 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 @@ -19,6 +19,9 @@

    36. {{ 'ORG_TYPE' | translate }} +
    37. +
    38. + {{ 'BUYER_TYPE_BC' | translate }}
    39. {{ 'ORG_DETAILS' | translate }} 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 92e8e1008..dc56c0402 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 @@ -7,7 +7,7 @@ import { ViewChildren, } from '@angular/core'; import { Store } from '@ngrx/store'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { BehaviorSubject, Observable } from 'rxjs'; import { share } from 'rxjs/operators'; @@ -51,6 +51,7 @@ export class ManageOrgRegStep2Component isDunlength: false, DunData:'', }; + public pageAccessMode:any; submitted: boolean = false; @ViewChildren('input') inputs!: QueryList; @@ -62,10 +63,20 @@ export class ManageOrgRegStep2Component protected uiStore: Store, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper, - private formBuilder: FormBuilder + private formBuilder: FormBuilder, + private ActivatedRoute: ActivatedRoute ) { super(uiStore, viewportScroller, scrollHelper); this.txtValue = ''; + this.ActivatedRoute.queryParams.subscribe((para: any) => { + if(para.data != undefined){ + this.pageAccessMode = JSON.parse(atob(para.data)); + localStorage.setItem('organisation_type',this.pageAccessMode) + } else { + this.pageAccessMode = null + localStorage.setItem('organisation_type','null') + } + }); } ngOnInit() { diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-3/manage-organisation-registration-step-3.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-step-3/manage-organisation-registration-step-3.component.html index fc2817b2d..d540adaf9 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-3/manage-organisation-registration-step-3.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-3/manage-organisation-registration-step-3.component.html @@ -20,6 +20,9 @@
    40. {{ 'ORG_TYPE' | translate }}
    41. +
    42. + {{ 'BUYER_TYPE_BC' | translate }} +
    43. {{ 'ORG_DETAILS' | translate }}
    44. diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-step-3/manage-organisation-registration-step-3.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-step-3/manage-organisation-registration-step-3.component.ts index cacae08fa..4266131c6 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-step-3/manage-organisation-registration-step-3.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-step-3/manage-organisation-registration-step-3.component.ts @@ -72,6 +72,7 @@ export class ManageOrgRegStep3Component protected _onDestroy = new Subject(); private orgDetails:any; public isInvalid:boolean=false + public pageAccessMode:any; @ViewChildren('input') inputs!: QueryList; @ViewChild('singleSelect', { static: true }) singleSelect!: MatSelect; @ViewChild('singleSelect') @@ -90,6 +91,7 @@ export class ManageOrgRegStep3Component super(uiStore, viewportScroller, scrollHelper); let queryParams = this.route.snapshot.queryParams; this.id = queryParams?.id || ''; + this.pageAccessMode = localStorage.getItem('organisation_type') ?? ''; } async ngOnInit() { @@ -231,8 +233,13 @@ export class ManageOrgRegStep3Component '/additional-identifiers' ); } else { + let cii_scheme = { + scheme:this.routeParams.scheme, + id:this.id + } this.orgDetails.address.countryCode=this.countryCode localStorage.setItem('cii_organisation', JSON.stringify(this.orgDetails)); + localStorage.setItem('cii_scheme', JSON.stringify(cii_scheme)); this.router.navigateByUrl(this.orgGroup); } } else { diff --git a/src/app/pages/manage-organisation/manage-reg-organisation-admin-notify/manage-reg-organisation-admin-notify.component.html b/src/app/pages/manage-organisation/manage-reg-organisation-admin-notify/manage-reg-organisation-admin-notify.component.html index 01dc826b8..4c2f7dc40 100644 --- a/src/app/pages/manage-organisation/manage-reg-organisation-admin-notify/manage-reg-organisation-admin-notify.component.html +++ b/src/app/pages/manage-organisation/manage-reg-organisation-admin-notify/manage-reg-organisation-admin-notify.component.html @@ -2,7 +2,36 @@
      -
        +
          +
        1. + {{ 'REGITERATION_HOME' | translate }} +
        2. +
        3. + {{ 'CREATE_ACC' | translate }} +
        4. +
        5. + {{ 'ENTER_DETAIL' | translate }} +
        6. +
        7. + {{ 'REG_ORG' | translate }} +
        8. +
        9. + {{ 'ORG_ADMIN' | translate }} +
        10. +
        11. + {{ 'ORG_TYPE' | translate }} +
        12. +
        13. + {{ 'ORG_DETAILS' | translate }} +
        14. +
        15. + {{ 'ORG_ALREADY_REG' | translate }} +
        16. +
        17. + {{ 'NOTIFICATION_SENT' | translate }} +
        18. +
        +
        1. {{ 'REGITERATION_HOME' | translate }}
        2. diff --git a/src/app/pages/manage-organisation/manage-reg-organisation-admin-notify/manage-reg-organisation-admin-notify.component.ts b/src/app/pages/manage-organisation/manage-reg-organisation-admin-notify/manage-reg-organisation-admin-notify.component.ts index 4847ff5ef..a6e6eea3e 100644 --- a/src/app/pages/manage-organisation/manage-reg-organisation-admin-notify/manage-reg-organisation-admin-notify.component.ts +++ b/src/app/pages/manage-organisation/manage-reg-organisation-admin-notify/manage-reg-organisation-admin-notify.component.ts @@ -1,5 +1,6 @@ import { ViewportScroller } from "@angular/common"; import { Component, OnInit } from "@angular/core"; +import { ActivatedRoute } from "@angular/router"; import { Store } from "@ngrx/store"; import { BaseComponent } from "src/app/components/base/base.component"; import { ScrollHelper } from "src/app/services/helper/scroll-helper.services"; @@ -14,9 +15,17 @@ import { UIState } from "src/app/store/ui.states"; export class ManageOrgRegNotifyAdminComponent implements OnInit { orgName: string = ''; + public pageAccessMode:any; constructor(protected uiStore: Store, - protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { + protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper,private ActivatedRoute: ActivatedRoute) { + this.ActivatedRoute.queryParams.subscribe((para: any) => { + if(para.data != undefined){ + this.pageAccessMode = JSON.parse(atob(para.data)); + } else { + this.pageAccessMode = null + } + }); } ngOnInit() { diff --git a/src/app/pages/manage-organisation/manage-reg-organisation-status-exists/manage-reg-organisation-status-exists.component.html b/src/app/pages/manage-organisation/manage-reg-organisation-status-exists/manage-reg-organisation-status-exists.component.html index 0cb45cd5c..b5fa11811 100644 --- a/src/app/pages/manage-organisation/manage-reg-organisation-status-exists/manage-reg-organisation-status-exists.component.html +++ b/src/app/pages/manage-organisation/manage-reg-organisation-status-exists/manage-reg-organisation-status-exists.component.html @@ -21,6 +21,10 @@
        3. {{ 'ORG_TYPE' | translate }}
        4. +
        5. + {{ 'BUYER_TYPE_BC' | + translate }} +
        6. {{ 'ORG_DETAILS' | translate }}
        7. diff --git a/src/app/pages/manage-organisation/manage-reg-organisation-status-exists/manage-reg-organisation-status-exists.component.ts b/src/app/pages/manage-organisation/manage-reg-organisation-status-exists/manage-reg-organisation-status-exists.component.ts index 99a5591b1..d4eb5c13b 100644 --- a/src/app/pages/manage-organisation/manage-reg-organisation-status-exists/manage-reg-organisation-status-exists.component.ts +++ b/src/app/pages/manage-organisation/manage-reg-organisation-status-exists/manage-reg-organisation-status-exists.component.ts @@ -12,12 +12,19 @@ export class ManageOrgRegSearchStatusExistsComponent implements OnInit{ orgreginfo: any; public pageAccessMode:any; + public buyerFlow:any constructor(private organisationService: OrganisationService, private router: Router,private ActivatedRoute: ActivatedRoute) { this.ActivatedRoute.queryParams.subscribe((para: any) => { - this.pageAccessMode = JSON.parse(atob(para.data)); + if(para.data != undefined){ + this.pageAccessMode = JSON.parse(atob(para.data)); + } else { + this.pageAccessMode = null + } }); + this.buyerFlow = localStorage.getItem('organisation_type') ?? ''; + } ngOnInit(){ @@ -25,9 +32,8 @@ export class ManageOrgRegSearchStatusExistsComponent implements OnInit{ } public onContinueSingleOrgRegistered() { - this.organisationService.requestOrgAdminToJoinOrg(this.orgreginfo.ciiOrgId, this.orgreginfo.adminUserFirstName, this.orgreginfo.adminUserLastName, this.orgreginfo.adminEmail).toPromise().then(() => { - this.router.navigateByUrl(`manage-org/register/notify-join-org`); + this.router.navigateByUrl(`/manage-org/register/notify-join-org?data=` + btoa(JSON.stringify(this.pageAccessMode))); }); } diff --git a/src/app/pages/nominate-success/nominate-success.component.html b/src/app/pages/nominate-success/nominate-success.component.html index 8043ef849..66f58597f 100644 --- a/src/app/pages/nominate-success/nominate-success.component.html +++ b/src/app/pages/nominate-success/nominate-success.component.html @@ -18,7 +18,7 @@ {{ 'ORG_ADMIN' | translate }}
        8. - {{ 'NOMINATE' | translate }} + {{ 'NOMINATE' | translate }}
        9. {{ 'SUCCESS' | translate }} @@ -55,7 +55,7 @@ {{ 'CREATE_ADMIN_ACC' | translate }}
        10. - {{ 'NOMINATE' | translate }} + {{ 'NOMINATE' | translate }}
        11. {{ 'SUCCESS' | translate }} diff --git a/src/app/pages/nominate-success/nominate-success.component.ts b/src/app/pages/nominate-success/nominate-success.component.ts index 38eb9b616..dee7256bb 100644 --- a/src/app/pages/nominate-success/nominate-success.component.ts +++ b/src/app/pages/nominate-success/nominate-success.component.ts @@ -43,9 +43,13 @@ export class NominateSuccessComponent extends BaseComponent implements OnDestroy ngOnDestroy(): void { this.subscription?.unsubscribe(); - localStorage.removeItem('schemeDetails') } + public goToNominate(){ + this.router.navigateByUrl(`/nominate?data=` + btoa(JSON.stringify(this.pageAccessMode))); + } + + public goConfirmOrgPage():void{ const schemeDetails = JSON.parse(localStorage.getItem('schemeDetails') || ''); this.router.navigateByUrl( diff --git a/src/app/pages/nominate/nominate.component.ts b/src/app/pages/nominate/nominate.component.ts index 22767e527..bf5eb193f 100644 --- a/src/app/pages/nominate/nominate.component.ts +++ b/src/app/pages/nominate/nominate.component.ts @@ -85,6 +85,7 @@ export class NominateComponent extends BaseComponent { } } public onSubmit(form: FormGroup) { + this.router.navigateByUrl(`nominate/success?data=` + btoa(JSON.stringify(this.pageAccessMode))); this.submitted = true; if (this.PatternService.emailValidator(form.get('email')?.value)) { this.formGroup.controls['email'].setErrors({ incorrect: true }); From c47cac8fa52dee0fa0872c5b23969c01c6465a3d Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Tue, 20 Dec 2022 19:06:28 +0530 Subject: [PATCH 73/79] nomini flow updated (#966) --- ...istration-error-username-already-exists.component.html | 2 +- ...egistration-error-username-already-exists.component.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-error-username-already-exists/manage-organisation-registration-error-username-already-exists.component.html b/src/app/pages/manage-organisation/manage-organisation-registration-error-username-already-exists/manage-organisation-registration-error-username-already-exists.component.html index e63a32724..be3c63926 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-error-username-already-exists/manage-organisation-registration-error-username-already-exists.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-registration-error-username-already-exists/manage-organisation-registration-error-username-already-exists.component.html @@ -24,7 +24,7 @@ {{ 'ORG_DETAILS' | translate }}
        12. - {{ 'CONFIRM_ORG_DETAILS' | translate }} + {{ 'CONFIRM_ORG_DETAILS' | translate }}
        13. {{ 'CREATE_ADMIN_ACC' | translate }} diff --git a/src/app/pages/manage-organisation/manage-organisation-registration-error-username-already-exists/manage-organisation-registration-error-username-already-exists.component.ts b/src/app/pages/manage-organisation/manage-organisation-registration-error-username-already-exists/manage-organisation-registration-error-username-already-exists.component.ts index dc6ed3a34..670cf7724 100644 --- a/src/app/pages/manage-organisation/manage-organisation-registration-error-username-already-exists/manage-organisation-registration-error-username-already-exists.component.ts +++ b/src/app/pages/manage-organisation/manage-organisation-registration-error-username-already-exists/manage-organisation-registration-error-username-already-exists.component.ts @@ -36,4 +36,12 @@ export class ManageOrgRegErrorUsernameExistsComponent extends BaseComponent impl window.history.back(); } + public goConfirmOrgPage():void{ + const schemeDetails = JSON.parse(localStorage.getItem('schemeDetails') || ''); + this.router.navigateByUrl( + `manage-org/register/search/${schemeDetails.scheme}?id=${encodeURIComponent( + schemeDetails.schemeID + )}` + ); + } } From 929a63c52b019f203cf8b52d82de1fdc0c30d91a Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 21 Dec 2022 11:15:20 +0530 Subject: [PATCH 74/79] gds formate correction updated (#968) --- .../auto-validation-buyer-success.component.html | 2 +- src/app/pages/buyer/success/success.component.html | 2 +- ...nisation-profile-add-contact-to-site.component.html | 2 +- ...istry-confirm-additional-identifiers.component.html | 2 +- ...rganisation-profile-registry-confirm.component.html | 2 +- ...tion-profile-registry-delete-confirm.component.html | 2 +- ...-organisation-profile-registry-error.component.html | 10 +++++----- ...organisation-profile-registry-search.component.html | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html index 9ca7426b2..53b817410 100644 --- a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html @@ -8,7 +8,7 @@ Manage service eligibility
        14. - Success + Success
      diff --git a/src/app/pages/buyer/success/success.component.html b/src/app/pages/buyer/success/success.component.html index d12d6d4ae..c687cd7dc 100644 --- a/src/app/pages/buyer/success/success.component.html +++ b/src/app/pages/buyer/success/success.component.html @@ -9,7 +9,7 @@ Manage service eligibility
    45. - Success + Success
    diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-add-contact-to-site/manage-organisation-profile-add-contact-to-site.component.html b/src/app/pages/manage-organisation/manage-organisation-profile-add-contact-to-site/manage-organisation-profile-add-contact-to-site.component.html index 76595920b..3c9cd061d 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-add-contact-to-site/manage-organisation-profile-add-contact-to-site.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-profile-add-contact-to-site/manage-organisation-profile-add-contact-to-site.component.html @@ -14,7 +14,7 @@ }}
  • - Add a contact to site {{siteInfo.siteName}} + Add a contact to site {{siteInfo.siteName}}
  • diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-confirm-additional-identifiers/manage-organisation-profile-registry-confirm-additional-identifiers.component.html b/src/app/pages/manage-organisation/manage-organisation-profile-registry-confirm-additional-identifiers/manage-organisation-profile-registry-confirm-additional-identifiers.component.html index 489595c7f..2c9842c63 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-confirm-additional-identifiers/manage-organisation-profile-registry-confirm-additional-identifiers.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-confirm-additional-identifiers/manage-organisation-profile-registry-confirm-additional-identifiers.component.html @@ -9,7 +9,7 @@ Manage your organisation
  • - Add new registry + Add new registry
  • diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-confirm/manage-organisation-profile-registry-confirm.component.html b/src/app/pages/manage-organisation/manage-organisation-profile-registry-confirm/manage-organisation-profile-registry-confirm.component.html index dd7bd3d90..6d85b3c08 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-confirm/manage-organisation-profile-registry-confirm.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-confirm/manage-organisation-profile-registry-confirm.component.html @@ -9,7 +9,7 @@ Manage your organisation
  • - Add new registry + Add new registry
  • diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-delete-confirm/manage-organisation-profile-registry-delete-confirm.component.html b/src/app/pages/manage-organisation/manage-organisation-profile-registry-delete-confirm/manage-organisation-profile-registry-delete-confirm.component.html index 259af109b..e22cb56c6 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-delete-confirm/manage-organisation-profile-registry-delete-confirm.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-delete-confirm/manage-organisation-profile-registry-delete-confirm.component.html @@ -9,7 +9,7 @@ Manage your organisation
  • - Success + Success
  • diff --git a/src/app/pages/manage-organisation/manage-organisation-profile-registry-error/manage-organisation-profile-registry-error.component.html b/src/app/pages/manage-organisation/manage-organisation-profile-registry-error/manage-organisation-profile-registry-error.component.html index 0c4bebe57..fa7471678 100644 --- a/src/app/pages/manage-organisation/manage-organisation-profile-registry-error/manage-organisation-profile-registry-error.component.html +++ b/src/app/pages/manage-organisation/manage-organisation-profile-registry-error/manage-organisation-profile-registry-error.component.html @@ -9,19 +9,19 @@ Manage your organisation
  • - Wrong Details + Wrong Details
  • - Unexpected error + Unexpected error
  • - Invalid registry + Invalid registry
  • - Registry already used + Registry already used
  • - Registry already used + Registry already used
  • 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 b4ac6247f..7a4e96b6f 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 @@ -9,7 +9,7 @@ Manage your organisation
  • - Add new registry + Add new registry
  • From ce002d978ec36406b18db49a7487cd9f1399df2d Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Thu, 5 Jan 2023 14:58:26 +0530 Subject: [PATCH 75/79] 3315 , 3316 , 3317 changes completed for p2sprint16 --- Auth0Templates/LogIn.html | 137 +++++++++++++++++- .../terms-conditions.component.html | 9 +- ...reg-organisation-status-new.component.html | 1 + 3 files changed, 145 insertions(+), 2 deletions(-) diff --git a/Auth0Templates/LogIn.html b/Auth0Templates/LogIn.html index b1c11a08f..b415d4769 100644 --- a/Auth0Templates/LogIn.html +++ b/Auth0Templates/LogIn.html @@ -421,6 +421,129 @@ padding: 20px 17px 14px; font-weight: bold; } + .govuk-notification-banner { + font-family: "GDS Transport", arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: 400; + font-size: 16px; + font-size: 1rem; + line-height: 1.25; + margin-bottom: 30px; + border: 5px solid #1d70b8; + background-color: #1d70b8; +} + +@media (min-width: 40.0625em) .govuk-notification-banner { + margin-bottom: 50px; +} + +@media (min-width: 40.0625em) .govuk-notification-banner { + font-size: 19px; + font-size: 1.1875rem; + line-height: 1.3157894737; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__header { + padding: 2px 20px 5px; +} + +.govuk-notification-banner__header { + padding: 2px 15px 5px; + border-bottom: 1px solid transparent; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__title { + font-size: 19px; + font-size: 1.1875rem; + line-height: 1.3157894737; +} + +.govuk-notification-banner__title { + font-family: "GDS Transport", arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: 700; + font-size: 16px; + font-size: 1rem; + line-height: 1.25; + margin: 0; + padding: 0; + color: #ffffff; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__content { + padding: 20px; +} + +.govuk-notification-banner__content { + color: #0b0c0c; + padding: 15px; + background-color: #ffffff; +} + +.govuk-notification-banner__content> :last-child { + margin-bottom: 0; +} + +.govuk-notification-banner__heading { + max-width: 100%; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__heading { + font-size: 24px; + font-size: 1.5rem; + line-height: 1.25; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__heading { + font-size: 24px !important; + font-size: 1.5rem; + line-height: 1.25; +} + +@media (min-width: 40.0625em) .govuk-notification-banner { + font-size: 19px; + font-size: 1.1875rem; + line-height: 1.3157894737; +} + +@media (min-width: 40.0625em) .govuk-notification-banner { + margin-bottom: 50px; +} + +.govuk-notification-banner__title { + font-size: 19px; + font-size: 1.1875rem; + line-height: 1.3157894737; +} + +.govuk-notification-banner__heading { + font-size: 24px; + font-size: 1.5rem; + line-height: 1.25; + font-weight: 700; +} + +.govuk-notification-banner__link:link { + color: #1d70b8 !important; +} + +.govuk-notification-banner__link { + font-family: "GDS Transport", arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: underline; + text-decoration-thickness: max(1px, 0.0625rem); + text-underline-offset: 0.1em; +} + +.govuk-notification-banner__link { + font-size: 1.5rem; + line-height: 1.25; + font-weight: 700; + color: #1d70b8; +} @@ -537,8 +660,20 @@
    @@ -421,6 +421,13 @@

    Definitions:

    by any third party, they shall contact their Administrator who shall take immediate action to rectify the situation.

    +

    + In the event that employees of an Organisation not already registered as Users contact CCS to request the + details of the Organisation’s Administrator(s), CCS will disclose the name and email address of the + Organisation’s Administrator(s). This is to enable registration queries to be addressed by the Organisation’s + Administrator. By registering as the Administrator for an Organisation, a User acknowledges that its name and + email address may be shared with other individuals within the same Organisation. +

    diff --git a/src/app/pages/manage-organisation/manage-reg-organisation-status-new/manage-reg-organisation-status-new.component.html b/src/app/pages/manage-organisation/manage-reg-organisation-status-new/manage-reg-organisation-status-new.component.html index 760c64ded..3f63e8a7b 100644 --- a/src/app/pages/manage-organisation/manage-reg-organisation-status-new/manage-reg-organisation-status-new.component.html +++ b/src/app/pages/manage-organisation/manage-reg-organisation-status-new/manage-reg-organisation-status-new.component.html @@ -19,6 +19,7 @@

    When you register, you will be:

  • Able to edit your organisation's details
  • The sole admin user, although you can add more
  • +

    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.

    Registering takes around 10 minutes.

    From e9b75984e63908fb1d3d3ec1140bd5d89aeb4459 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Thu, 5 Jan 2023 15:02:47 +0530 Subject: [PATCH 76/79] 3315 , 3316 , 3317 changes completed for p2sprint16 (#979) --- Auth0Templates/LogIn.html | 137 +++++++++++++++++- .../terms-conditions.component.html | 9 +- ...reg-organisation-status-new.component.html | 1 + 3 files changed, 145 insertions(+), 2 deletions(-) diff --git a/Auth0Templates/LogIn.html b/Auth0Templates/LogIn.html index b1c11a08f..b415d4769 100644 --- a/Auth0Templates/LogIn.html +++ b/Auth0Templates/LogIn.html @@ -421,6 +421,129 @@ padding: 20px 17px 14px; font-weight: bold; } + .govuk-notification-banner { + font-family: "GDS Transport", arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: 400; + font-size: 16px; + font-size: 1rem; + line-height: 1.25; + margin-bottom: 30px; + border: 5px solid #1d70b8; + background-color: #1d70b8; +} + +@media (min-width: 40.0625em) .govuk-notification-banner { + margin-bottom: 50px; +} + +@media (min-width: 40.0625em) .govuk-notification-banner { + font-size: 19px; + font-size: 1.1875rem; + line-height: 1.3157894737; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__header { + padding: 2px 20px 5px; +} + +.govuk-notification-banner__header { + padding: 2px 15px 5px; + border-bottom: 1px solid transparent; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__title { + font-size: 19px; + font-size: 1.1875rem; + line-height: 1.3157894737; +} + +.govuk-notification-banner__title { + font-family: "GDS Transport", arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: 700; + font-size: 16px; + font-size: 1rem; + line-height: 1.25; + margin: 0; + padding: 0; + color: #ffffff; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__content { + padding: 20px; +} + +.govuk-notification-banner__content { + color: #0b0c0c; + padding: 15px; + background-color: #ffffff; +} + +.govuk-notification-banner__content> :last-child { + margin-bottom: 0; +} + +.govuk-notification-banner__heading { + max-width: 100%; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__heading { + font-size: 24px; + font-size: 1.5rem; + line-height: 1.25; +} + +@media (min-width: 40.0625em) .govuk-notification-banner__heading { + font-size: 24px !important; + font-size: 1.5rem; + line-height: 1.25; +} + +@media (min-width: 40.0625em) .govuk-notification-banner { + font-size: 19px; + font-size: 1.1875rem; + line-height: 1.3157894737; +} + +@media (min-width: 40.0625em) .govuk-notification-banner { + margin-bottom: 50px; +} + +.govuk-notification-banner__title { + font-size: 19px; + font-size: 1.1875rem; + line-height: 1.3157894737; +} + +.govuk-notification-banner__heading { + font-size: 24px; + font-size: 1.5rem; + line-height: 1.25; + font-weight: 700; +} + +.govuk-notification-banner__link:link { + color: #1d70b8 !important; +} + +.govuk-notification-banner__link { + font-family: "GDS Transport", arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-decoration: underline; + text-decoration-thickness: max(1px, 0.0625rem); + text-underline-offset: 0.1em; +} + +.govuk-notification-banner__link { + font-size: 1.5rem; + line-height: 1.25; + font-weight: 700; + color: #1d70b8; +} @@ -537,8 +660,20 @@
    @@ -421,6 +421,13 @@

    Definitions:

    by any third party, they shall contact their Administrator who shall take immediate action to rectify the situation.

    +

    + In the event that employees of an Organisation not already registered as Users contact CCS to request the + details of the Organisation’s Administrator(s), CCS will disclose the name and email address of the + Organisation’s Administrator(s). This is to enable registration queries to be addressed by the Organisation’s + Administrator. By registering as the Administrator for an Organisation, a User acknowledges that its name and + email address may be shared with other individuals within the same Organisation. +

    diff --git a/src/app/pages/manage-organisation/manage-reg-organisation-status-new/manage-reg-organisation-status-new.component.html b/src/app/pages/manage-organisation/manage-reg-organisation-status-new/manage-reg-organisation-status-new.component.html index 760c64ded..3f63e8a7b 100644 --- a/src/app/pages/manage-organisation/manage-reg-organisation-status-new/manage-reg-organisation-status-new.component.html +++ b/src/app/pages/manage-organisation/manage-reg-organisation-status-new/manage-reg-organisation-status-new.component.html @@ -19,6 +19,7 @@

    When you register, you will be:

  • Able to edit your organisation's details
  • The sole admin user, although you can add more
  • +

    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.

    Registering takes around 10 minutes.

    From f1ce33149ff52efb377e686beb78ef2f82fe5a61 Mon Sep 17 00:00:00 2001 From: ponselvamsakthivel-bc <87376328+ponselvamsakthivel-bc@users.noreply.github.com> Date: Thu, 5 Jan 2023 19:35:35 +0530 Subject: [PATCH 77/79] Revert "interim fix to testing on 05-01-2023" --- Auth0Templates/LogIn.html | 137 +- Auth0Templates/Mfa.html | 1106 ++++++++--------- src/app/app.module.ts | 4 +- .../cookies-settings.component.html | 92 +- .../cookies-settings.component.scss | 3 - .../cookies-settings.component.ts | 11 +- .../terms-conditions.component.html | 371 +++--- .../terms-conditions.component.ts | 16 +- .../accessibility-statement.component.html | 11 +- .../accessibility-statement.component.ts | 15 +- ...to-validation-buyer-success.component.html | 147 ++- .../confirm-changes/confirm.component.html | 70 +- .../confirm-org-type.component.html | 150 ++- .../buyer/confirm/confirm.component.html | 74 +- .../buyer/success/success.component.html | 2 +- .../update-org-type.component.html | 78 +- .../change-password.component.html | 15 - .../change-password.component.ts | 3 - .../contact-admin.component.html | 9 +- .../contact-admin/contact-admin.component.ts | 4 +- src/app/pages/error/error.component.html | 13 - src/app/pages/error/error.component.ts | 1 - .../forgot-password-success.html | 14 +- .../forgot-password.component.html | 10 - .../forgot-password.component.scss | 3 - src/app/pages/home/home.component.html | 5 +- src/app/pages/home/home.component.ts | 4 +- .../view-pending-verification.component.ts | 27 + .../view-verified-org.component.ts | 26 + .../delegated-access-user.component.html | 20 +- .../delegated-user-confirm.component.html | 18 +- .../find-your-administrator.component.html | 23 +- ...profile-add-contact-to-site.component.html | 2 +- ...firm-additional-identifiers.component.html | 2 +- ...on-profile-registry-confirm.component.html | 2 +- ...ile-registry-delete-confirm.component.html | 2 +- ...ion-profile-registry-delete.component.html | 14 +- ...tion-profile-registry-error.component.html | 25 - ...ion-profile-registry-search.component.html | 2 +- ...ation-registration-add-user.component.html | 87 +- ...isation-registration-add-user.component.ts | 32 +- ...tion-additional-identifiers.component.html | 35 - ...ration-additional-identifiers.component.ts | 5 +- ...ion-registration-buyer-type.component.html | 28 +- ...ation-registration-buyer-type.component.ts | 2 +- ...sation-registration-confirm.component.html | 44 - ...nisation-registration-confirm.component.ts | 39 +- ...tration-error-details-wrong.component.html | 36 +- ...istration-error-details-wrong.component.ts | 5 +- ...egistration-error-not-found.component.html | 34 +- ...-registration-error-not-found.component.ts | 2 - ...n-error-not-my-organisation.component.html | 36 +- ...ion-error-not-my-organisation.component.ts | 4 +- ...ror-username-already-exists.component.html | 35 +- ...error-username-already-exists.component.ts | 8 - ...anisation-registration-type.component.html | 23 +- ...isation-registration-step-1.component.html | 15 +- ...isation-registration-step-2.component.html | 30 +- ...anisation-registration-step-2.component.ts | 21 +- ...isation-registration-step-3.component.html | 36 +- ...anisation-registration-step-3.component.ts | 7 - ...g-organisation-admin-notify.component.html | 48 - ...reg-organisation-admin-notify.component.ts | 14 +- ...organisation-not-registered.component.html | 20 +- ...g-organisation-not-registered.component.ts | 2 +- ...age-reg-organisation-search.component.html | 14 +- ...anage-reg-organisation-search.component.ts | 2 +- ...ganisation-status-duplicate.component.html | 17 +- ...-organisation-status-exists.component.html | 47 +- ...eg-organisation-status-exists.component.ts | 19 +- ...reg-organisation-status-new.component.html | 18 +- ...e-user-confirm-reset-password-component.ts | 5 +- .../manage-user-delete-confirm-component.ts | 5 +- .../nominate-success.component.html | 62 - .../nominate-success.component.ts | 25 +- .../pages/nominate/nominate.component.html | 57 +- src/app/pages/nominate/nominate.component.ts | 21 +- .../operation-success.component.html | 9 +- .../operation-success.component.ts | 4 +- .../org-support/error/error.component.html | 21 +- ...user-contact-delete-confirm-component.html | 8 +- .../user-contact-delete-confirm-component.ts | 2 - .../user-contact-edit.component.html | 8 +- .../user-contact-edit.component.ts | 2 - .../confirm-mfa-reset.component.html | 9 +- .../confirm-mfa-reset.component.ts | 2 - .../success-user-mfa.component.html | 9 +- .../success-user-mfa.component.ts | 2 - .../user-profile/user-profile-component.html | 80 +- .../user-profile/user-profile-component.scss | 62 +- .../user-profile/user-profile-component.ts | 34 +- .../wrapper/wrapper-org--group-service.ts | 30 +- src/assets/i18n/en.json | 28 +- src/styles.scss | 13 +- 94 files changed, 1433 insertions(+), 2361 deletions(-) diff --git a/Auth0Templates/LogIn.html b/Auth0Templates/LogIn.html index b415d4769..b1c11a08f 100644 --- a/Auth0Templates/LogIn.html +++ b/Auth0Templates/LogIn.html @@ -421,129 +421,6 @@ padding: 20px 17px 14px; font-weight: bold; } - .govuk-notification-banner { - font-family: "GDS Transport", arial, sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-weight: 400; - font-size: 16px; - font-size: 1rem; - line-height: 1.25; - margin-bottom: 30px; - border: 5px solid #1d70b8; - background-color: #1d70b8; -} - -@media (min-width: 40.0625em) .govuk-notification-banner { - margin-bottom: 50px; -} - -@media (min-width: 40.0625em) .govuk-notification-banner { - font-size: 19px; - font-size: 1.1875rem; - line-height: 1.3157894737; -} - -@media (min-width: 40.0625em) .govuk-notification-banner__header { - padding: 2px 20px 5px; -} - -.govuk-notification-banner__header { - padding: 2px 15px 5px; - border-bottom: 1px solid transparent; -} - -@media (min-width: 40.0625em) .govuk-notification-banner__title { - font-size: 19px; - font-size: 1.1875rem; - line-height: 1.3157894737; -} - -.govuk-notification-banner__title { - font-family: "GDS Transport", arial, sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-weight: 700; - font-size: 16px; - font-size: 1rem; - line-height: 1.25; - margin: 0; - padding: 0; - color: #ffffff; -} - -@media (min-width: 40.0625em) .govuk-notification-banner__content { - padding: 20px; -} - -.govuk-notification-banner__content { - color: #0b0c0c; - padding: 15px; - background-color: #ffffff; -} - -.govuk-notification-banner__content> :last-child { - margin-bottom: 0; -} - -.govuk-notification-banner__heading { - max-width: 100%; -} - -@media (min-width: 40.0625em) .govuk-notification-banner__heading { - font-size: 24px; - font-size: 1.5rem; - line-height: 1.25; -} - -@media (min-width: 40.0625em) .govuk-notification-banner__heading { - font-size: 24px !important; - font-size: 1.5rem; - line-height: 1.25; -} - -@media (min-width: 40.0625em) .govuk-notification-banner { - font-size: 19px; - font-size: 1.1875rem; - line-height: 1.3157894737; -} - -@media (min-width: 40.0625em) .govuk-notification-banner { - margin-bottom: 50px; -} - -.govuk-notification-banner__title { - font-size: 19px; - font-size: 1.1875rem; - line-height: 1.3157894737; -} - -.govuk-notification-banner__heading { - font-size: 24px; - font-size: 1.5rem; - line-height: 1.25; - font-weight: 700; -} - -.govuk-notification-banner__link:link { - color: #1d70b8 !important; -} - -.govuk-notification-banner__link { - font-family: "GDS Transport", arial, sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - text-decoration: underline; - text-decoration-thickness: max(1px, 0.0625rem); - text-underline-offset: 0.1em; -} - -.govuk-notification-banner__link { - font-size: 1.5rem; - line-height: 1.25; - font-weight: 700; - color: #1d70b8; -} @@ -660,20 +537,8 @@
    -
    -
    -
    -
    -
      -
    1. - Sign in -
    2. -
    3. - Additional security -
    4. -
    -
    +
    +
    +
    + Back

    Sign in using additional diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 87cfce595..bb66f9e9a 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -187,7 +187,6 @@ import { UpdateOrgTypeComponent } from './pages/buyer/update-org-type/update-org import { ConfirmOrgTypeComponent } from './pages/buyer/confirm-org-type/confirm-org-type.component'; import { AutoValidationBuyerSuccessComponent } from './pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component'; import { BuyerBothErrorComponent } from './pages/manage-buyer-and-both-requests/buyer-both-error/buyer-both-error.component'; -import { AccessibilityStatementComponent } from './pages/accessibility-statement/accessibility-statement.component'; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http); @@ -340,8 +339,7 @@ export function createTranslateLoader(http: HttpClient) { UpdateOrgTypeComponent, ConfirmOrgTypeComponent, AutoValidationBuyerSuccessComponent, - BuyerBothErrorComponent, - AccessibilityStatementComponent + BuyerBothErrorComponent ], imports: [ // BrowserModule, diff --git a/src/app/components/cookies-settings/cookies-settings.component.html b/src/app/components/cookies-settings/cookies-settings.component.html index 119c4b051..a2b58e819 100644 --- a/src/app/components/cookies-settings/cookies-settings.component.html +++ b/src/app/components/cookies-settings/cookies-settings.component.html @@ -1,39 +1,19 @@
    -

    - Success -

    +

    + Success +

    -

    - You’ve set your cookie preferences. Go back to - the page you were looking at. -

    +

    + You’ve set your cookie preferences. Go back to the page you were looking at. +

    -
    +

    - @@ -41,13 +21,11 @@

    Cookies

    Cookies are small files saved on your phone, tablet or computer when you visit a website.

    -

    We use cookies to make the Public Procurement Gateway work and collect information - about how you use our service.

    +

    We use cookies to make the Public Procurement Gateway work and collect information about how you use our service.

    Essential cookies

    - Essential cookies keep your information secure while you use the Public Procurement Gateway. We do - not need to ask permission to use them. + Essential cookies keep your information secure while you use the Public Procurement Gateway. We do not need to ask permission to use them.

    @@ -123,27 +101,23 @@

    Essential cookies

    - + - +
    did_compatFallback cookie for anomaly detection on browsers that - don’t support the sameSite=None attribute.Fallback cookie for anomaly detection on browsers that don’t support the sameSite=None attribute. {{did_compat}} hr
    _cf_bm This cookie is used by our authentication service Auth0 to - distinguish between humans and bots. In this way, valid reports on the use of the - website can be created.This cookie is used by our authentication service Auth0 to distinguish between humans and bots. In this way, valid reports on the use of the website can be created. {{_cf_bm}} min
    -

    Analytics cookies (optional)

    +

    Analytics cookies (optional)

    Google Analytics

    - With your permission, we use Google Analytics to collect data about how you use the Public - Procurement Gateway. This information helps us to improve our service. + With your permission, we use Google Analytics to collect data about how you use the Public Procurement Gateway. This information helps us to improve our service.

    Google is not allowed to use or share our analytics data with anyone. @@ -153,8 +127,7 @@

    Google Analytics

    • how you got to the Public Procurement Gateway
    • -
    • the pages you visit on the Public Procurement Gateway and how long you spend on them -
    • +
    • the pages you visit on the Public Procurement Gateway and how long you spend on them
    • any errors you see while using the Public Procurement Gateway
    @@ -169,20 +142,17 @@

    Google Analytics

    _ga - This helps us count how many people visit CCS by - tracking if you’ve visited before. + This helps us count how many people visit CCS by tracking if you’ve visited before. 2 yrs _gid - This helps us count how many people visit CCS by - tracking if you’ve visited before. + This helps us count how many people visit CCS by tracking if you’ve visited before. 24 hrs _gat_UA-47046847-22 - This helps us count how many people visit CCS by - tracking if you’ve visited before. + This helps us count how many people visit CCS by tracking if you’ve visited before. 1 min @@ -200,8 +170,7 @@

    Google Analytics

    -
    @@ -209,8 +178,7 @@

    Google Analytics

    -
    @@ -224,9 +192,7 @@

    Google Analytics

    Glass box

    - We use Glassbox software to collect information about how you use the Public Procurement - Gateway. We do this to help make sure the site is meeting the needs of its users and to help - us make improvements. + We use Glassbox software to collect information about how you use the Public Procurement Gateway. We do this to help make sure the site is meeting the needs of its users and to help us make improvements.

    Glassbox stores information about: @@ -238,8 +204,7 @@

    Glass box

  • Scrolls
  • - We don’t collect or store your personal information (e.g. your name or address) so this - information can’t be used to identify who you are. + We don’t collect or store your personal information (e.g. your name or address) so this information can’t be used to identify who you are.

    We don’t allow Glassbox to use or share our analytics data. @@ -256,8 +221,7 @@

    Glass box

    _cls_s - The session identifying - cookie. It also indicates if the visitor is new or existing. + The session identifying cookie. It also indicates if the visitor is new or existing.
    • 0: New @@ -271,8 +235,7 @@

      Glass box

      _cls_v - The visitor identifying - cookie. + The visitor identifying cookie. 2 yrs @@ -290,8 +253,7 @@

      Glass box

      -
    @@ -299,16 +261,14 @@

    Glass box

    -
    - +
    diff --git a/src/app/components/cookies-settings/cookies-settings.component.scss b/src/app/components/cookies-settings/cookies-settings.component.scss index 66d326160..03c2002ed 100644 --- a/src/app/components/cookies-settings/cookies-settings.component.scss +++ b/src/app/components/cookies-settings/cookies-settings.component.scss @@ -148,7 +148,4 @@ table th{ } .cookiestable-padding { padding-left: 20px !important ; -} -a { - text-decoration: underline; } \ No newline at end of file diff --git a/src/app/components/cookies-settings/cookies-settings.component.ts b/src/app/components/cookies-settings/cookies-settings.component.ts index 39df530bf..1b7ebd50b 100644 --- a/src/app/components/cookies-settings/cookies-settings.component.ts +++ b/src/app/components/cookies-settings/cookies-settings.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; import { CookiesService } from 'src/app/shared/cookies.service'; import { environment } from 'src/environments/environment'; @@ -32,18 +31,13 @@ export class CookiesSettingsComponent implements OnInit { } private ppg_cookies_preferences_set: string = this.CookiesService.getCookie('ppg_cookies_preferences_set'); private ppg_cookies_policy: string = this.CookiesService.getCookie('ppg_cookies_policy'); - public userName = ''; - public isOrgAdmin: boolean = false; - constructor(private CookiesService: CookiesService,private router: Router) { - this.isOrgAdmin = JSON.parse(localStorage.getItem('isOrgAdmin') || 'false'); - this.userName = localStorage.getItem('user_name') || ''; - } + constructor(private CookiesService: CookiesService) { } ngOnInit(): void { this.cookiesValue = JSON.parse(this.ppg_cookies_policy) if (this.ppg_cookies_preferences_set == "true") { this.cookiesValue = JSON.parse(this.ppg_cookies_policy) - } + } } public OnSubmit() { @@ -74,5 +68,4 @@ export class CookiesSettingsComponent implements OnInit { const element = document.getElementById("govuk-notification-banner-title"); element?.scrollIntoView(); } - } diff --git a/src/app/components/terms-conditions/terms-conditions.component.html b/src/app/components/terms-conditions/terms-conditions.component.html index e1fd7717a..aeaa034e8 100644 --- a/src/app/components/terms-conditions/terms-conditions.component.html +++ b/src/app/components/terms-conditions/terms-conditions.component.html @@ -4,18 +4,12 @@ @@ -27,7 +21,7 @@

    This page sets out the Public Procurement Gateway Terms of Use that you agree to in order to register, access and use the Public - Procurement Gateway.These terms were last updated on 1 December 2022. + Procurement Gateway.

    @@ -40,68 +34,148 @@

    Browse by category

    @@ -204,8 +278,12 @@

    Definitions:

    “Privacy Policy” means CCS’s Privacy Notice which is available here: - https://www.gov.uk/government/publications/crown-commercial-service-privacy-notice/crown-commercial-service-privacy-notice + https://www.gov.uk/government/publications/crown-commercial-service-privacy-notice/crown-commercial-service-privacy-notice

    “Public Procurement Gateway” and @@ -343,13 +421,6 @@

    Definitions:

    by any third party, they shall contact their Administrator who shall take immediate action to rectify the situation.

    -

    - In the event that employees of an Organisation not already registered as Users contact CCS to request the - details of the Organisation’s Administrator(s), CCS will disclose the name and email address of the - Organisation’s Administrator(s). This is to enable registration queries to be addressed by the Organisation’s - Administrator. By registering as the Administrator for an Organisation, a User acknowledges that its name and - email address may be shared with other individuals within the same Organisation. -

    @@ -372,8 +443,10 @@

    Definitions:

    - Organisation and User/s Obligations, Warranties and - Liabilities + Organisation and User/s Obligations, Warranties and + Liabilities

    The Organisation and its User/s shall use PPG for lawful and proper @@ -476,7 +549,8 @@

    Definitions:

    CCS welcomes and encourages other websites to link to the PPG. Administrators must contact CCS for permission at - info@crowncommercial.gov.uk + info@crowncommercial.gov.uk to request that the Organisation’s website is associated with or endorsed by CCS or another government department or agency. @@ -532,37 +606,52 @@

    Definitions:

    Using PPG Content

    -
  • - Most content on the PPG is subject to - Crown - copyright protection and is published under the - Open Government Licence (OGL). -
  • +
  • + Most content on the PPG is subject to + Crown copyright protection and is published under the + Open Government Licence (OGL). +
  • -
  • - Some content is exempt from the OGL - check the - - list of exemptions. -
  • -
  • - Departmental logos and crests are also exempt from the OGL, except - when they form an integral part of a document or dataset -
  • -
  • - If any content is not subject to Crown copyright protection or - published under the OGL, if applicable CCS will credit the author or - copyright holder. -
  • -
  • - Organisations can reproduce content published on the PPG under the OGL - as long as it follows the licence’s conditions. Further guidance on - this can be found at - Open Government Licence (nationalarchives.gov.uk) -
  • +
  • + Some content is exempt from the OGL - check the + + list of exemptions. +
  • +
  • + Departmental logos and crests are also exempt from the OGL, except + when they form an integral part of a document or dataset +
  • +
  • + If any content is not subject to Crown copyright protection or + published under the OGL, if applicable CCS will credit the author or + copyright holder. +
  • +
  • + Organisations can reproduce content published on the PPG under the OGL + as long as it follows the licence’s conditions. Further guidance on + this can be found at + Open Government Licence (nationalarchives.gov.uk) +

  • @@ -646,8 +735,12 @@

    Definitions:

    The - PPG has a - Cookie Policy which can be accessed from the PPG home page. The Organisation and its + PPG has a Cookie Policy which can be accessed from the PPG home page. The Organisation and its User/s will have the option for PPG to collect information and confirm that any data provided is accurate in accordance with the Cookie Policy.

    @@ -674,28 +767,26 @@

    Definitions:

    Data Protection

    -

    The Organisation and its User/s shall comply with UK GDPR and all - relevant regulations together with any codes of conduct and guidance - issued by the Information Commissioner from time to time and they shall - not do or cause or permit to be done anything which may cause or - otherwise result in a breach by CCS.

    -

    CCS will collect, hold and process Personal Data obtained from and - about - User/s. CCS will only store Personal Data to the extent necessary for - the purposes for which the Personal Data is being processed.

    -

    It is the Organisation and its User/s’ responsibility to ensure they - comply with all relevant law including UK GDPR in relation to their data - processing activities.

    -

    The Organisation shall indemnify CCS against any and all losses - incurred - if the Organisation or its User/s breaches any UK GDPR.

    -

    The Organisation (and if applicable its User/s) shall procure the - agreement of each relevant data subject to such data being collected, - held and used in accordance with these Terms of Use, any relevant - Privacy Policies, the Data Protection Legislation and relevant Cookie - Policies.

    -

    CCS’ data retention policy for the PPG is to retain the information - uploaded into the PPG for a maximum of seven years.

    +

    The Organisation and its User/s shall comply with UK GDPR and all + relevant regulations together with any codes of conduct and guidance + issued by the Information Commissioner from time to time and they shall + not do or cause or permit to be done anything which may cause or + otherwise result in a breach by CCS.

    +

    CCS will collect, hold and process Personal Data obtained from and about + User/s. CCS will only store Personal Data to the extent necessary for + the purposes for which the Personal Data is being processed.

    +

    It is the Organisation and its User/s’ responsibility to ensure they + comply with all relevant law including UK GDPR in relation to their data + processing activities.

    +

    The Organisation shall indemnify CCS against any and all losses incurred + if the Organisation or its User/s breaches any UK GDPR.

    +

    The Organisation (and if applicable its User/s) shall procure the + agreement of each relevant data subject to such data being collected, + held and used in accordance with these Terms of Use, any relevant + Privacy Policies, the Data Protection Legislation and relevant Cookie + Policies.

    +

    CCS’ data retention policy for the PPG is to retain the information + uploaded into the PPG for a maximum of seven years.

    @@ -726,4 +817,4 @@

    Definitions:

    -
    \ No newline at end of file +
    diff --git a/src/app/components/terms-conditions/terms-conditions.component.ts b/src/app/components/terms-conditions/terms-conditions.component.ts index edef4439f..457181ca4 100644 --- a/src/app/components/terms-conditions/terms-conditions.component.ts +++ b/src/app/components/terms-conditions/terms-conditions.component.ts @@ -8,16 +8,18 @@ import { Router } from '@angular/router'; styleUrls: ['./terms-conditions.component.scss'], }) export class TermsConditionsComponent implements OnInit { - public userName = '' - public isOrgAdmin: boolean = false; - - constructor(private router: Router, private scroller: ViewportScroller) { - this.isOrgAdmin = JSON.parse(localStorage.getItem('isOrgAdmin') || 'false'); - this.userName = localStorage.getItem('user_name') || ''; - } + private userName = localStorage.getItem('user_name') || ''; + constructor(private router: Router, private scroller: ViewportScroller) {} ngOnInit(): void {} + public backToHome(): void { + if (this.userName) { + this.router.navigateByUrl(`home`); + } else { + window.location.href = 'https://www.crowncommercial.gov.uk'; + } + } public scrollContent(id: string): void { document.getElementById(id)?.scrollIntoView({ diff --git a/src/app/pages/accessibility-statement/accessibility-statement.component.html b/src/app/pages/accessibility-statement/accessibility-statement.component.html index eb566926c..ae70faff3 100644 --- a/src/app/pages/accessibility-statement/accessibility-statement.component.html +++ b/src/app/pages/accessibility-statement/accessibility-statement.component.html @@ -2,16 +2,7 @@
    1. - - {{ 'ADMINISTRATOR_DASHBOARD' | translate }} - - - {{"PUBLIC_PROCUREMENT_GATEWAY_DASHBOARD" | translate}} - - - {{"REGITERATION_HOME" | translate}} - + Home
    2. Accessibility statement diff --git a/src/app/pages/accessibility-statement/accessibility-statement.component.ts b/src/app/pages/accessibility-statement/accessibility-statement.component.ts index e9f07a129..9cdf73e4c 100644 --- a/src/app/pages/accessibility-statement/accessibility-statement.component.ts +++ b/src/app/pages/accessibility-statement/accessibility-statement.component.ts @@ -14,13 +14,9 @@ public representingTag={ KeyboardLevelA:'', PageTitledLevelA:'' } -public userName = ''; -public isOrgAdmin: boolean = false; +private userName = localStorage.getItem('user_name') || ''; - constructor(private router: Router) { - this.isOrgAdmin = JSON.parse(localStorage.getItem('isOrgAdmin') || 'false'); - this.userName = localStorage.getItem('user_name') || ''; - } + constructor(private router: Router) { } ngOnInit(): void { } @@ -29,4 +25,11 @@ public isOrgAdmin: boolean = false; window.print() } + public navigateToHome():void{ + if(this.userName){ + this.router.navigateByUrl(`home`); + }else{ + window.location.href='https://www.crowncommercial.gov.uk'; + } + } } diff --git a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html index 53b817410..dcc86884e 100644 --- a/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html +++ b/src/app/pages/buyer/auto-validation-buyer-success/auto-validation-buyer-success.component.html @@ -8,7 +8,7 @@ Manage service eligibility
    3. - Success + Success
    @@ -58,14 +58,31 @@

    You have successfully saved the changes<
    -
    @@ -75,9 +92,23 @@

    You have successfully saved the changes<
    -