taxtank-core 0.19.1 → 0.19.2
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.
- package/bundles/taxtank-core.umd.js +17 -3
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/forms/bank/bank-account.form.js +16 -3
- package/esm2015/lib/models/bank/bank-account-property.js +2 -2
- package/fesm2015/taxtank-core.js +16 -3
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/forms/bank/bank-account.form.d.ts +7 -0
- package/package.json +1 -1
|
@@ -3188,7 +3188,7 @@
|
|
|
3188
3188
|
__decorate([
|
|
3189
3189
|
classTransformer.Transform(function (_a) {
|
|
3190
3190
|
var value = _a.value;
|
|
3191
|
-
return value ||
|
|
3191
|
+
return value || 100;
|
|
3192
3192
|
}),
|
|
3193
3193
|
classTransformer.Expose()
|
|
3194
3194
|
], BankAccountProperty.prototype, "percent", void 0);
|
|
@@ -14678,13 +14678,14 @@
|
|
|
14678
14678
|
}, bankAccount) || this;
|
|
14679
14679
|
_this.bankAccount = bankAccount;
|
|
14680
14680
|
if (bankAccount.isLoan()) {
|
|
14681
|
-
_this.addControl('loan', new BankAccountLoanForm());
|
|
14681
|
+
_this.addControl('loan', new BankAccountLoanForm(bankAccount.loan));
|
|
14682
14682
|
}
|
|
14683
14683
|
_this.listenEvents();
|
|
14684
14684
|
return _this;
|
|
14685
14685
|
}
|
|
14686
14686
|
BankAccountForm.prototype.listenEvents = function () {
|
|
14687
14687
|
this.listenTankTypeChanges();
|
|
14688
|
+
this.listenValueChanges();
|
|
14688
14689
|
};
|
|
14689
14690
|
Object.defineProperty(BankAccountForm.prototype, "properties", {
|
|
14690
14691
|
get: function () {
|
|
@@ -14699,9 +14700,16 @@
|
|
|
14699
14700
|
BankAccountForm.prototype.isPropertyTank = function () {
|
|
14700
14701
|
return this.get('tankType').value === exports.TankTypeEnum.PROPERTY;
|
|
14701
14702
|
};
|
|
14703
|
+
BankAccountForm.prototype.confirm = function () {
|
|
14704
|
+
this.markAllAsTouched();
|
|
14705
|
+
if (this.invalid) {
|
|
14706
|
+
return;
|
|
14707
|
+
}
|
|
14708
|
+
this.isConfirmed = true;
|
|
14709
|
+
};
|
|
14702
14710
|
BankAccountForm.prototype.addPropertiesArray = function () {
|
|
14703
14711
|
var control = new BankAccountPropertiesForm(this.isLoan(), this.bankAccount.bankAccountProperties);
|
|
14704
|
-
// Default form behaviour is:
|
|
14712
|
+
// Default form behaviour is: if we add enabled form control to disabled form group then this form group enable.
|
|
14705
14713
|
// Disable form control before add to avoid form group enabling.
|
|
14706
14714
|
if (this.disabled) {
|
|
14707
14715
|
control.disable();
|
|
@@ -14717,6 +14725,12 @@
|
|
|
14717
14725
|
_this.isPropertyTank() ? _this.addPropertiesArray() : _this.removeControl('bankAccountProperties');
|
|
14718
14726
|
});
|
|
14719
14727
|
};
|
|
14728
|
+
BankAccountForm.prototype.listenValueChanges = function () {
|
|
14729
|
+
var _this = this;
|
|
14730
|
+
this.valueChanges.subscribe(function () {
|
|
14731
|
+
_this.isConfirmed = false;
|
|
14732
|
+
});
|
|
14733
|
+
};
|
|
14720
14734
|
return BankAccountForm;
|
|
14721
14735
|
}(AbstractForm));
|
|
14722
14736
|
|