taxtank-core 0.28.86 → 0.28.87
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 +54 -19
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/property/property-category-movement.collection.js +2 -2
- package/esm2015/lib/models/event/app-event-type.enum.js +20 -18
- package/esm2015/lib/services/http/sole/sole-invoice/sole-invoice.service.js +12 -1
- package/esm2015/lib/services/http/subscription/subscription.service.js +1 -2
- package/esm2015/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.js +21 -1
- package/fesm2015/taxtank-core.js +50 -19
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/models/event/app-event-type.enum.d.ts +19 -17
- package/lib/services/http/sole/sole-invoice/sole-invoice.service.d.ts +4 -1
- package/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.d.ts +3 -0
- package/package.json +1 -1
|
@@ -600,23 +600,25 @@
|
|
|
600
600
|
AppEventTypeEnum[AppEventTypeEnum["SOLE_DETAILS_UPDATED"] = 49] = "SOLE_DETAILS_UPDATED";
|
|
601
601
|
AppEventTypeEnum[AppEventTypeEnum["SOLE_INVOICE_PUBLISHED"] = 50] = "SOLE_INVOICE_PUBLISHED";
|
|
602
602
|
AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 51] = "TAX_REVIEW_UPDATED";
|
|
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["
|
|
603
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_ALLOCATION_CREATED"] = 52] = "TRANSACTION_ALLOCATION_CREATED";
|
|
604
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_ALLOCATION_DELETED"] = 53] = "TRANSACTION_ALLOCATION_DELETED";
|
|
605
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 54] = "TRANSACTION_CREATED";
|
|
606
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 55] = "TRANSACTION_DELETED";
|
|
607
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 56] = "TRANSACTION_UPDATED";
|
|
608
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_RECEIPT"] = 57] = "TRANSACTION_UPDATED_WITH_RECEIPT";
|
|
609
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_DELETED_RECEIPT"] = 58] = "TRANSACTION_UPDATED_WITH_DELETED_RECEIPT";
|
|
610
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_CREATED"] = 59] = "TRANSACTION_RECEIPT_CREATED";
|
|
611
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_DELETED"] = 60] = "TRANSACTION_RECEIPT_DELETED";
|
|
612
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 61] = "TRANSACTIONS_CREATED";
|
|
613
|
+
AppEventTypeEnum[AppEventTypeEnum["USER_UPDATED"] = 62] = "USER_UPDATED";
|
|
614
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_UPDATED"] = 63] = "VEHICLE_CLAIM_UPDATED";
|
|
615
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_CREATED"] = 64] = "VEHICLE_CLAIM_CREATED";
|
|
616
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 65] = "VEHICLE_CLAIM_DETAILS_UPDATED";
|
|
617
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 66] = "VEHICLE_CLAIM_DETAILS_CREATED";
|
|
618
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 67] = "VEHICLE_LOGBOOK_CREATED";
|
|
619
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 68] = "VEHICLE_LOGBOOK_UPDATED";
|
|
620
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 69] = "VEHICLE_LOGBOOK_DELETED";
|
|
621
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 70] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
|
|
620
622
|
})(exports.AppEventTypeEnum || (exports.AppEventTypeEnum = {}));
|
|
621
623
|
|
|
622
624
|
var EventDispatcherService = /** @class */ (function () {
|
|
@@ -7888,7 +7890,7 @@
|
|
|
7888
7890
|
PropertyCategoryMovementCollection.prototype.getByForecast = function (property, forecast) {
|
|
7889
7891
|
var financialYear = new FinancialYear(forecast.financialYear);
|
|
7890
7892
|
return this.filterBy('property.id', property.id).filter(function (movement) {
|
|
7891
|
-
return movement.fromDate <= financialYear.endDate && movement.toDate >= financialYear.startDate;
|
|
7893
|
+
return movement.fromDate <= financialYear.endDate && !movement.toDate || movement.toDate >= financialYear.startDate;
|
|
7892
7894
|
});
|
|
7893
7895
|
};
|
|
7894
7896
|
PropertyCategoryMovementCollection.prototype.hasCategory = function (categoryId) {
|
|
@@ -12982,6 +12984,9 @@
|
|
|
12982
12984
|
_this.isHydra = true;
|
|
12983
12985
|
return _this;
|
|
12984
12986
|
}
|
|
12987
|
+
SoleInvoiceService.prototype.listenEvents = function () {
|
|
12988
|
+
this.listenAllocations();
|
|
12989
|
+
};
|
|
12985
12990
|
SoleInvoiceService.prototype.add = function (invoice) {
|
|
12986
12991
|
var _this = this;
|
|
12987
12992
|
return _super.prototype.add.call(this, invoice).pipe(operators.map(function (newInvoice) {
|
|
@@ -13030,6 +13035,15 @@
|
|
|
13030
13035
|
var number = (_b = (_a = last__default["default"](this.cache)) === null || _a === void 0 ? void 0 : _a.number) !== null && _b !== void 0 ? _b : 0;
|
|
13031
13036
|
return number + 1;
|
|
13032
13037
|
};
|
|
13038
|
+
SoleInvoiceService.prototype.listenAllocations = function () {
|
|
13039
|
+
var _this = this;
|
|
13040
|
+
this.eventDispatcherService.on([
|
|
13041
|
+
exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_CREATED,
|
|
13042
|
+
exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_DELETED
|
|
13043
|
+
]).subscribe(function () {
|
|
13044
|
+
_this.resetCache();
|
|
13045
|
+
});
|
|
13046
|
+
};
|
|
13033
13047
|
return SoleInvoiceService;
|
|
13034
13048
|
}(RestService));
|
|
13035
13049
|
SoleInvoiceService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SoleInvoiceService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
@@ -14125,6 +14139,28 @@
|
|
|
14125
14139
|
TransactionAllocationService.prototype.add = function (allocation) {
|
|
14126
14140
|
return this.addBatch([allocation]).pipe(operators.map(function (newAllocations) { return newAllocations[0]; }));
|
|
14127
14141
|
};
|
|
14142
|
+
TransactionAllocationService.prototype.addBatch = function (models, queryParams) {
|
|
14143
|
+
var _this = this;
|
|
14144
|
+
return _super.prototype.addBatch.call(this, models, queryParams)
|
|
14145
|
+
.pipe(operators.map(function (allocations) {
|
|
14146
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_CREATED, allocations));
|
|
14147
|
+
return allocations;
|
|
14148
|
+
}));
|
|
14149
|
+
};
|
|
14150
|
+
TransactionAllocationService.prototype.delete = function (model) {
|
|
14151
|
+
var _this = this;
|
|
14152
|
+
return _super.prototype.delete.call(this, model)
|
|
14153
|
+
.pipe(operators.map(function () {
|
|
14154
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_DELETED, null));
|
|
14155
|
+
}));
|
|
14156
|
+
};
|
|
14157
|
+
TransactionAllocationService.prototype.deleteBatch = function (models) {
|
|
14158
|
+
var _this = this;
|
|
14159
|
+
return _super.prototype.deleteBatch.call(this, models)
|
|
14160
|
+
.pipe(operators.map(function () {
|
|
14161
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_DELETED, null));
|
|
14162
|
+
}));
|
|
14163
|
+
};
|
|
14128
14164
|
/**
|
|
14129
14165
|
* get list of transactions allocations related with passed bank transactions list
|
|
14130
14166
|
*/
|
|
@@ -17610,7 +17646,6 @@
|
|
|
17610
17646
|
var _this = this;
|
|
17611
17647
|
if (force === void 0) { force = false; }
|
|
17612
17648
|
if (this._serviceSubscription === undefined || force) {
|
|
17613
|
-
console.log('getSubscription');
|
|
17614
17649
|
this._serviceSubscription = null;
|
|
17615
17650
|
this.http.get(this.environment.apiV2 + "/subscriptions/last")
|
|
17616
17651
|
.pipe(operators.map(function (response) {
|