taxtank-core 0.28.7 → 0.28.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9897,7 +9897,8 @@
9897
9897
  }());
9898
9898
 
9899
9899
  /**
9900
- * Enum with maximum number of payments, depending on the frequency
9900
+ * Enum with maximum number of payments, depending on the frequency.
9901
+ * Used only for vehicle loans
9901
9902
  */
9902
9903
  exports.LoanMaxNumberOfPaymentsEnum = void 0;
9903
9904
  (function (LoanMaxNumberOfPaymentsEnum) {
@@ -16927,6 +16928,10 @@
16927
16928
  * For vehicle loans term has a maximum value depended of repayment frequency
16928
16929
  */
16929
16930
  LoanForm.prototype.updateTermValidation = function () {
16931
+ // no need terms for bank loans
16932
+ if (!!this.loan.bankAccount) {
16933
+ return;
16934
+ }
16930
16935
  var currentRepaymentFrequency = this.get('repaymentFrequency').value;
16931
16936
  // term validation depends on selected repayment frequency, so can not validate when frequency is empty
16932
16937
  // repaymentType is required field, so we don't need to clear validation
@@ -17469,7 +17474,7 @@
17469
17474
  if (bankAccount.isLoan()) {
17470
17475
  // Attach bank account to loan for LoanForm's logic
17471
17476
  // @TODO Alex/Vik: we should use separated API for bank accounts and loans
17472
- var loan = classTransformer.plainToClass(Loan, Object.assign(bankAccount.loan, { bankAccount: Object.assign(bankAccount, { loan: null }) }));
17477
+ var loan = classTransformer.plainToClass(Loan, Object.assign(bankAccount.loan, { bankAccount: { accountId: bankAccount.accountId } }));
17473
17478
  _this.addControl('loan', new LoanForm(loan));
17474
17479
  }
17475
17480
  // basiq account import form should be disabled (unchecked) by default