taxtank-core 0.16.6 → 0.16.9
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 +83 -58
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/db/Enums/income-source-type-list-salary.enum.js +1 -1
- package/esm2015/lib/db/Enums/income-source-type-list-sole.enum.js +5 -0
- package/esm2015/lib/db/Enums/income-source-type-list-work.enum.js +1 -1
- package/esm2015/lib/db/Enums/income-source-type.enum.js +1 -1
- package/esm2015/lib/db/Enums/property/property-category-list.enum.js +2 -3
- package/esm2015/lib/models/account-setup/account-setup-items.const.js +2 -2
- package/esm2015/lib/models/event/app-event-type.enum.js +38 -37
- package/esm2015/lib/models/toast/toast.js +2 -1
- package/esm2015/lib/services/account-setup/account-setup.service.js +31 -17
- package/esm2015/lib/services/http/bank/basiq/basiq.service.js +4 -2
- package/esm2015/lib/services/http/firm/client-income/client-income-types.service.js +3 -1
- package/esm2015/lib/services/http/rest/rest.service.js +2 -1
- package/esm2015/public-api.js +2 -2
- package/fesm2015/taxtank-core.js +80 -56
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/db/Enums/income-source-type-list-sole.enum.d.ts +3 -0
- package/lib/db/Enums/property/property-category-list.enum.d.ts +1 -1
- package/lib/models/event/app-event-type.enum.d.ts +37 -36
- package/lib/models/toast/toast.d.ts +1 -0
- package/lib/services/http/bank/basiq/basiq.service.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -3951,8 +3951,7 @@
|
|
|
3951
3951
|
exports.PropertyCategoryListEnum = void 0;
|
|
3952
3952
|
(function (PropertyCategoryListEnum) {
|
|
3953
3953
|
PropertyCategoryListEnum[PropertyCategoryListEnum["OWNER_OCCUPIED"] = 3] = "OWNER_OCCUPIED";
|
|
3954
|
-
|
|
3955
|
-
PropertyCategoryListEnum[PropertyCategoryListEnum["VACANT_LAND"] = 6] = "VACANT_LAND";
|
|
3954
|
+
PropertyCategoryListEnum[PropertyCategoryListEnum["VACANT_LAND"] = 5] = "VACANT_LAND";
|
|
3956
3955
|
})(exports.PropertyCategoryListEnum || (exports.PropertyCategoryListEnum = {}));
|
|
3957
3956
|
|
|
3958
3957
|
exports.TaxExemptionMetadataEnum = void 0;
|
|
@@ -4372,10 +4371,10 @@
|
|
|
4372
4371
|
return IncomeSourceType;
|
|
4373
4372
|
}(AbstractModel));
|
|
4374
4373
|
|
|
4375
|
-
|
|
4374
|
+
var IncomeSourceTypeListSalaryEnum;
|
|
4376
4375
|
(function (IncomeSourceTypeListSalaryEnum) {
|
|
4377
4376
|
IncomeSourceTypeListSalaryEnum[IncomeSourceTypeListSalaryEnum["BONUSES"] = 1] = "BONUSES";
|
|
4378
|
-
})(
|
|
4377
|
+
})(IncomeSourceTypeListSalaryEnum || (IncomeSourceTypeListSalaryEnum = {}));
|
|
4379
4378
|
|
|
4380
4379
|
exports.IncomeSourceTypeListWorkEnum = void 0;
|
|
4381
4380
|
(function (IncomeSourceTypeListWorkEnum) {
|
|
@@ -4401,7 +4400,7 @@
|
|
|
4401
4400
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
4402
4401
|
}
|
|
4403
4402
|
IncomeSourceType.prototype.isSalary = function () {
|
|
4404
|
-
return !!
|
|
4403
|
+
return !!IncomeSourceTypeListSalaryEnum[this.id];
|
|
4405
4404
|
};
|
|
4406
4405
|
IncomeSourceType.prototype.isWork = function () {
|
|
4407
4406
|
return !!exports.IncomeSourceTypeListWorkEnum[this.id];
|
|
@@ -6090,6 +6089,11 @@
|
|
|
6090
6089
|
DepreciationWriteOffAmountEnum[DepreciationWriteOffAmountEnum["BORROWING_EXPENSES"] = 100] = "BORROWING_EXPENSES";
|
|
6091
6090
|
})(exports.DepreciationWriteOffAmountEnum || (exports.DepreciationWriteOffAmountEnum = {}));
|
|
6092
6091
|
|
|
6092
|
+
exports.IncomeSourceTypeListSoleEnum = void 0;
|
|
6093
|
+
(function (IncomeSourceTypeListSoleEnum) {
|
|
6094
|
+
IncomeSourceTypeListSoleEnum[IncomeSourceTypeListSoleEnum["SOLE_TRADER"] = 7] = "SOLE_TRADER";
|
|
6095
|
+
})(exports.IncomeSourceTypeListSoleEnum || (exports.IncomeSourceTypeListSoleEnum = {}));
|
|
6096
|
+
|
|
6093
6097
|
exports.InviteStatusEnum = void 0;
|
|
6094
6098
|
(function (InviteStatusEnum) {
|
|
6095
6099
|
InviteStatusEnum[InviteStatusEnum["PENDING"] = 1] = "PENDING";
|
|
@@ -7576,42 +7580,43 @@
|
|
|
7576
7580
|
AppEventTypeEnum[AppEventTypeEnum["BANK_ACCOUNT_UPDATED"] = 3] = "BANK_ACCOUNT_UPDATED";
|
|
7577
7581
|
AppEventTypeEnum[AppEventTypeEnum["BANK_TRANSACTION_ALLOCATED"] = 4] = "BANK_TRANSACTION_ALLOCATED";
|
|
7578
7582
|
AppEventTypeEnum[AppEventTypeEnum["BASIQ_CONSENT_UPDATED"] = 5] = "BASIQ_CONSENT_UPDATED";
|
|
7579
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7580
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7581
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7582
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7583
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7584
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7585
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7586
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7587
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7588
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7589
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7590
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7591
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7592
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7593
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7594
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7595
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7596
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7597
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7598
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7599
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7600
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7601
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7602
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7603
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7604
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7605
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7606
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7607
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7608
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7609
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7610
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7611
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7612
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7613
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7614
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
7583
|
+
AppEventTypeEnum[AppEventTypeEnum["BASIQ_CONNECTION_UPDATED"] = 6] = "BASIQ_CONNECTION_UPDATED";
|
|
7584
|
+
AppEventTypeEnum[AppEventTypeEnum["CLIENT_INVITE_ACCEPTED"] = 7] = "CLIENT_INVITE_ACCEPTED";
|
|
7585
|
+
AppEventTypeEnum[AppEventTypeEnum["CLIENT_OPEN_CHAT"] = 8] = "CLIENT_OPEN_CHAT";
|
|
7586
|
+
AppEventTypeEnum[AppEventTypeEnum["CLIENT_TRANSFER_TO_OTHER_EMPLOYEE"] = 9] = "CLIENT_TRANSFER_TO_OTHER_EMPLOYEE";
|
|
7587
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_DELETED"] = 10] = "DEPRECIATION_DELETED";
|
|
7588
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATIONS_CREATED"] = 11] = "DEPRECIATIONS_CREATED";
|
|
7589
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_CREATED"] = 12] = "INCOME_SOURCES_CREATED";
|
|
7590
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_UPDATED"] = 13] = "INCOME_SOURCES_UPDATED";
|
|
7591
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_CREATED"] = 14] = "INCOME_SOURCES_FORECASTS_CREATED";
|
|
7592
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_UPDATED"] = 15] = "INCOME_SOURCES_FORECASTS_UPDATED";
|
|
7593
|
+
AppEventTypeEnum[AppEventTypeEnum["LOAN_UPDATED"] = 16] = "LOAN_UPDATED";
|
|
7594
|
+
AppEventTypeEnum[AppEventTypeEnum["LOAN_PAYOUT_UPDATED"] = 17] = "LOAN_PAYOUT_UPDATED";
|
|
7595
|
+
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_CREATED"] = 18] = "MESSAGE_CREATED";
|
|
7596
|
+
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_CREATED"] = 19] = "MESSAGE_FILE_CREATED";
|
|
7597
|
+
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_DELETED"] = 20] = "MESSAGE_FILE_DELETED";
|
|
7598
|
+
AppEventTypeEnum[AppEventTypeEnum["NOTIFICATION_ADDED"] = 21] = "NOTIFICATION_ADDED";
|
|
7599
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_UPDATED_WITH_DOCUMENT"] = 22] = "PROPERTY_UPDATED_WITH_DOCUMENT";
|
|
7600
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DOCUMENT_ADDED"] = 23] = "PROPERTY_DOCUMENT_ADDED";
|
|
7601
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 24] = "PROPERTY_MOVEMENT_CREATED";
|
|
7602
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 25] = "PROPERTY_MOVEMENT_UPDATED";
|
|
7603
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 26] = "PROPERTY_MOVEMENT_DELETED";
|
|
7604
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SHARE_UPDATED"] = 27] = "PROPERTY_SHARE_UPDATED";
|
|
7605
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 28] = "PROPERTY_SUBSCRIPTION_ADDED";
|
|
7606
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 29] = "PROPERTY_SUBSCRIPTION_DELETED";
|
|
7607
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 30] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
|
|
7608
|
+
AppEventTypeEnum[AppEventTypeEnum["SERVICE_SUBSCRIPTION_UPDATED"] = 31] = "SERVICE_SUBSCRIPTION_UPDATED";
|
|
7609
|
+
AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 32] = "TAX_REVIEW_UPDATED";
|
|
7610
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 33] = "TRANSACTION_CREATED";
|
|
7611
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 34] = "TRANSACTION_DELETED";
|
|
7612
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 35] = "TRANSACTION_UPDATED";
|
|
7613
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 36] = "TRANSACTIONS_CREATED";
|
|
7614
|
+
AppEventTypeEnum[AppEventTypeEnum["USER_UPDATED"] = 37] = "USER_UPDATED";
|
|
7615
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_UPDATED"] = 38] = "VEHICLE_CLAIM_UPDATED";
|
|
7616
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_CREATED"] = 39] = "VEHICLE_CLAIM_CREATED";
|
|
7617
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 40] = "VEHICLE_LOGBOOK_CREATED";
|
|
7618
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 41] = "VEHICLE_LOGBOOK_UPDATED";
|
|
7619
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 42] = "VEHICLE_LOGBOOK_DELETED";
|
|
7615
7620
|
})(exports.AppEventTypeEnum || (exports.AppEventTypeEnum = {}));
|
|
7616
7621
|
|
|
7617
7622
|
/**
|
|
@@ -8676,6 +8681,7 @@
|
|
|
8676
8681
|
var Toast = /** @class */ (function () {
|
|
8677
8682
|
function Toast() {
|
|
8678
8683
|
this.duration = 3000;
|
|
8684
|
+
this.autoClose = true;
|
|
8679
8685
|
}
|
|
8680
8686
|
return Toast;
|
|
8681
8687
|
}());
|
|
@@ -8897,7 +8903,7 @@
|
|
|
8897
8903
|
clientIncomeTypes: ['sole']
|
|
8898
8904
|
}),
|
|
8899
8905
|
_a[AccountSetupItemsEnum.TRANSACTION] = classTransformer.plainToClass(AccountSetupItem, {
|
|
8900
|
-
title: '
|
|
8906
|
+
title: 'Allocate transactions',
|
|
8901
8907
|
description: 'Select one or multiple transactions, the category from the dropdown and attach your receipt. It’s that simple to capture every possible deduction, and keep organised all throughout the year.',
|
|
8902
8908
|
url: '/client/bank-feeds',
|
|
8903
8909
|
urlFragment: 'allocationProductTour',
|
|
@@ -8916,6 +8922,8 @@
|
|
|
8916
8922
|
ClientIncomeTypesService.prototype.get = function () {
|
|
8917
8923
|
var _this = this;
|
|
8918
8924
|
if (!this.cache) {
|
|
8925
|
+
// @TODO alex fix everywhere, start with rest service
|
|
8926
|
+
this.cache = classTransformer.plainToClass(ClientIncomeTypes, {});
|
|
8919
8927
|
this.http.get(this.environment.apiV2 + "/client-income-types")
|
|
8920
8928
|
.pipe(operators.map(function (response) {
|
|
8921
8929
|
return classTransformer.plainToClass(ClientIncomeTypes, response['hydra:member'][0], { excludePrefixes: ['@'] });
|
|
@@ -9054,6 +9062,7 @@
|
|
|
9054
9062
|
*/
|
|
9055
9063
|
RestService.prototype.get = function () {
|
|
9056
9064
|
if (!this.cache) {
|
|
9065
|
+
this.cache = [];
|
|
9057
9066
|
this.fetch().subscribe();
|
|
9058
9067
|
}
|
|
9059
9068
|
return this.cacheSubject.asObservable();
|
|
@@ -10043,12 +10052,22 @@
|
|
|
10043
10052
|
AccountSetupService.prototype.get = function () {
|
|
10044
10053
|
var _this = this;
|
|
10045
10054
|
if (!this.cache) {
|
|
10046
|
-
this.
|
|
10055
|
+
this.cache = new AccountSetupItemCollection([]);
|
|
10056
|
+
this.clientIncomeTypesService.get()
|
|
10057
|
+
.pipe(
|
|
10058
|
+
// we need account setup only when user selected at least one income type
|
|
10059
|
+
operators.filter(function (incomeTypes) { return !!incomeTypes.length; }), operators.mergeMap(function (incomeTypes) {
|
|
10047
10060
|
_this.clientIncomeTypesId = incomeTypes.id;
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10061
|
+
return _this.createBatch(incomeTypes);
|
|
10062
|
+
}))
|
|
10063
|
+
.subscribe(function (items) {
|
|
10064
|
+
switch (true) {
|
|
10065
|
+
case !_this.cache:
|
|
10066
|
+
case _this.cache.getBy('isCompleted', true).length !== items.getBy('isCompleted', true).length:
|
|
10067
|
+
case _this.cache.length !== items.length:
|
|
10068
|
+
_this.cache = cloneDeep__default["default"](items);
|
|
10069
|
+
_this.cacheSubject.next(_this.cache);
|
|
10070
|
+
}
|
|
10052
10071
|
});
|
|
10053
10072
|
}
|
|
10054
10073
|
return this.cacheSubject.asObservable();
|
|
@@ -10068,6 +10087,9 @@
|
|
|
10068
10087
|
if (result.length) {
|
|
10069
10088
|
item.isCompleted = true;
|
|
10070
10089
|
}
|
|
10090
|
+
else {
|
|
10091
|
+
item.isCompleted = false;
|
|
10092
|
+
}
|
|
10071
10093
|
return item;
|
|
10072
10094
|
}));
|
|
10073
10095
|
};
|
|
@@ -10079,7 +10101,7 @@
|
|
|
10079
10101
|
var batch = [];
|
|
10080
10102
|
// Salary item is completed when user added salary income source
|
|
10081
10103
|
if (incomeTypes.salary) {
|
|
10082
|
-
batch.push(this.create(AccountSetupItemsEnum.SALARY, this.getIncomeSourcesByType(exports.IncomeSourceTypeEnum.
|
|
10104
|
+
batch.push(this.create(AccountSetupItemsEnum.SALARY, this.getIncomeSourcesByType(exports.IncomeSourceTypeEnum.WORK)));
|
|
10083
10105
|
}
|
|
10084
10106
|
// Other income item is completed when user added at least one other income source
|
|
10085
10107
|
if (incomeTypes.dividends || incomeTypes.other) {
|
|
@@ -10105,7 +10127,7 @@
|
|
|
10105
10127
|
// }
|
|
10106
10128
|
// Allocation item is completed when user added at least one transaction allocation
|
|
10107
10129
|
batch.push(this.create(AccountSetupItemsEnum.TRANSACTION, this.transactionAllocationService.get()));
|
|
10108
|
-
return batch;
|
|
10130
|
+
return rxjs.combineLatest(batch).pipe(operators.map(function (items) { return new AccountSetupItemCollection(items); }));
|
|
10109
10131
|
};
|
|
10110
10132
|
/**
|
|
10111
10133
|
* @TODO work with collection when services refactored
|
|
@@ -10119,15 +10141,15 @@
|
|
|
10119
10141
|
* Show logbook item when user has at least 1 vehicle transaction
|
|
10120
10142
|
*/
|
|
10121
10143
|
AccountSetupService.prototype.getLogbookItem = function () {
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
if (
|
|
10128
|
-
return
|
|
10144
|
+
var _this = this;
|
|
10145
|
+
return this.transactionService.get()
|
|
10146
|
+
.pipe(
|
|
10147
|
+
// @TODO Alex: remove map when services start work with collections
|
|
10148
|
+
operators.map(function (transactions) { return new TransactionCollection(transactions); }), operators.mergeMap(function (transactions) {
|
|
10149
|
+
if (transactions.getVehicleTransactions().length) {
|
|
10150
|
+
return _this.create(AccountSetupItemsEnum.WORK_LOGBOOK, _this.vehicleClaimService.get());
|
|
10129
10151
|
}
|
|
10130
|
-
return null;
|
|
10152
|
+
return rxjs.of(null);
|
|
10131
10153
|
}));
|
|
10132
10154
|
};
|
|
10133
10155
|
return AccountSetupService;
|
|
@@ -10504,7 +10526,10 @@
|
|
|
10504
10526
|
* Notify backend to update connections
|
|
10505
10527
|
*/
|
|
10506
10528
|
BasiqService.prototype.updateConnections = function () {
|
|
10507
|
-
|
|
10529
|
+
var _this = this;
|
|
10530
|
+
return this.http.post(this.environment.apiV2 + "/basiq/connections", {}).pipe(operators.map(function (connections) {
|
|
10531
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.BASIQ_CONNECTION_UPDATED, !!connections));
|
|
10532
|
+
}));
|
|
10508
10533
|
};
|
|
10509
10534
|
/**
|
|
10510
10535
|
* access token to use basiq connect ui iframe
|