merge angular-17 into dev to upgrade from Angular v16 to v17
This commit is contained in:
+14
-8
@@ -15,6 +15,12 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
interface OfficeNode {
|
||||
id: number;
|
||||
name: string;
|
||||
loans: any[];
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-loan-approval',
|
||||
templateUrl: './loan-approval.component.html',
|
||||
@@ -32,7 +38,7 @@ export class LoanApprovalComponent {
|
||||
/** Row Selection Data */
|
||||
selection: SelectionModel<any>;
|
||||
/** Map data */
|
||||
idToNodeMap = {};
|
||||
idToNodeMap: { [key: number]: OfficeNode } = {};
|
||||
/** Grouped Office Data */
|
||||
officesArray: any[];
|
||||
/** List of Requests */
|
||||
@@ -79,15 +85,15 @@ export class LoanApprovalComponent {
|
||||
});
|
||||
this.loans.forEach((loanEle: any) => {
|
||||
if (loanEle.status.pendingApproval) {
|
||||
let tempOffice = {};
|
||||
let tempOffice: OfficeNode | undefined;
|
||||
if (loanEle.clientOfficeId) {
|
||||
tempOffice = this.idToNodeMap[loanEle.clientOfficeId];
|
||||
tempOffice['loans'].push(loanEle);
|
||||
} else {
|
||||
if (loanEle.group) {
|
||||
tempOffice = this.idToNodeMap[loanEle.group.officeId];
|
||||
tempOffice['loans'].push(loanEle);
|
||||
}
|
||||
} else if (loanEle.group?.officeId) {
|
||||
tempOffice = this.idToNodeMap[loanEle.group.officeId];
|
||||
}
|
||||
|
||||
if (tempOffice) {
|
||||
tempOffice.loans.push(loanEle);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+10
-3
@@ -15,6 +15,13 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
interface RescheduleFormData {
|
||||
dateFormat: string;
|
||||
locale: string;
|
||||
approvedOnDate?: string;
|
||||
rejectedOnDate?: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-reschedule-loan',
|
||||
templateUrl: './reschedule-loan.component.html',
|
||||
@@ -107,14 +114,14 @@ export class RescheduleLoanComponent {
|
||||
const dateFormat = this.settingsService.dateFormat;
|
||||
const transactionDate = this.dateUtils.formatDate(this.settingsService.businessDate, dateFormat);
|
||||
const locale = this.settingsService.language.code;
|
||||
const formData = {
|
||||
const formData: RescheduleFormData = {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
if (command === 'approve') {
|
||||
formData['approvedOnDate'] = transactionDate;
|
||||
formData.approvedOnDate = transactionDate;
|
||||
} else {
|
||||
formData['rejectedOnDate'] = transactionDate;
|
||||
formData.rejectedOnDate = transactionDate;
|
||||
}
|
||||
const listSelectedAccounts = this.selection.selected;
|
||||
this.batchRequests = [];
|
||||
|
||||
Reference in New Issue
Block a user