-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from nhsengland/develop
Merging into master for deployment
- Loading branch information
Showing
54 changed files
with
2,886 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...les/feature-modules/admin/pages/account/manage-account/manage-account-info.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="nhsuk-grid-row nhsuk-u-padding-top-3"> | ||
<div class="nhsuk-grid-column-full"> | ||
|
||
<theme-alert [type]="alert.type" [title]="alert.title" [setFocus]="alert.setFocus"> | ||
<p> {{ alert.message }} </p> | ||
</theme-alert> | ||
|
||
<h1 class="nhsuk-heading-xl"> {{ pageTitle }} </h1> | ||
|
||
</div> | ||
</div> | ||
<div class="nhsuk-grid-row nhsuk-u-margin-bottom-5"> | ||
<div class="nhsuk-grid-column-full"> | ||
<h2 class="nhsuk-heading-l"> Change your Password </h2> | ||
<p> You will need to enter your current password to change to a new one. </p> | ||
<a [href]="changePassword"> Change your Password </a> | ||
<h6> Last password update: {{ user.passwordResetOn | date:'dd/MM/yyyy' }} </h6> | ||
</div> | ||
</div> |
47 changes: 47 additions & 0 deletions
47
.../feature-modules/admin/pages/account/manage-account/manage-account-info.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { HttpClientTestingModule } from '@angular/common/http/testing'; | ||
|
||
import { Injector } from '@angular/core'; | ||
import { USER_INFO_ADMIN } from '@tests/data.mocks'; | ||
|
||
import { CoreModule, AppInjector } from '@modules/core'; | ||
import { StoresModule, AuthenticationStore } from '@modules/stores'; | ||
|
||
import { PageAdminAccountManageAccountInfoComponent } from './manage-account-info.component'; | ||
import { AdminModule } from '@modules/feature-modules/admin/admin.module'; | ||
|
||
|
||
|
||
|
||
describe('FeatureModules/Admin/Pages/Account?ManageAccount/PageAdminAccountManageAccountInfoComponent', () => { | ||
|
||
let authenticationStore: AuthenticationStore; | ||
|
||
|
||
let component: PageAdminAccountManageAccountInfoComponent; | ||
let fixture: ComponentFixture<PageAdminAccountManageAccountInfoComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [ | ||
HttpClientTestingModule, | ||
RouterTestingModule, | ||
CoreModule, | ||
StoresModule, | ||
AdminModule | ||
] | ||
}); | ||
|
||
AppInjector.setInjector(TestBed.inject(Injector)); | ||
|
||
authenticationStore = TestBed.inject(AuthenticationStore); | ||
authenticationStore.getUserInfo = () => USER_INFO_ADMIN; | ||
|
||
}); | ||
it('should create the component', () => { | ||
fixture = TestBed.createComponent(PageAdminAccountManageAccountInfoComponent); | ||
component = fixture.componentInstance; | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
30 changes: 30 additions & 0 deletions
30
...dules/feature-modules/admin/pages/account/manage-account/manage-account-info.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { CoreComponent } from '@app/base'; | ||
import { AlertType } from '@app/base/models'; | ||
|
||
@Component({ | ||
selector: 'app-admin-pages-manage-account-info', | ||
templateUrl: './manage-account-info.component.html' | ||
}) | ||
export class PageAdminAccountManageAccountInfoComponent extends CoreComponent implements OnInit { | ||
|
||
alert: AlertType = { type: null }; | ||
changePassword = `${this.stores.environment.APP_URL}/change-password`; | ||
|
||
user: { | ||
passwordResetOn: string | ||
}; | ||
constructor( | ||
|
||
) { | ||
|
||
super(); | ||
this.setPageTitle('Manage account'); | ||
|
||
const user = this.stores.authentication.getUserInfo(); | ||
this.user = { | ||
passwordResetOn: user.passwordResetOn | ||
}; | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...ture-modules/admin/pages/admin-users/admin-users-delete/admin-users-delete.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="nhsuk-grid-row nhsuk-u-padding-top-3"> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
|
||
<h1 class="nhsuk-heading-xl"> {{ pageTitle }} </h1> | ||
|
||
<form [formGroup]="form"> | ||
|
||
<div class="nhsuk-warning-callout nhsuk-u-margin-top-0"> | ||
<div class="nhsuk-heading-m nhsuk-warning-callout__label"> | ||
<span role="text"> <span class="nhsuk-u-visually-hidden">Important: </span> Are you sure? </span> | ||
</div> | ||
<p> This action is irreversible once the admin user is deleted.</p> | ||
</div> | ||
<!-- <theme-form-input controlName="email" label="Enter your email" [pageUniqueField]="false"></theme-form-input> --> | ||
<theme-form-input controlName="confirmation" label="Are you sure that you want to delete?" description="To confirm, please type the following: delete the administrator" [pageUniqueField]="false"></theme-form-input> | ||
<ng-container *ngIf="pageStep === 'CODE_REQUEST'"> | ||
<theme-form-input controlName="code" label="Enter the confirmation code" [pageUniqueField]="false"></theme-form-input> | ||
</ng-container> | ||
<button class="nhsuk-button nhsuk-button--secondary nhsuk-u-margin-top-3" (click)="onSubmitForm()" [disabled]="submitBtnClicked"> Delete account </button> | ||
|
||
<!-- </ng-container> --> | ||
|
||
<div class="nhsuk-u-padding-bottom-5"> | ||
<a routerLink="/admin/administration-users/{{user.id}}"> Cancel </a> | ||
</div> | ||
|
||
</form> | ||
|
||
</div> | ||
</div> |
Oops, something went wrong.