Skip to content

Commit

Permalink
more twekas
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryuto131 committed Nov 13, 2020
1 parent b75acf7 commit 30f3e5d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
<div class=p-grid>
<div class="p-col-12 p-lg-6">
<p-card header="Current Pes Status: {{currentServiceman?.pesStatus}}">
<h1>My statuses</h1>
<ng-container *ngIf="allConditionStatusWrappers.length === 0">
<p-messages severity="warn">
<ng-template pTemplate>
<div class="p-ml-2" style="font-size: 1.5rem;"><i class="pi pi-exclamation-triangle"
style="font-size: 1.5rem"></i> You have no past/present status</div>
</ng-template>
</p-messages>
</ng-container>
<p-table #dt [value]="allConditionStatusWrappers" [paginator]="true" [rows]="10"
*ngIf="allConditionStatusWrappers.length !== 0"
styleClass="p-datatable p-datatable-gridlines p-datatable-striped p-datatable-sm">
Expand Down Expand Up @@ -44,6 +53,7 @@
<div class="card">
<h1>My Medical Reviews</h1>
<p-tabView>

<p-tabPanel header="Upcoming">
<ng-container *ngIf="upcomingMedicalBoardCaseWrappers.length === 0">
<p-messages severity="warn">
Expand All @@ -53,7 +63,7 @@ <h1>My Medical Reviews</h1>
</ng-template>
</p-messages>
</ng-container>
<ng-container *ngIf="medicalBoardCaseWrappers.length !== 0">
<ng-container *ngIf="upcomingMedicalBoardCaseWrappers.length !== 0">
<p-card class="marginCard" *ngFor="let indivCase of upcomingMedicalBoardCaseWrappers">
<h1>Medical Case Id: {{indivCase.medicalBoardCase.medicalBoardCaseId}}</h1>
<div class="p-grid">
Expand All @@ -76,6 +86,29 @@ <h4>{{indivCase.scheduledStartDate | date:'HH:mm' }} -
(onPageChange)="paginateUpcoming($event)"></p-paginator>
</ng-container>
</p-tabPanel>
<p-tabPanel header="Unscheduled">
<ng-container *ngIf="waitingMedicalBoardCaseWrappers.length === 0">
<p-messages severity="warn">
<ng-template pTemplate>
<div class="p-ml-2" style="font-size: 1.5rem;"><i class="pi pi-exclamation-triangle"
style="font-size: 1.5rem"></i> You have no unscheduled medical review</div>
</ng-template>
</p-messages>
</ng-container>
<ng-container *ngIf="waitingMedicalBoardCaseWrappers.length !== 0">
<p-card class="marginCard" *ngFor="let indivCase of waitingMedicalBoardCaseWrappers">
<h1>Medical Case Id: {{indivCase.medicalBoardCase.medicalBoardCaseId}}</h1>
<div class="p-grid">
<div class="p-col-12 p-md-6">
<h4><i class="pi pi-id-card" style="font-size: 1rem"></i> Assigned Chairman</h4>
<h4>{{indivCase.chairman}}</h4>
</div>
</div>
</p-card>
<p-paginator [rows]="5" [totalRecords]="upcomingMedicalBoardCaseWrappers.length"
(onPageChange)="paginateUpcoming($event)"></p-paginator>
</ng-container>
</p-tabPanel>
<p-tabPanel header="Completed">
<ng-container *ngIf="completedMedicalBoardCaseWrappers.length === 0">
<p-messages severity="warn">
Expand All @@ -85,7 +118,7 @@ <h4>{{indivCase.scheduledStartDate | date:'HH:mm' }} -
</ng-template>
</p-messages>
</ng-container>
<ng-container *ngIf="medicalBoardCaseWrappers.length !== 0">
<ng-container *ngIf="completedMedicalBoardCaseWrappers.length !== 0">
<p-card class="marginCard" *ngFor="let indivCase of completedMedicalBoardCaseWrappers">
<h1>Medical Case ID: {{indivCase.medicalBoardCase.medicalBoardCaseId}}</h1>
<div class="p-grid">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class MedicalReviewScreenComponent implements OnInit {
allConditionStatusWrappers: ConditionStatusWrapper[] = []
activeConditionStatusWrappers: ConditionStatusWrapper[]
expiredConditionStatusWrappers: ConditionStatusWrapper[]
waitingMedicalBoardCaseWrappers: MedicalBoardCaseWrapper[] = []
currentServiceman: Serviceman


Expand Down Expand Up @@ -58,6 +59,8 @@ export class MedicalReviewScreenComponent implements OnInit {
conStatWrapper.conditionStartDate = this.convertUTCStringToSingaporeDate(conStatWrapper.conditionStartDate)
});
this.completedMedicalBoardCaseWrappers.push(mbCase)
} else {
this.waitingMedicalBoardCaseWrappers.push(mbCase)
}

});
Expand Down

0 comments on commit 30f3e5d

Please sign in to comment.