fix: display report run frequency value (#556)
- Display report run frequency value rather than the id in View Adhoc Query Fixes: #555 Co-authored-by: punwai <punwaiw@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" *ngIf="adhocQueryData.reportRunFrequency">
|
||||
{{ adhocQueryData.reportRunFrequency }}
|
||||
{{ reportRunFrequency }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="mat-body-strong">
|
||||
|
||||
@@ -41,6 +41,18 @@ export class ViewAdhocQueryComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the report run frequency value from id
|
||||
* @returns {string} Report run frequency value.
|
||||
*/
|
||||
get reportRunFrequency(): string {
|
||||
for (const reportRunFrequency of this.adhocQueryData.reportRunFrequencies) {
|
||||
if (reportRunFrequency.id === this.adhocQueryData.reportRunFrequency) {
|
||||
return reportRunFrequency.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the adhoc query and redirects to adhoc queries.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user