taxtank-core 0.28.49 → 0.28.51
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 +104 -61
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/models/endpoint/endpoints.const.js +2 -1
- package/esm2015/lib/models/event/app-event-type.enum.js +63 -61
- package/esm2015/lib/services/http/bank/bank-account/bank-account.service.js +4 -2
- package/esm2015/lib/services/http/bank/bank-transaction/bank-transaction.service.js +12 -1
- package/esm2015/lib/services/http/sole/sole-business/messages.enum.js +7 -0
- package/esm2015/lib/services/http/sole/sole-business/sole-business.service.js +25 -2
- package/esm2015/lib/services/http/transaction/transaction.service.js +2 -1
- package/fesm2015/taxtank-core.js +102 -61
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/models/event/app-event-type.enum.d.ts +62 -60
- package/lib/services/http/bank/bank-transaction/bank-transaction.service.d.ts +4 -0
- package/lib/services/http/sole/sole-business/messages.enum.d.ts +5 -0
- package/lib/services/http/sole/sole-business/sole-business.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -562,66 +562,68 @@
|
|
|
562
562
|
AppEventTypeEnum[AppEventTypeEnum["BANK_ACCOUNT_CREATED"] = 2] = "BANK_ACCOUNT_CREATED";
|
|
563
563
|
AppEventTypeEnum[AppEventTypeEnum["BANK_ACCOUNT_UPDATED"] = 3] = "BANK_ACCOUNT_UPDATED";
|
|
564
564
|
AppEventTypeEnum[AppEventTypeEnum["BANK_TRANSACTION_ALLOCATED"] = 4] = "BANK_TRANSACTION_ALLOCATED";
|
|
565
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
566
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
567
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
568
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
569
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
570
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
571
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
572
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
573
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
574
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
575
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
576
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
577
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
578
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
579
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
580
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
581
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
582
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
583
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
584
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
585
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
586
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
587
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
588
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
589
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
590
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
591
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
592
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
593
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
594
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
595
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
596
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
597
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
598
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
599
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
600
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
601
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
602
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
603
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
604
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
605
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
606
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
607
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
608
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
609
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
610
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
611
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
612
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
613
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
614
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
615
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
616
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
617
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
618
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
619
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
620
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
621
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
622
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
623
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
624
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
565
|
+
AppEventTypeEnum[AppEventTypeEnum["BANK_TRANSACTIONS_ADDED"] = 5] = "BANK_TRANSACTIONS_ADDED";
|
|
566
|
+
AppEventTypeEnum[AppEventTypeEnum["BANK_TRANSACTIONS_DELETED"] = 6] = "BANK_TRANSACTIONS_DELETED";
|
|
567
|
+
AppEventTypeEnum[AppEventTypeEnum["BASIQ_CONSENT_UPDATED"] = 7] = "BASIQ_CONSENT_UPDATED";
|
|
568
|
+
AppEventTypeEnum[AppEventTypeEnum["BASIQ_CONNECTION_UPDATED"] = 8] = "BASIQ_CONNECTION_UPDATED";
|
|
569
|
+
AppEventTypeEnum[AppEventTypeEnum["BASIQ_JOB_CREATED"] = 9] = "BASIQ_JOB_CREATED";
|
|
570
|
+
AppEventTypeEnum[AppEventTypeEnum["BASIQ_LOGIN_FINISHED"] = 10] = "BASIQ_LOGIN_FINISHED";
|
|
571
|
+
AppEventTypeEnum[AppEventTypeEnum["CLIENT_INVITE_ACCEPTED"] = 11] = "CLIENT_INVITE_ACCEPTED";
|
|
572
|
+
AppEventTypeEnum[AppEventTypeEnum["CLIENT_OPEN_CHAT"] = 12] = "CLIENT_OPEN_CHAT";
|
|
573
|
+
AppEventTypeEnum[AppEventTypeEnum["CLIENT_TRANSFER_TO_OTHER_EMPLOYEE"] = 13] = "CLIENT_TRANSFER_TO_OTHER_EMPLOYEE";
|
|
574
|
+
AppEventTypeEnum[AppEventTypeEnum["CURRENT_USER_GET_FAILED"] = 14] = "CURRENT_USER_GET_FAILED";
|
|
575
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_DELETED"] = 15] = "DEPRECIATION_DELETED";
|
|
576
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATIONS_CREATED"] = 16] = "DEPRECIATIONS_CREATED";
|
|
577
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_UPDATED_WITH_RECEIPT"] = 17] = "DEPRECIATION_UPDATED_WITH_RECEIPT";
|
|
578
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT"] = 18] = "DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT";
|
|
579
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_RECEIPT_CREATED"] = 19] = "DEPRECIATION_RECEIPT_CREATED";
|
|
580
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_RECEIPT_DELETED"] = 20] = "DEPRECIATION_RECEIPT_DELETED";
|
|
581
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_CREATED"] = 21] = "INCOME_SOURCES_CREATED";
|
|
582
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_UPDATED"] = 22] = "INCOME_SOURCES_UPDATED";
|
|
583
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_CREATED"] = 23] = "INCOME_SOURCES_FORECASTS_CREATED";
|
|
584
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_UPDATED"] = 24] = "INCOME_SOURCES_FORECASTS_UPDATED";
|
|
585
|
+
AppEventTypeEnum[AppEventTypeEnum["LOAN_UPDATED"] = 25] = "LOAN_UPDATED";
|
|
586
|
+
AppEventTypeEnum[AppEventTypeEnum["LOAN_PAYOUT_UPDATED"] = 26] = "LOAN_PAYOUT_UPDATED";
|
|
587
|
+
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_CREATED"] = 27] = "MESSAGE_CREATED";
|
|
588
|
+
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_CREATED"] = 28] = "MESSAGE_FILE_CREATED";
|
|
589
|
+
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_DELETED"] = 29] = "MESSAGE_FILE_DELETED";
|
|
590
|
+
AppEventTypeEnum[AppEventTypeEnum["NOTIFICATION_ADDED"] = 30] = "NOTIFICATION_ADDED";
|
|
591
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DEPRECIATION_CALCULATION_UPDATED"] = 31] = "PROPERTY_DEPRECIATION_CALCULATION_UPDATED";
|
|
592
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_UPDATED"] = 32] = "PROPERTY_UPDATED";
|
|
593
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_UPDATED_WITH_DOCUMENT"] = 33] = "PROPERTY_UPDATED_WITH_DOCUMENT";
|
|
594
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DOCUMENT_ADDED"] = 34] = "PROPERTY_DOCUMENT_ADDED";
|
|
595
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 35] = "PROPERTY_MOVEMENT_CREATED";
|
|
596
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 36] = "PROPERTY_MOVEMENT_UPDATED";
|
|
597
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 37] = "PROPERTY_MOVEMENT_DELETED";
|
|
598
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SHARE_UPDATED"] = 38] = "PROPERTY_SHARE_UPDATED";
|
|
599
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_ADDED"] = 39] = "PROPERTY_SALE_ADDED";
|
|
600
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_DELETED"] = 40] = "PROPERTY_SALE_DELETED";
|
|
601
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 41] = "PROPERTY_SUBSCRIPTION_ADDED";
|
|
602
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 42] = "PROPERTY_SUBSCRIPTION_DELETED";
|
|
603
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 43] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
|
|
604
|
+
AppEventTypeEnum[AppEventTypeEnum["SERVICE_SUBSCRIPTION_UPDATED"] = 44] = "SERVICE_SUBSCRIPTION_UPDATED";
|
|
605
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_BUSINESS_CREATED"] = 45] = "SOLE_BUSINESS_CREATED";
|
|
606
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_DEPRECIATION_METHOD_UPDATED"] = 46] = "SOLE_DEPRECIATION_METHOD_UPDATED";
|
|
607
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_DETAILS_CREATED"] = 47] = "SOLE_DETAILS_CREATED";
|
|
608
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_DETAILS_UPDATED"] = 48] = "SOLE_DETAILS_UPDATED";
|
|
609
|
+
AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 49] = "TAX_REVIEW_UPDATED";
|
|
610
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 50] = "TRANSACTION_CREATED";
|
|
611
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 51] = "TRANSACTION_DELETED";
|
|
612
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 52] = "TRANSACTION_UPDATED";
|
|
613
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_RECEIPT"] = 53] = "TRANSACTION_UPDATED_WITH_RECEIPT";
|
|
614
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_DELETED_RECEIPT"] = 54] = "TRANSACTION_UPDATED_WITH_DELETED_RECEIPT";
|
|
615
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_CREATED"] = 55] = "TRANSACTION_RECEIPT_CREATED";
|
|
616
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_DELETED"] = 56] = "TRANSACTION_RECEIPT_DELETED";
|
|
617
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 57] = "TRANSACTIONS_CREATED";
|
|
618
|
+
AppEventTypeEnum[AppEventTypeEnum["USER_UPDATED"] = 58] = "USER_UPDATED";
|
|
619
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_UPDATED"] = 59] = "VEHICLE_CLAIM_UPDATED";
|
|
620
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_CREATED"] = 60] = "VEHICLE_CLAIM_CREATED";
|
|
621
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 61] = "VEHICLE_CLAIM_DETAILS_UPDATED";
|
|
622
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 62] = "VEHICLE_CLAIM_DETAILS_CREATED";
|
|
623
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 63] = "VEHICLE_LOGBOOK_CREATED";
|
|
624
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 64] = "VEHICLE_LOGBOOK_UPDATED";
|
|
625
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 65] = "VEHICLE_LOGBOOK_DELETED";
|
|
626
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 66] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
|
|
625
627
|
})(exports.AppEventTypeEnum || (exports.AppEventTypeEnum = {}));
|
|
626
628
|
|
|
627
629
|
var EventDispatcherService = /** @class */ (function () {
|
|
@@ -1081,6 +1083,7 @@
|
|
|
1081
1083
|
SOLE_BUSINESS_LOSSES_POST: new Endpoint('POST', '\\/sole-business-losses'),
|
|
1082
1084
|
SOLE_BUSINESS_LOSSES_PUT: new Endpoint('PUT', '\\/sole-business-losses\\/\\d+'),
|
|
1083
1085
|
SOLE_BUSINESS_LOSS_OFFSET_RULES_GET: new Endpoint('GET', '\\/sole-business-loss-offset-rules'),
|
|
1086
|
+
SOLE_BUSINESS_LOGO_POST: new Endpoint('POST', '\\/sole-businesses\\/\\d+\\/logo'),
|
|
1084
1087
|
SOLE_CONTACTS_POST: new Endpoint('POST', '\\/sole-contacts'),
|
|
1085
1088
|
SOLE_CONTACTS_PUT: new Endpoint('PUT', '\\/sole-contacts\\/\\d+'),
|
|
1086
1089
|
BUSINESS_ACTIVITIES_GET: new Endpoint('GET', '\\/sole-business-activities'),
|
|
@@ -12430,6 +12433,13 @@
|
|
|
12430
12433
|
UserEventSettingFieldEnum["FREQUENCY"] = "frequency";
|
|
12431
12434
|
})(exports.UserEventSettingFieldEnum || (exports.UserEventSettingFieldEnum = {}));
|
|
12432
12435
|
|
|
12436
|
+
var MessagesEnum$1;
|
|
12437
|
+
(function (MessagesEnum) {
|
|
12438
|
+
MessagesEnum["LOGO_UPDATED"] = "Logo updated successfully";
|
|
12439
|
+
MessagesEnum["LOGO_ERROR_FORMAT"] = "Wrong file format. Allowed extensions: jpg, img, png";
|
|
12440
|
+
MessagesEnum["LOGO_ERROR_SIZE"] = "The file is too big. Maximum size is 2mb";
|
|
12441
|
+
})(MessagesEnum$1 || (MessagesEnum$1 = {}));
|
|
12442
|
+
|
|
12433
12443
|
var SoleBusinessService = /** @class */ (function (_super) {
|
|
12434
12444
|
__extends(SoleBusinessService, _super);
|
|
12435
12445
|
function SoleBusinessService() {
|
|
@@ -12446,6 +12456,25 @@
|
|
|
12446
12456
|
return business;
|
|
12447
12457
|
}));
|
|
12448
12458
|
};
|
|
12459
|
+
SoleBusinessService.prototype.uploadLogo = function (business, file) {
|
|
12460
|
+
var _this = this;
|
|
12461
|
+
var formData = new FormData();
|
|
12462
|
+
formData.append('file', file);
|
|
12463
|
+
return this.http.post(this.environment.apiV2 + "/" + this.url + "/" + business.id + "/logo", formData)
|
|
12464
|
+
.pipe(operators.map(function (updatedBusiness) {
|
|
12465
|
+
var tempCache = cloneDeep__default["default"](_this.cache);
|
|
12466
|
+
replace(tempCache, classTransformer.plainToClass(SoleBusiness, updatedBusiness));
|
|
12467
|
+
_this.cache = tempCache;
|
|
12468
|
+
_this.cacheSubject.next(_this.cache);
|
|
12469
|
+
_this.toastService.success(MessagesEnum$1.LOGO_UPDATED);
|
|
12470
|
+
}), operators.catchError(function (error) {
|
|
12471
|
+
// Show error when user provided wrong image (format or size)
|
|
12472
|
+
if (error.status === 422) {
|
|
12473
|
+
_this.toastService.error(error.error.violations[0].message);
|
|
12474
|
+
}
|
|
12475
|
+
return throwError.throwError(error);
|
|
12476
|
+
}));
|
|
12477
|
+
};
|
|
12449
12478
|
return SoleBusinessService;
|
|
12450
12479
|
}(RestService));
|
|
12451
12480
|
SoleBusinessService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
@@ -13726,7 +13755,9 @@
|
|
|
13726
13755
|
this.eventDispatcherService.on([
|
|
13727
13756
|
exports.AppEventTypeEnum.PROPERTY_SHARE_UPDATED,
|
|
13728
13757
|
exports.AppEventTypeEnum.LOAN_PAYOUT_UPDATED,
|
|
13729
|
-
exports.AppEventTypeEnum.BANK_CONNECTION_ADDED
|
|
13758
|
+
exports.AppEventTypeEnum.BANK_CONNECTION_ADDED,
|
|
13759
|
+
exports.AppEventTypeEnum.BANK_TRANSACTIONS_ADDED,
|
|
13760
|
+
exports.AppEventTypeEnum.BANK_TRANSACTIONS_DELETED
|
|
13730
13761
|
]).subscribe(function () {
|
|
13731
13762
|
_this.resetCache();
|
|
13732
13763
|
});
|
|
@@ -14233,6 +14264,7 @@
|
|
|
14233
14264
|
*/
|
|
14234
14265
|
TransactionService.prototype.listenDepreciationChange = function () {
|
|
14235
14266
|
var _this = this;
|
|
14267
|
+
// @TODO we never dispatch DEPRECIATION_DELETED
|
|
14236
14268
|
this.eventDispatcherService.on(exports.AppEventTypeEnum.DEPRECIATION_DELETED).subscribe(function () {
|
|
14237
14269
|
_this.fetch()
|
|
14238
14270
|
.subscribe(function (transactions) {
|
|
@@ -14713,13 +14745,24 @@
|
|
|
14713
14745
|
(_a = _this.cache).push.apply(_a, __spreadArray([], __read(newBankTransactions.filter(function (bt) { return new FinancialYear().includes(bt.date); }))));
|
|
14714
14746
|
_this.updateCache();
|
|
14715
14747
|
}
|
|
14748
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.BANK_TRANSACTIONS_ADDED, newBankTransactions));
|
|
14716
14749
|
return newBankTransactions;
|
|
14717
14750
|
}));
|
|
14718
14751
|
};
|
|
14752
|
+
BankTransactionService.prototype.delete = function (model) {
|
|
14753
|
+
var _this = this;
|
|
14754
|
+
return _super.prototype.delete.call(this, model).pipe(operators.map(function () {
|
|
14755
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.BANK_TRANSACTIONS_DELETED, model));
|
|
14756
|
+
}));
|
|
14757
|
+
};
|
|
14758
|
+
/**
|
|
14759
|
+
* @TODO move to sse when backend send mercure event
|
|
14760
|
+
*/
|
|
14719
14761
|
BankTransactionService.prototype.listenBankTransactionsImport = function () {
|
|
14720
14762
|
var _this = this;
|
|
14721
14763
|
this.eventDispatcherService.on(exports.AppEventTypeEnum.NOTIFICATION_ADDED).subscribe(function (notification) {
|
|
14722
14764
|
if (!notification.isRead && notification.eventType === UserEventTypeTypeEnum.BASIQ_FIRST_IMPORT_COMPLETE) {
|
|
14765
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.BANK_TRANSACTIONS_ADDED, []));
|
|
14723
14766
|
_this.resetCache();
|
|
14724
14767
|
}
|
|
14725
14768
|
});
|