taxtank-core 0.33.47 → 0.33.48
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/collections/home-office/home-office-claim.collection.mjs +7 -0
- package/esm2022/src/lib/collections/home-office/index.mjs +2 -0
- package/esm2022/src/lib/collections/index.mjs +2 -1
- package/esm2022/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.mjs +10 -1
- package/esm2022/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.mjs +6 -1
- package/esm2022/src/lib/db/Enums/chart-accounts/index.mjs +1 -2
- package/esm2022/src/lib/forms/abstract.form.mjs +3 -3
- package/esm2022/src/lib/forms/home-office/home-office-calculator.form.mjs +25 -0
- package/esm2022/src/lib/forms/home-office/home-office-claim.form.mjs +3 -3
- package/esm2022/src/lib/forms/home-office/home-office-log.form.mjs +2 -2
- package/esm2022/src/lib/forms/home-office/index.mjs +2 -1
- package/esm2022/src/lib/forms/transaction/work/work-expense.form.mjs +15 -2
- package/esm2022/src/lib/models/bank/bank-transaction-chart-data.mjs +2 -3
- package/esm2022/src/lib/models/chart-accounts/chart-accounts.mjs +21 -2
- package/esm2022/src/lib/models/dictionary/dictionary.mjs +3 -2
- package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +5 -1
- package/esm2022/src/lib/models/home-office/home-office-claim.interface.mjs +1 -1
- package/esm2022/src/lib/models/home-office/home-office-claim.mjs +31 -11
- package/esm2022/src/lib/models/transaction/transaction.mjs +5 -2
- package/esm2022/src/lib/services/data.service.mjs +2 -2
- package/esm2022/src/lib/services/http/home-office/home-office-claim.service.mjs +4 -4
- package/esm2022/src/lib/services/http/home-office/home-office-log.service.mjs +2 -2
- package/esm2022/src/lib/services/http/rest/rest-old.service.mjs +8 -1
- package/esm2022/src/lib/services/http/rest/rest.service.mjs +24 -5
- package/esm2022/src/lib/validators/current-fin-year.validator.mjs +3 -2
- package/fesm2022/taxtank-core.mjs +147 -39
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/collections/home-office/home-office-claim.collection.d.ts +5 -0
- package/src/lib/collections/home-office/index.d.ts +1 -0
- package/src/lib/collections/index.d.ts +1 -0
- package/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.d.ts +10 -1
- package/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.d.ts +6 -1
- package/src/lib/db/Enums/chart-accounts/index.d.ts +0 -1
- package/src/lib/forms/abstract.form.d.ts +1 -1
- package/src/lib/forms/home-office/home-office-calculator.form.d.ts +8 -0
- package/src/lib/forms/home-office/home-office-log.form.d.ts +1 -1
- package/src/lib/forms/home-office/index.d.ts +1 -0
- package/src/lib/forms/transaction/work/work-expense.form.d.ts +4 -2
- package/src/lib/models/bank/bank-transaction-chart-data.d.ts +2 -2
- package/src/lib/models/chart-accounts/chart-accounts.d.ts +2 -0
- package/src/lib/models/dictionary/dictionary.d.ts +2 -2
- package/src/lib/models/home-office/home-office-claim.d.ts +8 -4
- package/src/lib/models/home-office/home-office-claim.interface.d.ts +5 -2
- package/src/lib/models/transaction/transaction.d.ts +2 -1
- package/src/lib/services/http/home-office/home-office-claim.service.d.ts +4 -4
- package/src/lib/services/http/home-office/home-office-log.service.d.ts +1 -1
- package/src/lib/services/http/rest/rest-old.service.d.ts +4 -0
- package/src/lib/services/http/rest/rest.service.d.ts +1 -0
- package/esm2022/src/lib/db/Enums/chart-accounts/home-office-chart-accounts.enum.mjs +0 -18
- package/src/lib/db/Enums/chart-accounts/home-office-chart-accounts.enum.d.ts +0 -16
@@ -6,6 +6,7 @@ import { HttpClient } from '@angular/common/http';
|
|
6
6
|
import { EventDispatcherService } from '../../event';
|
7
7
|
import { classToPlain, plainToClass } from 'class-transformer';
|
8
8
|
import { ToastService } from '../../toast';
|
9
|
+
import clone from 'lodash/clone';
|
9
10
|
import * as i0 from "@angular/core";
|
10
11
|
/**
|
11
12
|
* Abstract base service that implements common services functionality
|
@@ -225,6 +226,12 @@ export class RestService {
|
|
225
226
|
createModelInstance(model) {
|
226
227
|
return plainToClass(this.modelClass, model);
|
227
228
|
}
|
229
|
+
/**
|
230
|
+
* never return cache directly to prevent update
|
231
|
+
*/
|
232
|
+
getCache() {
|
233
|
+
return clone(this.cache);
|
234
|
+
}
|
228
235
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RestService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
229
236
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RestService, providedIn: 'root' }); }
|
230
237
|
}
|
@@ -237,4 +244,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
237
244
|
type: Inject,
|
238
245
|
args: ['environment']
|
239
246
|
}] }] });
|
240
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdC1vbGQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3Jlc3QvcmVzdC1vbGQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0QsT0FBTyxFQUFjLGFBQWEsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUNqRCxPQUFPLEVBQUUsS0FBSyxFQUFFLEdBQUcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzVDLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUNuRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDbEQsT0FBTyxFQ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XRhYmxlXG4gICAqL1xuICBnZXRDYWNoZVN1YmplY3RPYnNlcnZhYmxlKCk6IE9ic2VydmFibGU8TW9kZWxbXT4ge1xuICAgIHJldHVybiB0aGlzLmNhY2hlU3ViamVjdC5hc09ic2VydmFibGUoKS5waXBlKG1hcCgoY2FjaGUpID0+IGNhY2hlLnNsaWNlKCkpKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBAVE9ETyB1c2UgZXhjbHVkZUV4dHJhbmVvdXNWYWx1ZXMgd2hlbiBhbGwgbW9kZWxzIHJlZmFjdG9yZWQgKGV4cG9zZWQgYWxsIG5lZWRlZCBwcm9wZXJ0aWVzKVxuICAgKiBDcmVhdGUgbmV3IGluc3RhbmNlIG9mIGNsYXNzXG4gICAqIEBwYXJhbSBtb2RlbCBpbnN0YW5jZSB0aGF0IHdlIHdpbGwgdXNlIGFzIGNvbnN0cnVjdG9yIG9wdGlvbnNcbiAgICovXG4gIHByb3RlY3RlZCBjcmVhdGVNb2RlbEluc3RhbmNlKG1vZGVsOiBCYXNlTW9kZWwgfCBvYmplY3QpOiBNb2RlbCB7XG4gICAgcmV0dXJuIHBsYWluVG9DbGFzcyh0aGlzLm1vZGVsQ2xhc3MsIG1vZGVsKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBuZXZlciByZXR1cm4gY2FjaGUgZGlyZWN0bHkgdG8gcHJldmVudCB1cGRhdGVcbiAgICovXG4gIGdldENhY2hlKCk6IE1vZGVsW10ge1xuICAgIHJldHVybiBjbG9uZSh0aGlzLmNhY2hlKTtcbiAgfVxufVxuIl19
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Inject, Injectable, inject } from '@angular/core';
|
2
|
-
import { ReplaySubject } from 'rxjs';
|
3
|
-
import { first, map } from 'rxjs/operators';
|
2
|
+
import { ReplaySubject, of } from 'rxjs';
|
3
|
+
import { catchError, first, map } from 'rxjs/operators';
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
5
5
|
import { EventDispatcherService, SseService } from '../../event';
|
6
6
|
import { classToPlain } from 'class-transformer';
|
@@ -12,9 +12,10 @@ import { ToastService } from '../../toast';
|
|
12
12
|
import merge from 'lodash/merge';
|
13
13
|
import intersection from 'lodash/intersection';
|
14
14
|
import last from 'lodash/last';
|
15
|
-
import
|
15
|
+
import cloneDeep from 'lodash/cloneDeep';
|
16
16
|
import * as i0 from "@angular/core";
|
17
17
|
/**
|
18
|
+
* @TODO refactor to behavior subject?
|
18
19
|
* Abstract base service that implements common services functionality
|
19
20
|
* and describe abstract methods/properties that have to be implemented in child services
|
20
21
|
* Model - entity service is working with
|
@@ -66,7 +67,7 @@ export class RestService extends DataService {
|
|
66
67
|
* perform a shallow copy of the emitted data to make it immutable
|
67
68
|
*/
|
68
69
|
getCacheSubjectObservable() {
|
69
|
-
return this.cacheSubject.asObservable().pipe(map((cache) =>
|
70
|
+
return this.cacheSubject.asObservable().pipe(map((cache) => cloneDeep(cache)));
|
70
71
|
}
|
71
72
|
/**
|
72
73
|
* Get data from backend and fill the cache
|
@@ -83,6 +84,9 @@ export class RestService extends DataService {
|
|
83
84
|
.pipe(map((response) => Array.isArray(response) ? response : toArray(response)), map((response) => {
|
84
85
|
this.setCache(response, true);
|
85
86
|
return this.cache;
|
87
|
+
}), catchError(() => {
|
88
|
+
this.toastService.error('An error occurred while fetching data');
|
89
|
+
return of(this.cache);
|
86
90
|
}));
|
87
91
|
}
|
88
92
|
get(path = this.apiUrl) {
|
@@ -119,6 +123,9 @@ export class RestService extends DataService {
|
|
119
123
|
this.handleResponse([result], 'post');
|
120
124
|
}
|
121
125
|
return result;
|
126
|
+
}), catchError(() => {
|
127
|
+
this.toastService.error('An error occurred while posting data');
|
128
|
+
return of(null);
|
122
129
|
}));
|
123
130
|
}
|
124
131
|
/**
|
@@ -133,6 +140,9 @@ export class RestService extends DataService {
|
|
133
140
|
this.handleResponse(result, 'post');
|
134
141
|
}
|
135
142
|
return result;
|
143
|
+
}), catchError(() => {
|
144
|
+
this.toastService.error('An error occurred while posting data');
|
145
|
+
return of([]);
|
136
146
|
}));
|
137
147
|
}
|
138
148
|
/**
|
@@ -147,6 +157,9 @@ export class RestService extends DataService {
|
|
147
157
|
this.handleResponse([result], 'put');
|
148
158
|
}
|
149
159
|
return result;
|
160
|
+
}), catchError(() => {
|
161
|
+
this.toastService.error('An error occurred while put data');
|
162
|
+
return of(null);
|
150
163
|
}));
|
151
164
|
}
|
152
165
|
/**
|
@@ -173,6 +186,9 @@ export class RestService extends DataService {
|
|
173
186
|
if (!this.mercureTopic) {
|
174
187
|
this.handleResponse([model], 'delete');
|
175
188
|
}
|
189
|
+
}), catchError(() => {
|
190
|
+
this.toastService.error('An error occurred while deleting data');
|
191
|
+
return of(null);
|
176
192
|
}));
|
177
193
|
}
|
178
194
|
/**
|
@@ -185,6 +201,9 @@ export class RestService extends DataService {
|
|
185
201
|
if (!this.mercureTopic) {
|
186
202
|
this.handleResponse(models, 'delete');
|
187
203
|
}
|
204
|
+
}), catchError(() => {
|
205
|
+
this.toastService.error('An error occurred while deleting data');
|
206
|
+
return of(null);
|
188
207
|
}));
|
189
208
|
}
|
190
209
|
/**
|
@@ -298,4 +317,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
298
317
|
type: Inject,
|
299
318
|
args: ['environment']
|
300
319
|
}] }] });
|
301
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL3NlcnZpY2VzL2h0dHAvcmVzdC9yZXN0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FB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QpIHtcbiAgICAgICAgICBtZXRob2QgPSB0aGlzLmhhc0luQ2FjaGUobW9kZWwuaWQpID8gJ3B1dCcgOiAncG9zdCc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbWV0aG9kID0gJ2RlbGV0ZSc7XG4gICAgICAgICAgLy8gd2UgZ290IGVtcHR5IGJvZHkgd2hlbiBpdGVtIGRlbGV0ZWQsIHNvIHdlIHNob3VsZCBnZXQgaWQgZnJvbSBBcGkgUGxhdGZvcm0gZGF0YSAoQGlkKVxuICAgICAgICAgIG1vZGVsID0gbWVyZ2UobW9kZWwsIHsgaWQ6ICtsYXN0KG1vZGVsWydAaWQnXS5zcGxpdCgnLycpKSB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7IG1ldGhvZCwgbW9kZWwgfTtcbiAgICAgIH0pXG4gICAgKS5zdWJzY3JpYmUoKGNoYW5nZSkgPT4ge1xuICAgICAgdGhpcy5oYW5kbGVSZXNwb25zZShbY2hhbmdlLm1vZGVsXSwgY2hhbmdlLm1ldGhvZClcbiAgICB9KTtcbiAgfVxufVxuIl19
|
@@ -5,10 +5,11 @@ import { FinancialYear } from '../models';
|
|
5
5
|
export function currentFinYearValidator() {
|
6
6
|
const currentFinYear = new FinancialYear();
|
7
7
|
return (control) => {
|
8
|
-
|
8
|
+
const date = new Date(control.value);
|
9
|
+
if (!control.value || date >= currentFinYear.startDate && date <= currentFinYear.endDate) {
|
9
10
|
return null;
|
10
11
|
}
|
11
12
|
return { notCurrentFinYear: true };
|
12
13
|
};
|
13
14
|
}
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVudC1maW4teWVhci52YWxpZGF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvdmFsa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