taxtank-core 0.29.15 → 0.29.17

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.
@@ -1483,7 +1483,7 @@
1483
1483
  return _super !== null && _super.apply(this, arguments) || this;
1484
1484
  }
1485
1485
  return ClientIncomeTypes;
1486
- }(AbstractModel));
1486
+ }(ObservableModel));
1487
1487
 
1488
1488
  var EmployeeDetails$1 = /** @class */ (function (_super) {
1489
1489
  __extends(EmployeeDetails, _super);
@@ -5162,7 +5162,7 @@
5162
5162
  var _this = this;
5163
5163
  this.items = [];
5164
5164
  properties.items.forEach(function (property) {
5165
- var depreciationsByType = new CollectionDictionary(depreciations, 'type');
5165
+ var depreciationsByType = new CollectionDictionary(depreciations.filterBy('property.id', property.id), 'type');
5166
5166
  depreciationsByType.keys.map(function (type) {
5167
5167
  _this.items.push(new PropertyReportItemDepreciation(depreciationsByType.get(type), property, chartAccounts.findBy('id', depreciationsByType.get(type).first.chartAccounts.id)));
5168
5168
  });
@@ -10345,7 +10345,7 @@
10345
10345
  /**
10346
10346
  * Subscribe to http events and run callback.
10347
10347
  * CSE - Cleint Sent Events
10348
- * @param type The class whose changes should be listened for
10348
+ * @param modelClass
10349
10349
  * @param methods The list of http methods should be listened for
10350
10350
  * @param callback The function to be called when event triggered
10351
10351
  */
@@ -10965,6 +10965,23 @@
10965
10965
  _this.resetCache();
10966
10966
  });
10967
10967
  };
10968
+ /**
10969
+ * @TODO remove when the class refactored on RestService
10970
+ * Subscribe to http events and run callback.
10971
+ * CSE - Cleint Sent Events
10972
+ * @param modelClass
10973
+ * @param methods The list of http methods should be listened for
10974
+ * @param callback The function to be called when event triggered
10975
+ */
10976
+ UserService.prototype.listenCSE = function (modelClass, methods, callback) {
10977
+ var _this = this;
10978
+ callback = callback.bind(this);
10979
+ methods.forEach(function (method) {
10980
+ _this.eventDispatcherService.on2(modelClass.getEventName(method)).subscribe(function (data) {
10981
+ callback(data);
10982
+ });
10983
+ });
10984
+ };
10968
10985
  return UserService;
10969
10986
  }());
10970
10987
  UserService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserService, deps: [{ token: i1__namespace.HttpClient }, { token: JwtService }, { token: EventDispatcherService }, { token: SseService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
@@ -15460,7 +15477,6 @@
15460
15477
  }));
15461
15478
  };
15462
15479
  PropertyService.prototype.listenEvents = function () {
15463
- this.cache;
15464
15480
  this.listenShareInviteAccepted();
15465
15481
  // @TODO Alex: consider to refactor property movements logic similar to client-movements
15466
15482
  this.listenMovementsChanges();