taxtank-core 0.33.7 → 0.33.9
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/collections/depreciation.collection.mjs +10 -4
- package/esm2022/src/lib/collections/exportable.collection.mjs +2 -6
- package/esm2022/src/lib/collections/holding/holding.collection.mjs +8 -1
- package/esm2022/src/lib/collections/transaction/index.mjs +2 -1
- package/esm2022/src/lib/collections/transaction/transaction-base.collection.mjs +4 -0
- package/esm2022/src/lib/collections/transaction/transaction.collection.mjs +3 -3
- package/esm2022/src/lib/db/Models/bank/bank-account.mjs +1 -1
- package/esm2022/src/lib/forms/transaction/transaction-base-filter.form.mjs +7 -2
- package/esm2022/src/lib/models/report/report.interface.mjs +1 -1
- package/esm2022/src/lib/models/report/reports.const.mjs +107 -72
- package/esm2022/src/lib/models/user/user.mjs +18 -28
- package/esm2022/src/lib/services/http/holding/holding-sale.service.mjs +3 -1
- package/esm2022/src/lib/services/http/property/property-sale/property-sale.service.mjs +3 -1
- package/esm2022/src/lib/services/http/property/property.service.mjs +3 -2
- package/fesm2022/taxtank-core.mjs +152 -108
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/collections/depreciation.collection.d.ts +5 -2
- package/src/lib/collections/exportable.collection.d.ts +2 -2
- package/src/lib/collections/holding/holding.collection.d.ts +1 -0
- package/src/lib/collections/transaction/index.d.ts +1 -0
- package/src/lib/collections/transaction/transaction-base.collection.d.ts +4 -0
- package/src/lib/collections/transaction/transaction.collection.d.ts +2 -2
- package/src/lib/db/Models/bank/bank-account.d.ts +1 -0
- package/src/lib/forms/transaction/transaction-base-filter.form.d.ts +3 -2
- package/src/lib/models/report/report.interface.d.ts +4 -3
- package/src/lib/models/report/reports.const.d.ts +2 -2
- package/src/lib/models/user/user.d.ts +2 -14
- package/src/lib/services/http/holding/holding-sale.service.d.ts +2 -0
- package/src/lib/services/http/property/property-sale/property-sale.service.d.ts +2 -0
- package/src/lib/services/http/property/property.service.d.ts +2 -0
@@ -1,73 +1,108 @@
|
|
1
1
|
import { UserRolesEnum } from 'taxtank-core/common';
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
2
|
+
export const REPORTS = {
|
3
|
+
[UserRolesEnum.CLIENT]: [
|
4
|
+
// @TODO TT-4385
|
5
|
+
// {
|
6
|
+
// title: 'Income & Expense Report',
|
7
|
+
// description: 'Income and expense report with prior year comparison and monthly view option. Filter by Tank, property, business or personal categories.',
|
8
|
+
// routerLink: './income-expense',
|
9
|
+
// },
|
10
|
+
{
|
11
|
+
title: 'Transactions Report',
|
12
|
+
description: 'Detailed report of the transactions allocated to each category. Filter by tank, property, business or your own search criteria.',
|
13
|
+
routerLink: './transactions',
|
14
|
+
},
|
15
|
+
{
|
16
|
+
title: 'MyTax Report',
|
17
|
+
description: 'Coded to the ATO\'s MyTax report, our interactive report enable you to self lodge faster, easier and more accurately online without the stress.',
|
18
|
+
routerLink: './my-tax',
|
19
|
+
},
|
20
|
+
{
|
21
|
+
title: 'Net Asset',
|
22
|
+
description: 'See your current net financial position, including a breakdown of net assets and liabilities across all tanks.',
|
23
|
+
routerLink: './net-assets',
|
24
|
+
},
|
25
|
+
],
|
26
|
+
[UserRolesEnum.WORK_TANK]: [
|
27
|
+
{
|
28
|
+
title: 'Motor Vehicle Report',
|
29
|
+
description: 'Displays work-related vehicle expenses based upon your logbook claim method or percentage.',
|
30
|
+
routerLink: './vehicle-expenses',
|
31
|
+
queryParams: { tankType: 2 }
|
32
|
+
},
|
33
|
+
{
|
34
|
+
title: 'Depreciation Report',
|
35
|
+
description: 'Register of plant & equipment depreciation including vehicles and work-related assets over $300.',
|
36
|
+
routerLink: './depreciation',
|
37
|
+
queryParams: { tankType: 2 }
|
38
|
+
},
|
39
|
+
{
|
40
|
+
title: 'Low Value Pool Report',
|
41
|
+
description: 'Register of new assets valued between $301 and $1,000 and existing assets that fall below the $1,000 threshold.',
|
42
|
+
routerLink: './low-value-pool',
|
43
|
+
queryParams: { tankType: 2 }
|
44
|
+
},
|
45
|
+
],
|
46
|
+
[UserRolesEnum.PROPERTY_TANK]: [
|
47
|
+
{
|
48
|
+
title: 'Property Schedule',
|
49
|
+
description: 'Compliant property schedule detailing incomes, expenses and depreciation for each property and ownership percentage.',
|
50
|
+
routerLink: './property-transactions',
|
51
|
+
},
|
52
|
+
{
|
53
|
+
title: 'Depreciation Report',
|
54
|
+
description: 'Register of building & improvements depreciation (capital works) and plant & equipment depreciation for each property.',
|
55
|
+
routerLink: './depreciation',
|
56
|
+
queryParams: { tankType: 1 }
|
57
|
+
},
|
58
|
+
{
|
59
|
+
title: 'Low Value Pool Report',
|
60
|
+
description: 'Register of new assets valued between $301 and $1,000 and existing assets that fall below the $1,000 threshold.',
|
61
|
+
routerLink: './low-value-pool',
|
62
|
+
queryParams: { tankType: 1 }
|
63
|
+
},
|
64
|
+
{
|
65
|
+
title: 'CGT Report',
|
66
|
+
description: 'Calculate net capital gains across all asset classes, including the application of losses and eligible concessions.',
|
67
|
+
routerLink: './cgt/property',
|
68
|
+
},
|
69
|
+
],
|
70
|
+
[UserRolesEnum.SOLE_TANK]: [
|
71
|
+
{
|
72
|
+
title: 'Business Schedule',
|
73
|
+
description: 'Compliant schedule detailing profit and loss for each primary and non-primary production business.',
|
74
|
+
routerLink: './business-schedule',
|
75
|
+
},
|
76
|
+
{
|
77
|
+
title: 'Motor Vehicle Report',
|
78
|
+
description: 'Displays work-related vehicle expenses based upon your logbook claim method or percentage.',
|
79
|
+
routerLink: './vehicle-expenses',
|
80
|
+
queryParams: { tankType: 4 }
|
81
|
+
},
|
82
|
+
{
|
83
|
+
title: 'Depreciation Report',
|
84
|
+
description: 'Track small business pool depreciation, instant asset write-offs and plant & equipment.',
|
85
|
+
routerLink: './depreciation',
|
86
|
+
queryParams: { tankType: 4 }
|
87
|
+
},
|
88
|
+
{
|
89
|
+
title: 'Low Value Pool Report',
|
90
|
+
description: 'Register of new assets valued between $301 and $1,000 and existing assets that fall below the $1,000 threshold.',
|
91
|
+
routerLink: './low-value-pool',
|
92
|
+
queryParams: { tankType: 4 }
|
93
|
+
},
|
94
|
+
{
|
95
|
+
title: 'BAS Report',
|
96
|
+
description: 'Summarises your GST obligations from applicable sales and purchases to enable accurate ATO lodgements.',
|
97
|
+
routerLink: './bas',
|
98
|
+
},
|
99
|
+
],
|
100
|
+
[UserRolesEnum.HOLDING_TANK]: [
|
101
|
+
{
|
102
|
+
title: 'CGT Report',
|
103
|
+
description: 'Calculate net capital gains across all asset classes, including the application of losses and eligible concessions.',
|
104
|
+
routerLink: './cgt/holding',
|
105
|
+
},
|
106
|
+
],
|
107
|
+
};
|
108
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVwb3J0cy5jb25zdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9tb2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2YgbG9zc2VzIGFuZCBlbGlnaWJsZSBjb25jZXNzaW9ucy4nLFxuICAgICAgcm91dGVyTGluazogJy4vY2d0L2hvbGRpbmcnLFxuICAgIH0sXG4gIF0sXG59XG4iXX0=
|
@@ -17,6 +17,7 @@ import { FinancialYear } from '../financial-year';
|
|
17
17
|
import { AppFile } from '../file';
|
18
18
|
import range from 'lodash/range';
|
19
19
|
import { AccountSetupItem } from '../account-setup/account-setup-item';
|
20
|
+
import { TankTypeEnum } from '../../db/Enums/tank-type.enum';
|
20
21
|
export class User extends BaseUser {
|
21
22
|
constructor() {
|
22
23
|
super(...arguments);
|
@@ -61,6 +62,22 @@ export class User extends BaseUser {
|
|
61
62
|
roles = flatten(roles.map((role) => USER_ROLES[role]));
|
62
63
|
return !!intersection(this.roles, roles).length;
|
63
64
|
}
|
65
|
+
getTankTypes() {
|
66
|
+
const tankTypes = [];
|
67
|
+
if (this.roles.includes(UserRolesEnum.WORK_TANK)) {
|
68
|
+
tankTypes.push(TankTypeEnum.WORK);
|
69
|
+
}
|
70
|
+
if (this.roles.includes(UserRolesEnum.PROPERTY_TANK)) {
|
71
|
+
tankTypes.push(TankTypeEnum.PROPERTY);
|
72
|
+
}
|
73
|
+
if (this.roles.includes(UserRolesEnum.SOLE_TANK)) {
|
74
|
+
tankTypes.push(TankTypeEnum.SOLE);
|
75
|
+
}
|
76
|
+
if (this.roles.includes(UserRolesEnum.HOLDING_TANK)) {
|
77
|
+
tankTypes.push(TankTypeEnum.HOLDING);
|
78
|
+
}
|
79
|
+
return tankTypes;
|
80
|
+
}
|
64
81
|
isOnboarding() {
|
65
82
|
return this.status === UserStatusEnum.ON_BOARDING;
|
66
83
|
}
|
@@ -100,33 +117,6 @@ export class User extends BaseUser {
|
|
100
117
|
isManager() {
|
101
118
|
return this.roles.includes(UserRolesEnum.FIRM_MANAGER) || this.roles.includes(UserRolesEnum.FIRM_TOP_MANAGER) || this.roles.includes(UserRolesEnum.FIRM_OWNER);
|
102
119
|
}
|
103
|
-
/**
|
104
|
-
* check if user has property tank access
|
105
|
-
*/
|
106
|
-
hasPropertyTank() {
|
107
|
-
return this.roles ?
|
108
|
-
this.roles.includes(UserRolesEnum.PROPERTY_TANK) :
|
109
|
-
!!this.getSubscriptionRole(UserRolesEnum.PROPERTY_TANK);
|
110
|
-
}
|
111
|
-
/**
|
112
|
-
* check if user has property tank access
|
113
|
-
*/
|
114
|
-
hasWorkTank() {
|
115
|
-
return this.roles ?
|
116
|
-
this.roles.includes(UserRolesEnum.WORK_TANK) :
|
117
|
-
!!this.getSubscriptionRole(UserRolesEnum.WORK_TANK);
|
118
|
-
}
|
119
|
-
/**
|
120
|
-
* Get user subscription role by provided role type
|
121
|
-
* @param roleType by which role should be returned
|
122
|
-
*/
|
123
|
-
getSubscriptionRole(roleType) {
|
124
|
-
/**
|
125
|
-
* Add @TODO for Alex to check if we should use getLastSubscription here
|
126
|
-
*/
|
127
|
-
return this.activeSubscription?.items
|
128
|
-
.find((subscriptionItem) => subscriptionItem.price.product.role.includes(roleType));
|
129
|
-
}
|
130
120
|
isCurrentFinancialYear() {
|
131
121
|
return new FinancialYear(new Date()).year === this.financialYear;
|
132
122
|
}
|
@@ -171,4 +161,4 @@ __decorate([
|
|
171
161
|
__decorate([
|
172
162
|
Type(() => AccountSetupItem)
|
173
163
|
], User.prototype, "blacklistSetupItems", void 0);
|
174
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9tb2RlbHMvdXNlci91c2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsSUFBSSxJQUFJLFFBQVEsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQzdELE9BQU8sRUFBRSxjQUFjLEVBQUU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iAgICAgIE1hdGgubWluKEZpbmFuY2lhbFllYXIudG9GaW5ZZWFyKHRoaXMuY3JlYXRlZEF0KSAtIDEsIDIwMjIpLFxuICAgICAgRmluYW5jaWFsWWVhci50b0ZpblllYXIobmV3IERhdGUoKSkgKyAxXG4gICAgKTtcbiAgfVxuXG4gIGdldCBmaXJtQnJhbmNoTmFtZXMoKTogc3RyaW5nIHtcbiAgICByZXR1cm4gdGhpcy5lbXBsb3llZURldGFpbHMuZmlybUJyYW5jaE5hbWVzO1xuICB9XG59XG5cbiJdfQ==
|
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
|
|
2
2
|
import { HoldingSale } from '../../../models';
|
3
3
|
import { RestService } from '../rest';
|
4
4
|
import { HoldingSaleCollection } from '../../../collections';
|
5
|
+
import { UserRolesEnum } from 'taxtank-core/common';
|
5
6
|
import * as i0 from "@angular/core";
|
6
7
|
export class HoldingSaleService extends RestService {
|
7
8
|
constructor() {
|
@@ -10,6 +11,7 @@ export class HoldingSaleService extends RestService {
|
|
10
11
|
this.collectionClass = HoldingSaleCollection;
|
11
12
|
this.endpointUri = 'holding-sales';
|
12
13
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
14
|
+
this.roles = [UserRolesEnum.HOLDING_TANK];
|
13
15
|
}
|
14
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingSaleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
15
17
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingSaleService, providedIn: 'root' }); }
|
@@ -20,4 +22,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
20
22
|
providedIn: 'root'
|
21
23
|
}]
|
22
24
|
}] });
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
25
|
+
//# sourceMappingURL=data:application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hci9jb3JlJztcbmltcG9ydCB7IEhvbGRpbmdTYWxlIGFzIEhvbGRpbmdTYWxlQmFzZSB9IGZyb20gJy4uLy4uLy4uL2RiL01vZGVscyc7XG5pbXBvcnQgeyBIb2xkaW5nU2FsZSB9IGZyb20gJy4uLy4uLy4uL21vZGVscyc7XG5pbXBvcnQgeyBSZXN0TWV0aG9kLCBSZXN0U2VydmljZSB9IGZyb20gJy4uL3Jlc3QnO1xuaW1wb3J0IHsgSG9sZGluZ1NhbGVDb2xsZWN0aW9uIH0gZnJvbSAnLi4vLi4vLi4vY29sbGVjdGlvbnMnO1xuaW1wb3J0IHsgVXNlclJvbGVzRW51bSB9IGZyb20gJ3RheHRhbmstY29yZS9jb21tb24nO1xuXG5ASW5qZWN0YWJsZSh7XG4gIHByb3ZpZGVkSW46ICdyb290J1xufSlcbmV4cG9ydCBjbGFzcyBIb2xkaW5nU2FsZVNlcnZpY2UgZXh0ZW5kcyBSZXN0U2VydmljZTxIb2xkaW5nU2FsZUJhc2UsIEhvbGRpbmdTYWxlLCBIb2xkaW5nU2FsZUNvbGxlY3Rpb24+IHtcbiAgbW9kZWxDbGFzcyA9IEhvbGRpbmdTYWxlO1xuICBjb2xsZWN0aW9uQ2xhc3MgPSBIb2xkaW5nU2FsZUNvbGxlY3Rpb247XG4gIGVuZHBvaW50VXJpID0gJ2hvbGRpbmctc2FsZXMnO1xuICBkaXNhYmxlZE1ldGhvZHM6IFJlc3RNZXRob2RbXSA9IFsncG9zdEJhdGNoJywgJ3B1dEJhdGNoJywgJ2RlbGV0ZUJhdGNoJ107XG4gIHJvbGVzID0gW1VzZXJSb2xlc0VudW0uSE9MRElOR19UQU5LXTtcbn1cbiJdfQ==
|
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
|
|
2
2
|
import { PropertySale } from '../../../../models';
|
3
3
|
import { RestService } from '../../rest';
|
4
4
|
import { PropertySaleCollection } from '../../../../collections';
|
5
|
+
import { UserRolesEnum } from 'taxtank-core/common';
|
5
6
|
import * as i0 from "@angular/core";
|
6
7
|
export class PropertySaleService extends RestService {
|
7
8
|
constructor() {
|
@@ -10,6 +11,7 @@ export class PropertySaleService extends RestService {
|
|
10
11
|
this.collectionClass = PropertySaleCollection;
|
11
12
|
this.endpointUri = 'properties/sales';
|
12
13
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
14
|
+
this.roles = [UserRolesEnum.PROPERTY_TANK];
|
13
15
|
}
|
14
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertySaleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
15
17
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertySaleService, providedIn: 'root' }); }
|
@@ -20,4 +22,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
20
22
|
providedIn: 'root'
|
21
23
|
}]
|
22
24
|
}] });
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHktc2FsZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL3NlcnZpY2VzL2h0dHAvcHJvcGVydHkvcHJvcGVydHktc2FsZS9wcm9wZXJ0eS1zYWxlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUzQyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDbEQsT0FBTyxFQUFjLFdBQVcsRUFBRSxNQUFNLFlBQVksQ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luamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgUHJvcGVydHlTYWxlU2VydmljZSBleHRlbmRzIFJlc3RTZXJ2aWNlPFByb3BlcnR5U2FsZUJhc2UsIFByb3BlcnR5U2FsZSwgUHJvcGVydHlTYWxlQ29sbGVjdGlvbj4ge1xuICBtb2RlbENsYXNzOiB0eXBlb2YgUHJvcGVydHlTYWxlID0gUHJvcGVydHlTYWxlO1xuICBjb2xsZWN0aW9uQ2xhc3M6IHR5cGVvZiBQcm9wZXJ0eVNhbGVDb2xsZWN0aW9uID0gUHJvcGVydHlTYWxlQ29sbGVjdGlvbjtcbiAgZW5kcG9pbnRVcmkgPSAncHJvcGVydGllcy9zYWxlcyc7XG4gIGRpc2FibGVkTWV0aG9kczogUmVzdE1ldGhvZFtdID0gWydwb3N0QmF0Y2gnLCAncHV0QmF0Y2gnLCAnZGVsZXRlQmF0Y2gnXTtcbiAgcm9sZXMgPSBbVXNlclJvbGVzRW51bS5QUk9QRVJUWV9UQU5LXTtcbn1cbiJdfQ==
|
@@ -4,6 +4,7 @@ import { plainToClass } from 'class-transformer';
|
|
4
4
|
import { AppEvent, AppEventTypeEnum, Property, PropertyCategoryMovement, PropertySale, PropertyShare, PropertySubscription, PropertyValuation } from '../../../models';
|
5
5
|
import { RestService } from '../rest';
|
6
6
|
import { PropertyCollection } from '../../../collections';
|
7
|
+
import { UserRolesEnum } from 'taxtank-core/common';
|
7
8
|
import * as i0 from "@angular/core";
|
8
9
|
/**
|
9
10
|
* @Todo Alex remove functionality related to PropertyShare
|
@@ -11,7 +12,6 @@ import * as i0 from "@angular/core";
|
|
11
12
|
* Service for work with Property
|
12
13
|
*/
|
13
14
|
export class PropertyService extends RestService {
|
14
|
-
// roles = [UserRolesEnum.PROPERTY_TANK];
|
15
15
|
constructor(environment) {
|
16
16
|
super(environment);
|
17
17
|
this.environment = environment;
|
@@ -19,6 +19,7 @@ export class PropertyService extends RestService {
|
|
19
19
|
this.collectionClass = PropertyCollection;
|
20
20
|
this.endpointUri = 'properties';
|
21
21
|
this.disabledMethods = ['deleteBatch'];
|
22
|
+
this.roles = [UserRolesEnum.PROPERTY_TANK];
|
22
23
|
this.listenEvents();
|
23
24
|
}
|
24
25
|
/**
|
@@ -85,4 +86,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
85
86
|
type: Inject,
|
86
87
|
args: ['environment']
|
87
88
|
}] }] });
|
88
|
-
//# sourceMappingURL=data:application/json;base64,
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3Byb3BlcnR5L3Byb3BlcnR5LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFNbkQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3JDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQ0wsUUFBUSxFQUNSLGdCQUFnQixFQUNoQixRQUFRLEVBQUUsd0JBQXdCLEVBQ2xDLFlBQVksRUFDWixhQUFhLEVBQ2Isb0JBQW9CLEVBQ3BCLGlCQUFpQixFQUNsQixNQUFNLGlCQUFpQixDQUFDO0FBRXpCLE9BQU8sRUFBYyxXQUFXLEVBQUUsTUFBTSxTQUFTLENBQUM7QUFDbEQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDMUQs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