Skip to content

Commit

Permalink
POCAMRS-363: Added selected month to patient list title - prep (#1320)
Browse files Browse the repository at this point in the history
  • Loading branch information
jecihjoy authored Oct 9, 2020
1 parent 1f8ca1d commit b4c1105
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<span><i class="fa fa-spinner fa-spin"></i>Loading...</span>
</div>
<h3>
<b>{{ selectedIndicator }}</b> patient list
<b>{{ selectedIndicator }}</b> patient list for the month of
<b>{{ selectedMonth }}</b>
</h3>
<hr />
<patient-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { PrepResourceService } from 'src/app/etl-api/prep-resource.service';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import * as Moment from 'moment';
@Component({
selector: 'app-prep-report-patient-list',
templateUrl: './prep-report-patient-list.component.html',
Expand All @@ -16,6 +17,7 @@ export class PrepReportPatientListComponent implements OnInit {
public selectedIndicator: string;
public hasLoadedAll = false;
public hasError = false;
public selectedMonth: String;

constructor(
private router: Router,
Expand All @@ -31,6 +33,9 @@ export class PrepReportPatientListComponent implements OnInit {
if (params && params.month) {
this.params = params;
this.selectedIndicator = params.indicatorHeader;
this.selectedMonth = Moment(new Date(params.month)).format(
'MMMM YYYY'
);
this.getPatientList(params);
}
},
Expand Down

0 comments on commit b4c1105

Please sign in to comment.