taxtank-core 0.23.4 → 0.23.7

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.
@@ -4479,9 +4479,13 @@
4479
4479
  if (items === void 0) { items = []; }
4480
4480
  return new this.collectionConstructor(items);
4481
4481
  };
4482
- CollectionDictionary.prototype.length = function () {
4483
- return this.keys.length;
4484
- };
4482
+ Object.defineProperty(CollectionDictionary.prototype, "length", {
4483
+ get: function () {
4484
+ return this.keys.length;
4485
+ },
4486
+ enumerable: false,
4487
+ configurable: true
4488
+ });
4485
4489
  /**
4486
4490
  * @Todo find a better solution to get list of the sorted keys
4487
4491
  * Get array of the "keys" by provided order
@@ -5410,6 +5414,17 @@
5410
5414
  return BankAccountCollection;
5411
5415
  }(Collection));
5412
5416
 
5417
+ /**
5418
+ * any event happened in the app, which needs to be handled somehow (distributed to other part of the app)
5419
+ */
5420
+ var AppEvent = /** @class */ (function () {
5421
+ function AppEvent(type, payload) {
5422
+ this.type = type;
5423
+ this.payload = payload;
5424
+ }
5425
+ return AppEvent;
5426
+ }());
5427
+
5413
5428
  /**
5414
5429
  * BankConnection means user account at specific bank (usually each user has only one at the same bank)
5415
5430
  * service handles BankConnection management
@@ -5445,6 +5460,7 @@
5445
5460
  _this.cacheSubject.next(cloneDeep__default["default"](_this.cache));
5446
5461
  }
5447
5462
  }
5463
+ _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.BANK_CONNECTION_ADDED, null));
5448
5464
  return classTransformer.plainToClass(BankConnection, connection);
5449
5465
  }));
5450
5466
  };
@@ -9030,17 +9046,6 @@
9030
9046
  classTransformer.Type(function () { return User; })
9031
9047
  ], EmployeeInvite.prototype, "employee", void 0);
9032
9048
 
9033
- /**
9034
- * any event happened in the app, which needs to be handled somehow (distributed to other part of the app)
9035
- */
9036
- var AppEvent = /** @class */ (function () {
9037
- function AppEvent(type, payload) {
9038
- this.type = type;
9039
- this.payload = payload;
9040
- }
9041
- return AppEvent;
9042
- }());
9043
-
9044
9049
  exports.ExportFormatEnum = void 0;
9045
9050
  (function (ExportFormatEnum) {
9046
9051
  ExportFormatEnum["PDF"] = "PDF";
@@ -11373,7 +11378,7 @@
11373
11378
  }]
11374
11379
  }] });
11375
11380
 
11376
- var MessagesEnum$1;
11381
+ var MessagesEnum;
11377
11382
  (function (MessagesEnum) {
11378
11383
  MessagesEnum["VEHICLE_CREATED"] = "Vehicle created successfully";
11379
11384
  MessagesEnum["VEHICLE_UPDATED"] = "Vehicle updated successfully";
@@ -11384,7 +11389,7 @@
11384
11389
  MessagesEnum["VEHICLE_LOGBOOK_CREATED"] = "Vehicle logbook created successfully";
11385
11390
  MessagesEnum["VEHICLE_LOGBOOK_UPDATED"] = "Vehicle logbook updated successfully";
11386
11391
  MessagesEnum["VEHICLE_LOGBOOK_DELETED"] = "Vehicle logbook deleted successfully";
11387
- })(MessagesEnum$1 || (MessagesEnum$1 = {}));
11392
+ })(MessagesEnum || (MessagesEnum = {}));
11388
11393
 
11389
11394
  var VehicleClaimService = /** @class */ (function (_super) {
11390
11395
  __extends(VehicleClaimService, _super);
@@ -11392,9 +11397,9 @@
11392
11397
  var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
11393
11398
  _this.modelClass = VehicleClaim;
11394
11399
  _this.url = 'vehicle-claims';
11395
- _this.messageCreated = MessagesEnum$1.VEHICLE_CLAIM_CREATED;
11396
- _this.messageUpdated = MessagesEnum$1.VEHICLE_CLAIM_UPDATED;
11397
- _this.messageDeleted = MessagesEnum$1.VEHICLE_CLAIM_DELETED;
11400
+ _this.messageCreated = MessagesEnum.VEHICLE_CLAIM_CREATED;
11401
+ _this.messageUpdated = MessagesEnum.VEHICLE_CLAIM_UPDATED;
11402
+ _this.messageDeleted = MessagesEnum.VEHICLE_CLAIM_DELETED;
11398
11403
  return _this;
11399
11404
  }
11400
11405
  return VehicleClaimService;
@@ -11421,13 +11426,6 @@
11421
11426
  return list;
11422
11427
  }
11423
11428
 
11424
- var MessagesEnum;
11425
- (function (MessagesEnum) {
11426
- MessagesEnum["DELETED_MESSAGE"] = "Transaction deleted";
11427
- MessagesEnum["UPDATED_MESSAGE"] = "Transaction updated";
11428
- MessagesEnum["CREATED_MESSAGE"] = "Transaction(s) created";
11429
- })(MessagesEnum || (MessagesEnum = {}));
11430
-
11431
11429
  /**
11432
11430
  * Service for transactions business logic
11433
11431
  */
@@ -11565,7 +11563,6 @@
11565
11563
  _this.updateCache();
11566
11564
  }
11567
11565
  _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTIONS_CREATED, addedTransactions));
11568
- _this.toastService.success(MessagesEnum.CREATED_MESSAGE);
11569
11566
  return addedTransactions;
11570
11567
  }));
11571
11568
  };
@@ -11603,7 +11600,6 @@
11603
11600
  _this.addBatch(childTransactionsToAdd).subscribe();
11604
11601
  }
11605
11602
  }
11606
- _this.toastService.success(MessagesEnum.UPDATED_MESSAGE);
11607
11603
  replace(_this.cache, updatedTransaction);
11608
11604
  _this.updateCache();
11609
11605
  return updatedTransaction;
@@ -11652,7 +11648,6 @@
11652
11648
  return transaction.id !== model.id && ((_a = transaction.parentTransaction) === null || _a === void 0 ? void 0 : _a.id) !== model.id;
11653
11649
  });
11654
11650
  _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTION_DELETED, model));
11655
- _this.toastService.success(MessagesEnum.DELETED_MESSAGE);
11656
11651
  _this.updateCache();
11657
11652
  _this.transactionDeleted.emit(model);
11658
11653
  }));
@@ -15275,9 +15270,9 @@
15275
15270
  var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
15276
15271
  _this.url = 'vehicles';
15277
15272
  _this.modelClass = Vehicle;
15278
- _this.messageCreated = MessagesEnum$1.VEHICLE_CREATED;
15279
- _this.messageUpdated = MessagesEnum$1.VEHICLE_UPDATED;
15280
- _this.messageDeleted = MessagesEnum$1.VEHICLE_DELETED;
15273
+ _this.messageCreated = MessagesEnum.VEHICLE_CREATED;
15274
+ _this.messageUpdated = MessagesEnum.VEHICLE_UPDATED;
15275
+ _this.messageDeleted = MessagesEnum.VEHICLE_DELETED;
15281
15276
  return _this;
15282
15277
  }
15283
15278
  VehicleService.prototype.listenEvents = function () {
@@ -15353,7 +15348,7 @@
15353
15348
  .pipe(operators.map(function (vehicleLogbookBase) {
15354
15349
  var newVehicleLogbook = classTransformer.plainToClass(VehicleLogbook, vehicleLogbookBase);
15355
15350
  _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.VEHICLE_LOGBOOK_CREATED, { logbook: newVehicleLogbook, vehicleId: vehicleId }));
15356
- _this.toastService.success(MessagesEnum$1.VEHICLE_LOGBOOK_CREATED);
15351
+ _this.toastService.success(MessagesEnum.VEHICLE_LOGBOOK_CREATED);
15357
15352
  return newVehicleLogbook;
15358
15353
  }));
15359
15354
  };
@@ -15362,7 +15357,7 @@
15362
15357
  return this.http.put(this.environment.apiV2 + "/vehicles/" + vehicleId + "/logbooks/" + logbook.id, logbook).pipe(operators.map(function (vehicleLogbookBase) {
15363
15358
  var updatedVehicleLogbook = classTransformer.plainToClass(VehicleLogbook, vehicleLogbookBase);
15364
15359
  _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.VEHICLE_LOGBOOK_UPDATED, { logbook: updatedVehicleLogbook, vehicleId: vehicleId }));
15365
- _this.toastService.success(MessagesEnum$1.VEHICLE_LOGBOOK_UPDATED);
15360
+ _this.toastService.success(MessagesEnum.VEHICLE_LOGBOOK_UPDATED);
15366
15361
  return classTransformer.plainToClass(VehicleLogbook, updatedVehicleLogbook);
15367
15362
  }));
15368
15363
  };
@@ -15371,7 +15366,7 @@
15371
15366
  return this.http.delete(this.environment.apiV2 + "/vehicles/" + vehicleId + "/logbooks/" + logbook.id)
15372
15367
  .pipe(operators.map(function () {
15373
15368
  _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.VEHICLE_LOGBOOK_DELETED, { logbook: logbook, vehicleId: vehicleId }));
15374
- _this.toastService.success(MessagesEnum$1.VEHICLE_LOGBOOK_DELETED);
15369
+ _this.toastService.success(MessagesEnum.VEHICLE_LOGBOOK_DELETED);
15375
15370
  }));
15376
15371
  };
15377
15372
  return VehicleLogbookService;