Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev release note - 20221003 - 1 #773

Merged
merged 2 commits into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,14 @@ <h1 class="govuk-fieldset__heading govuk-!-font-size-24">
End date
</h1>
</legend>
<div id="end-hint" class="govuk-hint">
<div id="end-hint" class="govuk-hint" *ngIf="pageAccessMode =='add'">
Please enter the end date for delegated access. Note, it cannot be more than 365
days
and less than 28 from the start date.
</div>
<div id="end-hint" class="govuk-hint" *ngIf="pageAccessMode =='edit'">
You can edit end date for delegated access. Note, it cannot be more than 365 days and less than 28 days from the start date.
</div>
<div class="govuk-date-input" id="end">
<span id="name-error" class="govuk-error-message"
*ngIf="submitted && (formGroup.controls.endday.hasError('required') || formGroup.controls.endmonth.hasError('required') || formGroup.controls.endyear.hasError('required'))">
Expand Down Expand Up @@ -266,10 +269,13 @@ <h1 class="govuk-fieldset__heading govuk-!-font-size-24">
Delegated user's permissions
</h1>
</legend>
<div id="waste-hint" class="govuk-hint">
<div id="waste-hint" class="govuk-hint" *ngIf="pageAccessMode =='add'">
Select which applications the delegated user should have access to. At least one
permission must be selected.
</div>
<div id="waste-hint" class="govuk-hint" *ngIf="pageAccessMode =='edit'">
Edit which applications the delegated user should have access to. At least one permission must be selected.
</div>
<span id="name-error" class="govuk-error-message"
*ngIf="submitted && getSelectedRoleIds(formGroup).length == 0">
<span class="govuk-visually-hidden">{{ 'ERROR_PREFIX' | translate
Expand Down Expand Up @@ -314,8 +320,7 @@ <h1 class="govuk-fieldset__heading govuk-!-font-size-24">
<!-- user permission -->
<br>
<a *ngIf="pageAccessMode == 'edit' && !delegationAccepted" href="javascript:;" class="navigation-text"
(click)="Resentactivation()"> Resent
activation link</a>
(click)="Resentactivation()"> Resend activation link </a>
<div class="govuk-button-group save-cancel-button-group govuk-!-margin-top-7">
<button type="submit" class="govuk-button" data-module="govuk-button"
(click)="onSubmit(formGroup)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ <h1 class="govuk-heading-l page-title header-bread-align">You have updated a del
</div>

<div *ngIf="userInfo.status==='delete'">
<h1 class="govuk-heading-l page-title header-bread-align">You have removed a delegated access for a user {{userInfo.userName}}</h1>
<h1 class="govuk-heading-l page-title header-bread-align">You have removed delegated access for user {{userInfo.userName}}</h1>
</div>

<div *ngIf="userInfo.status==='resent'">
<h1 class="govuk-heading-l page-title header-bread-align">A new activation link for a delegated access has been set to user {{userInfo.userName}}</h1>
<h1 class="govuk-heading-l page-title header-bread-align">A new activation link for a delegated user has been sent to {{userInfo.userName}}</h1>
</div>
</div>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public userInfo:any;
ngOnInit(): void {
this.ActivatedRoute.queryParams.subscribe((para: any) => {
this.userInfo = JSON.parse(atob(para.data));
console.log("this.userInfo",this.userInfo)
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@
</li>
</ol>
</div>
<h1 class="govuk-heading-xl page-title header-bread-align">Confirm you want to delegate access to the user
</h1>
<h1 *ngIf="pageAccessMode == 'add'" class="govuk-heading-xl page-title header-bread-align">Confirm you want to delegate access to the user</h1>
<h1 *ngIf="pageAccessMode == 'edit'" class="govuk-heading-xl page-title header-bread-align">Confirm you want to update access for the delegated user</h1>
<div class="manage-groups-bg">
<p class="govuk-body-l">
<p class="govuk-body-l" *ngIf="pageAccessMode == 'add'">
You are giving permission for a delegated access to your Organisation to a user:
</p>
<p class="govuk-body-l" *ngIf="pageAccessMode == 'edit'">
You are updating permissions for a delegated user to your Organisation:
</p>
</div>
<div class="govuk-form-group">
<div class="span-group govuk-!-margin-top-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ import { WrapperUserDelegatedService } from 'src/app/services/wrapper/wrapper-us
export class DelegatedUserConfirmComponent implements OnInit {
public userInfo: any = {}
public UserSelectedinfo: any;
public pageAccessMode=''
constructor(private route: Router, private ActivatedRoute: ActivatedRoute, private DelegatedService: WrapperUserDelegatedService,private titleService: Title,) { }

ngOnInit(): void {
this.ActivatedRoute.queryParams.subscribe((para: any) => {
this.userInfo = JSON.parse(atob(para.data)).userDetails;
this.UserSelectedinfo = JSON.parse(atob(para.data))
this.pageAccessMode = this.UserSelectedinfo.userDetails.pageaccessmode
});
if (this.UserSelectedinfo.userDetails.pageaccessmode === "edit") {
if (this.pageAccessMode === "edit") {
this.titleService.setTitle(
`${ 'Confirm Delegation'} - CCS`
);
Expand All @@ -33,7 +35,7 @@ export class DelegatedUserConfirmComponent implements OnInit {


public onSubmit(): void {
if (this.UserSelectedinfo.userDetails.pageaccessmode === "edit") {
if (this.pageAccessMode === "edit") {
this.updateDelegatedUser()
} else {
this.createDelegateUser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class DelegatedUserListComponent implements OnInit {
currentPage: 1,
pageCount: 0,
pageSize: environment.listPageSize,
usersTableHeaders: ['NAME', 'EMAIL', 'Remaining days', 'Origin organisation'],
usersTableHeaders: ['NAME', 'EMAIL', 'Remaining days', 'Organisation'],
usersColumnsToDisplay: ['name', 'userName', 'remainingDays', 'originOrganisation'],
userList: '',
pageName: 'Contactadmin',
Expand All @@ -34,7 +34,7 @@ export class DelegatedUserListComponent implements OnInit {
currentPage: 1,
pageCount: 0,
pageSize: environment.listPageSize,
usersTableHeaders: ['NAME', 'EMAIL', 'Expiry date', 'Origin organisation'],
usersTableHeaders: ['NAME', 'EMAIL', 'Expiry date', 'Organisation'],
usersColumnsToDisplay: ['name', 'userName', 'endDate', 'originOrganisation'],
userList: '',
pageName: 'Contactadmin',
Expand All @@ -59,6 +59,7 @@ export class DelegatedUserListComponent implements OnInit {
}

ngOnInit() {
this.tabChanged(sessionStorage.getItem('activetab') || '')
setTimeout(() => {
this.getOrganisationExpiredUsers()
}, 10);
Expand Down Expand Up @@ -141,6 +142,7 @@ export class DelegatedUserListComponent implements OnInit {


public tabChanged(activetab: string): void {
sessionStorage.setItem('activetab',activetab)
if (activetab === 'currentusers') {
this.tabConfig.currentusers = true
this.tabConfig.expiredusers = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h1 class="govuk-fieldset__heading">
<input [(ngModel)]="primaryRoleSelected" class="govuk-radios__input" id="originorganisationname"
name="originorganisationname" type="radio" value="primaryselected" (click)="setPrimaryOrg()">
<label class="govuk-label govuk-radios__label" for="originorganisationname">
{{userDetails.originOrganisationName}} (original)
{{userDetails.originOrganisationName}} (My organisation)
</label>
</div>
<div class="govuk-radios__item" *ngFor="let org of organisationList">
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/wrapper/wrapper-org--group-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class WrapperOrganisationGroupService {

getUsersAdmin(organisationId: string, currentPage: number, pageSize: number): Observable<any> {
pageSize = pageSize <= 0 ? 10 : pageSize;
const url = `${this.url}/${organisationId}/users?currentPage=${currentPage}&pageSize=${pageSize}&isAdmin=true&includeSelf=true`;
const url = `${this.url}/${organisationId}/users?currentPage=${currentPage}&pageSize=${pageSize}&isAdmin=true&include-self=true`;
return this.http.get<UserListResponse>(url).pipe(
map((data: UserListResponse) => {
return data;
Expand Down