merge angular-17 into dev to upgrade from Angular v16 to v17
This commit is contained in:
+3
-1
@@ -41,6 +41,8 @@ export class FixedDepositsAccountActionsComponent {
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
const name = this.route.snapshot.params['name'];
|
||||
this.actions[name] = true;
|
||||
if (name && name in this.actions) {
|
||||
this.actions[name as keyof typeof this.actions] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-4
@@ -5,6 +5,7 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Currency, PaymentType } from 'app/shared/models/general.model';
|
||||
import { TransactionCommand, TransactionTypeFlags } from '../../../transaction.model';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-fixed-deposits-cash-transaction',
|
||||
@@ -23,9 +24,9 @@ export class FixedDepositsCashTransactionComponent implements OnInit {
|
||||
/** Flag to enable payment details fields. */
|
||||
addPaymentDetailsFlag: Boolean = false;
|
||||
/** transaction type flag to render required UI */
|
||||
transactionType: { deposit: boolean; withdrawal: boolean } = { deposit: false, withdrawal: false };
|
||||
transactionType: TransactionTypeFlags = { deposit: false, withdrawal: false };
|
||||
/** transaction command for submit request */
|
||||
transactionCommand: string;
|
||||
transactionCommand: TransactionCommand;
|
||||
actionName: string;
|
||||
/** saving account's Id */
|
||||
accountId: string;
|
||||
@@ -53,8 +54,14 @@ export class FixedDepositsCashTransactionComponent implements OnInit {
|
||||
this.paymentTypeOptions = data.fixedDepositsAccountActionData.paymentTypeOptions;
|
||||
});
|
||||
this.actionName = this.route.snapshot.params['name'];
|
||||
this.transactionCommand = this.actionName.toLowerCase();
|
||||
this.transactionType[this.transactionCommand] = true;
|
||||
const lowerName = this.actionName.toLowerCase();
|
||||
if (lowerName === 'deposit' || lowerName === 'withdrawal') {
|
||||
this.transactionCommand = lowerName;
|
||||
this.transactionType[this.transactionCommand] = true;
|
||||
} else {
|
||||
throw new Error(`Invalid transaction action: ${this.actionName}`);
|
||||
}
|
||||
|
||||
this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId'];
|
||||
}
|
||||
|
||||
|
||||
+11
-5
@@ -8,6 +8,7 @@ import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
import { TransactionCommand, TransactionTypeFlags } from '../../../transaction.model';
|
||||
|
||||
/**
|
||||
* Deposits Recurring Deposits Account Component
|
||||
@@ -39,8 +40,8 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
|
||||
action: string;
|
||||
actionName: string;
|
||||
transactionCommand: string;
|
||||
transactionType: { deposit: boolean; withdrawal: boolean } = { deposit: false, withdrawal: false };
|
||||
transactionCommand: TransactionCommand;
|
||||
transactionType: TransactionTypeFlags = { deposit: false, withdrawal: false };
|
||||
|
||||
/**
|
||||
* Retrieves action details transactions template data from `resolve`
|
||||
@@ -66,13 +67,18 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
data.recurringDepositsAccountActionData.outstandingChargeAmount > 0
|
||||
) {
|
||||
this.outstandingChargeAmount = data.recurringDepositsAccountActionData.outstandingChargeAmount;
|
||||
this.transactionAmount = this.transactionAmount + this.outstandingChargeAmount;
|
||||
this.transactionAmount += this.outstandingChargeAmount;
|
||||
}
|
||||
});
|
||||
this.actionName = this.route.snapshot.params['name'];
|
||||
this.action = this.actionName.toLowerCase();
|
||||
this.transactionCommand = this.action.toLowerCase();
|
||||
this.transactionType[this.transactionCommand] = true;
|
||||
if (this.action === 'deposit' || this.action === 'withdrawal') {
|
||||
this.transactionCommand = this.action;
|
||||
this.transactionType[this.transactionCommand] = true;
|
||||
} else {
|
||||
throw new Error(`Invalid transaction action: ${this.actionName}`);
|
||||
}
|
||||
|
||||
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -47,6 +47,8 @@ export class RecurringDepositsAccountActionsComponent {
|
||||
}
|
||||
});
|
||||
const name = this.route.snapshot.params['name'];
|
||||
this.actions[name] = true;
|
||||
if (name && name in this.actions) {
|
||||
this.actions[name as keyof typeof this.actions] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -69,8 +69,7 @@
|
||||
{{ 'labels.inputs.Note' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50">
|
||||
*ngIf="transactionData.note">
|
||||
<div class="flex-50" *ngIf="transactionData.note">
|
||||
{{ transactionData.note }}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export type TransactionCommand = 'deposit' | 'withdrawal';
|
||||
|
||||
export type TransactionTypeFlags = {
|
||||
[key in TransactionCommand]: boolean;
|
||||
};
|
||||
Reference in New Issue
Block a user