taxtank-core 0.33.39 → 0.33.41
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/forms/transaction/transaction.form.mjs +2 -1
- package/esm2022/src/lib/functions/mat-options-functions.mjs +2 -2
- package/esm2022/src/lib/services/http/property/property-messages.enum.mjs +4 -1
- package/esm2022/src/lib/services/http/property/property.service.mjs +12 -2
- package/esm2022/src/lib/services/http/transaction/transaction.service.mjs +9 -18
- package/fesm2022/taxtank-core.mjs +20 -17
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/services/http/property/property-messages.enum.d.ts +4 -1
- package/src/lib/services/http/property/property.service.d.ts +1 -0
- package/src/lib/services/http/transaction/transaction.service.d.ts +2 -8
@@ -12,6 +12,7 @@ export class TransactionForm extends TransactionBaseForm {
|
|
12
12
|
source: new UntypedFormControl(transaction.source || TransactionSourceEnum.BANK_TRANSACTION, Validators.required)
|
13
13
|
}));
|
14
14
|
this.get('date').addValidators([currentFinYearValidator()]);
|
15
|
+
console.log(transaction);
|
15
16
|
// convert child transactions to controls
|
16
17
|
transaction.transactions.map((transaction) => {
|
17
18
|
this.addTransactionControl(transaction);
|
@@ -59,4 +60,4 @@ export class TransactionForm extends TransactionBaseForm {
|
|
59
60
|
return super.submit(Object.assign(data, { transactions: this.buildTransactions(this.currentValue) }), true);
|
60
61
|
}
|
61
62
|
}
|
62
|
-
//# sourceMappingURL=data:application/json;base64,
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24uZm9ybS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9mb3Jtcy90cmFuc2FjdGlvbi90cmFuc2FjdGlvbi5mb3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVB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Wx1ZSkgfSksIHRydWUpO1xuICB9XG59XG4iXX0=
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export function compareMatOptions(option, value) {
|
2
|
-
if (!option) {
|
2
|
+
if (!option || !value) {
|
3
3
|
return false;
|
4
4
|
}
|
5
5
|
return option.id === value.id;
|
@@ -10,4 +10,4 @@ export function displayMatOptions(option) {
|
|
10
10
|
}
|
11
11
|
return option['name'];
|
12
12
|
}
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0LW9wdGlvbnMtZnVuY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2Z1bmN0aW9ucy9tYXQtb3B0aW9ucy1mdW5jdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxVQUFVLGlCQUFpQixDQUFDLE1BQVcsRUFBRSxLQUFVO0lBQ3ZELElBQUksQ0FBQyxNQUFNLElBQUksQ0FBQyxLQUFLLEVBQUU7UUFDckIsT0FBTyxLQUFLLENBQUM7S0FDZDtJQUVELE9BQU8sTUFBTSxDQUFDLEVBQUUsS0FBSyxLQUFLLENBQUMsRUFBRSxDQUFDO0FBQ2hDLENBQUM7QUFFRCxNQUFNLFVBQVUsaUJBQWlCLENBQUMsTUFBYztJQUM5QyxJQUFJLENBQUMsTUFBTSxFQUFFO1FBQ1gsT0FBTyxFQUFFLENBQUM7S0FDWDtJQUVELE9BQU8sTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ3hCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gY29tcGFyZU1hdE9wdGlvbnMob3B0aW9uOiBhbnksIHZhbHVlOiBhbnkpOiBib29sZWFuIHtcclxuICBpZiAoIW9wdGlvbiB8fCAhdmFsdWUpIHtcclxuICAgIHJldHVybiBmYWxzZTtcclxuICB9XHJcblxyXG4gIHJldHVybiBvcHRpb24uaWQgPT09IHZhbHVlLmlkO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gZGlzcGxheU1hdE9wdGlvbnMob3B0aW9uOiBvYmplY3QpOiBzdHJpbmcge1xyXG4gIGlmICghb3B0aW9uKSB7XHJcbiAgICByZXR1cm4gJyc7XHJcbiAgfVxyXG5cclxuICByZXR1cm4gb3B0aW9uWyduYW1lJ107XHJcbn1cclxuIl19
|
@@ -2,5 +2,8 @@ export var PropertyMessagesEnum;
|
|
2
2
|
(function (PropertyMessagesEnum) {
|
3
3
|
PropertyMessagesEnum["PHOTO_UPDATED"] = "Property photo updated";
|
4
4
|
PropertyMessagesEnum["PROPERTY_UPDATED"] = "Property updated";
|
5
|
+
PropertyMessagesEnum["DELETE_CONFIRM"] = "Are you sure you want to delete property?";
|
6
|
+
PropertyMessagesEnum["DELETE"] = "Property deleted";
|
7
|
+
PropertyMessagesEnum["DELETE_500"] = "Only properties without transactions can be removed";
|
5
8
|
})(PropertyMessagesEnum || (PropertyMessagesEnum = {}));
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHktbWVzc2FnZXMuZW51bS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3Byb3BlcnR5L3Byb3BlcnR5LW1lc3NhZ2VzLmVudW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksb0JBTVg7QUFORCxXQUFZLG9CQUFvQjtJQUM5QixnRUFBd0MsQ0FBQTtJQUN4Qyw2REFBcUMsQ0FBQTtJQUNyQyxvRkFBNEQsQ0FBQTtJQUM1RCxtREFBMkIsQ0FBQTtJQUMzQiwwRkFBa0UsQ0FBQTtBQUNwRSxDQUFDLEVBTlcsb0JBQW9CLEtBQXBCLG9CQUFvQixRQU0vQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIFByb3BlcnR5TWVzc2FnZXNFbnVtIHtcbiAgUEhPVE9fVVBEQVRFRCA9ICdQcm9wZXJ0eSBwaG90byB1cGRhdGVkJyxcbiAgUFJPUEVSVFlfVVBEQVRFRCA9ICdQcm9wZXJ0eSB1cGRhdGVkJyxcbiAgREVMRVRFX0NPTkZJUk0gPSAnQXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSBwcm9wZXJ0eT8nLFxuICBERUxFVEUgPSAnUHJvcGVydHkgZGVsZXRlZCcsXG4gIERFTEVURV81MDAgPSAnT25seSBwcm9wZXJ0aWVzIHdpdGhvdXQgdHJhbnNhY3Rpb25zIGNhbiBiZSByZW1vdmVkJ1xufVxuIl19
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import { Inject, Injectable } from '@angular/core';
|
2
|
-
import {
|
2
|
+
import { throwError } from 'rxjs';
|
3
|
+
import { catchError, map } from 'rxjs/operators';
|
3
4
|
import { plainToClass } from 'class-transformer';
|
4
5
|
import { AppEvent, AppEventTypeEnum, Property, PropertyCategoryMovement, PropertySale, PropertyShare, PropertySubscription, PropertyValuation } from '../../../models';
|
5
6
|
import { RestService } from '../rest';
|
6
7
|
import { PropertyCollection } from '../../../collections';
|
7
8
|
import { UserRolesEnum } from 'taxtank-core/common';
|
9
|
+
import { PropertyMessagesEnum } from './property-messages.enum';
|
8
10
|
import * as i0 from "@angular/core";
|
9
11
|
/**
|
10
12
|
* @Todo Alex remove functionality related to PropertyShare
|
@@ -80,6 +82,14 @@ export class PropertyService extends RestService {
|
|
80
82
|
this.updateCache([deactivatedProperty], 'put');
|
81
83
|
}));
|
82
84
|
}
|
85
|
+
delete(property) {
|
86
|
+
return super.delete(property).pipe(catchError((error) => {
|
87
|
+
if (error.status === 500) {
|
88
|
+
this.toastService.error(PropertyMessagesEnum.DELETE_500);
|
89
|
+
}
|
90
|
+
return throwError(() => error);
|
91
|
+
}));
|
92
|
+
}
|
83
93
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertyService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
84
94
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertyService, providedIn: 'root' }); }
|
85
95
|
}
|
@@ -92,4 +102,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
92
102
|
type: Inject,
|
93
103
|
args: ['environment']
|
94
104
|
}] }] });
|
95
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3Byb3BlcnR5L3Byb3BlcnR5LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFNbkQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3JDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQ0wsUUFBUSxFQUNSLGdCQUFnQixFQUNoQixRQUFRLEVBQUUsd0JBQXdCLEVBQ2xDLFlBQVksRUFDWixhQUFhLEVBQ2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cGVydHk6IFByb3BlcnR5KTogT2JzZXJ2YWJsZTx2b2lkPiB7XG4gICAgcmV0dXJuIHN1cGVyLmRlbGV0ZShwcm9wZXJ0eSkucGlwZShcbiAgICAgIGNhdGNoRXJyb3IoKGVycm9yOiBIdHRwRXJyb3JSZXNwb25zZSkgPT4ge1xuICAgICAgICBpZiAoZXJyb3Iuc3RhdHVzID09PSA1MDApIHtcbiAgICAgICAgICB0aGlzLnRvYXN0U2VydmljZS5lcnJvcihQcm9wZXJ0eU1lc3NhZ2VzRW51bS5ERUxFVEVfNTAwKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aHJvd0Vycm9yKCgpID0+IGVycm9yKTtcbiAgICAgIH0pLFxuICAgIClcbiAgfVxufVxuIl19
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { EventEmitter, Inject, Injectable } from '@angular/core';
|
2
2
|
import { map } from 'rxjs/operators';
|
3
|
-
import { replace
|
3
|
+
import { replace } from '../../../functions/array';
|
4
4
|
import { TransactionOperationEnum } from '../../../db/Enums/transaction-operation.enum';
|
5
5
|
import { RestService } from '../rest/rest-old.service';
|
6
6
|
import { AppEvent, AppEventTypeEnum, Depreciation, PropertyShare, Transaction, VehicleClaim } from '../../../models';
|
@@ -36,26 +36,17 @@ export class TransactionService extends RestService {
|
|
36
36
|
this.listenPropertyForecastUpdate();
|
37
37
|
this.listenNotifications();
|
38
38
|
}
|
39
|
-
|
40
|
-
|
41
|
-
*/
|
42
|
-
getAll() {
|
43
|
-
return super.get().pipe(
|
44
|
-
// assign child transactions (fees) to parent transactions
|
45
|
-
map((transactions) => {
|
39
|
+
fetch(path = this.apiUrl, cache = true) {
|
40
|
+
return super.fetch(path, cache).pipe(map(transactions => {
|
46
41
|
transactions.forEach((transaction) => {
|
47
42
|
transaction.transactions = transactions
|
48
43
|
// get list of child transactions
|
49
44
|
.filter((t) => t.parentTransaction && t.parentTransaction.id === transaction.id);
|
50
45
|
});
|
51
|
-
sort(transactions, 'date', false);
|
52
46
|
return transactions;
|
53
47
|
}));
|
54
48
|
}
|
55
|
-
|
56
|
-
* current year transactions
|
57
|
-
*/
|
58
|
-
get() {
|
49
|
+
getCurrentYear() {
|
59
50
|
return super.get().pipe(map((transactions) => new TransactionCollection(transactions).filterByFinancialYear('date').toArray()));
|
60
51
|
}
|
61
52
|
/**
|
@@ -75,24 +66,24 @@ export class TransactionService extends RestService {
|
|
75
66
|
* get transactions related with property
|
76
67
|
*/
|
77
68
|
getByPropertyId(propertyId) {
|
78
|
-
return this.
|
69
|
+
return this.getCurrentYear()
|
79
70
|
.pipe(map((transactions) => transactions.filter((transaction) => transaction.property?.id === propertyId)));
|
80
71
|
}
|
81
72
|
/**
|
82
73
|
* get list of transactions with tank type 'Work'
|
83
74
|
*/
|
84
75
|
getWorkTransactions() {
|
85
|
-
return this.
|
76
|
+
return this.getCurrentYear()
|
86
77
|
.pipe(map((transactions) => transactions.filter((transaction) => transaction.isWorkTank())));
|
87
78
|
}
|
88
79
|
/**
|
89
80
|
* Get list of property holding costs (transactions related to vacant land property)
|
90
81
|
*/
|
91
82
|
getPropertyHoldingCosts(propertyId) {
|
92
|
-
return
|
83
|
+
return this.fetch(`${this.environment.apiV2}/properties/${propertyId}/holding-costs`, false);
|
93
84
|
}
|
94
85
|
getWithoutTaxFreeProperty() {
|
95
|
-
return
|
86
|
+
return this.fetch(`${this.apiUrl}?excludeTaxFreePropertyCategories`, false);
|
96
87
|
}
|
97
88
|
/**
|
98
89
|
* get list of taxable transactions with tank type 'Work'
|
@@ -268,4 +259,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
268
259
|
type: Inject,
|
269
260
|
args: ['environment']
|
270
261
|
}] }] });
|
271
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL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PropertyMessagesEnum;
|
|
13946
13946
|
(function (PropertyMessagesEnum) {
|
13947
13947
|
PropertyMessagesEnum["PHOTO_UPDATED"] = "Property photo updated";
|
13948
13948
|
PropertyMessagesEnum["PROPERTY_UPDATED"] = "Property updated";
|
13949
|
+
PropertyMessagesEnum["DELETE_CONFIRM"] = "Are you sure you want to delete property?";
|
13950
|
+
PropertyMessagesEnum["DELETE"] = "Property deleted";
|
13951
|
+
PropertyMessagesEnum["DELETE_500"] = "Only properties without transactions can be removed";
|
13949
13952
|
})(PropertyMessagesEnum || (PropertyMessagesEnum = {}));
|
13950
13953
|
|
13951
13954
|
/**
|
@@ -14022,6 +14025,14 @@ class PropertyService extends RestService$1 {
|
|
14022
14025
|
this.updateCache([deactivatedProperty], 'put');
|
14023
14026
|
}));
|
14024
14027
|
}
|
14028
|
+
delete(property) {
|
14029
|
+
return super.delete(property).pipe(catchError((error) => {
|
14030
|
+
if (error.status === 500) {
|
14031
|
+
this.toastService.error(PropertyMessagesEnum.DELETE_500);
|
14032
|
+
}
|
14033
|
+
return throwError(() => error);
|
14034
|
+
}));
|
14035
|
+
}
|
14025
14036
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertyService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
14026
14037
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertyService, providedIn: 'root' }); }
|
14027
14038
|
}
|
@@ -15247,26 +15258,17 @@ class TransactionService extends RestService {
|
|
15247
15258
|
this.listenPropertyForecastUpdate();
|
15248
15259
|
this.listenNotifications();
|
15249
15260
|
}
|
15250
|
-
|
15251
|
-
|
15252
|
-
*/
|
15253
|
-
getAll() {
|
15254
|
-
return super.get().pipe(
|
15255
|
-
// assign child transactions (fees) to parent transactions
|
15256
|
-
map((transactions) => {
|
15261
|
+
fetch(path = this.apiUrl, cache = true) {
|
15262
|
+
return super.fetch(path, cache).pipe(map(transactions => {
|
15257
15263
|
transactions.forEach((transaction) => {
|
15258
15264
|
transaction.transactions = transactions
|
15259
15265
|
// get list of child transactions
|
15260
15266
|
.filter((t) => t.parentTransaction && t.parentTransaction.id === transaction.id);
|
15261
15267
|
});
|
15262
|
-
sort(transactions, 'date', false);
|
15263
15268
|
return transactions;
|
15264
15269
|
}));
|
15265
15270
|
}
|
15266
|
-
|
15267
|
-
* current year transactions
|
15268
|
-
*/
|
15269
|
-
get() {
|
15271
|
+
getCurrentYear() {
|
15270
15272
|
return super.get().pipe(map((transactions) => new TransactionCollection(transactions).filterByFinancialYear('date').toArray()));
|
15271
15273
|
}
|
15272
15274
|
/**
|
@@ -15286,24 +15288,24 @@ class TransactionService extends RestService {
|
|
15286
15288
|
* get transactions related with property
|
15287
15289
|
*/
|
15288
15290
|
getByPropertyId(propertyId) {
|
15289
|
-
return this.
|
15291
|
+
return this.getCurrentYear()
|
15290
15292
|
.pipe(map((transactions) => transactions.filter((transaction) => transaction.property?.id === propertyId)));
|
15291
15293
|
}
|
15292
15294
|
/**
|
15293
15295
|
* get list of transactions with tank type 'Work'
|
15294
15296
|
*/
|
15295
15297
|
getWorkTransactions() {
|
15296
|
-
return this.
|
15298
|
+
return this.getCurrentYear()
|
15297
15299
|
.pipe(map((transactions) => transactions.filter((transaction) => transaction.isWorkTank())));
|
15298
15300
|
}
|
15299
15301
|
/**
|
15300
15302
|
* Get list of property holding costs (transactions related to vacant land property)
|
15301
15303
|
*/
|
15302
15304
|
getPropertyHoldingCosts(propertyId) {
|
15303
|
-
return
|
15305
|
+
return this.fetch(`${this.environment.apiV2}/properties/${propertyId}/holding-costs`, false);
|
15304
15306
|
}
|
15305
15307
|
getWithoutTaxFreeProperty() {
|
15306
|
-
return
|
15308
|
+
return this.fetch(`${this.apiUrl}?excludeTaxFreePropertyCategories`, false);
|
15307
15309
|
}
|
15308
15310
|
/**
|
15309
15311
|
* get list of taxable transactions with tank type 'Work'
|
@@ -20463,7 +20465,7 @@ function getDocIcon(file) {
|
|
20463
20465
|
}
|
20464
20466
|
|
20465
20467
|
function compareMatOptions(option, value) {
|
20466
|
-
if (!option) {
|
20468
|
+
if (!option || !value) {
|
20467
20469
|
return false;
|
20468
20470
|
}
|
20469
20471
|
return option.id === value.id;
|
@@ -23704,6 +23706,7 @@ class TransactionForm extends TransactionBaseForm {
|
|
23704
23706
|
source: new UntypedFormControl(transaction.source || TransactionSourceEnum.BANK_TRANSACTION, Validators.required)
|
23705
23707
|
}));
|
23706
23708
|
this.get('date').addValidators([currentFinYearValidator()]);
|
23709
|
+
console.log(transaction);
|
23707
23710
|
// convert child transactions to controls
|
23708
23711
|
transaction.transactions.map((transaction) => {
|
23709
23712
|
this.addTransactionControl(transaction);
|