taxtank-core 0.2.1 → 0.3.0
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 +898 -447
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/property.collection.js +8 -1
- package/esm2015/lib/db/Enums/chart-accounts-metadata-list.enum.js +2 -3
- package/esm2015/lib/interceptors/corelogic-interceptor.js +44 -0
- package/esm2015/lib/interceptors/financial-year-interceptor.js +30 -0
- package/esm2015/lib/interceptors/interceptors.module.js +74 -0
- package/esm2015/lib/interceptors/jwt-interceptor.js +137 -0
- package/esm2015/lib/interceptors/preloader.interceptor.js +32 -0
- package/esm2015/lib/interceptors/user-switcher-interceptor.js +42 -0
- package/esm2015/lib/models/color/alphabet-colors.enum.js +30 -0
- package/esm2015/lib/models/endpoint/endpoints.const.js +3 -1
- package/esm2015/lib/models/transaction/transaction.js +5 -5
- package/esm2015/lib/services/bank/bank-account.service.js +7 -1
- package/esm2015/lib/services/bank/bank-connection.service.js +10 -1
- package/esm2015/lib/services/property/equity-position-chart.service.js +45 -0
- package/esm2015/lib/tt-core.module.js +8 -4
- package/esm2015/public-api.js +7 -1
- package/fesm2015/taxtank-core.js +845 -422
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/property.collection.d.ts +5 -0
- package/lib/db/Enums/chart-accounts-metadata-list.enum.d.ts +1 -2
- package/lib/interceptors/corelogic-interceptor.d.ts +20 -0
- package/lib/interceptors/financial-year-interceptor.d.ts +12 -0
- package/lib/interceptors/interceptors.module.d.ts +6 -0
- package/lib/interceptors/jwt-interceptor.d.ts +42 -0
- package/lib/interceptors/preloader.interceptor.d.ts +15 -0
- package/lib/interceptors/user-switcher-interceptor.d.ts +19 -0
- package/lib/models/color/alphabet-colors.enum.d.ts +28 -0
- package/lib/models/transaction/transaction.d.ts +1 -3
- package/lib/services/bank/bank-account.service.d.ts +1 -0
- package/lib/services/bank/bank-connection.service.d.ts +2 -0
- package/lib/services/property/equity-position-chart.service.d.ts +15 -0
- package/lib/tt-core.module.d.ts +2 -1
- package/package.json +1 -1
- package/public-api.d.ts +6 -0
package/fesm2015/taxtank-core.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Injectable, Inject, NgModule, EventEmitter } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/common/http';
|
|
5
|
+
import { HttpParams, HttpErrorResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
6
|
+
import { ReplaySubject, BehaviorSubject, throwError, Subject, Observable, combineLatest, forkJoin } from 'rxjs';
|
|
7
|
+
import { map, catchError, filter, take, switchMap, finalize, mergeMap } from 'rxjs/operators';
|
|
8
|
+
import { plainToClass, Type, Exclude, Transform, Expose, classToPlain } from 'class-transformer';
|
|
9
|
+
import { JwtHelperService } from '@auth0/angular-jwt';
|
|
4
10
|
import has from 'lodash/has';
|
|
5
11
|
import get from 'lodash/get';
|
|
6
12
|
import flatten from 'lodash/flatten';
|
|
@@ -10,15 +16,10 @@ import uniqBy from 'lodash/uniqBy';
|
|
|
10
16
|
import concat from 'lodash/concat';
|
|
11
17
|
import compact from 'lodash/compact';
|
|
12
18
|
import { __decorate, __awaiter } from 'tslib';
|
|
13
|
-
import { Type, plainToClass, Exclude, Transform, Expose, classToPlain } from 'class-transformer';
|
|
14
19
|
import * as moment from 'moment';
|
|
15
20
|
import { DateRange } from 'moment-range';
|
|
16
21
|
import cloneDeep$1 from 'lodash/cloneDeep';
|
|
17
22
|
import { Validators } from '@angular/forms';
|
|
18
|
-
import { ReplaySubject, BehaviorSubject, Subject, Observable, combineLatest, forkJoin } from 'rxjs';
|
|
19
|
-
import { map, filter, mergeMap } from 'rxjs/operators';
|
|
20
|
-
import * as i1 from '@angular/common/http';
|
|
21
|
-
import { JwtHelperService } from '@auth0/angular-jwt';
|
|
22
23
|
import _ from 'lodash';
|
|
23
24
|
import { EventSourcePolyfill } from 'event-source-polyfill/src/eventsource.min.js';
|
|
24
25
|
import * as i1$1 from '@angular/router';
|
|
@@ -30,6 +31,682 @@ import { loadStripe } from '@stripe/stripe-js';
|
|
|
30
31
|
import * as xlsx from 'xlsx';
|
|
31
32
|
import * as FileSaver from 'file-saver';
|
|
32
33
|
|
|
34
|
+
/**
|
|
35
|
+
* https://api-uat.corelogic.asia/property/au/v2/suggest.json
|
|
36
|
+
* address suggestion from corelogic service
|
|
37
|
+
*/
|
|
38
|
+
class CorelogicSuggestion {
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
class CorelogicService {
|
|
42
|
+
constructor(http, environment) {
|
|
43
|
+
this.http = http;
|
|
44
|
+
this.environment = environment;
|
|
45
|
+
this.accessTokenSubject = new ReplaySubject(1);
|
|
46
|
+
}
|
|
47
|
+
getAccessToken(force = false) {
|
|
48
|
+
if (!this._accessToken || force) {
|
|
49
|
+
this.http.get(`${this.environment.coreLogicUrl}/access/oauth/token?grant_type=client_credentials&client_id=${this.environment.coreLogicId}&client_secret=${this.environment.coreLogicSecret}`)
|
|
50
|
+
.pipe(map((response) => {
|
|
51
|
+
return response.access_token;
|
|
52
|
+
}))
|
|
53
|
+
.subscribe((token) => {
|
|
54
|
+
this._accessToken = token;
|
|
55
|
+
this.accessTokenSubject.next(this._accessToken);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return this.accessTokenSubject.asObservable();
|
|
59
|
+
}
|
|
60
|
+
getSuggestions(query, country = 'au') {
|
|
61
|
+
// @TODO handle different countries in future
|
|
62
|
+
return this.http.get(`${this.environment.coreLogicUrl}/property/${country}/v2/suggest.json?q=${query}`)
|
|
63
|
+
.pipe(map((response) => {
|
|
64
|
+
return response.suggestions.map((item) => plainToClass(CorelogicSuggestion, item));
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
CorelogicService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CorelogicService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
69
|
+
CorelogicService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CorelogicService, providedIn: 'root' });
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CorelogicService, decorators: [{
|
|
71
|
+
type: Injectable,
|
|
72
|
+
args: [{
|
|
73
|
+
providedIn: 'root'
|
|
74
|
+
}]
|
|
75
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
76
|
+
type: Inject,
|
|
77
|
+
args: ['environment']
|
|
78
|
+
}] }]; } });
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Corelogic interceptor add Core Logic access token for each search requests related with Core Logic API
|
|
82
|
+
*/
|
|
83
|
+
class CorelogicInterceptor {
|
|
84
|
+
constructor(corelogicService, environment) {
|
|
85
|
+
this.corelogicService = corelogicService;
|
|
86
|
+
this.environment = environment;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Check if requested url requested core logic, but not core logic auth api
|
|
90
|
+
* @param req
|
|
91
|
+
*/
|
|
92
|
+
addToken(req) {
|
|
93
|
+
// don't need token for this endpoint
|
|
94
|
+
if (req.url.includes(`${this.environment.coreLogicUrl}/access/oauth/token`)) {
|
|
95
|
+
return req;
|
|
96
|
+
}
|
|
97
|
+
// add core logic token to request headers
|
|
98
|
+
if (req.url.includes(this.environment.coreLogicUrl)) {
|
|
99
|
+
return req.clone({
|
|
100
|
+
setHeaders: {
|
|
101
|
+
Authorization: 'Bearer ' + this.corelogicService._accessToken
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
// return request without changes if url not related with core logic
|
|
106
|
+
return req;
|
|
107
|
+
}
|
|
108
|
+
intercept(request, next) {
|
|
109
|
+
return next.handle(this.addToken(request));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
CorelogicInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CorelogicInterceptor, deps: [{ token: CorelogicService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
113
|
+
CorelogicInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CorelogicInterceptor });
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CorelogicInterceptor, decorators: [{
|
|
115
|
+
type: Injectable
|
|
116
|
+
}], ctorParameters: function () { return [{ type: CorelogicService }, { type: undefined, decorators: [{
|
|
117
|
+
type: Inject,
|
|
118
|
+
args: ['environment']
|
|
119
|
+
}] }]; } });
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Financial Year interceptor add financialYear parameter to requests because a lot of POST and GET requests require this parameter
|
|
123
|
+
* @TODO now we can get current fin year from user on backend. So we can remove this interceptor
|
|
124
|
+
*/
|
|
125
|
+
class FinancialYearInterceptor {
|
|
126
|
+
intercept(request, next) {
|
|
127
|
+
// Set financial year parameter to requests
|
|
128
|
+
let params = new HttpParams({
|
|
129
|
+
fromString: request.params.toString()
|
|
130
|
+
});
|
|
131
|
+
// clone request to add new parameters
|
|
132
|
+
let clonedReq = request.clone();
|
|
133
|
+
if (!params.get('financialYear')) {
|
|
134
|
+
params = params.set('financialYear', localStorage.getItem('financialYear'));
|
|
135
|
+
clonedReq = request.clone({
|
|
136
|
+
params: params
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return next.handle(clonedReq);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
FinancialYearInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FinancialYearInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
143
|
+
FinancialYearInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FinancialYearInterceptor });
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FinancialYearInterceptor, decorators: [{
|
|
145
|
+
type: Injectable
|
|
146
|
+
}] });
|
|
147
|
+
|
|
148
|
+
const NAME_TOKEN = 'token';
|
|
149
|
+
const NAME_REFRESH_TOKEN = 'refreshToken';
|
|
150
|
+
class JwtService extends JwtHelperService {
|
|
151
|
+
getToken() {
|
|
152
|
+
return localStorage[NAME_TOKEN];
|
|
153
|
+
}
|
|
154
|
+
getRefreshToken() {
|
|
155
|
+
return localStorage[NAME_REFRESH_TOKEN];
|
|
156
|
+
}
|
|
157
|
+
saveTokens(tokens) {
|
|
158
|
+
localStorage[NAME_TOKEN] = tokens.token;
|
|
159
|
+
localStorage[NAME_REFRESH_TOKEN] = tokens.refreshToken;
|
|
160
|
+
}
|
|
161
|
+
destroyTokens() {
|
|
162
|
+
localStorage.removeItem(NAME_TOKEN);
|
|
163
|
+
localStorage.removeItem(NAME_REFRESH_TOKEN);
|
|
164
|
+
}
|
|
165
|
+
getUser() {
|
|
166
|
+
return this.decodeToken();
|
|
167
|
+
}
|
|
168
|
+
isMe(userId) {
|
|
169
|
+
return this.getUser().id === userId;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
JwtService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: JwtService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
173
|
+
JwtService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: JwtService, providedIn: 'root' });
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: JwtService, decorators: [{
|
|
175
|
+
type: Injectable,
|
|
176
|
+
args: [{
|
|
177
|
+
providedIn: 'root'
|
|
178
|
+
}]
|
|
179
|
+
}] });
|
|
180
|
+
|
|
181
|
+
class AuthService {
|
|
182
|
+
constructor(http, jwtService, environment) {
|
|
183
|
+
this.http = http;
|
|
184
|
+
this.jwtService = jwtService;
|
|
185
|
+
this.environment = environment;
|
|
186
|
+
this.isLoggedInSubject = new BehaviorSubject(!this.jwtService.isTokenExpired());
|
|
187
|
+
}
|
|
188
|
+
setAuth(response) {
|
|
189
|
+
this.jwtService.saveTokens(response);
|
|
190
|
+
this.isLoggedInSubject.next(true);
|
|
191
|
+
}
|
|
192
|
+
login(username, password) {
|
|
193
|
+
return this.http.post(`${this.environment.apiV2}/login_check`, { username, password }).pipe(map((response) => {
|
|
194
|
+
this.setAuth(response);
|
|
195
|
+
return response;
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
refresh(refreshToken) {
|
|
199
|
+
return this.http.post(`${this.environment.apiV2}/token/refresh`, { refreshToken }).pipe(map((response) => {
|
|
200
|
+
this.setAuth(response);
|
|
201
|
+
return response;
|
|
202
|
+
}));
|
|
203
|
+
}
|
|
204
|
+
logoutFront(url = '/login') {
|
|
205
|
+
localStorage.clear();
|
|
206
|
+
location.replace(url);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: JwtService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
210
|
+
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: AuthService, decorators: [{
|
|
212
|
+
type: Injectable,
|
|
213
|
+
args: [{
|
|
214
|
+
providedIn: 'root'
|
|
215
|
+
}]
|
|
216
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: JwtService }, { type: undefined, decorators: [{
|
|
217
|
+
type: Inject,
|
|
218
|
+
args: ['environment']
|
|
219
|
+
}] }]; } });
|
|
220
|
+
|
|
221
|
+
const MESSAGE_DEFAULT_500_ERROR = 'Unexpected error! Please try again later. You can send us via chat your questions.';
|
|
222
|
+
/**
|
|
223
|
+
* JWT Interceptor add jwt token to each request related with TaxTank API
|
|
224
|
+
*/
|
|
225
|
+
class JwtInterceptor {
|
|
226
|
+
constructor(jwtService, authService, environment) {
|
|
227
|
+
this.jwtService = jwtService;
|
|
228
|
+
this.authService = authService;
|
|
229
|
+
this.environment = environment;
|
|
230
|
+
this.isRefreshingToken = false;
|
|
231
|
+
this.tokenSubject = new BehaviorSubject(null);
|
|
232
|
+
}
|
|
233
|
+
addToken(req) {
|
|
234
|
+
return req.clone({
|
|
235
|
+
setHeaders: { Authorization: 'Bearer ' + this.jwtService.getToken() },
|
|
236
|
+
withCredentials: true
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
intercept(request, next) {
|
|
240
|
+
// skip third party requests
|
|
241
|
+
if (!request.url.includes(this.environment.api_uri)) {
|
|
242
|
+
return next.handle(request);
|
|
243
|
+
}
|
|
244
|
+
// add token to every api request
|
|
245
|
+
return next.handle(this.addToken(request)).pipe(
|
|
246
|
+
// handle errors
|
|
247
|
+
catchError((err) => {
|
|
248
|
+
if (err instanceof HttpErrorResponse) {
|
|
249
|
+
switch (err.status) {
|
|
250
|
+
// unexpected errors
|
|
251
|
+
case 405:
|
|
252
|
+
case 500:
|
|
253
|
+
this.handle500Error();
|
|
254
|
+
break;
|
|
255
|
+
// expected errors
|
|
256
|
+
case 401:
|
|
257
|
+
return this.handle401Error(request, next, err);
|
|
258
|
+
case 400:
|
|
259
|
+
case 403:
|
|
260
|
+
// @TODO in most cases 404 is not an error, handle in components
|
|
261
|
+
// case 404:
|
|
262
|
+
this.showErrorMessages(err);
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return throwError(err);
|
|
267
|
+
}));
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @TODO log
|
|
271
|
+
* @TODO waiting for backend to handle errors in a better way
|
|
272
|
+
*/
|
|
273
|
+
handle400Error(err) {
|
|
274
|
+
// this.snackBar.open(err.error['hydra:description'], '', {
|
|
275
|
+
// panelClass: 'error'
|
|
276
|
+
// });
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* @TODO log
|
|
280
|
+
* @TODO waiting for backend to handle errors in a better way
|
|
281
|
+
*/
|
|
282
|
+
handle403Error(err) {
|
|
283
|
+
// this.snackBar.open(err.error['hydra:description'], '', {
|
|
284
|
+
// panelClass: 'error'
|
|
285
|
+
// });
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* @TODO log
|
|
289
|
+
*/
|
|
290
|
+
handle500Error() {
|
|
291
|
+
// this.snackBar.open(MESSAGE_DEFAULT_500_ERROR, '', {
|
|
292
|
+
// panelClass: 'error'
|
|
293
|
+
// });
|
|
294
|
+
}
|
|
295
|
+
handle401Error(req, next, err) {
|
|
296
|
+
if (req.url.includes('token/refresh') || req.url.includes('login')) {
|
|
297
|
+
if (req.url.includes('token/refresh')) {
|
|
298
|
+
this.authService.logoutFront();
|
|
299
|
+
}
|
|
300
|
+
return throwError(err);
|
|
301
|
+
}
|
|
302
|
+
// refreshing token, wait until it's done and retry the request
|
|
303
|
+
if (this.isRefreshingToken) {
|
|
304
|
+
return this.tokenSubject.pipe(filter(token => token != null), take(1), switchMap(token => next.handle(this.addToken(req))));
|
|
305
|
+
// refresh token
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
// subsequent requests should wait until refresh token is ready
|
|
309
|
+
this.isRefreshingToken = true;
|
|
310
|
+
this.tokenSubject.next(null);
|
|
311
|
+
return this.authService.refresh(this.jwtService.getRefreshToken()).pipe(switchMap((tokens) => {
|
|
312
|
+
this.tokenSubject.next(tokens.token);
|
|
313
|
+
return next.handle(this.addToken(req));
|
|
314
|
+
}), catchError(() => {
|
|
315
|
+
this.authService.logoutFront();
|
|
316
|
+
return throwError(err);
|
|
317
|
+
}), finalize(() => {
|
|
318
|
+
this.isRefreshingToken = false;
|
|
319
|
+
}));
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Handle error messages
|
|
324
|
+
* @param errorResponse from which messages should be taken
|
|
325
|
+
*
|
|
326
|
+
* @TODO move to separated interceptor
|
|
327
|
+
*/
|
|
328
|
+
showErrorMessages(errorResponse) {
|
|
329
|
+
if (!errorResponse.error.violations) {
|
|
330
|
+
// this.snackBar.open('Something went wrong', '', {
|
|
331
|
+
// panelClass: 'error'
|
|
332
|
+
// });
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
errorResponse.error.violations.forEach((violation) => {
|
|
336
|
+
// this.snackBar.open(violation['message'], '', {
|
|
337
|
+
// panelClass: 'error'
|
|
338
|
+
// });
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
JwtInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: JwtInterceptor, deps: [{ token: JwtService }, { token: AuthService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
343
|
+
JwtInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: JwtInterceptor });
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: JwtInterceptor, decorators: [{
|
|
345
|
+
type: Injectable
|
|
346
|
+
}], ctorParameters: function () { return [{ type: JwtService }, { type: AuthService }, { type: undefined, decorators: [{
|
|
347
|
+
type: Inject,
|
|
348
|
+
args: ['environment']
|
|
349
|
+
}] }]; } });
|
|
350
|
+
|
|
351
|
+
const KEY = '_switch_user';
|
|
352
|
+
/**
|
|
353
|
+
* provides user management to managers (users with ROLE_ACCOUNTANT for now, more in future)
|
|
354
|
+
*/
|
|
355
|
+
class UserSwitcherService {
|
|
356
|
+
/**
|
|
357
|
+
* get switched username
|
|
358
|
+
*/
|
|
359
|
+
get() {
|
|
360
|
+
return localStorage[KEY];
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* switch to user (username should be used for correct work of backend)
|
|
364
|
+
*/
|
|
365
|
+
set(username) {
|
|
366
|
+
localStorage[KEY] = username;
|
|
367
|
+
window.location.replace('/client/dashboard');
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* go back to original user
|
|
371
|
+
*/
|
|
372
|
+
reset() {
|
|
373
|
+
localStorage.removeItem(KEY);
|
|
374
|
+
window.location.replace('/firm/dashboard');
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
UserSwitcherService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserSwitcherService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
378
|
+
UserSwitcherService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserSwitcherService, providedIn: 'root' });
|
|
379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserSwitcherService, decorators: [{
|
|
380
|
+
type: Injectable,
|
|
381
|
+
args: [{
|
|
382
|
+
providedIn: 'root'
|
|
383
|
+
}]
|
|
384
|
+
}] });
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Impersonate current's user (manager) to client experience with help of special header
|
|
388
|
+
*/
|
|
389
|
+
class UserSwitcherInterceptor {
|
|
390
|
+
constructor(userSwitcherService, environment) {
|
|
391
|
+
this.userSwitcherService = userSwitcherService;
|
|
392
|
+
this.environment = environment;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* add token header if request url contain TaxTank API URL
|
|
396
|
+
*/
|
|
397
|
+
switch(req, username) {
|
|
398
|
+
// skip third party api requests
|
|
399
|
+
if (!req.url.includes(this.environment.api_uri) || !username) {
|
|
400
|
+
return req;
|
|
401
|
+
}
|
|
402
|
+
const params = new HttpParams({ fromString: req.params.toString() }).set('_switch_user', username);
|
|
403
|
+
return req.clone({ params });
|
|
404
|
+
// @TODO move to header solution when backend can support it
|
|
405
|
+
// return req.clone({
|
|
406
|
+
// setHeaders: {
|
|
407
|
+
// HTTP_X_SWITCH_USER: username
|
|
408
|
+
// }
|
|
409
|
+
// });
|
|
410
|
+
}
|
|
411
|
+
intercept(request, next) {
|
|
412
|
+
return next.handle(this.switch(request, this.userSwitcherService.get()));
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
UserSwitcherInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserSwitcherInterceptor, deps: [{ token: UserSwitcherService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
416
|
+
UserSwitcherInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserSwitcherInterceptor });
|
|
417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserSwitcherInterceptor, decorators: [{
|
|
418
|
+
type: Injectable
|
|
419
|
+
}], ctorParameters: function () { return [{ type: UserSwitcherService }, { type: undefined, decorators: [{
|
|
420
|
+
type: Inject,
|
|
421
|
+
args: ['environment']
|
|
422
|
+
}] }]; } });
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Backend endpoint class
|
|
426
|
+
*/
|
|
427
|
+
class Endpoint {
|
|
428
|
+
constructor(method, pattern) {
|
|
429
|
+
this.method = method;
|
|
430
|
+
this.pattern = pattern;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* check url with regexp
|
|
434
|
+
* @param url
|
|
435
|
+
*/
|
|
436
|
+
test(url) {
|
|
437
|
+
return this.regexp.test(url);
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Get regexp for endpoint
|
|
441
|
+
*/
|
|
442
|
+
get regexp() {
|
|
443
|
+
return new RegExp(`^${this.method} \.\*${this.pattern}$`);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* List of all app endpoints
|
|
449
|
+
*/
|
|
450
|
+
const ENDPOINTS = {
|
|
451
|
+
ASSETS_GET: new Endpoint('GET', '\\/assets\\/\.\*\\/\\d+'),
|
|
452
|
+
BANK_ACCOUNTS_GET: new Endpoint('GET', '\\/bank-accounts'),
|
|
453
|
+
BANK_ACCOUNTS_POST: new Endpoint('POST', '\\/bank-accounts'),
|
|
454
|
+
BANK_ACCOUNTS_PUT: new Endpoint('PUT', '\\/bank-accounts\\/\\d+'),
|
|
455
|
+
BANK_CONNECTION_POST: new Endpoint('POST', '\\/bank-connections'),
|
|
456
|
+
BANK_TRANSACTIONS_GET: new Endpoint('GET', '\\/bank-transactions'),
|
|
457
|
+
BANK_TRANSACTIONS_DELETE: new Endpoint('DELETE', '\\/bank-transactions\\/\\d+'),
|
|
458
|
+
BANK_TRANSACTIONS_IMPORT_POST: new Endpoint('POST', '\\/bank-transactions\\/\\d+\\/import'),
|
|
459
|
+
BASIQ_ACCOUNTS_GET: new Endpoint('GET', '\\/basiq\\/\\accounts'),
|
|
460
|
+
CAPITAL_COSTS_GET: new Endpoint('GET', '\\/capital-costs'),
|
|
461
|
+
CHARTS_INCOME_GET: new Endpoint('GET', '\\/charts\\/\\incomes'),
|
|
462
|
+
CHARTS_EXPENSES_GET: new Endpoint('GET', '\\/charts\\/\\expenses'),
|
|
463
|
+
CHART_ACCOUNTS_GET: new Endpoint('GET', '\\/chart-accounts'),
|
|
464
|
+
CLIENTS_GET: new Endpoint('GET', '\\/clients'),
|
|
465
|
+
CLIENTS_PUT: new Endpoint('PUT', '\\/clients'),
|
|
466
|
+
CLIENTS_EXCLUDE_PUT: new Endpoint('PUT', '\\/clients\\/\\d+\\/exclude'),
|
|
467
|
+
CLIENTS_INVITES_GET: new Endpoint('GET', '\\/clients\\/\\invites'),
|
|
468
|
+
CLIENTS_INVITES_POST: new Endpoint('POST', '\\/clients\\/\\invites'),
|
|
469
|
+
CLIENTS_INVITES_DELETE: new Endpoint('DELETE', '\\/clients\\/\\invites\\/\\d+'),
|
|
470
|
+
CLIENTS_INVITES_ACCEPT_POST: new Endpoint('POST', '\\/clients\\/\\invites\\/\\d+\\/accept'),
|
|
471
|
+
CLIENTS_INVITES_REJECT_POST: new Endpoint('POST', '\\/clients\\/\\invites\\/\\d+\\/reject'),
|
|
472
|
+
CLIENTS_INVITES_RESEND_POST: new Endpoint('POST', '\\/clients\\/\\invites\\/\\d+\\/resend'),
|
|
473
|
+
CLIENT_MOVEMENTS_GET: new Endpoint('GET', '\\/client-movements'),
|
|
474
|
+
CLIENT_MOVEMENTS_POST: new Endpoint('POST', '\\/client-movements'),
|
|
475
|
+
COUNTRIES_GET: new Endpoint('GET', '\\/countries'),
|
|
476
|
+
DEPRECIATIONS_CLOSING_GET: new Endpoint('GET', '\\/depreciations\\/\\closing-balance\.\*'),
|
|
477
|
+
DEPRECIATIONS_GET: new Endpoint('GET', '\\/depreciations'),
|
|
478
|
+
DEPRECIATIONS_POST: new Endpoint('POST', '\\/depreciations'),
|
|
479
|
+
DEPRECIATIONS_PUT: new Endpoint('PUT', '\\/depreciations\\/\\d+'),
|
|
480
|
+
EMPLOYEES_GET: new Endpoint('GET', '\\/employees'),
|
|
481
|
+
EMPLOYEES_INVITES_GET: new Endpoint('GET', '\\/employees\\/\\invites'),
|
|
482
|
+
EMPLOYEES_INVITES_DELETE: new Endpoint('DELETE', '\\/employees\\/\\invites\\/\\d+'),
|
|
483
|
+
EMPLOYEES_INVITE_POST: new Endpoint('POST', '\\/employees\\/\\invites'),
|
|
484
|
+
EMPLOYEES_INVITES_REJECT_POST: new Endpoint('POST', '\\/employees\\/\\invites\\/\\d+\\/\\reject'),
|
|
485
|
+
EMPLOYEES_INVITES_RESEND_POST: new Endpoint('POST', '\\/employees\\/\\invites\\/\\d+\\/\\resend'),
|
|
486
|
+
FIRM_GET: new Endpoint('GET', '\\/firms'),
|
|
487
|
+
FIRM_CURRENT_GET: new Endpoint('GET', '\\/firms\\/current'),
|
|
488
|
+
FIRM_CURRENT_PUT: new Endpoint('PUT', '\\/firms\\/current\.\*'),
|
|
489
|
+
FIRM_INVITE_POST: new Endpoint('POST', '\\/firms\\/invite'),
|
|
490
|
+
FIRM_REGISTRATION_POST: new Endpoint('POST', '\\/firms\\/registration'),
|
|
491
|
+
FIRM_UPDATE_PHOTO_POST: new Endpoint('POST', '\\/firms\\/photo\.\*'),
|
|
492
|
+
FOLDERS_GET: new Endpoint('GET', '\\/folders'),
|
|
493
|
+
FOLDERS_POST: new Endpoint('POST', '\\/folders'),
|
|
494
|
+
FOLDERS_PUT: new Endpoint('PUT', '\\/folders\\/\\d+'),
|
|
495
|
+
FOLDERS_DOCUMENTS_POST: new Endpoint('POST', '\\/folders\\/\\d+\\/documents'),
|
|
496
|
+
FOLDERS_DOCUMENTS_PUT: new Endpoint('PUT', '\\/folders\\/\\d+\\/documents\\/\\d+'),
|
|
497
|
+
INCOME_SOURCES_GET: new Endpoint('GET', '\\/income-sources'),
|
|
498
|
+
INCOME_SOURCES_POST: new Endpoint('POST', '\\/income-sources'),
|
|
499
|
+
INCOME_SOURCES_PUT: new Endpoint('PUT', '\\/income-sources'),
|
|
500
|
+
INCOME_SOURCES_DELETE: new Endpoint('DELETE', '\\/income-sources\\/\\d+'),
|
|
501
|
+
INCOME_SOURCE_FORECAST_GET: new Endpoint('GET', '\\/income-source-forecasts'),
|
|
502
|
+
INCOME_SOURCE_FORECAST_POST: new Endpoint('POST', '\\/income-source-forecasts'),
|
|
503
|
+
INCOME_SOURCE_FORECAST_PUT: new Endpoint('PUT', '\\/income-source-forecasts'),
|
|
504
|
+
INCOME_SOURCE_FORECAST_DELETE: new Endpoint('DELETE', '\\/income-source-forecasts\\/\\d+'),
|
|
505
|
+
INCOME_SOURCE_TYPES_GET: new Endpoint('GET', '\\/income-source-types'),
|
|
506
|
+
LOANS_GET: new Endpoint('GET', '\\/bank-accounts\\/loans'),
|
|
507
|
+
LOANS_POST: new Endpoint('POST', '\\/bank-accounts\\/loans'),
|
|
508
|
+
LOANS_PUT: new Endpoint('PUT', '\\/bank-accounts\\/loans/\\d+'),
|
|
509
|
+
LOANS_PAYOUT_POST: new Endpoint('POST', '\\/loans\\/\\d+\\/payout'),
|
|
510
|
+
LOANS_PAYOUT_PUT: new Endpoint('PUT', '\\/loans\\/\\d+\\/payout\\/\\d+'),
|
|
511
|
+
LOANS_PAYOUT_DELETE: new Endpoint('DELETE', '\\/loans\\/\\d+\\/payout\\/\\d+'),
|
|
512
|
+
LOANS_CALCULATION_POST: new Endpoint('POST', '\\/bank-accounts\\/loans\\/calculation'),
|
|
513
|
+
LOGIN_CHECK_POST: new Endpoint('POST', '\\/login_check'),
|
|
514
|
+
NOTIFICATIONS_GET: new Endpoint('GET', '\\/service-notifications'),
|
|
515
|
+
OCCUPATIONS_GET: new Endpoint('GET', '\\/occupations'),
|
|
516
|
+
PROPERTIES_GET: new Endpoint('GET', '\\/properties'),
|
|
517
|
+
PROPERTIES_POST: new Endpoint('POST', '\\/properties'),
|
|
518
|
+
PROPERTY_PUT: new Endpoint('PUT', '\\/properties/\\d+'),
|
|
519
|
+
PROPERTIES_PUT: new Endpoint('PUT', '\\/properties'),
|
|
520
|
+
PROPERTIES_CATEGORIES_EQUITY_GET: new Endpoint('GET', '\\/properties\\/categories\\/equity'),
|
|
521
|
+
PROPERTIES_CATEGORIES_GET: new Endpoint('GET', '\\/properties\\/categories'),
|
|
522
|
+
PROPERTIES_CATEGORIES_PUT: new Endpoint('PUT', '\\/properties\\/categories\\/\\d+'),
|
|
523
|
+
PROPERTIES_CATEGORIES_POST: new Endpoint('POST', '\\/properties\\/categories'),
|
|
524
|
+
PROPERTIES_CATEGORY_MOVEMENTS_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/category-movements'),
|
|
525
|
+
PROPERTIES_CATEGORY_MOVEMENTS_PUT: new Endpoint('PUT', '\\/properties\\/\\d+\\/category-movements\\/\\d+'),
|
|
526
|
+
PROPERTIES_CO_OWNERS_PUT: new Endpoint('PUT', '\\/properties\\/co-owners\\/\\d+'),
|
|
527
|
+
PROPERTIES_CO_OWNERS_GET: new Endpoint('GET', '\\/properties\\/co-owners'),
|
|
528
|
+
PROPERTIES_CO_OWNERS_POST: new Endpoint('POST', '\\/properties\\/co-owners'),
|
|
529
|
+
PROPERTIES_DEACTIVATE_PUT: new Endpoint('PUT', '\\/properties\\/\\d+\\/deactivate'),
|
|
530
|
+
PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_GET: new Endpoint('GET', '\\/properties\\/\\d+\\/depreciation-capital-projects'),
|
|
531
|
+
PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/depreciation-capital-projects'),
|
|
532
|
+
PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_PUT: new Endpoint('PUT', '\\/properties\\/\\d+\\/depreciation-capital-projects\\/\\d+'),
|
|
533
|
+
PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_DELETE: new Endpoint('DELETE', '\\/properties\\/\\d+\\/depreciation-capital-projects\\/\\d+'),
|
|
534
|
+
PROPERTIES_DOCUMENTS_GET: new Endpoint('GET', '\\/properties\\/documents'),
|
|
535
|
+
PROPERTIES_DOCUMENTS_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/documents'),
|
|
536
|
+
PROPERTIES_DOCUMENTS_PUT: new Endpoint('PUT', '\\/properties\\/documents\\/\\d+'),
|
|
537
|
+
PROPERTIES_DOCUMENTS_DELETE: new Endpoint('DELETE', '\\/properties\\/documents\\/\\d+'),
|
|
538
|
+
PROPERTIES_PHOTO_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/photo\.\*'),
|
|
539
|
+
PROPERTIES_SUGGESTIONS_GET: new Endpoint('GET', '/property\\/\\w+\\/v2\\/.*$'),
|
|
540
|
+
PROPERTIES_VALUATIONS_DOCUMENTS_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/valuations\\/\\d+\\/documents'),
|
|
541
|
+
PRORATION_COST_POST: new Endpoint('POST', '\\/subscriptions\\/proration-cost'),
|
|
542
|
+
SALARY_FORECAST_GET: new Endpoint('GET', '\\/salary-forecasts'),
|
|
543
|
+
SALARY_FORECAST_POST: new Endpoint('POST', '\\/salary-forecasts'),
|
|
544
|
+
SALARY_FORECAST_PUT: new Endpoint('PUT', '\\/salary-forecasts'),
|
|
545
|
+
SERVICE_PRICES_GET: new Endpoint('GET', '\\/service-prices'),
|
|
546
|
+
SERVICE_PAYMENTS_GET: new Endpoint('GET', '\\/service-payments'),
|
|
547
|
+
STRIPE_BILLING_PORTAL_GET: new Endpoint('GET', '\\/stripe\\/billing-portal-session'),
|
|
548
|
+
STRIPE_CHECKOUT_SESSION_POST: new Endpoint('POST', '\\/stripe\\/checkout-session'),
|
|
549
|
+
SUBSCRIPTION_LAST_GET: new Endpoint('GET', '\\/subscriptions\\/last'),
|
|
550
|
+
SUBSCRIPTION_ITEMS_PUT: new Endpoint('PUT', '\\/subscriptions\\/items'),
|
|
551
|
+
TAX_CALCULATION_POST: new Endpoint('POST', '\\/tax-calculation'),
|
|
552
|
+
TAX_REVIEWS_GET: new Endpoint('GET', '\\/tax-reviews'),
|
|
553
|
+
TAX_REVIEWS_DELETE: new Endpoint('DELETE', '\\/tax-reviews\\/\\d+'),
|
|
554
|
+
TAX_REVIEWS_POST: new Endpoint('POST', '\\/tax-reviews'),
|
|
555
|
+
TAX_REVIEWS_PUT: new Endpoint('PUT', '\\/tax-reviews\\/\\d+'),
|
|
556
|
+
TAX_SUMMARY_ACTUAL_GET: new Endpoint('GET', '\\/tax-summary\\/actuals'),
|
|
557
|
+
TAX_SUMMARY_FORECAST_GET: new Endpoint('GET', '\\/tax-summary\\/forecasts'),
|
|
558
|
+
TRANSACTION_DELETE: new Endpoint('DELETE', '\\/transactions\\/\\d+'),
|
|
559
|
+
TRANSACTION_PUT: new Endpoint('PUT', '\\/transactions\\/\\d+'),
|
|
560
|
+
TRANSACTIONS_GET: new Endpoint('GET', '\\/transactions'),
|
|
561
|
+
TRANSACTIONS_POST: new Endpoint('POST', '\\/transactions'),
|
|
562
|
+
TRANSACTIONS_PUT: new Endpoint('PUT', '\\/transactions'),
|
|
563
|
+
TRANSACTIONS_ALLOCATIONS_GET: new Endpoint('GET', '\\/transactions-allocations'),
|
|
564
|
+
TRANSACTIONS_ALLOCATIONS_POST: new Endpoint('POST', '\\/transactions-allocations'),
|
|
565
|
+
TRANSACTIONS_ALLOCATIONS_DELETE: new Endpoint('DELETE', '\\/transactions-allocations\\/\\d+'),
|
|
566
|
+
USER_CONFIRMATION_POST: new Endpoint('POST', '\\/users\\/confirmation'),
|
|
567
|
+
USER_CURRENT_GET: new Endpoint('GET', '\\/users\\/current'),
|
|
568
|
+
USER_CURRENT_PASSWORD_PUT: new Endpoint('PUT', '\\/users\\/current\\/password\.\*'),
|
|
569
|
+
USER_EVENT_SETTINGS_GET: new Endpoint('GET', '\\/user-event-settings'),
|
|
570
|
+
USER_EVENT_TYPES_GET: new Endpoint('GET', '\\/user-event-types'),
|
|
571
|
+
USER_INVITE_DELETE: new Endpoint('DELETE', '\\/users\\/invite\\/\\d+'),
|
|
572
|
+
USER_INVITE_POST: new Endpoint('POST', '\\/users\\/invite'),
|
|
573
|
+
USER_INVITE_RESEND_POST: new Endpoint('POST', '\\/users\\/invite/\\d+\\/resend'),
|
|
574
|
+
USER_PUT: new Endpoint('PUT', '\\/users\\/\\d+'),
|
|
575
|
+
USER_REGISTRATION_POST: new Endpoint('POST', '\\/users\\/registration'),
|
|
576
|
+
USER_RESET_PASSWORD_PUT: new Endpoint('PUT', '\\/users\\/reset-password'),
|
|
577
|
+
USER_SEARCH_GET: new Endpoint('GET', '\\/users\\/search\.\*'),
|
|
578
|
+
USER_UPDATE_PHOTO_POST: new Endpoint('POST', '\\/users\\/photo\.\*'),
|
|
579
|
+
USER_STATUS_PUT: new Endpoint('PUT', '\\/users\\/status'),
|
|
580
|
+
VEHICLES_GET: new Endpoint('GET', '\\/vehicles'),
|
|
581
|
+
VEHICLES_POST: new Endpoint('POST', '\\/vehicles'),
|
|
582
|
+
VEHICLES_PUT: new Endpoint('PUT', '\\/vehicles\\/\\d+'),
|
|
583
|
+
VEHICLE_CLAIMS_GET: new Endpoint('GET', '\\/vehicle-claims'),
|
|
584
|
+
VEHICLE_CLAIMS_POST: new Endpoint('POST', '\\/vehicle-claims'),
|
|
585
|
+
VEHICLE_LOGBOOK_POST: new Endpoint('POST', '\\/vehicles\\/\\d+\\/logbooks'),
|
|
586
|
+
VEHICLE_LOGBOOK_PUT: new Endpoint('PUT', '\\/vehicles\\/\\d+\\/logbooks\\/\\d+'),
|
|
587
|
+
VEHICLE_CLAIMS_PUT: new Endpoint('PUT', '\\/vehicle-claims\\/\\d+')
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
class PreloaderService {
|
|
591
|
+
constructor() {
|
|
592
|
+
this.activePreloaders = new BehaviorSubject([]);
|
|
593
|
+
}
|
|
594
|
+
get() {
|
|
595
|
+
return this.activePreloaders.asObservable();
|
|
596
|
+
}
|
|
597
|
+
add(endpoint) {
|
|
598
|
+
const activePreloaders = this.activePreloaders.getValue();
|
|
599
|
+
activePreloaders.push(endpoint);
|
|
600
|
+
this.activePreloaders.next(activePreloaders);
|
|
601
|
+
}
|
|
602
|
+
delete(endpoint) {
|
|
603
|
+
let activePreloaders = this.activePreloaders.getValue();
|
|
604
|
+
activePreloaders = activePreloaders.filter((preloader) => preloader !== endpoint);
|
|
605
|
+
this.activePreloaders.next(activePreloaders);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
PreloaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreloaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
609
|
+
PreloaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreloaderService, providedIn: 'root' });
|
|
610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreloaderService, decorators: [{
|
|
611
|
+
type: Injectable,
|
|
612
|
+
args: [{
|
|
613
|
+
providedIn: 'root'
|
|
614
|
+
}]
|
|
615
|
+
}], ctorParameters: function () { return []; } });
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* interceptor for preloader handling
|
|
619
|
+
*/
|
|
620
|
+
class PreloaderInterceptor {
|
|
621
|
+
constructor(preloaderService) {
|
|
622
|
+
this.preloaderService = preloaderService;
|
|
623
|
+
}
|
|
624
|
+
intercept(request, next) {
|
|
625
|
+
const endpoint = this.findEndpoint(`${request.method} ${request.url}`);
|
|
626
|
+
if (!!endpoint) {
|
|
627
|
+
this.preloaderService.add(endpoint);
|
|
628
|
+
return next.handle(request).pipe(finalize(() => {
|
|
629
|
+
this.preloaderService.delete(endpoint);
|
|
630
|
+
}));
|
|
631
|
+
}
|
|
632
|
+
return next.handle(request);
|
|
633
|
+
}
|
|
634
|
+
findEndpoint(requestPath) {
|
|
635
|
+
return Object.values(ENDPOINTS).find((endpoint) => endpoint.test(requestPath));
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
PreloaderInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreloaderInterceptor, deps: [{ token: PreloaderService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
639
|
+
PreloaderInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreloaderInterceptor });
|
|
640
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreloaderInterceptor, decorators: [{
|
|
641
|
+
type: Injectable
|
|
642
|
+
}], ctorParameters: function () { return [{ type: PreloaderService }]; } });
|
|
643
|
+
|
|
644
|
+
class InterceptorsModule {
|
|
645
|
+
}
|
|
646
|
+
InterceptorsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: InterceptorsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
647
|
+
InterceptorsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: InterceptorsModule });
|
|
648
|
+
InterceptorsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: InterceptorsModule, providers: [
|
|
649
|
+
{
|
|
650
|
+
provide: HTTP_INTERCEPTORS,
|
|
651
|
+
useClass: CorelogicInterceptor,
|
|
652
|
+
multi: true
|
|
653
|
+
},
|
|
654
|
+
// @TODO move to user module
|
|
655
|
+
{
|
|
656
|
+
provide: HTTP_INTERCEPTORS,
|
|
657
|
+
useClass: FinancialYearInterceptor,
|
|
658
|
+
multi: true
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
provide: HTTP_INTERCEPTORS,
|
|
662
|
+
useClass: JwtInterceptor,
|
|
663
|
+
multi: true
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
provide: HTTP_INTERCEPTORS,
|
|
667
|
+
useClass: UserSwitcherInterceptor,
|
|
668
|
+
multi: true
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
provide: HTTP_INTERCEPTORS,
|
|
672
|
+
useClass: PreloaderInterceptor,
|
|
673
|
+
multi: true
|
|
674
|
+
}
|
|
675
|
+
] });
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: InterceptorsModule, decorators: [{
|
|
677
|
+
type: NgModule,
|
|
678
|
+
args: [{
|
|
679
|
+
providers: [
|
|
680
|
+
{
|
|
681
|
+
provide: HTTP_INTERCEPTORS,
|
|
682
|
+
useClass: CorelogicInterceptor,
|
|
683
|
+
multi: true
|
|
684
|
+
},
|
|
685
|
+
// @TODO move to user module
|
|
686
|
+
{
|
|
687
|
+
provide: HTTP_INTERCEPTORS,
|
|
688
|
+
useClass: FinancialYearInterceptor,
|
|
689
|
+
multi: true
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
provide: HTTP_INTERCEPTORS,
|
|
693
|
+
useClass: JwtInterceptor,
|
|
694
|
+
multi: true
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
provide: HTTP_INTERCEPTORS,
|
|
698
|
+
useClass: UserSwitcherInterceptor,
|
|
699
|
+
multi: true
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
provide: HTTP_INTERCEPTORS,
|
|
703
|
+
useClass: PreloaderInterceptor,
|
|
704
|
+
multi: true
|
|
705
|
+
}
|
|
706
|
+
]
|
|
707
|
+
}]
|
|
708
|
+
}] });
|
|
709
|
+
|
|
33
710
|
class TtCoreModule {
|
|
34
711
|
static forRoot(environment) {
|
|
35
712
|
localStorage.setItem('api_uri', environment['api_uri']);
|
|
@@ -45,16 +722,19 @@ class TtCoreModule {
|
|
|
45
722
|
}
|
|
46
723
|
}
|
|
47
724
|
TtCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
48
|
-
TtCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, imports: [CommonModule
|
|
725
|
+
TtCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, imports: [CommonModule,
|
|
726
|
+
InterceptorsModule] });
|
|
49
727
|
TtCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, imports: [[
|
|
50
|
-
CommonModule
|
|
728
|
+
CommonModule,
|
|
729
|
+
InterceptorsModule
|
|
51
730
|
]] });
|
|
52
731
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, decorators: [{
|
|
53
732
|
type: NgModule,
|
|
54
733
|
args: [{
|
|
55
734
|
declarations: [],
|
|
56
735
|
imports: [
|
|
57
|
-
CommonModule
|
|
736
|
+
CommonModule,
|
|
737
|
+
InterceptorsModule
|
|
58
738
|
]
|
|
59
739
|
}]
|
|
60
740
|
}] });
|
|
@@ -959,6 +1639,12 @@ class PropertyCollection extends AbstractCollection {
|
|
|
959
1639
|
return min < property.purchaseDate ? min : property.purchaseDate;
|
|
960
1640
|
}, new FinancialYear(new Date()).startDate);
|
|
961
1641
|
}
|
|
1642
|
+
/**
|
|
1643
|
+
* Get list of unique property categories from collection
|
|
1644
|
+
*/
|
|
1645
|
+
getCategories() {
|
|
1646
|
+
return uniqBy(this.items.map((property) => property.category), 'id');
|
|
1647
|
+
}
|
|
962
1648
|
}
|
|
963
1649
|
|
|
964
1650
|
class ServicePriceCollection extends AbstractCollection {
|
|
@@ -1581,8 +2267,7 @@ var ChartAccountsMetadataListEnum;
|
|
|
1581
2267
|
ChartAccountsMetadataListEnum[ChartAccountsMetadataListEnum["TAX_OFFSETS"] = 8] = "TAX_OFFSETS";
|
|
1582
2268
|
ChartAccountsMetadataListEnum[ChartAccountsMetadataListEnum["HOURS"] = 11] = "HOURS";
|
|
1583
2269
|
ChartAccountsMetadataListEnum[ChartAccountsMetadataListEnum["TAX_PAID"] = 13] = "TAX_PAID";
|
|
1584
|
-
ChartAccountsMetadataListEnum[ChartAccountsMetadataListEnum["
|
|
1585
|
-
ChartAccountsMetadataListEnum[ChartAccountsMetadataListEnum["NON_REDUNDANCY"] = 18] = "NON_REDUNDANCY";
|
|
2270
|
+
ChartAccountsMetadataListEnum[ChartAccountsMetadataListEnum["TAX_FREE_COMPONENT"] = 18] = "TAX_FREE_COMPONENT";
|
|
1586
2271
|
ChartAccountsMetadataListEnum[ChartAccountsMetadataListEnum["YEARS_OF_SERVICE"] = 19] = "YEARS_OF_SERVICE";
|
|
1587
2272
|
ChartAccountsMetadataListEnum[ChartAccountsMetadataListEnum["UNTAXED_ELEMENT"] = 24] = "UNTAXED_ELEMENT";
|
|
1588
2273
|
ChartAccountsMetadataListEnum[ChartAccountsMetadataListEnum["FRANKED"] = 26] = "FRANKED";
|
|
@@ -3612,9 +4297,9 @@ class Transaction extends Transaction$1 {
|
|
|
3612
4297
|
// @TODO fix hack while transactions refactoring (use class-transformer)
|
|
3613
4298
|
return +(Math.round(this.getIncomeAmountByType(IncomeAmountTypeEnum.GROSS) * 100) / 100).toFixed(2);
|
|
3614
4299
|
}
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
4300
|
+
get taxFreeComponent() {
|
|
4301
|
+
return this.getMetadataFieldValue(ChartAccountsMetadataListEnum.TAX_FREE_COMPONENT);
|
|
4302
|
+
}
|
|
3618
4303
|
get frankingCredit() {
|
|
3619
4304
|
return this.getMetadataFieldValue(ChartAccountsMetadataListEnum.FRANKING_CREDIT);
|
|
3620
4305
|
}
|
|
@@ -3651,7 +4336,7 @@ class Transaction extends Transaction$1 {
|
|
|
3651
4336
|
(this.transactions
|
|
3652
4337
|
.reduce((sum, transaction) => sum + Math.abs(transaction.amount), 0) * modifier);
|
|
3653
4338
|
case this.isWorkTank():
|
|
3654
|
-
return this.amount + ((this.tax + this.frankingCredit) * modifier);
|
|
4339
|
+
return this.amount + ((this.tax + this.frankingCredit - this.taxFreeComponent) * modifier);
|
|
3655
4340
|
default:
|
|
3656
4341
|
return this.amount || 0;
|
|
3657
4342
|
}
|
|
@@ -4246,6 +4931,36 @@ class ClientPortfolioChartData {
|
|
|
4246
4931
|
class ClientPortfolioReport {
|
|
4247
4932
|
}
|
|
4248
4933
|
|
|
4934
|
+
var AlphabetColorsEnum;
|
|
4935
|
+
(function (AlphabetColorsEnum) {
|
|
4936
|
+
AlphabetColorsEnum["A"] = "#9CC3D5";
|
|
4937
|
+
AlphabetColorsEnum["B"] = "#E69A8D";
|
|
4938
|
+
AlphabetColorsEnum["C"] = "#ED2B33";
|
|
4939
|
+
AlphabetColorsEnum["D"] = "#E3CD81";
|
|
4940
|
+
AlphabetColorsEnum["E"] = "#343148";
|
|
4941
|
+
AlphabetColorsEnum["F"] = "#2C5F2D";
|
|
4942
|
+
AlphabetColorsEnum["G"] = "#FFA177";
|
|
4943
|
+
AlphabetColorsEnum["H"] = "#435E55";
|
|
4944
|
+
AlphabetColorsEnum["I"] = "#2BAE66";
|
|
4945
|
+
AlphabetColorsEnum["J"] = "#3C1053";
|
|
4946
|
+
AlphabetColorsEnum["K"] = "#DD4132";
|
|
4947
|
+
AlphabetColorsEnum["L"] = "#FC766A";
|
|
4948
|
+
AlphabetColorsEnum["M"] = "#ADEFD1";
|
|
4949
|
+
AlphabetColorsEnum["N"] = "#79C000";
|
|
4950
|
+
AlphabetColorsEnum["O"] = "#D198C5";
|
|
4951
|
+
AlphabetColorsEnum["P"] = "#5B84B1";
|
|
4952
|
+
AlphabetColorsEnum["Q"] = "#A13941";
|
|
4953
|
+
AlphabetColorsEnum["R"] = "#D85A7F";
|
|
4954
|
+
AlphabetColorsEnum["S"] = "#00203F";
|
|
4955
|
+
AlphabetColorsEnum["T"] = "#42EADD";
|
|
4956
|
+
AlphabetColorsEnum["U"] = "#5F4B8B";
|
|
4957
|
+
AlphabetColorsEnum["V"] = "#FDDB27";
|
|
4958
|
+
AlphabetColorsEnum["W"] = "#CDB599";
|
|
4959
|
+
AlphabetColorsEnum["X"] = "#4B878B";
|
|
4960
|
+
AlphabetColorsEnum["Y"] = "#B0B8B4";
|
|
4961
|
+
AlphabetColorsEnum["Z"] = "#E3C9CE";
|
|
4962
|
+
})(AlphabetColorsEnum || (AlphabetColorsEnum = {}));
|
|
4963
|
+
|
|
4249
4964
|
/**
|
|
4250
4965
|
* Class to generate data-table structure based on provided collection.
|
|
4251
4966
|
* Use to work with HTML/PDF/XLSX tables
|
|
@@ -4371,250 +5086,86 @@ class DepreciationReceipt extends DepreciationReceipt$1 {
|
|
|
4371
5086
|
constructor() {
|
|
4372
5087
|
super(...arguments);
|
|
4373
5088
|
this.type = AssetTypeEnum.RECEIPTS;
|
|
4374
|
-
this.entityType = AssetEntityTypeEnum.DEPRECIATIONS;
|
|
4375
|
-
}
|
|
4376
|
-
}
|
|
4377
|
-
|
|
4378
|
-
class Document$1 {
|
|
4379
|
-
}
|
|
4380
|
-
|
|
4381
|
-
/**
|
|
4382
|
-
* Enum with document types which used to API url prefix
|
|
4383
|
-
*/
|
|
4384
|
-
var DocumentApiUrlPrefixEnum;
|
|
4385
|
-
(function (DocumentApiUrlPrefixEnum) {
|
|
4386
|
-
DocumentApiUrlPrefixEnum["FOLDERS"] = "folders";
|
|
4387
|
-
DocumentApiUrlPrefixEnum["PROPERTIES"] = "properties";
|
|
4388
|
-
})(DocumentApiUrlPrefixEnum || (DocumentApiUrlPrefixEnum = {}));
|
|
4389
|
-
|
|
4390
|
-
class Document extends Document$1 {
|
|
4391
|
-
constructor() {
|
|
4392
|
-
super(...arguments);
|
|
4393
|
-
this.type = AssetTypeEnum.DOCUMENTS;
|
|
4394
|
-
this.entityType = AssetEntityTypeEnum.FOLDERS;
|
|
4395
|
-
}
|
|
4396
|
-
/**
|
|
4397
|
-
* Get folder as document parent entity
|
|
4398
|
-
*/
|
|
4399
|
-
getEntity() {
|
|
4400
|
-
return this.folder;
|
|
4401
|
-
}
|
|
4402
|
-
/**
|
|
4403
|
-
* Get API url prefix
|
|
4404
|
-
*/
|
|
4405
|
-
getApiUrlPrefix() {
|
|
4406
|
-
return DocumentApiUrlPrefixEnum.FOLDERS;
|
|
4407
|
-
}
|
|
4408
|
-
}
|
|
4409
|
-
|
|
4410
|
-
const DOCUMENT_FILE_TYPES = {
|
|
4411
|
-
image: [
|
|
4412
|
-
'image/png',
|
|
4413
|
-
'image/jpg',
|
|
4414
|
-
'image/jpeg',
|
|
4415
|
-
'image/tiff',
|
|
4416
|
-
'image/bmp'
|
|
4417
|
-
],
|
|
4418
|
-
all: [
|
|
4419
|
-
'image/png',
|
|
4420
|
-
'image/jpg',
|
|
4421
|
-
'image/jpeg',
|
|
4422
|
-
'image/tiff',
|
|
4423
|
-
'image/bmp',
|
|
4424
|
-
'application/msword',
|
|
4425
|
-
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
4426
|
-
'application/pdf',
|
|
4427
|
-
'application/vnd.ms-excel',
|
|
4428
|
-
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
4429
|
-
'text/csv'
|
|
4430
|
-
]
|
|
4431
|
-
};
|
|
4432
|
-
|
|
4433
|
-
class DocumentFolder$1 {
|
|
4434
|
-
}
|
|
4435
|
-
|
|
4436
|
-
class DocumentFolder extends DocumentFolder$1 {
|
|
4437
|
-
}
|
|
4438
|
-
__decorate([
|
|
4439
|
-
Type(() => Document)
|
|
4440
|
-
], DocumentFolder.prototype, "documents", void 0);
|
|
4441
|
-
|
|
4442
|
-
class EmployeeInvite$1 {
|
|
4443
|
-
}
|
|
4444
|
-
|
|
4445
|
-
class EmployeeInvite extends EmployeeInvite$1 {
|
|
4446
|
-
}
|
|
4447
|
-
__decorate([
|
|
4448
|
-
Type(() => RegistrationInvite)
|
|
4449
|
-
], EmployeeInvite.prototype, "registrationInvite", void 0);
|
|
4450
|
-
__decorate([
|
|
4451
|
-
Type(() => User)
|
|
4452
|
-
], EmployeeInvite.prototype, "employee", void 0);
|
|
4453
|
-
|
|
4454
|
-
/**
|
|
4455
|
-
* Backend endpoint class
|
|
4456
|
-
*/
|
|
4457
|
-
class Endpoint {
|
|
4458
|
-
constructor(method, pattern) {
|
|
4459
|
-
this.method = method;
|
|
4460
|
-
this.pattern = pattern;
|
|
4461
|
-
}
|
|
4462
|
-
/**
|
|
4463
|
-
* check url with regexp
|
|
4464
|
-
* @param url
|
|
4465
|
-
*/
|
|
4466
|
-
test(url) {
|
|
4467
|
-
return this.regexp.test(url);
|
|
4468
|
-
}
|
|
4469
|
-
/**
|
|
4470
|
-
* Get regexp for endpoint
|
|
4471
|
-
*/
|
|
4472
|
-
get regexp() {
|
|
4473
|
-
return new RegExp(`^${this.method} \.\*${this.pattern}$`);
|
|
4474
|
-
}
|
|
4475
|
-
}
|
|
4476
|
-
|
|
4477
|
-
/**
|
|
4478
|
-
* List of all app endpoints
|
|
4479
|
-
*/
|
|
4480
|
-
const ENDPOINTS = {
|
|
4481
|
-
ASSETS_GET: new Endpoint('GET', '\\/assets\\/\.\*\\/\\d+'),
|
|
4482
|
-
BANK_ACCOUNTS_GET: new Endpoint('GET', '\\/bank-accounts'),
|
|
4483
|
-
BANK_ACCOUNTS_POST: new Endpoint('POST', '\\/bank-accounts'),
|
|
4484
|
-
BANK_ACCOUNTS_PUT: new Endpoint('PUT', '\\/bank-accounts\\/\\d+'),
|
|
4485
|
-
BANK_CONNECTION_POST: new Endpoint('POST', '\\/bank-connections'),
|
|
4486
|
-
BANK_TRANSACTIONS_GET: new Endpoint('GET', '\\/bank-transactions'),
|
|
4487
|
-
BANK_TRANSACTIONS_DELETE: new Endpoint('DELETE', '\\/bank-transactions\\/\\d+'),
|
|
4488
|
-
BANK_TRANSACTIONS_IMPORT_POST: new Endpoint('POST', '\\/bank-transactions\\/\\d+\\/import'),
|
|
4489
|
-
BASIQ_ACCOUNTS_GET: new Endpoint('GET', '\\/basiq\\/\\accounts'),
|
|
4490
|
-
CAPITAL_COSTS_GET: new Endpoint('GET', '\\/capital-costs'),
|
|
4491
|
-
CHARTS_INCOME_GET: new Endpoint('GET', '\\/charts\\/\\incomes'),
|
|
4492
|
-
CHARTS_EXPENSES_GET: new Endpoint('GET', '\\/charts\\/\\expenses'),
|
|
4493
|
-
CHART_ACCOUNTS_GET: new Endpoint('GET', '\\/chart-accounts'),
|
|
4494
|
-
CLIENTS_GET: new Endpoint('GET', '\\/clients'),
|
|
4495
|
-
CLIENTS_PUT: new Endpoint('PUT', '\\/clients'),
|
|
4496
|
-
CLIENTS_EXCLUDE_PUT: new Endpoint('PUT', '\\/clients\\/\\d+\\/exclude'),
|
|
4497
|
-
CLIENTS_INVITES_GET: new Endpoint('GET', '\\/clients\\/\\invites'),
|
|
4498
|
-
CLIENTS_INVITES_POST: new Endpoint('POST', '\\/clients\\/\\invites'),
|
|
4499
|
-
CLIENTS_INVITES_DELETE: new Endpoint('DELETE', '\\/clients\\/\\invites\\/\\d+'),
|
|
4500
|
-
CLIENTS_INVITES_ACCEPT_POST: new Endpoint('POST', '\\/clients\\/\\invites\\/\\d+\\/accept'),
|
|
4501
|
-
CLIENTS_INVITES_REJECT_POST: new Endpoint('POST', '\\/clients\\/\\invites\\/\\d+\\/reject'),
|
|
4502
|
-
CLIENTS_INVITES_RESEND_POST: new Endpoint('POST', '\\/clients\\/\\invites\\/\\d+\\/resend'),
|
|
4503
|
-
CLIENT_MOVEMENTS_GET: new Endpoint('GET', '\\/client-movements'),
|
|
4504
|
-
CLIENT_MOVEMENTS_POST: new Endpoint('POST', '\\/client-movements'),
|
|
4505
|
-
COUNTRIES_GET: new Endpoint('GET', '\\/countries'),
|
|
4506
|
-
DEPRECIATIONS_CLOSING_GET: new Endpoint('GET', '\\/depreciations\\/\\closing-balance\.\*'),
|
|
4507
|
-
DEPRECIATIONS_GET: new Endpoint('GET', '\\/depreciations'),
|
|
4508
|
-
DEPRECIATIONS_POST: new Endpoint('POST', '\\/depreciations'),
|
|
4509
|
-
DEPRECIATIONS_PUT: new Endpoint('PUT', '\\/depreciations\\/\\d+'),
|
|
4510
|
-
EMPLOYEES_GET: new Endpoint('GET', '\\/employees'),
|
|
4511
|
-
EMPLOYEES_INVITES_GET: new Endpoint('GET', '\\/employees\\/\\invites'),
|
|
4512
|
-
EMPLOYEES_INVITES_DELETE: new Endpoint('DELETE', '\\/employees\\/\\invites\\/\\d+'),
|
|
4513
|
-
EMPLOYEES_INVITE_POST: new Endpoint('POST', '\\/employees\\/\\invites'),
|
|
4514
|
-
EMPLOYEES_INVITES_REJECT_POST: new Endpoint('POST', '\\/employees\\/\\invites\\/\\d+\\/\\reject'),
|
|
4515
|
-
EMPLOYEES_INVITES_RESEND_POST: new Endpoint('POST', '\\/employees\\/\\invites\\/\\d+\\/\\resend'),
|
|
4516
|
-
FIRM_GET: new Endpoint('GET', '\\/firms'),
|
|
4517
|
-
FIRM_CURRENT_GET: new Endpoint('GET', '\\/firms\\/current'),
|
|
4518
|
-
FIRM_CURRENT_PUT: new Endpoint('PUT', '\\/firms\\/current\.\*'),
|
|
4519
|
-
FIRM_INVITE_POST: new Endpoint('POST', '\\/firms\\/invite'),
|
|
4520
|
-
FIRM_REGISTRATION_POST: new Endpoint('POST', '\\/firms\\/registration'),
|
|
4521
|
-
FIRM_UPDATE_PHOTO_POST: new Endpoint('POST', '\\/firms\\/photo\.\*'),
|
|
4522
|
-
FOLDERS_GET: new Endpoint('GET', '\\/folders'),
|
|
4523
|
-
FOLDERS_POST: new Endpoint('POST', '\\/folders'),
|
|
4524
|
-
FOLDERS_PUT: new Endpoint('PUT', '\\/folders\\/\\d+'),
|
|
4525
|
-
FOLDERS_DOCUMENTS_POST: new Endpoint('POST', '\\/folders\\/\\d+\\/documents'),
|
|
4526
|
-
FOLDERS_DOCUMENTS_PUT: new Endpoint('PUT', '\\/folders\\/\\d+\\/documents\\/\\d+'),
|
|
4527
|
-
INCOME_SOURCES_GET: new Endpoint('GET', '\\/income-sources'),
|
|
4528
|
-
INCOME_SOURCES_POST: new Endpoint('POST', '\\/income-sources'),
|
|
4529
|
-
INCOME_SOURCES_PUT: new Endpoint('PUT', '\\/income-sources'),
|
|
4530
|
-
INCOME_SOURCES_DELETE: new Endpoint('DELETE', '\\/income-sources\\/\\d+'),
|
|
4531
|
-
INCOME_SOURCE_FORECAST_GET: new Endpoint('GET', '\\/income-source-forecasts'),
|
|
4532
|
-
INCOME_SOURCE_FORECAST_POST: new Endpoint('POST', '\\/income-source-forecasts'),
|
|
4533
|
-
INCOME_SOURCE_FORECAST_PUT: new Endpoint('PUT', '\\/income-source-forecasts'),
|
|
4534
|
-
INCOME_SOURCE_FORECAST_DELETE: new Endpoint('DELETE', '\\/income-source-forecasts\\/\\d+'),
|
|
4535
|
-
INCOME_SOURCE_TYPES_GET: new Endpoint('GET', '\\/income-source-types'),
|
|
4536
|
-
LOANS_GET: new Endpoint('GET', '\\/bank-accounts\\/loans'),
|
|
4537
|
-
LOANS_POST: new Endpoint('POST', '\\/bank-accounts\\/loans'),
|
|
4538
|
-
LOANS_PUT: new Endpoint('PUT', '\\/bank-accounts\\/loans/\\d+'),
|
|
4539
|
-
LOANS_PAYOUT_POST: new Endpoint('POST', '\\/loans\\/\\d+\\/payout'),
|
|
4540
|
-
LOANS_PAYOUT_PUT: new Endpoint('PUT', '\\/loans\\/\\d+\\/payout\\/\\d+'),
|
|
4541
|
-
LOANS_PAYOUT_DELETE: new Endpoint('DELETE', '\\/loans\\/\\d+\\/payout\\/\\d+'),
|
|
4542
|
-
LOANS_CALCULATION_POST: new Endpoint('POST', '\\/bank-accounts\\/loans\\/calculation'),
|
|
4543
|
-
LOGIN_CHECK_POST: new Endpoint('POST', '\\/login_check'),
|
|
4544
|
-
NOTIFICATIONS_GET: new Endpoint('GET', '\\/service-notifications'),
|
|
4545
|
-
OCCUPATIONS_GET: new Endpoint('GET', '\\/occupations'),
|
|
4546
|
-
PROPERTIES_GET: new Endpoint('GET', '\\/properties'),
|
|
4547
|
-
PROPERTIES_POST: new Endpoint('POST', '\\/properties'),
|
|
4548
|
-
PROPERTY_PUT: new Endpoint('PUT', '\\/properties/\\d+'),
|
|
4549
|
-
PROPERTIES_PUT: new Endpoint('PUT', '\\/properties'),
|
|
4550
|
-
PROPERTIES_CATEGORIES_EQUITY_GET: new Endpoint('GET', '\\/properties\\/categories\\/equity'),
|
|
4551
|
-
PROPERTIES_CATEGORIES_GET: new Endpoint('GET', '\\/properties\\/categories'),
|
|
4552
|
-
PROPERTIES_CATEGORIES_PUT: new Endpoint('PUT', '\\/properties\\/categories\\/\\d+'),
|
|
4553
|
-
PROPERTIES_CATEGORIES_POST: new Endpoint('POST', '\\/properties\\/categories'),
|
|
4554
|
-
PROPERTIES_CATEGORY_MOVEMENTS_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/category-movements'),
|
|
4555
|
-
PROPERTIES_CATEGORY_MOVEMENTS_PUT: new Endpoint('PUT', '\\/properties\\/\\d+\\/category-movements\\/\\d+'),
|
|
4556
|
-
PROPERTIES_CO_OWNERS_PUT: new Endpoint('PUT', '\\/properties\\/co-owners\\/\\d+'),
|
|
4557
|
-
PROPERTIES_CO_OWNERS_GET: new Endpoint('GET', '\\/properties\\/co-owners'),
|
|
4558
|
-
PROPERTIES_CO_OWNERS_POST: new Endpoint('POST', '\\/properties\\/co-owners'),
|
|
4559
|
-
PROPERTIES_DEACTIVATE_PUT: new Endpoint('PUT', '\\/properties\\/\\d+\\/deactivate'),
|
|
4560
|
-
PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_GET: new Endpoint('GET', '\\/properties\\/\\d+\\/depreciation-capital-projects'),
|
|
4561
|
-
PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/depreciation-capital-projects'),
|
|
4562
|
-
PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_PUT: new Endpoint('PUT', '\\/properties\\/\\d+\\/depreciation-capital-projects\\/\\d+'),
|
|
4563
|
-
PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_DELETE: new Endpoint('DELETE', '\\/properties\\/\\d+\\/depreciation-capital-projects\\/\\d+'),
|
|
4564
|
-
PROPERTIES_DOCUMENTS_GET: new Endpoint('GET', '\\/properties\\/documents'),
|
|
4565
|
-
PROPERTIES_DOCUMENTS_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/documents'),
|
|
4566
|
-
PROPERTIES_DOCUMENTS_PUT: new Endpoint('PUT', '\\/properties\\/documents\\/\\d+'),
|
|
4567
|
-
PROPERTIES_DOCUMENTS_DELETE: new Endpoint('DELETE', '\\/properties\\/documents\\/\\d+'),
|
|
4568
|
-
PROPERTIES_PHOTO_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/photo\.\*'),
|
|
4569
|
-
PROPERTIES_SUGGESTIONS_GET: new Endpoint('GET', '/property\\/\\w+\\/v2\\/.*$'),
|
|
4570
|
-
PROPERTIES_VALUATIONS_DOCUMENTS_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/valuations\\/\\d+\\/documents'),
|
|
4571
|
-
PRORATION_COST_POST: new Endpoint('POST', '\\/subscriptions\\/proration-cost'),
|
|
4572
|
-
SALARY_FORECAST_GET: new Endpoint('GET', '\\/salary-forecasts'),
|
|
4573
|
-
SALARY_FORECAST_POST: new Endpoint('POST', '\\/salary-forecasts'),
|
|
4574
|
-
SALARY_FORECAST_PUT: new Endpoint('PUT', '\\/salary-forecasts'),
|
|
4575
|
-
SERVICE_PRICES_GET: new Endpoint('GET', '\\/service-prices'),
|
|
4576
|
-
SERVICE_PAYMENTS_GET: new Endpoint('GET', '\\/service-payments'),
|
|
4577
|
-
STRIPE_BILLING_PORTAL_GET: new Endpoint('GET', '\\/stripe\\/billing-portal-session'),
|
|
4578
|
-
STRIPE_CHECKOUT_SESSION_POST: new Endpoint('POST', '\\/stripe\\/checkout-session'),
|
|
4579
|
-
SUBSCRIPTION_LAST_GET: new Endpoint('GET', '\\/subscriptions\\/last'),
|
|
4580
|
-
SUBSCRIPTION_ITEMS_PUT: new Endpoint('PUT', '\\/subscriptions\\/items'),
|
|
4581
|
-
TAX_CALCULATION_POST: new Endpoint('POST', '\\/tax-calculation'),
|
|
4582
|
-
TAX_REVIEWS_GET: new Endpoint('GET', '\\/tax-reviews'),
|
|
4583
|
-
TAX_REVIEWS_DELETE: new Endpoint('DELETE', '\\/tax-reviews\\/\\d+'),
|
|
4584
|
-
TAX_REVIEWS_POST: new Endpoint('POST', '\\/tax-reviews'),
|
|
4585
|
-
TAX_REVIEWS_PUT: new Endpoint('PUT', '\\/tax-reviews\\/\\d+'),
|
|
4586
|
-
TAX_SUMMARY_ACTUAL_GET: new Endpoint('GET', '\\/tax-summary\\/actuals'),
|
|
4587
|
-
TAX_SUMMARY_FORECAST_GET: new Endpoint('GET', '\\/tax-summary\\/forecasts'),
|
|
4588
|
-
TRANSACTION_DELETE: new Endpoint('DELETE', '\\/transactions\\/\\d+'),
|
|
4589
|
-
TRANSACTION_PUT: new Endpoint('PUT', '\\/transactions\\/\\d+'),
|
|
4590
|
-
TRANSACTIONS_GET: new Endpoint('GET', '\\/transactions'),
|
|
4591
|
-
TRANSACTIONS_POST: new Endpoint('POST', '\\/transactions'),
|
|
4592
|
-
TRANSACTIONS_PUT: new Endpoint('PUT', '\\/transactions'),
|
|
4593
|
-
TRANSACTIONS_ALLOCATIONS_GET: new Endpoint('GET', '\\/transactions-allocations'),
|
|
4594
|
-
TRANSACTIONS_ALLOCATIONS_POST: new Endpoint('POST', '\\/transactions-allocations'),
|
|
4595
|
-
TRANSACTIONS_ALLOCATIONS_DELETE: new Endpoint('DELETE', '\\/transactions-allocations\\/\\d+'),
|
|
4596
|
-
USER_CONFIRMATION_POST: new Endpoint('POST', '\\/users\\/confirmation'),
|
|
4597
|
-
USER_CURRENT_GET: new Endpoint('GET', '\\/users\\/current'),
|
|
4598
|
-
USER_CURRENT_PASSWORD_PUT: new Endpoint('PUT', '\\/users\\/current\\/password\.\*'),
|
|
4599
|
-
USER_EVENT_SETTINGS_GET: new Endpoint('GET', '\\/user-event-settings'),
|
|
4600
|
-
USER_EVENT_TYPES_GET: new Endpoint('GET', '\\/user-event-types'),
|
|
4601
|
-
USER_INVITE_DELETE: new Endpoint('DELETE', '\\/users\\/invite\\/\\d+'),
|
|
4602
|
-
USER_INVITE_POST: new Endpoint('POST', '\\/users\\/invite'),
|
|
4603
|
-
USER_INVITE_RESEND_POST: new Endpoint('POST', '\\/users\\/invite/\\d+\\/resend'),
|
|
4604
|
-
USER_PUT: new Endpoint('PUT', '\\/users\\/\\d+'),
|
|
4605
|
-
USER_REGISTRATION_POST: new Endpoint('POST', '\\/users\\/registration'),
|
|
4606
|
-
USER_RESET_PASSWORD_PUT: new Endpoint('PUT', '\\/users\\/reset-password'),
|
|
4607
|
-
USER_SEARCH_GET: new Endpoint('GET', '\\/users\\/search\.\*'),
|
|
4608
|
-
USER_UPDATE_PHOTO_POST: new Endpoint('POST', '\\/users\\/photo\.\*'),
|
|
4609
|
-
USER_STATUS_PUT: new Endpoint('PUT', '\\/users\\/status'),
|
|
4610
|
-
VEHICLES_GET: new Endpoint('GET', '\\/vehicles'),
|
|
4611
|
-
VEHICLE_CLAIMS_GET: new Endpoint('GET', '\\/vehicle-claims'),
|
|
4612
|
-
VEHICLE_CLAIMS_POST: new Endpoint('POST', '\\/vehicle-claims'),
|
|
4613
|
-
VEHICLE_LOGBOOK_POST: new Endpoint('POST', '\\/vehicles\\/\\d+\\/logbooks'),
|
|
4614
|
-
VEHICLE_LOGBOOK_PUT: new Endpoint('PUT', '\\/vehicles\\/\\d+\\/logbooks\\/\\d+'),
|
|
4615
|
-
VEHICLE_CLAIMS_PUT: new Endpoint('PUT', '\\/vehicle-claims\\/\\d+')
|
|
5089
|
+
this.entityType = AssetEntityTypeEnum.DEPRECIATIONS;
|
|
5090
|
+
}
|
|
5091
|
+
}
|
|
5092
|
+
|
|
5093
|
+
class Document$1 {
|
|
5094
|
+
}
|
|
5095
|
+
|
|
5096
|
+
/**
|
|
5097
|
+
* Enum with document types which used to API url prefix
|
|
5098
|
+
*/
|
|
5099
|
+
var DocumentApiUrlPrefixEnum;
|
|
5100
|
+
(function (DocumentApiUrlPrefixEnum) {
|
|
5101
|
+
DocumentApiUrlPrefixEnum["FOLDERS"] = "folders";
|
|
5102
|
+
DocumentApiUrlPrefixEnum["PROPERTIES"] = "properties";
|
|
5103
|
+
})(DocumentApiUrlPrefixEnum || (DocumentApiUrlPrefixEnum = {}));
|
|
5104
|
+
|
|
5105
|
+
class Document extends Document$1 {
|
|
5106
|
+
constructor() {
|
|
5107
|
+
super(...arguments);
|
|
5108
|
+
this.type = AssetTypeEnum.DOCUMENTS;
|
|
5109
|
+
this.entityType = AssetEntityTypeEnum.FOLDERS;
|
|
5110
|
+
}
|
|
5111
|
+
/**
|
|
5112
|
+
* Get folder as document parent entity
|
|
5113
|
+
*/
|
|
5114
|
+
getEntity() {
|
|
5115
|
+
return this.folder;
|
|
5116
|
+
}
|
|
5117
|
+
/**
|
|
5118
|
+
* Get API url prefix
|
|
5119
|
+
*/
|
|
5120
|
+
getApiUrlPrefix() {
|
|
5121
|
+
return DocumentApiUrlPrefixEnum.FOLDERS;
|
|
5122
|
+
}
|
|
5123
|
+
}
|
|
5124
|
+
|
|
5125
|
+
const DOCUMENT_FILE_TYPES = {
|
|
5126
|
+
image: [
|
|
5127
|
+
'image/png',
|
|
5128
|
+
'image/jpg',
|
|
5129
|
+
'image/jpeg',
|
|
5130
|
+
'image/tiff',
|
|
5131
|
+
'image/bmp'
|
|
5132
|
+
],
|
|
5133
|
+
all: [
|
|
5134
|
+
'image/png',
|
|
5135
|
+
'image/jpg',
|
|
5136
|
+
'image/jpeg',
|
|
5137
|
+
'image/tiff',
|
|
5138
|
+
'image/bmp',
|
|
5139
|
+
'application/msword',
|
|
5140
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
5141
|
+
'application/pdf',
|
|
5142
|
+
'application/vnd.ms-excel',
|
|
5143
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
5144
|
+
'text/csv'
|
|
5145
|
+
]
|
|
4616
5146
|
};
|
|
4617
5147
|
|
|
5148
|
+
class DocumentFolder$1 {
|
|
5149
|
+
}
|
|
5150
|
+
|
|
5151
|
+
class DocumentFolder extends DocumentFolder$1 {
|
|
5152
|
+
}
|
|
5153
|
+
__decorate([
|
|
5154
|
+
Type(() => Document)
|
|
5155
|
+
], DocumentFolder.prototype, "documents", void 0);
|
|
5156
|
+
|
|
5157
|
+
class EmployeeInvite$1 {
|
|
5158
|
+
}
|
|
5159
|
+
|
|
5160
|
+
class EmployeeInvite extends EmployeeInvite$1 {
|
|
5161
|
+
}
|
|
5162
|
+
__decorate([
|
|
5163
|
+
Type(() => RegistrationInvite)
|
|
5164
|
+
], EmployeeInvite.prototype, "registrationInvite", void 0);
|
|
5165
|
+
__decorate([
|
|
5166
|
+
Type(() => User)
|
|
5167
|
+
], EmployeeInvite.prototype, "employee", void 0);
|
|
5168
|
+
|
|
4618
5169
|
/**
|
|
4619
5170
|
* any event happened in the app, which needs to be handled somehow (distributed to other part of the app)
|
|
4620
5171
|
*/
|
|
@@ -4944,13 +5495,6 @@ const CAPITAL_COSTS_ITEMS = [
|
|
|
4944
5495
|
}),
|
|
4945
5496
|
];
|
|
4946
5497
|
|
|
4947
|
-
/**
|
|
4948
|
-
* https://api-uat.corelogic.asia/property/au/v2/suggest.json
|
|
4949
|
-
* address suggestion from corelogic service
|
|
4950
|
-
*/
|
|
4951
|
-
class CorelogicSuggestion {
|
|
4952
|
-
}
|
|
4953
|
-
|
|
4954
5498
|
/**
|
|
4955
5499
|
* Enum with properties ownership filter options
|
|
4956
5500
|
*/
|
|
@@ -5562,41 +6106,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
5562
6106
|
args: ['environment']
|
|
5563
6107
|
}] }]; } });
|
|
5564
6108
|
|
|
5565
|
-
const KEY = '_switch_user';
|
|
5566
|
-
/**
|
|
5567
|
-
* provides user management to managers (users with ROLE_ACCOUNTANT for now, more in future)
|
|
5568
|
-
*/
|
|
5569
|
-
class UserSwitcherService {
|
|
5570
|
-
/**
|
|
5571
|
-
* get switched username
|
|
5572
|
-
*/
|
|
5573
|
-
get() {
|
|
5574
|
-
return localStorage[KEY];
|
|
5575
|
-
}
|
|
5576
|
-
/**
|
|
5577
|
-
* switch to user (username should be used for correct work of backend)
|
|
5578
|
-
*/
|
|
5579
|
-
set(username) {
|
|
5580
|
-
localStorage[KEY] = username;
|
|
5581
|
-
window.location.replace('/client/dashboard');
|
|
5582
|
-
}
|
|
5583
|
-
/**
|
|
5584
|
-
* go back to original user
|
|
5585
|
-
*/
|
|
5586
|
-
reset() {
|
|
5587
|
-
localStorage.removeItem(KEY);
|
|
5588
|
-
window.location.replace('/firm/dashboard');
|
|
5589
|
-
}
|
|
5590
|
-
}
|
|
5591
|
-
UserSwitcherService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserSwitcherService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5592
|
-
UserSwitcherService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserSwitcherService, providedIn: 'root' });
|
|
5593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserSwitcherService, decorators: [{
|
|
5594
|
-
type: Injectable,
|
|
5595
|
-
args: [{
|
|
5596
|
-
providedIn: 'root'
|
|
5597
|
-
}]
|
|
5598
|
-
}] });
|
|
5599
|
-
|
|
5600
6109
|
/**
|
|
5601
6110
|
* Service to work with assets (documents, receipts, e.t.c.)
|
|
5602
6111
|
*/
|
|
@@ -5644,79 +6153,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
5644
6153
|
args: ['environment']
|
|
5645
6154
|
}] }]; } });
|
|
5646
6155
|
|
|
5647
|
-
const NAME_TOKEN = 'token';
|
|
5648
|
-
const NAME_REFRESH_TOKEN = 'refreshToken';
|
|
5649
|
-
class JwtService extends JwtHelperService {
|
|
5650
|
-
getToken() {
|
|
5651
|
-
return localStorage[NAME_TOKEN];
|
|
5652
|
-
}
|
|
5653
|
-
getRefreshToken() {
|
|
5654
|
-
return localStorage[NAME_REFRESH_TOKEN];
|
|
5655
|
-
}
|
|
5656
|
-
saveTokens(tokens) {
|
|
5657
|
-
localStorage[NAME_TOKEN] = tokens.token;
|
|
5658
|
-
localStorage[NAME_REFRESH_TOKEN] = tokens.refreshToken;
|
|
5659
|
-
}
|
|
5660
|
-
destroyTokens() {
|
|
5661
|
-
localStorage.removeItem(NAME_TOKEN);
|
|
5662
|
-
localStorage.removeItem(NAME_REFRESH_TOKEN);
|
|
5663
|
-
}
|
|
5664
|
-
getUser() {
|
|
5665
|
-
return this.decodeToken();
|
|
5666
|
-
}
|
|
5667
|
-
isMe(userId) {
|
|
5668
|
-
return this.getUser().id === userId;
|
|
5669
|
-
}
|
|
5670
|
-
}
|
|
5671
|
-
JwtService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: JwtService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
5672
|
-
JwtService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: JwtService, providedIn: 'root' });
|
|
5673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: JwtService, decorators: [{
|
|
5674
|
-
type: Injectable,
|
|
5675
|
-
args: [{
|
|
5676
|
-
providedIn: 'root'
|
|
5677
|
-
}]
|
|
5678
|
-
}] });
|
|
5679
|
-
|
|
5680
|
-
class AuthService {
|
|
5681
|
-
constructor(http, jwtService, environment) {
|
|
5682
|
-
this.http = http;
|
|
5683
|
-
this.jwtService = jwtService;
|
|
5684
|
-
this.environment = environment;
|
|
5685
|
-
this.isLoggedInSubject = new BehaviorSubject(!this.jwtService.isTokenExpired());
|
|
5686
|
-
}
|
|
5687
|
-
setAuth(response) {
|
|
5688
|
-
this.jwtService.saveTokens(response);
|
|
5689
|
-
this.isLoggedInSubject.next(true);
|
|
5690
|
-
}
|
|
5691
|
-
login(username, password) {
|
|
5692
|
-
return this.http.post(`${this.environment.apiV2}/login_check`, { username, password }).pipe(map((response) => {
|
|
5693
|
-
this.setAuth(response);
|
|
5694
|
-
return response;
|
|
5695
|
-
}));
|
|
5696
|
-
}
|
|
5697
|
-
refresh(refreshToken) {
|
|
5698
|
-
return this.http.post(`${this.environment.apiV2}/token/refresh`, { refreshToken }).pipe(map((response) => {
|
|
5699
|
-
this.setAuth(response);
|
|
5700
|
-
return response;
|
|
5701
|
-
}));
|
|
5702
|
-
}
|
|
5703
|
-
logoutFront(url = '/login') {
|
|
5704
|
-
localStorage.clear();
|
|
5705
|
-
location.replace(url);
|
|
5706
|
-
}
|
|
5707
|
-
}
|
|
5708
|
-
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: JwtService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5709
|
-
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
5710
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: AuthService, decorators: [{
|
|
5711
|
-
type: Injectable,
|
|
5712
|
-
args: [{
|
|
5713
|
-
providedIn: 'root'
|
|
5714
|
-
}]
|
|
5715
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: JwtService }, { type: undefined, decorators: [{
|
|
5716
|
-
type: Inject,
|
|
5717
|
-
args: ['environment']
|
|
5718
|
-
}] }]; } });
|
|
5719
|
-
|
|
5720
6156
|
// replace array element with the new one (only arrays of objects)
|
|
5721
6157
|
function replace(array, item, matchField = 'id') {
|
|
5722
6158
|
const index = array.findIndex((i) => i[matchField] === item[matchField]);
|
|
@@ -6058,6 +6494,12 @@ class BankAccountService extends BaseRestService {
|
|
|
6058
6494
|
return updatedBankAccount;
|
|
6059
6495
|
}));
|
|
6060
6496
|
}
|
|
6497
|
+
getOwn() {
|
|
6498
|
+
return this.get()
|
|
6499
|
+
.pipe(map((bankAccounts) => {
|
|
6500
|
+
return bankAccounts.filter((bankAccount) => bankAccount.isOwner(+localStorage.getItem('userId')));
|
|
6501
|
+
}));
|
|
6502
|
+
}
|
|
6061
6503
|
/**
|
|
6062
6504
|
* Listen to EventDispatcherService events
|
|
6063
6505
|
*/
|
|
@@ -6187,6 +6629,10 @@ class BankConnectionService extends BaseRestService {
|
|
|
6187
6629
|
this.environment = environment;
|
|
6188
6630
|
this.modelClass = BankConnection;
|
|
6189
6631
|
this.url = 'bank-connections';
|
|
6632
|
+
this.listenEvents();
|
|
6633
|
+
}
|
|
6634
|
+
listenEvents() {
|
|
6635
|
+
this.listenToAddedBankAccounts();
|
|
6190
6636
|
}
|
|
6191
6637
|
post(bankConnection) {
|
|
6192
6638
|
return this.http.post(`${this.environment.apiV2}/${this.url}`, bankConnection)
|
|
@@ -6195,6 +6641,11 @@ class BankConnectionService extends BaseRestService {
|
|
|
6195
6641
|
return plainToClass(BankConnection, bankConnectionBase);
|
|
6196
6642
|
}));
|
|
6197
6643
|
}
|
|
6644
|
+
listenToAddedBankAccounts() {
|
|
6645
|
+
this.eventDispatcherService.on(AppEventTypeEnum.BANK_ACCOUNT_CREATED).subscribe(() => {
|
|
6646
|
+
this.resetCache();
|
|
6647
|
+
});
|
|
6648
|
+
}
|
|
6198
6649
|
}
|
|
6199
6650
|
BankConnectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: BankConnectionService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6200
6651
|
BankConnectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: BankConnectionService, providedIn: 'root' });
|
|
@@ -8006,63 +8457,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
8006
8457
|
}]
|
|
8007
8458
|
}] });
|
|
8008
8459
|
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
get() {
|
|
8014
|
-
return this.activePreloaders.asObservable();
|
|
8015
|
-
}
|
|
8016
|
-
add(endpoint) {
|
|
8017
|
-
const activePreloaders = this.activePreloaders.getValue();
|
|
8018
|
-
activePreloaders.push(endpoint);
|
|
8019
|
-
this.activePreloaders.next(activePreloaders);
|
|
8020
|
-
}
|
|
8021
|
-
delete(endpoint) {
|
|
8022
|
-
let activePreloaders = this.activePreloaders.getValue();
|
|
8023
|
-
activePreloaders = activePreloaders.filter((preloader) => preloader !== endpoint);
|
|
8024
|
-
this.activePreloaders.next(activePreloaders);
|
|
8025
|
-
}
|
|
8026
|
-
}
|
|
8027
|
-
PreloaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreloaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8028
|
-
PreloaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreloaderService, providedIn: 'root' });
|
|
8029
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreloaderService, decorators: [{
|
|
8030
|
-
type: Injectable,
|
|
8031
|
-
args: [{
|
|
8032
|
-
providedIn: 'root'
|
|
8033
|
-
}]
|
|
8034
|
-
}], ctorParameters: function () { return []; } });
|
|
8035
|
-
|
|
8036
|
-
class CorelogicService {
|
|
8460
|
+
/**
|
|
8461
|
+
* Service for get property equity position half-year history chart data
|
|
8462
|
+
*/
|
|
8463
|
+
class EquityPositionChartService {
|
|
8037
8464
|
constructor(http, environment) {
|
|
8038
8465
|
this.http = http;
|
|
8039
8466
|
this.environment = environment;
|
|
8040
|
-
this.accessTokenSubject = new ReplaySubject(1);
|
|
8041
|
-
}
|
|
8042
|
-
getAccessToken(force = false) {
|
|
8043
|
-
if (!this._accessToken || force) {
|
|
8044
|
-
this.http.get(`${this.environment.coreLogicUrl}/access/oauth/token?grant_type=client_credentials&client_id=${this.environment.coreLogicId}&client_secret=${this.environment.coreLogicSecret}`)
|
|
8045
|
-
.pipe(map((response) => {
|
|
8046
|
-
return response.access_token;
|
|
8047
|
-
}))
|
|
8048
|
-
.subscribe((token) => {
|
|
8049
|
-
this._accessToken = token;
|
|
8050
|
-
this.accessTokenSubject.next(this._accessToken);
|
|
8051
|
-
});
|
|
8052
|
-
}
|
|
8053
|
-
return this.accessTokenSubject.asObservable();
|
|
8054
8467
|
}
|
|
8055
|
-
|
|
8056
|
-
// @TODO
|
|
8057
|
-
return this.http.get(`${this.environment.
|
|
8468
|
+
get() {
|
|
8469
|
+
// @TODO refactor backend
|
|
8470
|
+
return this.http.get(`${this.environment.apiV2}/properties/categories/equity`)
|
|
8058
8471
|
.pipe(map((response) => {
|
|
8059
|
-
return response.
|
|
8472
|
+
return response.map((item) => {
|
|
8473
|
+
return plainToClass(ChartData, {
|
|
8474
|
+
name: item.category.name,
|
|
8475
|
+
data: item.equity.map((serie) => {
|
|
8476
|
+
return plainToClass(ChartSerie, {
|
|
8477
|
+
label: serie.date,
|
|
8478
|
+
value: serie.amount
|
|
8479
|
+
});
|
|
8480
|
+
})
|
|
8481
|
+
});
|
|
8482
|
+
});
|
|
8060
8483
|
}));
|
|
8061
8484
|
}
|
|
8062
8485
|
}
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type:
|
|
8486
|
+
EquityPositionChartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8487
|
+
EquityPositionChartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, providedIn: 'root' });
|
|
8488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, decorators: [{
|
|
8066
8489
|
type: Injectable,
|
|
8067
8490
|
args: [{
|
|
8068
8491
|
providedIn: 'root'
|
|
@@ -9849,5 +10272,5 @@ function taxReviewFilterPredicate(data, filter) {
|
|
|
9849
10272
|
* Generated bundle index. Do not edit.
|
|
9850
10273
|
*/
|
|
9851
10274
|
|
|
9852
|
-
export { AbstractCollection, Address, AddressService, AddressTypeEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Bank, BankAccount, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CapitalProjectService, ChartAccounts, ChartAccountsCategoryEnum, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartData, ChartSerie, Chat, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientInvite, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEFAULT_VEHICLE_EXPENSE, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DataTable, DataTableColumn, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationReceipt, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EventDispatcherService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSalaryEnum, IncomeSourceTypeListWorkEnum, IntercomService, InviteStatusEnum, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookCollection, LogbookPeriod, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, Notification, NotificationService, Occupation, OccupationService, OwnershipFilterOptionsEnum, PdfService, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCapitalCost, PropertyCapitalCostService, PropertyCategory, PropertyCategoryMovement, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyOwner, PropertyOwnerAccessEnum, PropertyOwnerService, PropertyOwnerStatusEnum, PropertyService, PropertySold, PropertySoldService, PropertySubscription, PropertyValuation, RegistrationInvite, RegistrationInviteStatusEnum, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceTypeEnum, ServiceProduct, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxReturnCategoryItem, TaxReturnCategoryItemCollection, TaxReturnCategoryItemDetails, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionCalculationService, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, Vehicle, VehicleClaim, VehicleClaimMethodEnum, VehicleLogbook, VehicleLogbookPurposeEnum, WORK_TANK_LOGBOOK_PURPOSE_OPTIONS, WorkTankService, XlsxService, cloneDeep, compare, compareMatOptions, createDate, displayMatOptions, enumToList, getDocIcon, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
|
|
10275
|
+
export { AbstractCollection, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Bank, BankAccount, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CapitalProjectService, ChartAccounts, ChartAccountsCategoryEnum, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartData, ChartSerie, Chat, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientInvite, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEFAULT_VEHICLE_EXPENSE, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DataTable, DataTableColumn, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationReceipt, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSalaryEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookCollection, LogbookPeriod, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, Notification, NotificationService, Occupation, OccupationService, OwnershipFilterOptionsEnum, PdfService, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCapitalCost, PropertyCapitalCostService, PropertyCategory, PropertyCategoryMovement, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyOwner, PropertyOwnerAccessEnum, PropertyOwnerService, PropertyOwnerStatusEnum, PropertyService, PropertySold, PropertySoldService, PropertySubscription, PropertyValuation, RegistrationInvite, RegistrationInviteStatusEnum, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceTypeEnum, ServiceProduct, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxReturnCategoryItem, TaxReturnCategoryItemCollection, TaxReturnCategoryItemDetails, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionCalculationService, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, Vehicle, VehicleClaim, VehicleClaimMethodEnum, VehicleLogbook, VehicleLogbookPurposeEnum, WORK_TANK_LOGBOOK_PURPOSE_OPTIONS, WorkTankService, XlsxService, cloneDeep, compare, compareMatOptions, createDate, displayMatOptions, enumToList, getDocIcon, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
|
|
9853
10276
|
//# sourceMappingURL=taxtank-core.js.map
|