refractor(df/locale):savings module (#1301)

This commit is contained in:
Abhishek Kumar
2021-08-08 13:16:30 +05:30
committed by GitHub
parent 997611a9f3
commit 88ee1b4fcd
4 changed files with 28 additions and 18 deletions
@@ -7,6 +7,7 @@ import { Observable } from 'rxjs';
/** Custom Services */
import { ReportsService } from 'app/reports/reports.service';
import { SettingsService } from 'app/settings/settings.service';
/**
* Savings Transaction Reciept resolver.
@@ -16,8 +17,10 @@ export class SavingsTransactionRecieptResolver implements Resolve<Object> {
/**
* @param {ReportsService} reportsService Reports service.
* @param {SettingsService} settingsService Settings Service.
*/
constructor(private reportsService: ReportsService) { }
constructor(private reportsService: ReportsService,
private settingsService: SettingsService) { }
/**
* Returns the Savings Transaction Reciept
@@ -30,7 +33,7 @@ export class SavingsTransactionRecieptResolver implements Resolve<Object> {
'output-type': 'PDF',
R_transactionId: transactionId
};
return this.reportsService.getPentahoRunReportData('Savings Transaction Receipt', data, 'default', 'en', 'dd MMMM yyyy');
return this.reportsService.getPentahoRunReportData('Savings Transaction Receipt', data, 'default', this.settingsService.language.code, this.settingsService.dateFormat);
}
}