Fineract backend settings with environment variables
This commit is contained in:
committed by
Arnold Gálovics
parent
1b72136411
commit
14ceb4f3fd
@@ -13,6 +13,7 @@ import { LoansService } from 'app/loans/loans.service';
|
||||
/** Dialog Components */
|
||||
import { LoanAccountLoadDocumentsDialogComponent } from 'app/loans/custom-dialog/loan-account-load-documents-dialog/loan-account-load-documents-dialog.component';
|
||||
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/**
|
||||
* Overdue charges tab component
|
||||
@@ -50,6 +51,7 @@ export class LoanDocumentsTabComponent implements OnInit {
|
||||
*/
|
||||
constructor(private route: ActivatedRoute,
|
||||
private loansService: LoansService,
|
||||
private settingsService: SettingsService,
|
||||
public dialog: MatDialog) {
|
||||
this.route.data.subscribe((data: { loanDocuments: any }) => {
|
||||
this.getLoanDocumentsData(data.loanDocuments);
|
||||
@@ -72,7 +74,7 @@ export class LoanDocumentsTabComponent implements OnInit {
|
||||
getLoanDocumentsData(data: any) {
|
||||
data.forEach((ele: any) => {
|
||||
let loandocs = {};
|
||||
loandocs = environment.serverUrl + '/loans/' + ele.parentEntityId + '/documents/' + ele.id + '/attachment?tenantIdentifier=' + environment.fineractPlatformTenantId;
|
||||
loandocs = this.settingsService.serverUrl + '/loans/' + ele.parentEntityId + '/documents/' + ele.id + '/attachment?tenantIdentifier=' + environment.fineractPlatformTenantId;
|
||||
ele.docUrl = loandocs;
|
||||
if (ele.fileName) {
|
||||
if (ele.fileName.toLowerCase().indexOf('.jpg') !== -1 || ele.fileName.toLowerCase().indexOf('.jpeg') !== -1 || ele.fileName.toLowerCase().indexOf('.png') !== -1) {
|
||||
|
||||
Reference in New Issue
Block a user