taxtank-core 0.1.4 → 0.1.5
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 +24 -17
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/models/bank/bank-connection.js +8 -1
- package/esm2015/lib/models/bank/bank.js +4 -14
- package/esm2015/lib/services/bank/bank-account.service.js +9 -5
- package/esm2015/lib/tt-core.module.js +2 -1
- package/fesm2015/taxtank-core.js +20 -16
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/models/bank/bank-connection.d.ts +4 -0
- package/lib/models/bank/bank.d.ts +0 -2
- package/lib/services/bank/bank-account.service.d.ts +2 -2
- package/package.json +1 -1
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
function TtCoreModule() {
|
|
45
45
|
}
|
|
46
46
|
TtCoreModule.forRoot = function (environment) {
|
|
47
|
+
localStorage.setItem('api_uri', environment['api_uri']);
|
|
47
48
|
return {
|
|
48
49
|
ngModule: TtCoreModule,
|
|
49
50
|
providers: [
|
|
@@ -3007,18 +3008,16 @@
|
|
|
3007
3008
|
classTransformer.Type((function () { return Country; }))
|
|
3008
3009
|
], Address.prototype, "country", void 0);
|
|
3009
3010
|
|
|
3010
|
-
var Bank = /** @class */ (function () {
|
|
3011
|
+
var Bank$1 = /** @class */ (function () {
|
|
3011
3012
|
function Bank() {
|
|
3012
3013
|
}
|
|
3013
3014
|
return Bank;
|
|
3014
3015
|
}());
|
|
3015
3016
|
|
|
3016
|
-
|
|
3017
|
+
var Bank = /** @class */ (function (_super) {
|
|
3017
3018
|
__extends(Bank, _super);
|
|
3018
|
-
function Bank(
|
|
3019
|
-
|
|
3020
|
-
_this.environment = environment;
|
|
3021
|
-
return _this;
|
|
3019
|
+
function Bank() {
|
|
3020
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3022
3021
|
}
|
|
3023
3022
|
Bank.prototype.getInitials = function () {
|
|
3024
3023
|
return this.name[0] + this.name[1];
|
|
@@ -3027,13 +3026,10 @@
|
|
|
3027
3026
|
if (!this.logo) {
|
|
3028
3027
|
return null;
|
|
3029
3028
|
}
|
|
3030
|
-
return this.logo.includes('http') ? "" + this.logo :
|
|
3029
|
+
return this.logo.includes('http') ? "" + this.logo : localStorage.getItem('api_uri') + "/" + this.logo;
|
|
3031
3030
|
};
|
|
3032
3031
|
return Bank;
|
|
3033
|
-
}(Bank));
|
|
3034
|
-
exports.Bank = __decorate([
|
|
3035
|
-
__param(0, i0.Inject('environment'))
|
|
3036
|
-
], exports.Bank);
|
|
3032
|
+
}(Bank$1));
|
|
3037
3033
|
|
|
3038
3034
|
var BankAccount$1 = /** @class */ (function () {
|
|
3039
3035
|
function BankAccount() {
|
|
@@ -4087,13 +4083,19 @@
|
|
|
4087
4083
|
function BankConnection() {
|
|
4088
4084
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
4089
4085
|
}
|
|
4086
|
+
/**
|
|
4087
|
+
* Check if status of connection is inactive (invalid)
|
|
4088
|
+
*/
|
|
4089
|
+
BankConnection.prototype.isInactive = function () {
|
|
4090
|
+
return this.status === exports.BankConnectionStatusEnum.INVALID;
|
|
4091
|
+
};
|
|
4090
4092
|
return BankConnection;
|
|
4091
4093
|
}(BankConnection$1));
|
|
4092
4094
|
__decorate([
|
|
4093
4095
|
classTransformer.Type(function () { return BasiqJob; })
|
|
4094
4096
|
], BankConnection.prototype, "basiqJob", void 0);
|
|
4095
4097
|
__decorate([
|
|
4096
|
-
classTransformer.Type(function () { return
|
|
4098
|
+
classTransformer.Type(function () { return Bank; })
|
|
4097
4099
|
], BankConnection.prototype, "bank", void 0);
|
|
4098
4100
|
|
|
4099
4101
|
var BankAccount = /** @class */ (function (_super) {
|
|
@@ -7724,7 +7726,7 @@
|
|
|
7724
7726
|
__extends(BankService, _super);
|
|
7725
7727
|
function BankService() {
|
|
7726
7728
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
7727
|
-
_this.modelClass =
|
|
7729
|
+
_this.modelClass = Bank;
|
|
7728
7730
|
_this.url = 'banks';
|
|
7729
7731
|
_this.isHydra = true;
|
|
7730
7732
|
return _this;
|
|
@@ -7760,7 +7762,7 @@
|
|
|
7760
7762
|
* Listen system notifications and update cache when got basiq notification received
|
|
7761
7763
|
*/
|
|
7762
7764
|
BankAccountService.prototype.listenEvents = function () {
|
|
7763
|
-
this.
|
|
7765
|
+
this.listenToEventDispatcherChanges();
|
|
7764
7766
|
};
|
|
7765
7767
|
/**
|
|
7766
7768
|
* Created manual bank account
|
|
@@ -7820,11 +7822,15 @@
|
|
|
7820
7822
|
}));
|
|
7821
7823
|
};
|
|
7822
7824
|
/**
|
|
7823
|
-
* Listen to EventDispatcherService
|
|
7825
|
+
* Listen to EventDispatcherService events
|
|
7824
7826
|
*/
|
|
7825
|
-
BankAccountService.prototype.
|
|
7827
|
+
BankAccountService.prototype.listenToEventDispatcherChanges = function () {
|
|
7826
7828
|
var _this = this;
|
|
7827
|
-
this.eventDispatcherService.on([
|
|
7829
|
+
this.eventDispatcherService.on([
|
|
7830
|
+
exports.AppEventTypeEnum.PROPERTY_OWNER_UPDATED,
|
|
7831
|
+
exports.AppEventTypeEnum.LOAN_PAYOUT_UPDATED,
|
|
7832
|
+
exports.AppEventTypeEnum.BANK_CONNECTION_ADDED
|
|
7833
|
+
]).subscribe(function () {
|
|
7828
7834
|
_this.fetch().subscribe(function (bankAccounts) {
|
|
7829
7835
|
_this.cache = bankAccounts;
|
|
7830
7836
|
_this.updateCache();
|
|
@@ -11820,6 +11826,7 @@
|
|
|
11820
11826
|
exports.AssetsService = AssetsService;
|
|
11821
11827
|
exports.AuthService = AuthService;
|
|
11822
11828
|
exports.BANK_ACCOUNT_TYPES = BANK_ACCOUNT_TYPES;
|
|
11829
|
+
exports.Bank = Bank;
|
|
11823
11830
|
exports.BankAccount = BankAccount;
|
|
11824
11831
|
exports.BankAccountCalculationService = BankAccountCalculationService;
|
|
11825
11832
|
exports.BankAccountChartData = BankAccountChartData;
|