taxtank-core 0.23.5 → 0.23.8
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 +25 -38
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/models/chart-accounts/chart-accounts-categories.const.js +3 -7
- package/esm2015/lib/services/http/bank/bank-connection/bank-connection.service.js +3 -1
- package/esm2015/lib/services/http/transaction/transaction.service.js +1 -5
- package/fesm2015/taxtank-core.js +24 -37
- package/fesm2015/taxtank-core.js.map +1 -1
- package/package.json +1 -1
- package/esm2015/lib/services/http/transaction/messages.enum.js +0 -7
- package/lib/services/http/transaction/messages.enum.d.ts +0 -5
|
@@ -2516,15 +2516,11 @@
|
|
|
2516
2516
|
],
|
|
2517
2517
|
workExpense: [
|
|
2518
2518
|
exports.ChartAccountsCategoryEnum.WORK_EXPENSE,
|
|
2519
|
-
exports.ChartAccountsCategoryEnum.OTHER_EXPENSE
|
|
2520
|
-
// @TODO Alex why?
|
|
2521
|
-
exports.ChartAccountsCategoryEnum.PERSONAL_EXPENSE
|
|
2519
|
+
exports.ChartAccountsCategoryEnum.OTHER_EXPENSE
|
|
2522
2520
|
],
|
|
2523
2521
|
workIncome: [
|
|
2524
2522
|
exports.ChartAccountsCategoryEnum.WORK_INCOME,
|
|
2525
|
-
exports.ChartAccountsCategoryEnum.OTHER_INCOME
|
|
2526
|
-
// @TODO Alex why?
|
|
2527
|
-
exports.ChartAccountsCategoryEnum.PERSONAL_INCOME
|
|
2523
|
+
exports.ChartAccountsCategoryEnum.OTHER_INCOME
|
|
2528
2524
|
],
|
|
2529
2525
|
soleExpense: [
|
|
2530
2526
|
exports.ChartAccountsCategoryEnum.SOLE_EXPENSE,
|
|
@@ -5414,6 +5410,17 @@
|
|
|
5414
5410
|
return BankAccountCollection;
|
|
5415
5411
|
}(Collection));
|
|
5416
5412
|
|
|
5413
|
+
/**
|
|
5414
|
+
* any event happened in the app, which needs to be handled somehow (distributed to other part of the app)
|
|
5415
|
+
*/
|
|
5416
|
+
var AppEvent = /** @class */ (function () {
|
|
5417
|
+
function AppEvent(type, payload) {
|
|
5418
|
+
this.type = type;
|
|
5419
|
+
this.payload = payload;
|
|
5420
|
+
}
|
|
5421
|
+
return AppEvent;
|
|
5422
|
+
}());
|
|
5423
|
+
|
|
5417
5424
|
/**
|
|
5418
5425
|
* BankConnection means user account at specific bank (usually each user has only one at the same bank)
|
|
5419
5426
|
* service handles BankConnection management
|
|
@@ -5449,6 +5456,7 @@
|
|
|
5449
5456
|
_this.cacheSubject.next(cloneDeep__default["default"](_this.cache));
|
|
5450
5457
|
}
|
|
5451
5458
|
}
|
|
5459
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.BANK_CONNECTION_ADDED, null));
|
|
5452
5460
|
return classTransformer.plainToClass(BankConnection, connection);
|
|
5453
5461
|
}));
|
|
5454
5462
|
};
|
|
@@ -9034,17 +9042,6 @@
|
|
|
9034
9042
|
classTransformer.Type(function () { return User; })
|
|
9035
9043
|
], EmployeeInvite.prototype, "employee", void 0);
|
|
9036
9044
|
|
|
9037
|
-
/**
|
|
9038
|
-
* any event happened in the app, which needs to be handled somehow (distributed to other part of the app)
|
|
9039
|
-
*/
|
|
9040
|
-
var AppEvent = /** @class */ (function () {
|
|
9041
|
-
function AppEvent(type, payload) {
|
|
9042
|
-
this.type = type;
|
|
9043
|
-
this.payload = payload;
|
|
9044
|
-
}
|
|
9045
|
-
return AppEvent;
|
|
9046
|
-
}());
|
|
9047
|
-
|
|
9048
9045
|
exports.ExportFormatEnum = void 0;
|
|
9049
9046
|
(function (ExportFormatEnum) {
|
|
9050
9047
|
ExportFormatEnum["PDF"] = "PDF";
|
|
@@ -11377,7 +11374,7 @@
|
|
|
11377
11374
|
}]
|
|
11378
11375
|
}] });
|
|
11379
11376
|
|
|
11380
|
-
var MessagesEnum
|
|
11377
|
+
var MessagesEnum;
|
|
11381
11378
|
(function (MessagesEnum) {
|
|
11382
11379
|
MessagesEnum["VEHICLE_CREATED"] = "Vehicle created successfully";
|
|
11383
11380
|
MessagesEnum["VEHICLE_UPDATED"] = "Vehicle updated successfully";
|
|
@@ -11388,7 +11385,7 @@
|
|
|
11388
11385
|
MessagesEnum["VEHICLE_LOGBOOK_CREATED"] = "Vehicle logbook created successfully";
|
|
11389
11386
|
MessagesEnum["VEHICLE_LOGBOOK_UPDATED"] = "Vehicle logbook updated successfully";
|
|
11390
11387
|
MessagesEnum["VEHICLE_LOGBOOK_DELETED"] = "Vehicle logbook deleted successfully";
|
|
11391
|
-
})(MessagesEnum
|
|
11388
|
+
})(MessagesEnum || (MessagesEnum = {}));
|
|
11392
11389
|
|
|
11393
11390
|
var VehicleClaimService = /** @class */ (function (_super) {
|
|
11394
11391
|
__extends(VehicleClaimService, _super);
|
|
@@ -11396,9 +11393,9 @@
|
|
|
11396
11393
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
11397
11394
|
_this.modelClass = VehicleClaim;
|
|
11398
11395
|
_this.url = 'vehicle-claims';
|
|
11399
|
-
_this.messageCreated = MessagesEnum
|
|
11400
|
-
_this.messageUpdated = MessagesEnum
|
|
11401
|
-
_this.messageDeleted = MessagesEnum
|
|
11396
|
+
_this.messageCreated = MessagesEnum.VEHICLE_CLAIM_CREATED;
|
|
11397
|
+
_this.messageUpdated = MessagesEnum.VEHICLE_CLAIM_UPDATED;
|
|
11398
|
+
_this.messageDeleted = MessagesEnum.VEHICLE_CLAIM_DELETED;
|
|
11402
11399
|
return _this;
|
|
11403
11400
|
}
|
|
11404
11401
|
return VehicleClaimService;
|
|
@@ -11425,13 +11422,6 @@
|
|
|
11425
11422
|
return list;
|
|
11426
11423
|
}
|
|
11427
11424
|
|
|
11428
|
-
var MessagesEnum;
|
|
11429
|
-
(function (MessagesEnum) {
|
|
11430
|
-
MessagesEnum["DELETED_MESSAGE"] = "Transaction deleted";
|
|
11431
|
-
MessagesEnum["UPDATED_MESSAGE"] = "Transaction updated";
|
|
11432
|
-
MessagesEnum["CREATED_MESSAGE"] = "Transaction(s) created";
|
|
11433
|
-
})(MessagesEnum || (MessagesEnum = {}));
|
|
11434
|
-
|
|
11435
11425
|
/**
|
|
11436
11426
|
* Service for transactions business logic
|
|
11437
11427
|
*/
|
|
@@ -11569,7 +11559,6 @@
|
|
|
11569
11559
|
_this.updateCache();
|
|
11570
11560
|
}
|
|
11571
11561
|
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTIONS_CREATED, addedTransactions));
|
|
11572
|
-
_this.toastService.success(MessagesEnum.CREATED_MESSAGE);
|
|
11573
11562
|
return addedTransactions;
|
|
11574
11563
|
}));
|
|
11575
11564
|
};
|
|
@@ -11607,7 +11596,6 @@
|
|
|
11607
11596
|
_this.addBatch(childTransactionsToAdd).subscribe();
|
|
11608
11597
|
}
|
|
11609
11598
|
}
|
|
11610
|
-
_this.toastService.success(MessagesEnum.UPDATED_MESSAGE);
|
|
11611
11599
|
replace(_this.cache, updatedTransaction);
|
|
11612
11600
|
_this.updateCache();
|
|
11613
11601
|
return updatedTransaction;
|
|
@@ -11656,7 +11644,6 @@
|
|
|
11656
11644
|
return transaction.id !== model.id && ((_a = transaction.parentTransaction) === null || _a === void 0 ? void 0 : _a.id) !== model.id;
|
|
11657
11645
|
});
|
|
11658
11646
|
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTION_DELETED, model));
|
|
11659
|
-
_this.toastService.success(MessagesEnum.DELETED_MESSAGE);
|
|
11660
11647
|
_this.updateCache();
|
|
11661
11648
|
_this.transactionDeleted.emit(model);
|
|
11662
11649
|
}));
|
|
@@ -15279,9 +15266,9 @@
|
|
|
15279
15266
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
15280
15267
|
_this.url = 'vehicles';
|
|
15281
15268
|
_this.modelClass = Vehicle;
|
|
15282
|
-
_this.messageCreated = MessagesEnum
|
|
15283
|
-
_this.messageUpdated = MessagesEnum
|
|
15284
|
-
_this.messageDeleted = MessagesEnum
|
|
15269
|
+
_this.messageCreated = MessagesEnum.VEHICLE_CREATED;
|
|
15270
|
+
_this.messageUpdated = MessagesEnum.VEHICLE_UPDATED;
|
|
15271
|
+
_this.messageDeleted = MessagesEnum.VEHICLE_DELETED;
|
|
15285
15272
|
return _this;
|
|
15286
15273
|
}
|
|
15287
15274
|
VehicleService.prototype.listenEvents = function () {
|
|
@@ -15357,7 +15344,7 @@
|
|
|
15357
15344
|
.pipe(operators.map(function (vehicleLogbookBase) {
|
|
15358
15345
|
var newVehicleLogbook = classTransformer.plainToClass(VehicleLogbook, vehicleLogbookBase);
|
|
15359
15346
|
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.VEHICLE_LOGBOOK_CREATED, { logbook: newVehicleLogbook, vehicleId: vehicleId }));
|
|
15360
|
-
_this.toastService.success(MessagesEnum
|
|
15347
|
+
_this.toastService.success(MessagesEnum.VEHICLE_LOGBOOK_CREATED);
|
|
15361
15348
|
return newVehicleLogbook;
|
|
15362
15349
|
}));
|
|
15363
15350
|
};
|
|
@@ -15366,7 +15353,7 @@
|
|
|
15366
15353
|
return this.http.put(this.environment.apiV2 + "/vehicles/" + vehicleId + "/logbooks/" + logbook.id, logbook).pipe(operators.map(function (vehicleLogbookBase) {
|
|
15367
15354
|
var updatedVehicleLogbook = classTransformer.plainToClass(VehicleLogbook, vehicleLogbookBase);
|
|
15368
15355
|
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.VEHICLE_LOGBOOK_UPDATED, { logbook: updatedVehicleLogbook, vehicleId: vehicleId }));
|
|
15369
|
-
_this.toastService.success(MessagesEnum
|
|
15356
|
+
_this.toastService.success(MessagesEnum.VEHICLE_LOGBOOK_UPDATED);
|
|
15370
15357
|
return classTransformer.plainToClass(VehicleLogbook, updatedVehicleLogbook);
|
|
15371
15358
|
}));
|
|
15372
15359
|
};
|
|
@@ -15375,7 +15362,7 @@
|
|
|
15375
15362
|
return this.http.delete(this.environment.apiV2 + "/vehicles/" + vehicleId + "/logbooks/" + logbook.id)
|
|
15376
15363
|
.pipe(operators.map(function () {
|
|
15377
15364
|
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.VEHICLE_LOGBOOK_DELETED, { logbook: logbook, vehicleId: vehicleId }));
|
|
15378
|
-
_this.toastService.success(MessagesEnum
|
|
15365
|
+
_this.toastService.success(MessagesEnum.VEHICLE_LOGBOOK_DELETED);
|
|
15379
15366
|
}));
|
|
15380
15367
|
};
|
|
15381
15368
|
return VehicleLogbookService;
|