-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathenrollee-enrolments.component.html
More file actions
102 lines (94 loc) · 3.86 KB
/
Copy pathenrollee-enrolments.component.html
File metadata and controls
102 lines (94 loc) · 3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<app-adjudication-container [content]="content"
[hasActions]="hasActions"
(action)="onAction()">
<app-page-header>Enrolments</app-page-header>
</app-adjudication-container>
<ng-template #content
let-enrollee="enrollee">
<mat-form-field (selectionChange)="onChange($event)">
<mat-label>Filter By Year</mat-label>
<mat-select [value]="selectedYear"
(selectionChange)="onChange($event)">
<mat-option *ngFor="let year of years"
[value]="year">
{{ year }}
</mat-option>
</mat-select>
</mat-form-field>
<ng-container *ngIf="isUnderAdjudication(enrollee)"
[ngTemplateOutlet]="card"
[ngTemplateOutletContext]="{
isCurrent: true,
submittedDate: enrollee?.appliedDate,
remoteAccess: enrollee?.remoteAccess,
enrolmentRoute: [AdjudicationRoutes.ENROLLEE_CURRENT_ENROLMENT]
}">
</ng-container>
<ng-container *ngFor="let enrolmentCard of enrolmentCards; let first = first; let last = last">
<ng-container [ngTemplateOutlet]="card"
[ngTemplateOutletContext]="{
isCurrent: enrolmentCard.isCurrent && !isUnderAdjudication(enrollee),
submittedDate: enrolmentCard.submissionCreatedDate,
acceptedDate: enrolmentCard.agreementAcceptedDate,
approvedDate: enrolmentCard.enrolmentApprovedDate,
agreementType: enrolmentCard.agreementType,
remoteAccess: enrolmentCard.requestedRemoteAccess,
enrolmentRoute: [enrolmentCard.submissionId, AdjudicationRoutes.ENROLLEE_ACCESS_TERM_ENROLMENT],
toaRoute: [enrolmentCard.agreementId, AdjudicationRoutes.ENROLLEE_ACCESS_TERM],
isLast: last
}">
</ng-container>
</ng-container>
</ng-template>
<ng-template #card
let-isCurrent="isCurrent"
let-submittedDate="submittedDate"
let-acceptedDate="acceptedDate"
let-approvedDate="approvedDate"
let-agreementType="agreementType"
let-remoteAccess="remoteAccess"
let-enrolmentRoute="enrolmentRoute"
let-toaRoute="toaRoute"
let-isLast="isLast">
<mat-card class="has-hover card"
[class.mb-3]="isLast">
<mat-card-content class="mb-0">
<!--
Custom card title used instead of mat-card-header with mat-card-title due
to mat-card-title not allowing the use of flexbox
-->
<div class="card-title">
<small>Enrolment submitted on {{ submittedDate | formatDate: 'MMMM Do YYYY' }}</small>
<small *ngIf="isCurrent">CURRENT</small>
</div>
<p>
<ng-container *ngIf="approvedDate; else current">
{{ 'This PRIME enrolment was approved on ' + (approvedDate | formatDate: 'MMMM Do YYYY') }}
</ng-container>
<ng-template #current>
This PRIME enrolment was not approved
</ng-template>
</p>
<ng-container *ngIf="approvedDate">
<p>
TOA assigned - {{ agreementType }}
{{ acceptedDate ? ', TOA was accepted on ' + (acceptedDate | formatDate: 'MMMM Do YYYY') :
', TOA was not accepted' }}
</p>
</ng-container>
<div *ngIf="remoteAccess"
class="card-title">
User Requested Remote Access
</div>
</mat-card-content>
<mat-card-actions>
<button mat-button
color="primary"
[routerLink]="enrolmentRoute">View Enrolment Detail</button>
<button mat-button
color="primary"
*ngIf="acceptedDate"
[routerLink]="toaRoute">View Terms of Access</button>
</mat-card-actions>
</mat-card>
</ng-template>