Skip to content

Commit

Permalink
PHR page routing added and endorsements removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
kakarlavinodkumar committed Nov 21, 2024
1 parent 146d3ff commit 444df17
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,11 @@ export const routes: Routes = [
'./pages/provincial-attachment-system/provincial-attachment-system-routing.routes'
).then((m) => m.routes),
},
{
path: AccessRoutes.PHR,
loadChildren: (): Promise<Routes> =>
import(
'./pages/phr/phr-routing.routes'
).then((m) => m.routes),
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class AccessRoutes {
public static PROVIDER_REPORTING_PORTAL = 'provider-reporting-portal';
public static SPECIAL_AUTH_EFORMS = 'sa-eforms';
public static PROVINCIAL_ATTACHMENT_SYSTEM = 'provincial-attachment-system';
public static PHR = 'phr';

/**
* @description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,15 @@ export class BcProviderApplicationPage
AccessRoutes.BASE_PATH,
AccessRoutes.PROVINCIAL_ATTACHMENT_SYSTEM,
]);
} else if (
this.previousUrl
.split('/')
.includes(AccessRoutes.PHR)
) {
this.router.navigate([
AccessRoutes.BASE_PATH,
AccessRoutes.PHR,
]);
} else {
this.navigationService.navigateToRoot();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,61 +52,6 @@ <h1>Enrol for Access</h1>
</div>
</mat-step>

<mat-step [completed]="false">
<ng-template matStepLabel>
<p class="pas-step-label">
Invite others to the PHR <br />
(Optional)
</p>
</ng-template>
<div>
<div
*ngIf="!hasCpn && (destination$ | async) === Destination.PORTAL; else licenced">
<p>
<i
>Because you are MOA or do <strong>not</strong> have a
college licence, then this step will become part of the
process.</i
>
</p>
<mat-stepper class="moa-message-steps">
<mat-step editable="false" [completed]="false">
<ng-template matStepLabel>Start endorsement</ng-template>
</mat-step>
<mat-step editable="false" [completed]="false">
<ng-template matStepLabel>Pending Approval</ng-template>
</mat-step>
<mat-step editable="false" [completed]="false">
<ng-template matStepLabel
>Completion and PHR login available</ng-template
>
</mat-step>
</mat-stepper>
</div>
<ng-template #licenced>
<p class="guide-information">
Do you work with others who need access to the PHR? For
example, assistants or other members of your Care Team, who
may or may not have a professional license? <br />If you do,
then you can send trusted colleagues a OneHealthID access
invitation by clicking the “Endorsements” button below.
</p>
</ng-template>
<button
mat-flat-button
type="button"
color="primary"
routerLink="/organization-info/endorsements"
aria-labelledby="navigate-to-endorsements">
Endorsements
</button>
</div>
<div class="stepper-buttons">
<button mat-stroked-button matStepperPrevious>Back</button>
<button mat-stroked-button matStepperNext>Next</button>
</div>
</mat-step>

<mat-step [completed]="false">
<ng-template matStepLabel>
Multi-Factor Authentication (MFA) Set-Up Guide
Expand All @@ -129,8 +74,7 @@ <h1>Enrol for Access</h1>
</ng-template>
<div>
<p class="guide-information">
Use your newly created BCProvider to login to the Provincial
Attachment System
Use your newly created BCProvider to login to the PHR
</p>
<p
*ngIf="bcProviderStatusCode === StatusCode.COMPLETED"
Expand All @@ -151,7 +95,7 @@ <h1>Enrol for Access</h1>
type="button"
color="primary"
aria-labelledby="navigate-to-pas"
[disabled]="pas$ | async"
[disabled]="phr$ | async"
(click)="navigateToPath()">
Login to PHR with your BCProvider
</button>
Expand Down Expand Up @@ -192,19 +136,19 @@ <h3><strong>PHR</strong></h3>
type="submit"
color="primary"
aria-labelledby="navigate-to-pas"
[disabled]="pas$ | async"
[disabled]="phr$ | async"
(click)="navigateToPath()">
Login
</button>
</div>
</div>
</div>
<ng-container *ngIf="hasCpn && (pas$ | async)">
<ng-container *ngIf="hasCpn && (phr$ | async)">
<div class="pas-button-text">
<i>You will need BCProvider credential before logging in.</i>
</div>
</ng-container>
<ng-container *ngIf="!hasCpn && (pas$ | async)">
<ng-container *ngIf="!hasCpn && (phr$ | async)">
<div class="pas-button-text">
<i
>You will need BCProvider credential, and an endorsement before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
} from './phr.constants';

@Component({
selector: 'app-provincial-attachment-system',
selector: 'app-phr',
standalone: true,
imports: [
AsyncPipe,
Expand All @@ -54,7 +54,7 @@ import {
NgOptimizedImage,
],
templateUrl: './phr.page.html',
styleUrl: './provincial-attachment-system.page.scss',
styleUrl: './phr.page.scss',
providers: [
{
provide: STEPPER_GLOBAL_OPTIONS,
Expand All @@ -67,9 +67,9 @@ export class PHRPage implements OnInit {
false,
);
public destination$: Observable<Destination>;
public pas$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
public phr$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
public bcProviderStatusCode: number | undefined;
public pasStatusCode: number | undefined;
public phrStatusCode: number | undefined;
public bcProviderUsername = '';
public logoutRedirectUrl: string;
public bcProviderTutorial: string;
Expand Down Expand Up @@ -137,12 +137,12 @@ export class PHRPage implements OnInit {
.pipe(
tap((profileStatus: ProfileStatus | null) => {
this.hasCpn = profileStatus?.status.collegeCertification.hasCpn;
this.pasStatusCode =
this.phrStatusCode =
profileStatus?.status.phr.statusCode;
this.bcProviderStatusCode =
profileStatus?.status.bcProvider.statusCode;
if (this.pasStatusCode === StatusCode.COMPLETED) {
this.pas$.next(false);
if (this.phrStatusCode === StatusCode.COMPLETED) {
this.phr$.next(false);
} else if (
selectedIndex === this.lastSelectedIndex &&
this.bcProviderStatusCode === StatusCode.COMPLETED
Expand Down

0 comments on commit 444df17

Please sign in to comment.