taxtank-core 0.25.0 → 0.27.1

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.
Files changed (28) hide show
  1. package/bundles/taxtank-core.umd.js +413 -264
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/models/endpoint/endpoints.const.js +3 -1
  4. package/esm2015/lib/models/event/app-event-type.enum.js +45 -42
  5. package/esm2015/lib/services/http/depreciation/depreciation-receipt/depreciation-receipt.service.js +40 -0
  6. package/esm2015/lib/services/http/depreciation/depreciation.service.js +61 -22
  7. package/esm2015/lib/services/http/depreciation/index.js +4 -0
  8. package/esm2015/lib/services/http/index.js +2 -1
  9. package/esm2015/lib/services/http/receipt/receipt.service.js +76 -0
  10. package/esm2015/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.js +20 -50
  11. package/esm2015/lib/services/http/transaction/transaction.service.js +12 -11
  12. package/esm2015/lib/services/http/user/index.js +5 -0
  13. package/esm2015/lib/services/http/user/users-invite/users-invite.service.js +23 -0
  14. package/esm2015/public-api.js +2 -3
  15. package/fesm2015/taxtank-core.js +375 -245
  16. package/fesm2015/taxtank-core.js.map +1 -1
  17. package/lib/models/event/app-event-type.enum.d.ts +44 -41
  18. package/lib/services/http/depreciation/depreciation-receipt/depreciation-receipt.service.d.ts +28 -0
  19. package/lib/services/http/depreciation/depreciation.service.d.ts +15 -7
  20. package/lib/services/http/depreciation/index.d.ts +3 -0
  21. package/lib/services/http/index.d.ts +1 -0
  22. package/lib/services/http/receipt/receipt.service.d.ts +62 -0
  23. package/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.d.ts +21 -21
  24. package/lib/services/http/transaction/transaction.service.d.ts +1 -0
  25. package/lib/services/http/user/index.d.ts +4 -0
  26. package/lib/services/http/user/users-invite/users-invite.service.d.ts +13 -0
  27. package/package.json +1 -1
  28. package/public-api.d.ts +1 -2
@@ -4,7 +4,7 @@ import * as i1$1 from '@angular/common';
4
4
  import { CommonModule, DatePipe } from '@angular/common';
5
5
  import * as i1 from '@angular/common/http';
6
6
  import { HttpParams, HttpErrorResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
7
- import { ReplaySubject, Subject, BehaviorSubject, throwError, combineLatest, of, Observable, forkJoin, from } from 'rxjs';
7
+ import { ReplaySubject, Subject, BehaviorSubject, throwError, combineLatest, forkJoin, of, Observable, from } from 'rxjs';
8
8
  import { map, filter, catchError, take, switchMap, finalize, mergeMap, skip, distinctUntilChanged } from 'rxjs/operators';
9
9
  import { plainToClass, classToPlain, Type, Exclude, Transform, Expose } from 'class-transformer';
10
10
  import { JwtHelperService } from '@auth0/angular-jwt';
@@ -211,47 +211,50 @@ var AppEventTypeEnum;
211
211
  AppEventTypeEnum[AppEventTypeEnum["CURRENT_USER_GET_FAILED"] = 11] = "CURRENT_USER_GET_FAILED";
212
212
  AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_DELETED"] = 12] = "DEPRECIATION_DELETED";
213
213
  AppEventTypeEnum[AppEventTypeEnum["DEPRECIATIONS_CREATED"] = 13] = "DEPRECIATIONS_CREATED";
214
- AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_CREATED"] = 14] = "INCOME_SOURCES_CREATED";
215
- AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_UPDATED"] = 15] = "INCOME_SOURCES_UPDATED";
216
- AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_CREATED"] = 16] = "INCOME_SOURCES_FORECASTS_CREATED";
217
- AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_UPDATED"] = 17] = "INCOME_SOURCES_FORECASTS_UPDATED";
218
- AppEventTypeEnum[AppEventTypeEnum["LOAN_UPDATED"] = 18] = "LOAN_UPDATED";
219
- AppEventTypeEnum[AppEventTypeEnum["LOAN_PAYOUT_UPDATED"] = 19] = "LOAN_PAYOUT_UPDATED";
220
- AppEventTypeEnum[AppEventTypeEnum["MESSAGE_CREATED"] = 20] = "MESSAGE_CREATED";
221
- AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_CREATED"] = 21] = "MESSAGE_FILE_CREATED";
222
- AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_DELETED"] = 22] = "MESSAGE_FILE_DELETED";
223
- AppEventTypeEnum[AppEventTypeEnum["NOTIFICATION_ADDED"] = 23] = "NOTIFICATION_ADDED";
224
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_UPDATED_WITH_DOCUMENT"] = 24] = "PROPERTY_UPDATED_WITH_DOCUMENT";
225
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DOCUMENT_ADDED"] = 25] = "PROPERTY_DOCUMENT_ADDED";
226
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 26] = "PROPERTY_MOVEMENT_CREATED";
227
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 27] = "PROPERTY_MOVEMENT_UPDATED";
228
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 28] = "PROPERTY_MOVEMENT_DELETED";
229
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SHARE_UPDATED"] = 29] = "PROPERTY_SHARE_UPDATED";
230
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_ADDED"] = 30] = "PROPERTY_SALE_ADDED";
231
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_DELETED"] = 31] = "PROPERTY_SALE_DELETED";
232
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 32] = "PROPERTY_SUBSCRIPTION_ADDED";
233
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 33] = "PROPERTY_SUBSCRIPTION_DELETED";
234
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 34] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
235
- AppEventTypeEnum[AppEventTypeEnum["SERVICE_SUBSCRIPTION_UPDATED"] = 35] = "SERVICE_SUBSCRIPTION_UPDATED";
236
- AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 36] = "TAX_REVIEW_UPDATED";
237
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 37] = "TRANSACTION_CREATED";
238
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 38] = "TRANSACTION_DELETED";
239
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 39] = "TRANSACTION_UPDATED";
240
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED_WITH_NEW_RECEIPT"] = 40] = "TRANSACTION_CREATED_WITH_NEW_RECEIPT";
241
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_NEW_RECEIPT"] = 41] = "TRANSACTION_UPDATED_WITH_NEW_RECEIPT";
242
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_DELETED_RECEIPT"] = 42] = "TRANSACTION_UPDATED_WITH_DELETED_RECEIPT";
243
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_CREATED"] = 43] = "TRANSACTION_RECEIPT_CREATED";
244
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_DELETED"] = 44] = "TRANSACTION_RECEIPT_DELETED";
245
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 45] = "TRANSACTIONS_CREATED";
246
- AppEventTypeEnum[AppEventTypeEnum["USER_UPDATED"] = 46] = "USER_UPDATED";
247
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_UPDATED"] = 47] = "VEHICLE_CLAIM_UPDATED";
248
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_CREATED"] = 48] = "VEHICLE_CLAIM_CREATED";
249
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 49] = "VEHICLE_CLAIM_DETAILS_UPDATED";
250
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 50] = "VEHICLE_CLAIM_DETAILS_CREATED";
251
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 51] = "VEHICLE_LOGBOOK_CREATED";
252
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 52] = "VEHICLE_LOGBOOK_UPDATED";
253
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 53] = "VEHICLE_LOGBOOK_DELETED";
254
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 54] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
214
+ AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_UPDATED_WITH_RECEIPT"] = 14] = "DEPRECIATION_UPDATED_WITH_RECEIPT";
215
+ AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT"] = 15] = "DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT";
216
+ AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_RECEIPT_CREATED"] = 16] = "DEPRECIATION_RECEIPT_CREATED";
217
+ AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_RECEIPT_DELETED"] = 17] = "DEPRECIATION_RECEIPT_DELETED";
218
+ AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_CREATED"] = 18] = "INCOME_SOURCES_CREATED";
219
+ AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_UPDATED"] = 19] = "INCOME_SOURCES_UPDATED";
220
+ AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_CREATED"] = 20] = "INCOME_SOURCES_FORECASTS_CREATED";
221
+ AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_UPDATED"] = 21] = "INCOME_SOURCES_FORECASTS_UPDATED";
222
+ AppEventTypeEnum[AppEventTypeEnum["LOAN_UPDATED"] = 22] = "LOAN_UPDATED";
223
+ AppEventTypeEnum[AppEventTypeEnum["LOAN_PAYOUT_UPDATED"] = 23] = "LOAN_PAYOUT_UPDATED";
224
+ AppEventTypeEnum[AppEventTypeEnum["MESSAGE_CREATED"] = 24] = "MESSAGE_CREATED";
225
+ AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_CREATED"] = 25] = "MESSAGE_FILE_CREATED";
226
+ AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_DELETED"] = 26] = "MESSAGE_FILE_DELETED";
227
+ AppEventTypeEnum[AppEventTypeEnum["NOTIFICATION_ADDED"] = 27] = "NOTIFICATION_ADDED";
228
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_UPDATED_WITH_DOCUMENT"] = 28] = "PROPERTY_UPDATED_WITH_DOCUMENT";
229
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DOCUMENT_ADDED"] = 29] = "PROPERTY_DOCUMENT_ADDED";
230
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 30] = "PROPERTY_MOVEMENT_CREATED";
231
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 31] = "PROPERTY_MOVEMENT_UPDATED";
232
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 32] = "PROPERTY_MOVEMENT_DELETED";
233
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SHARE_UPDATED"] = 33] = "PROPERTY_SHARE_UPDATED";
234
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_ADDED"] = 34] = "PROPERTY_SALE_ADDED";
235
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_DELETED"] = 35] = "PROPERTY_SALE_DELETED";
236
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 36] = "PROPERTY_SUBSCRIPTION_ADDED";
237
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 37] = "PROPERTY_SUBSCRIPTION_DELETED";
238
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 38] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
239
+ AppEventTypeEnum[AppEventTypeEnum["SERVICE_SUBSCRIPTION_UPDATED"] = 39] = "SERVICE_SUBSCRIPTION_UPDATED";
240
+ AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 40] = "TAX_REVIEW_UPDATED";
241
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 41] = "TRANSACTION_CREATED";
242
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 42] = "TRANSACTION_DELETED";
243
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 43] = "TRANSACTION_UPDATED";
244
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_RECEIPT"] = 44] = "TRANSACTION_UPDATED_WITH_RECEIPT";
245
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_DELETED_RECEIPT"] = 45] = "TRANSACTION_UPDATED_WITH_DELETED_RECEIPT";
246
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_CREATED"] = 46] = "TRANSACTION_RECEIPT_CREATED";
247
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_DELETED"] = 47] = "TRANSACTION_RECEIPT_DELETED";
248
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 48] = "TRANSACTIONS_CREATED";
249
+ AppEventTypeEnum[AppEventTypeEnum["USER_UPDATED"] = 49] = "USER_UPDATED";
250
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_UPDATED"] = 50] = "VEHICLE_CLAIM_UPDATED";
251
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_CREATED"] = 51] = "VEHICLE_CLAIM_CREATED";
252
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 52] = "VEHICLE_CLAIM_DETAILS_UPDATED";
253
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 53] = "VEHICLE_CLAIM_DETAILS_CREATED";
254
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 54] = "VEHICLE_LOGBOOK_CREATED";
255
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 55] = "VEHICLE_LOGBOOK_UPDATED";
256
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 56] = "VEHICLE_LOGBOOK_DELETED";
257
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 57] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
255
258
  })(AppEventTypeEnum || (AppEventTypeEnum = {}));
256
259
 
257
260
  class EventDispatcherService {
@@ -601,6 +604,8 @@ const ENDPOINTS = {
601
604
  DEPRECIATIONS_GET: new Endpoint('GET', '\\/depreciations'),
602
605
  DEPRECIATIONS_POST: new Endpoint('POST', '\\/depreciations'),
603
606
  DEPRECIATIONS_PUT: new Endpoint('PUT', '\\/depreciations\\/\\d+'),
607
+ DEPRECIATION_RECEIPTS_POST: new Endpoint('POST', '\\/depreciations\\/\\d+\\/receipts'),
608
+ DEPRECIATION_RECEIPTS_DELETE: new Endpoint('DELETE', '\\/depreciations\\/\\d+\\/receipts\\/\\d+'),
604
609
  EMPLOYEES_GET: new Endpoint('GET', '\\/employees'),
605
610
  EMPLOYEES_INVITES_GET: new Endpoint('GET', '\\/employees\\/\\invites'),
606
611
  EMPLOYEES_INVITES_DELETE: new Endpoint('DELETE', '\\/employees\\/\\invites\\/\\d+'),
@@ -9037,6 +9042,123 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
9037
9042
  }]
9038
9043
  }] });
9039
9044
 
9045
+ /**
9046
+ * Service that works with Occupations
9047
+ */
9048
+ class OccupationService {
9049
+ constructor(http, environment) {
9050
+ this.http = http;
9051
+ this.environment = environment;
9052
+ this.occupationsSubject = new ReplaySubject(1);
9053
+ }
9054
+ /**
9055
+ * Get list of occupations
9056
+ */
9057
+ getOccupations() {
9058
+ if (!this._occupations) {
9059
+ this.http.get(`${this.environment.apiV2}/occupations`)
9060
+ .pipe(map((response) => {
9061
+ return response.map((item) => plainToClass(Occupation, item));
9062
+ }))
9063
+ .subscribe((occupations) => {
9064
+ this._occupations = occupations;
9065
+ this.occupationsSubject.next(occupations);
9066
+ });
9067
+ }
9068
+ return this.occupationsSubject.asObservable();
9069
+ }
9070
+ }
9071
+ OccupationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: OccupationService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
9072
+ OccupationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: OccupationService, providedIn: 'root' });
9073
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: OccupationService, decorators: [{
9074
+ type: Injectable,
9075
+ args: [{
9076
+ providedIn: 'root'
9077
+ }]
9078
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
9079
+ type: Inject,
9080
+ args: ['environment']
9081
+ }] }]; } });
9082
+
9083
+ class UserEventSettingService extends RestService {
9084
+ constructor() {
9085
+ super(...arguments);
9086
+ this.modelClass = UserEventSetting;
9087
+ this.url = 'user-event-settings';
9088
+ this.isHydra = true;
9089
+ }
9090
+ /**
9091
+ * Send batch to add/updated settings
9092
+ */
9093
+ saveBatch(settings) {
9094
+ // batch with post/put requests based on setting id
9095
+ const batch = settings.map((setting) => {
9096
+ setting.isUpdating = true;
9097
+ if (setting.id) {
9098
+ return this.http.put(`${this.environment.apiV2}/${this.url}/${setting.id}`, classToPlain(setting));
9099
+ }
9100
+ return this.http.post(`${this.environment.apiV2}/${this.url}`, classToPlain(setting));
9101
+ });
9102
+ return forkJoin(batch).pipe(map((eventSettings) => {
9103
+ eventSettings.forEach((eventSetting) => {
9104
+ // get setting from cache by saved setting id
9105
+ const cachedSetting = this.cache.find((setting) => setting.id === eventSetting.id);
9106
+ if (cachedSetting) {
9107
+ replace(this.cache, eventSetting);
9108
+ }
9109
+ else {
9110
+ this.cache.push(plainToClass(UserEventSetting, eventSetting));
9111
+ }
9112
+ });
9113
+ this.updateCache();
9114
+ }));
9115
+ }
9116
+ }
9117
+ UserEventSettingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventSettingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
9118
+ UserEventSettingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventSettingService, providedIn: 'root' });
9119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventSettingService, decorators: [{
9120
+ type: Injectable,
9121
+ args: [{
9122
+ providedIn: 'root'
9123
+ }]
9124
+ }] });
9125
+
9126
+ class UserEventTypeService extends RestService {
9127
+ constructor() {
9128
+ super(...arguments);
9129
+ this.modelClass = UserEventType;
9130
+ this.url = 'user-event-types';
9131
+ this.isHydra = true;
9132
+ }
9133
+ }
9134
+ UserEventTypeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventTypeService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
9135
+ UserEventTypeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventTypeService, providedIn: 'root' });
9136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventTypeService, decorators: [{
9137
+ type: Injectable,
9138
+ args: [{
9139
+ providedIn: 'root'
9140
+ }]
9141
+ }] });
9142
+
9143
+ /**
9144
+ * Service to work with invitations for unregistered users
9145
+ */
9146
+ class UsersInviteService extends RestService {
9147
+ constructor() {
9148
+ super(...arguments);
9149
+ this.modelClass = RegistrationInvite;
9150
+ this.url = 'users/invite';
9151
+ }
9152
+ }
9153
+ UsersInviteService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UsersInviteService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
9154
+ UsersInviteService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UsersInviteService, providedIn: 'root' });
9155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UsersInviteService, decorators: [{
9156
+ type: Injectable,
9157
+ args: [{
9158
+ providedIn: 'root'
9159
+ }]
9160
+ }] });
9161
+
9040
9162
  /**
9041
9163
  * Service for logbook best period calculation
9042
9164
  * @TODO Vik: improve structure for such cases (TT-2043)
@@ -9611,57 +9733,94 @@ function enumToList(data) {
9611
9733
  return list;
9612
9734
  }
9613
9735
 
9614
- class TransactionReceiptService {
9615
- constructor(http, eventDispatcherService, environment) {
9736
+ /**
9737
+ * Abstract service class to work with transactions-like receipt files (transactions, depreciations, e.t.c.)
9738
+ * @Todo TT-2191 refactor service when receipts API will be updated
9739
+ */
9740
+ class ReceiptService {
9741
+ constructor(http, eventDispatcherService, environment, toastService) {
9616
9742
  this.http = http;
9617
9743
  this.eventDispatcherService = eventDispatcherService;
9618
9744
  this.environment = environment;
9619
- this.url = 'receipts';
9620
- this.listenEvents();
9745
+ this.toastService = toastService;
9746
+ }
9747
+ listenEvents() {
9748
+ this.listenParentWithReceiptUpdated();
9749
+ this.listenParentWithoutReceiptUpdated();
9621
9750
  }
9622
9751
  /**
9623
- * Transaction instance is necessary to take the ID and the receipt file from it.
9752
+ * Entity is necessary to take the ID and the receipt file from it.
9624
9753
  */
9625
- add(transaction) {
9754
+ add(receiptEntity) {
9626
9755
  const formData = new FormData();
9627
- formData.append('file', transaction.file);
9628
- this.http.post(`${this.environment.apiV2}/transactions/${transaction.id}/${this.url}`, formData)
9629
- .subscribe((receiptResponse) => {
9630
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_RECEIPT_CREATED, plainToClass(TransactionReceipt, receiptResponse)));
9631
- });
9756
+ formData.append('file', receiptEntity.file);
9757
+ return this.http.post(`${this.environment.apiV2}/${this.entityType}/${receiptEntity.id}/receipts`, formData)
9758
+ .pipe(map((receipt) => {
9759
+ const uploadedReceipt = this.createModelInstance(receipt);
9760
+ this.eventDispatcherService.dispatch(new AppEvent(this.receiptCreatedEvent, uploadedReceipt));
9761
+ return uploadedReceipt;
9762
+ }));
9763
+ }
9764
+ delete(receiptEntity) {
9765
+ return this.http.delete(`${this.environment.apiV2}/${this.entityType}/${receiptEntity.id}/receipts/${receiptEntity.receipt.id}`)
9766
+ .pipe(map(() => {
9767
+ this.eventDispatcherService.dispatch(new AppEvent(this.receiptDeletedEvent, receiptEntity));
9768
+ }));
9632
9769
  }
9633
9770
  /**
9634
- * Transaction instance is necessary to take the ID and the receipt ID from it.
9771
+ * Parent entity was updated with attached receipt
9635
9772
  */
9636
- delete(transaction) {
9637
- this.http.delete(`${this.environment.apiV2}/transactions/${transaction.id}/${this.url}/${transaction.receipt.id}`)
9638
- .subscribe(() => {
9639
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_RECEIPT_DELETED, transaction));
9640
- });
9641
- }
9642
- listenEvents() {
9643
- this.listenTransactionWithReceiptUpdated();
9644
- this.listenTransactionWithoutReceiptUpdated();
9645
- }
9646
- listenTransactionWithReceiptUpdated() {
9647
- this.eventDispatcherService.on([
9648
- AppEventTypeEnum.TRANSACTION_CREATED_WITH_NEW_RECEIPT,
9649
- AppEventTypeEnum.TRANSACTION_UPDATED_WITH_NEW_RECEIPT
9650
- ]).subscribe((transaction) => {
9651
- this.add(transaction);
9773
+ listenParentWithReceiptUpdated() {
9774
+ this.eventDispatcherService.on(this.entityUpdatedWithReceiptEvent)
9775
+ .subscribe((receiptEntity) => {
9776
+ this.add(receiptEntity).subscribe();
9652
9777
  });
9653
9778
  }
9654
9779
  /**
9655
- * Case when transaction was updated, but receipt was removed
9780
+ * Parent entity was updated, but receipt was removed
9656
9781
  */
9657
- listenTransactionWithoutReceiptUpdated() {
9658
- this.eventDispatcherService.on(AppEventTypeEnum.TRANSACTION_UPDATED_WITH_DELETED_RECEIPT)
9659
- .subscribe((transaction) => {
9660
- this.delete(transaction);
9782
+ listenParentWithoutReceiptUpdated() {
9783
+ this.eventDispatcherService.on(this.entityUpdatedWithDeletedReceiptEvent)
9784
+ .subscribe((receiptEntity) => {
9785
+ this.delete(receiptEntity).subscribe();
9661
9786
  });
9662
9787
  }
9788
+ createModelInstance(data) {
9789
+ return plainToClass(this.modelClass, data);
9790
+ }
9663
9791
  }
9664
- TransactionReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionReceiptService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
9792
+ ReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ReceiptService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
9793
+ ReceiptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ReceiptService, providedIn: 'root' });
9794
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ReceiptService, decorators: [{
9795
+ type: Injectable,
9796
+ args: [{
9797
+ providedIn: 'root'
9798
+ }]
9799
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
9800
+ type: Inject,
9801
+ args: ['environment']
9802
+ }] }, { type: ToastService }]; } });
9803
+
9804
+ /**
9805
+ * @Todo TT-2191 refactor service when receipts API will be updated
9806
+ */
9807
+ class TransactionReceiptService extends ReceiptService {
9808
+ constructor(http, eventDispatcherService, environment, toastService) {
9809
+ super(http, eventDispatcherService, environment, toastService);
9810
+ this.http = http;
9811
+ this.eventDispatcherService = eventDispatcherService;
9812
+ this.environment = environment;
9813
+ this.toastService = toastService;
9814
+ this.modelClass = TransactionReceipt;
9815
+ this.entityType = AssetEntityTypeEnum.TRANSACTIONS;
9816
+ this.receiptCreatedEvent = AppEventTypeEnum.TRANSACTION_RECEIPT_CREATED;
9817
+ this.receiptDeletedEvent = AppEventTypeEnum.TRANSACTION_RECEIPT_DELETED;
9818
+ this.entityUpdatedWithReceiptEvent = AppEventTypeEnum.TRANSACTION_UPDATED_WITH_RECEIPT;
9819
+ this.entityUpdatedWithDeletedReceiptEvent = AppEventTypeEnum.TRANSACTION_UPDATED_WITH_DELETED_RECEIPT;
9820
+ this.listenEvents();
9821
+ }
9822
+ }
9823
+ TransactionReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionReceiptService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
9665
9824
  TransactionReceiptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionReceiptService, providedIn: 'root' });
9666
9825
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionReceiptService, decorators: [{
9667
9826
  type: Injectable,
@@ -9671,7 +9830,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
9671
9830
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
9672
9831
  type: Inject,
9673
9832
  args: ['environment']
9674
- }] }]; } });
9833
+ }] }, { type: ToastService }]; } });
9675
9834
 
9676
9835
  /**
9677
9836
  * Service for transactions business logic
@@ -9788,10 +9947,10 @@ class TransactionService extends RestService {
9788
9947
  transactions.forEach((transaction, index) => {
9789
9948
  // @TODO backend: need to upload file in the same backend endpoint with transaction add/update
9790
9949
  // check if passed receipt and upload file
9791
- if (transaction.file && (transaction.file instanceof File)) {
9950
+ if (transaction.file) {
9792
9951
  transaction.id = response[index].id;
9793
9952
  addedTransactions[index].file = transaction.file;
9794
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_CREATED_WITH_NEW_RECEIPT, addedTransactions[index]));
9953
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_UPDATED_WITH_RECEIPT, addedTransactions[index]));
9795
9954
  }
9796
9955
  // @TODO Viktor: implement API for saving of nested transactions
9797
9956
  // add child transactions if exist
@@ -9824,9 +9983,9 @@ class TransactionService extends RestService {
9824
9983
  const updatedTransaction = plainToClass(Transaction, response);
9825
9984
  // @TODO need to upload file in the same backend endpoint with transaction add/update
9826
9985
  // check if passed new receipt and upload file
9827
- if (transaction.file && (transaction.file instanceof File)) {
9986
+ if (transaction.file) {
9828
9987
  updatedTransaction.file = transaction.file;
9829
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_UPDATED_WITH_NEW_RECEIPT, updatedTransaction));
9988
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_UPDATED_WITH_RECEIPT, updatedTransaction));
9830
9989
  // receipt file was removed from form - we should delete receipt from transaction
9831
9990
  }
9832
9991
  else if (!transaction.file && transaction.receipt) {
@@ -9850,8 +10009,7 @@ class TransactionService extends RestService {
9850
10009
  this.addBatch(childTransactionsToAdd).subscribe();
9851
10010
  }
9852
10011
  }
9853
- replace(this.cache, updatedTransaction);
9854
- this.updateCache();
10012
+ this.replaceInCache(updatedTransaction);
9855
10013
  return updatedTransaction;
9856
10014
  }));
9857
10015
  }
@@ -9965,16 +10123,14 @@ class TransactionService extends RestService {
9965
10123
  // we don't need to keep file after save
9966
10124
  transactionToUpdate.file = null;
9967
10125
  transactionToUpdate.receipt = transactionReceipt;
9968
- replace(this.cache, transactionToUpdate);
9969
- this.updateCache();
10126
+ this.replaceInCache(transactionToUpdate);
9970
10127
  });
9971
10128
  }
9972
10129
  listenReceiptDeleted() {
9973
10130
  this.eventDispatcherService.on(AppEventTypeEnum.TRANSACTION_RECEIPT_DELETED).subscribe((transaction) => {
9974
10131
  const transactionToUpdate = this.find(transaction.id);
9975
10132
  transactionToUpdate.receipt = null;
9976
- replace(this.cache, transactionToUpdate);
9977
- this.updateCache();
10133
+ this.replaceInCache(transactionToUpdate);
9978
10134
  });
9979
10135
  }
9980
10136
  listenVehicleClaimChanges() {
@@ -9987,6 +10143,10 @@ class TransactionService extends RestService {
9987
10143
  this.resetCache();
9988
10144
  });
9989
10145
  }
10146
+ replaceInCache(transactionToReplace) {
10147
+ replace(this.cache, transactionToReplace);
10148
+ this.updateCache();
10149
+ }
9990
10150
  }
9991
10151
  TransactionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: TransactionReceiptService }], target: i0.ɵɵFactoryTarget.Injectable });
9992
10152
  TransactionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionService, providedIn: 'root' });
@@ -11076,62 +11236,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
11076
11236
  }] }]; } });
11077
11237
 
11078
11238
  /**
11079
- * Service for work with DepreciationCapitalProjects
11239
+ * @Todo TT-2191 refactor service when receipts API will be updated
11080
11240
  */
11081
- class DepreciationCapitalProjectService {
11082
- constructor(http, environment) {
11241
+ class DepreciationReceiptService extends ReceiptService {
11242
+ constructor(http, eventDispatcherService, environment, toastService) {
11243
+ super(http, eventDispatcherService, environment, toastService);
11083
11244
  this.http = http;
11245
+ this.eventDispatcherService = eventDispatcherService;
11084
11246
  this.environment = environment;
11085
- this.cacheSubject = new ReplaySubject(1);
11086
- }
11087
- get(propertyId) {
11088
- this.cacheSubject.next([]);
11089
- this.http.get(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects`)
11090
- .subscribe((capitalProjectsBase) => {
11091
- this.cache = capitalProjectsBase.map((capitalProjectBase) => {
11092
- return plainToClass(DepreciationCapitalProject, capitalProjectBase);
11093
- });
11094
- this.cacheSubject.next(this.cache);
11095
- });
11096
- return this.cacheSubject.asObservable();
11097
- }
11098
- add(capitalProject, propertyId) {
11099
- return this.http.post(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects`, capitalProject)
11100
- .pipe(map((capitalProjectBase) => {
11101
- this.cache.push(plainToClass(DepreciationCapitalProject, capitalProjectBase));
11102
- this.cacheSubject.next(this.cache);
11103
- }));
11104
- }
11105
- update(capitalProject, propertyId) {
11106
- return this.http.put(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects/${capitalProject.id}`, capitalProject)
11107
- .pipe(map((capitalProjectBase) => {
11108
- replace(this.cache, plainToClass(DepreciationCapitalProject, capitalProjectBase));
11109
- this.cacheSubject.next(this.cache);
11110
- }));
11111
- }
11112
- delete(capitalProject, propertyId) {
11113
- return this.http.delete(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects/${capitalProject.id}`)
11114
- .pipe(map(() => {
11115
- this.cache = this.cache.filter((item) => capitalProject.id !== item.id);
11116
- this.cacheSubject.next(this.cache);
11117
- }));
11247
+ this.toastService = toastService;
11248
+ this.modelClass = DepreciationReceipt;
11249
+ this.entityType = AssetEntityTypeEnum.DEPRECIATIONS;
11250
+ this.receiptCreatedEvent = AppEventTypeEnum.DEPRECIATION_RECEIPT_CREATED;
11251
+ this.receiptDeletedEvent = AppEventTypeEnum.DEPRECIATION_RECEIPT_DELETED;
11252
+ this.entityUpdatedWithDeletedReceiptEvent = AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT;
11253
+ this.entityUpdatedWithReceiptEvent = AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_RECEIPT;
11254
+ this.listenEvents();
11118
11255
  }
11119
11256
  }
11120
- DepreciationCapitalProjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
11121
- DepreciationCapitalProjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, providedIn: 'root' });
11122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, decorators: [{
11257
+ DepreciationReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationReceiptService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
11258
+ DepreciationReceiptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationReceiptService, providedIn: 'root' });
11259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationReceiptService, decorators: [{
11123
11260
  type: Injectable,
11124
11261
  args: [{
11125
11262
  providedIn: 'root'
11126
11263
  }]
11127
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
11264
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
11128
11265
  type: Inject,
11129
11266
  args: ['environment']
11130
- }] }]; } });
11267
+ }] }, { type: ToastService }]; } });
11131
11268
 
11132
11269
  class DepreciationService extends RestService {
11133
- constructor() {
11134
- super(...arguments);
11270
+ constructor(http, eventDispatcherService, environment, toastService, depreciationReceiptService) {
11271
+ super(http, eventDispatcherService, environment, toastService);
11272
+ this.http = http;
11273
+ this.eventDispatcherService = eventDispatcherService;
11274
+ this.environment = environment;
11275
+ this.toastService = toastService;
11276
+ this.depreciationReceiptService = depreciationReceiptService;
11135
11277
  this.modelClass = Depreciation;
11136
11278
  this.url = 'depreciations';
11137
11279
  }
@@ -11152,15 +11294,41 @@ class DepreciationService extends RestService {
11152
11294
  */
11153
11295
  addBatch(depreciations) {
11154
11296
  return super.addBatch(depreciations).pipe(map((newDepreciations) => {
11297
+ depreciations.forEach((depreciation, index) => {
11298
+ // @TODO backend: need to upload file in the same backend endpoint with depreciation add/update
11299
+ // check if passed receipt and upload file
11300
+ if (depreciation.file && (depreciation.file instanceof File)) {
11301
+ depreciation.id = newDepreciations[index].id;
11302
+ newDepreciations[index].file = depreciation.file;
11303
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_RECEIPT, newDepreciations[index]));
11304
+ }
11305
+ });
11155
11306
  this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.DEPRECIATIONS_CREATED, newDepreciations));
11156
11307
  return newDepreciations;
11157
11308
  }));
11158
11309
  }
11310
+ update(depreciation) {
11311
+ return super.update(depreciation).pipe(map((updatedDepreciation) => {
11312
+ // @TODO need to upload file in the same backend endpoint with depreciation add/update
11313
+ // check if passed new receipt and upload file
11314
+ if (depreciation.file && (depreciation.file instanceof File)) {
11315
+ updatedDepreciation.file = depreciation.file;
11316
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_RECEIPT, updatedDepreciation));
11317
+ // receipt file was removed from form - we should delete receipt from transaction
11318
+ }
11319
+ else if (!depreciation.file && depreciation.receipt) {
11320
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT, updatedDepreciation));
11321
+ }
11322
+ return updatedDepreciation;
11323
+ }));
11324
+ }
11159
11325
  /**
11160
11326
  * Listen to Depreciations events
11161
11327
  */
11162
11328
  listenEvents() {
11163
11329
  this.listenToUpdatedLoan();
11330
+ this.listenReceiptAdded();
11331
+ this.listenReceiptDeleted();
11164
11332
  this.listenVehicleClaimChanges();
11165
11333
  this.listenToUpdatedBankAccount();
11166
11334
  }
@@ -11170,21 +11338,20 @@ class DepreciationService extends RestService {
11170
11338
  return response || 0;
11171
11339
  }));
11172
11340
  }
11173
- /**
11174
- * Upload depreciation receipt
11175
- * @param depreciation for which will be uploaded receipt
11176
- */
11177
- uploadReceipt(depreciation) {
11178
- const formData = new FormData();
11179
- formData.append('file', depreciation.file);
11180
- depreciation.receipt = null;
11181
- this.http.post(`${this.environment.apiV2}/${this.url}/${depreciation.id}/receipts`, formData)
11182
- .subscribe((receiptResponse) => {
11341
+ listenReceiptAdded() {
11342
+ this.eventDispatcherService.on(AppEventTypeEnum.DEPRECIATION_RECEIPT_CREATED).subscribe((receipt) => {
11343
+ const depreciationToUpdate = this.find(receipt.depreciation.id);
11183
11344
  // we don't need to keep file after save
11184
- depreciation.file = null;
11185
- depreciation.receipt = plainToClass(DepreciationReceipt, receiptResponse);
11186
- replace(this.cache, depreciation);
11187
- this.cacheSubject.next(this.cache.slice());
11345
+ depreciationToUpdate.file = null;
11346
+ depreciationToUpdate.receipt = receipt;
11347
+ this.replaceInCache(depreciationToUpdate);
11348
+ });
11349
+ }
11350
+ listenReceiptDeleted() {
11351
+ this.eventDispatcherService.on(AppEventTypeEnum.DEPRECIATION_RECEIPT_DELETED).subscribe((depreciation) => {
11352
+ const depreciationToUpdate = this.find(depreciation.id);
11353
+ depreciationToUpdate.receipt = null;
11354
+ this.replaceInCache(depreciationToUpdate);
11188
11355
  });
11189
11356
  }
11190
11357
  /**
@@ -11218,15 +11385,76 @@ class DepreciationService extends RestService {
11218
11385
  this.resetCache();
11219
11386
  });
11220
11387
  }
11388
+ replaceInCache(depreciationToReplace) {
11389
+ replace(this.cache, depreciationToReplace);
11390
+ this.updateCache();
11391
+ }
11221
11392
  }
11222
- DepreciationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
11393
+ DepreciationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: DepreciationReceiptService }], target: i0.ɵɵFactoryTarget.Injectable });
11223
11394
  DepreciationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationService, providedIn: 'root' });
11224
11395
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationService, decorators: [{
11225
11396
  type: Injectable,
11226
11397
  args: [{
11227
11398
  providedIn: 'root'
11228
11399
  }]
11229
- }] });
11400
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
11401
+ type: Inject,
11402
+ args: ['environment']
11403
+ }] }, { type: ToastService }, { type: DepreciationReceiptService }]; } });
11404
+
11405
+ /**
11406
+ * Service for work with DepreciationCapitalProjects
11407
+ */
11408
+ class DepreciationCapitalProjectService {
11409
+ constructor(http, environment) {
11410
+ this.http = http;
11411
+ this.environment = environment;
11412
+ this.cacheSubject = new ReplaySubject(1);
11413
+ }
11414
+ get(propertyId) {
11415
+ this.cacheSubject.next([]);
11416
+ this.http.get(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects`)
11417
+ .subscribe((capitalProjectsBase) => {
11418
+ this.cache = capitalProjectsBase.map((capitalProjectBase) => {
11419
+ return plainToClass(DepreciationCapitalProject, capitalProjectBase);
11420
+ });
11421
+ this.cacheSubject.next(this.cache);
11422
+ });
11423
+ return this.cacheSubject.asObservable();
11424
+ }
11425
+ add(capitalProject, propertyId) {
11426
+ return this.http.post(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects`, capitalProject)
11427
+ .pipe(map((capitalProjectBase) => {
11428
+ this.cache.push(plainToClass(DepreciationCapitalProject, capitalProjectBase));
11429
+ this.cacheSubject.next(this.cache);
11430
+ }));
11431
+ }
11432
+ update(capitalProject, propertyId) {
11433
+ return this.http.put(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects/${capitalProject.id}`, capitalProject)
11434
+ .pipe(map((capitalProjectBase) => {
11435
+ replace(this.cache, plainToClass(DepreciationCapitalProject, capitalProjectBase));
11436
+ this.cacheSubject.next(this.cache);
11437
+ }));
11438
+ }
11439
+ delete(capitalProject, propertyId) {
11440
+ return this.http.delete(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects/${capitalProject.id}`)
11441
+ .pipe(map(() => {
11442
+ this.cache = this.cache.filter((item) => capitalProject.id !== item.id);
11443
+ this.cacheSubject.next(this.cache);
11444
+ }));
11445
+ }
11446
+ }
11447
+ DepreciationCapitalProjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
11448
+ DepreciationCapitalProjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, providedIn: 'root' });
11449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, decorators: [{
11450
+ type: Injectable,
11451
+ args: [{
11452
+ providedIn: 'root'
11453
+ }]
11454
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
11455
+ type: Inject,
11456
+ args: ['environment']
11457
+ }] }]; } });
11230
11458
 
11231
11459
  /**
11232
11460
  * Service to handle document-folders and depending documents logic
@@ -13026,44 +13254,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
13026
13254
  }]
13027
13255
  }] });
13028
13256
 
13029
- /**
13030
- * Service that works with Occupations
13031
- */
13032
- class OccupationService {
13033
- constructor(http, environment) {
13034
- this.http = http;
13035
- this.environment = environment;
13036
- this.occupationsSubject = new ReplaySubject(1);
13037
- }
13038
- /**
13039
- * Get list of occupations
13040
- */
13041
- getOccupations() {
13042
- if (!this._occupations) {
13043
- this.http.get(`${this.environment.apiV2}/occupations`)
13044
- .pipe(map((response) => {
13045
- return response.map((item) => plainToClass(Occupation, item));
13046
- }))
13047
- .subscribe((occupations) => {
13048
- this._occupations = occupations;
13049
- this.occupationsSubject.next(occupations);
13050
- });
13051
- }
13052
- return this.occupationsSubject.asObservable();
13053
- }
13054
- }
13055
- OccupationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: OccupationService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
13056
- OccupationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: OccupationService, providedIn: 'root' });
13057
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: OccupationService, decorators: [{
13058
- type: Injectable,
13059
- args: [{
13060
- providedIn: 'root'
13061
- }]
13062
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
13063
- type: Inject,
13064
- args: ['environment']
13065
- }] }]; } });
13066
-
13067
13257
  /**
13068
13258
  * Service to work with user
13069
13259
  */
@@ -13210,66 +13400,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
13210
13400
  args: ['environment']
13211
13401
  }] }]; } });
13212
13402
 
13213
- class UserEventSettingService extends RestService {
13214
- constructor() {
13215
- super(...arguments);
13216
- this.modelClass = UserEventSetting;
13217
- this.url = 'user-event-settings';
13218
- this.isHydra = true;
13219
- }
13220
- /**
13221
- * Send batch to add/updated settings
13222
- */
13223
- saveBatch(settings) {
13224
- // batch with post/put requests based on setting id
13225
- const batch = settings.map((setting) => {
13226
- setting.isUpdating = true;
13227
- if (setting.id) {
13228
- return this.http.put(`${this.environment.apiV2}/${this.url}/${setting.id}`, classToPlain(setting));
13229
- }
13230
- return this.http.post(`${this.environment.apiV2}/${this.url}`, classToPlain(setting));
13231
- });
13232
- return forkJoin(batch).pipe(map((eventSettings) => {
13233
- eventSettings.forEach((eventSetting) => {
13234
- // get setting from cache by saved setting id
13235
- const cachedSetting = this.cache.find((setting) => setting.id === eventSetting.id);
13236
- if (cachedSetting) {
13237
- replace(this.cache, eventSetting);
13238
- }
13239
- else {
13240
- this.cache.push(plainToClass(UserEventSetting, eventSetting));
13241
- }
13242
- });
13243
- this.updateCache();
13244
- }));
13245
- }
13246
- }
13247
- UserEventSettingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventSettingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
13248
- UserEventSettingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventSettingService, providedIn: 'root' });
13249
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventSettingService, decorators: [{
13250
- type: Injectable,
13251
- args: [{
13252
- providedIn: 'root'
13253
- }]
13254
- }] });
13255
-
13256
- class UserEventTypeService extends RestService {
13257
- constructor() {
13258
- super(...arguments);
13259
- this.modelClass = UserEventType;
13260
- this.url = 'user-event-types';
13261
- this.isHydra = true;
13262
- }
13263
- }
13264
- UserEventTypeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventTypeService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
13265
- UserEventTypeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventTypeService, providedIn: 'root' });
13266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UserEventTypeService, decorators: [{
13267
- type: Injectable,
13268
- args: [{
13269
- providedIn: 'root'
13270
- }]
13271
- }] });
13272
-
13273
13403
  /**
13274
13404
  * Service to work with XLSX (generate, download, e.t.c.)
13275
13405
  */
@@ -14703,5 +14833,5 @@ VehicleLogbookForm.maxDescriptionLength = 60;
14703
14833
  * Generated bundle index. Do not edit.
14704
14834
  */
14705
14835
 
14706
- export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqConfig, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, KompassifyService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessOrLosses, MyTaxBusinessOrLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEmployeeShareSchemes, MyTaxEmployeeShareSchemesForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductIdEnum, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceItem, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetadata, TaxExemptionMetadataEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
14836
+ export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqConfig, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReceiptService, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, KompassifyService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessOrLosses, MyTaxBusinessOrLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEmployeeShareSchemes, MyTaxEmployeeShareSchemesForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductIdEnum, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceItem, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetadata, TaxExemptionMetadataEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
14707
14837
  //# sourceMappingURL=taxtank-core.js.map