taxtank-core 0.33.13 → 0.33.16

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/esm2022/src/lib/collections/holding/holding.collection.mjs +4 -1
  2. package/esm2022/src/lib/db/Models/vehicle/vehicle-claim.mjs +3 -3
  3. package/esm2022/src/lib/forms/report/my-tax/my-tax-business-income-or-losses/my-tax-business-details/my-tax-business-details.form.mjs +1 -1
  4. package/esm2022/src/lib/forms/transaction/transaction-base-filter.form.mjs +4 -1
  5. package/esm2022/src/lib/models/event/app-event-type.enum.mjs +7 -9
  6. package/esm2022/src/lib/models/vehicle/vehicle-claim-details.mjs +1 -2
  7. package/esm2022/src/lib/services/account-setup/account-setup.service.mjs +2 -2
  8. package/esm2022/src/lib/services/http/bank/bank-account/bank-account.service.mjs +3 -1
  9. package/esm2022/src/lib/services/http/depreciation/depreciation.service.mjs +3 -4
  10. package/esm2022/src/lib/services/http/property/property-category-movement/property-category-movement.service.mjs +16 -7
  11. package/esm2022/src/lib/services/http/property/property-share/property-share.service.mjs +3 -1
  12. package/esm2022/src/lib/services/http/sole/sole-invoice/sole-invoice.service.mjs +9 -9
  13. package/esm2022/src/lib/services/http/transaction/transaction.service.mjs +3 -4
  14. package/esm2022/src/lib/services/http/vehicle/vehicle-claim.service.mjs +6 -18
  15. package/esm2022/src/lib/services/http/vehicle/vehicle.service.mjs +2 -2
  16. package/fesm2022/taxtank-core.mjs +42 -42
  17. package/fesm2022/taxtank-core.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/src/lib/collections/holding/holding.collection.d.ts +1 -0
  20. package/src/lib/db/Models/vehicle/vehicle-claim.d.ts +2 -2
  21. package/src/lib/forms/report/my-tax/my-tax-business-income-or-losses/my-tax-business-details/my-tax-business-details.form.d.ts +1 -1
  22. package/src/lib/models/event/app-event-type.enum.d.ts +6 -8
  23. package/src/lib/services/http/bank/bank-account/bank-account.service.d.ts +2 -0
  24. package/src/lib/services/http/property/property-category-movement/property-category-movement.service.d.ts +5 -1
  25. package/src/lib/services/http/property/property-share/property-share.service.d.ts +2 -0
  26. package/src/lib/services/http/sole/sole-invoice/sole-invoice.service.d.ts +6 -6
  27. package/src/lib/services/http/vehicle/vehicle-claim.service.d.ts +5 -6
  28. package/src/lib/services/http/vehicle/vehicle.service.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.33.13",
3
+ "version": "0.33.16",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^17.0.0",
@@ -13,4 +13,5 @@ export declare class HoldingCollection extends ExportableCollection<Holding> {
13
13
  get sharedMarketValue(): number;
14
14
  getGrowthCoefficient(): number;
15
15
  getUnsold(): this;
16
+ getUnrealisedProfit(): number;
16
17
  }
@@ -1,8 +1,8 @@
1
1
  import { User } from '../user/user';
2
- import { AbstractModel } from '../abstract-model';
3
2
  import { SoleBusiness } from '../sole/sole-business';
4
3
  import { VehicleClaimDetails } from './vehicle-claim-details';
5
- export declare class VehicleClaim extends AbstractModel {
4
+ import { ObservableModel } from '../observable-model';
5
+ export declare class VehicleClaim extends ObservableModel {
6
6
  kilometers?: number;
7
7
  workUsage?: number;
8
8
  details?: VehicleClaimDetails;
@@ -1,6 +1,6 @@
1
1
  import { MyTaxBusinessDetails } from '../../../../../models/report';
2
2
  import { AbstractForm } from '../../../../abstract.form';
3
- import { IEventListener } from '../../../../../interfaces/event-listener.interface';
3
+ import { IEventListener } from '../../../../../interfaces';
4
4
  export declare class MyTaxBusinessDetailsForm extends AbstractForm<MyTaxBusinessDetails> implements IEventListener {
5
5
  private businessDetails;
6
6
  constructor(businessDetails: MyTaxBusinessDetails);
@@ -52,12 +52,10 @@ export declare enum AppEventTypeEnum {
52
52
  TRANSACTION_DELETED = 47,
53
53
  TRANSACTION_UPDATED = 48,
54
54
  TRANSACTIONS_CREATED = 49,
55
- VEHICLE_CLAIM_UPDATED = 50,
56
- VEHICLE_CLAIM_CREATED = 51,
57
- VEHICLE_CLAIM_DETAILS_UPDATED = 52,
58
- VEHICLE_CLAIM_DETAILS_CREATED = 53,
59
- VEHICLE_LOGBOOK_CREATED = 54,
60
- VEHICLE_LOGBOOK_UPDATED = 55,
61
- VEHICLE_LOGBOOK_DELETED = 56,
62
- VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED = 57
55
+ VEHICLE_CLAIM_DETAILS_UPDATED = 50,
56
+ VEHICLE_CLAIM_DETAILS_CREATED = 51,
57
+ VEHICLE_LOGBOOK_CREATED = 52,
58
+ VEHICLE_LOGBOOK_UPDATED = 53,
59
+ VEHICLE_LOGBOOK_DELETED = 54,
60
+ VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED = 55
63
61
  }
@@ -6,6 +6,7 @@ import { IEventListener } from '../../../../interfaces';
6
6
  import { BankAccountCollection } from '../../../../collections';
7
7
  import { EventDispatcherService, SseService } from '../../../event';
8
8
  import { HttpClient } from '@angular/common/http';
9
+ import { UserRolesEnum } from 'taxtank-core/common';
9
10
  import * as i0 from "@angular/core";
10
11
  /**
11
12
  * Service that handling user's bank accounts logic
@@ -19,6 +20,7 @@ export declare class BankAccountService extends RestService<BankAccountBase, Ban
19
20
  modelClass: typeof BankAccount;
20
21
  collectionClass: typeof BankAccountCollection;
21
22
  disabledMethods: RestMethod[];
23
+ roles: UserRolesEnum[];
22
24
  constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, sseService: SseService, environment: any);
23
25
  getActive(): Observable<BankAccountCollection>;
24
26
  /**
@@ -2,12 +2,16 @@ import { PropertyCategoryMovement } from '../../../../models';
2
2
  import { PropertyCategoryMovement as PropertyCategoryMovementBase } from '../../../../db/Models';
3
3
  import { RestMethod, RestService } from '../../rest';
4
4
  import { PropertyCategoryMovementCollection } from '../../../../collections';
5
+ import { IEventListener } from '../../../../interfaces';
5
6
  import * as i0 from "@angular/core";
6
- export declare class PropertyCategoryMovementService extends RestService<PropertyCategoryMovementBase, PropertyCategoryMovement, PropertyCategoryMovementCollection> {
7
+ export declare class PropertyCategoryMovementService extends RestService<PropertyCategoryMovementBase, PropertyCategoryMovement, PropertyCategoryMovementCollection> implements IEventListener {
8
+ protected environment: any;
7
9
  modelClass: typeof PropertyCategoryMovement;
8
10
  collectionClass: typeof PropertyCategoryMovementCollection;
9
11
  endpointUri: string;
10
12
  disabledMethods: RestMethod[];
13
+ constructor(environment: any);
14
+ listenEvents(): void;
11
15
  static ɵfac: i0.ɵɵFactoryDeclaration<PropertyCategoryMovementService, never>;
12
16
  static ɵprov: i0.ɵɵInjectableDeclaration<PropertyCategoryMovementService>;
13
17
  }
@@ -4,6 +4,7 @@ import { PropertyShare } from '../../../../models';
4
4
  import { RestMethod, RestService } from '../../rest';
5
5
  import { IEventListener } from '../../../../interfaces';
6
6
  import { PropertyShareCollection } from '../../../../collections';
7
+ import { UserRolesEnum } from 'taxtank-core/common';
7
8
  import * as i0 from "@angular/core";
8
9
  export declare class PropertyShareService extends RestService<PropertyShareBase, PropertyShare, PropertyShareCollection> implements IEventListener {
9
10
  protected environment: any;
@@ -11,6 +12,7 @@ export declare class PropertyShareService extends RestService<PropertyShareBase,
11
12
  modelClass: typeof PropertyShare;
12
13
  collectionClass: typeof PropertyShareCollection;
13
14
  disabledMethods: RestMethod[];
15
+ roles: UserRolesEnum[];
14
16
  constructor(environment: any);
15
17
  /**
16
18
  * Listen to Event Dispatcher events
@@ -1,22 +1,22 @@
1
- import { RestService } from '../../rest/rest-old.service';
1
+ import { RestService } from '../../rest';
2
2
  import { SoleInvoice as SoleInvoiceBase } from '../../../../db/Models/sole/sole-invoice';
3
3
  import { SoleInvoice } from '../../../../models';
4
4
  import { SoleInvoiceStatusesEnum } from '../../../../db/Enums/sole-invoice-statuses.enum';
5
5
  import { Observable } from 'rxjs';
6
6
  import { UserRolesEnum } from 'taxtank-core/common';
7
+ import { SoleInvoiceCollection } from '../../../../collections';
7
8
  import * as i0 from "@angular/core";
8
- export declare class SoleInvoiceService extends RestService<SoleInvoiceBase, SoleInvoice> {
9
+ export declare class SoleInvoiceService extends RestService<SoleInvoiceBase, SoleInvoice, SoleInvoiceCollection> {
9
10
  protected environment: any;
11
+ endpointUri: string;
10
12
  modelClass: typeof SoleInvoice;
11
- url: string;
13
+ collectionClass: typeof SoleInvoiceCollection;
12
14
  roles: UserRolesEnum[];
13
15
  constructor(environment: any);
14
16
  updateStatus(invoice: SoleInvoice, status: SoleInvoiceStatusesEnum): Observable<SoleInvoice>;
15
17
  send(invoice: SoleInvoice, file: File): Observable<Object>;
16
18
  /**
17
- * @TODO use backend
18
- * Return the next number from the last invoice.
19
- * Basically needed to create a new invoice to show its number when the invoice has not yet been sent to the backend
19
+ * Return the next number from the last invoice
20
20
  */
21
21
  getNewInvoiceNumber(): number;
22
22
  static ɵfac: i0.ɵɵFactoryDeclaration<SoleInvoiceService, never>;
@@ -1,20 +1,19 @@
1
1
  import { VehicleClaim as VehicleClaimBase } from '../../../db/Models/vehicle/vehicle-claim';
2
2
  import { VehicleClaim } from '../../../models';
3
- import { RestService } from '../rest/rest-old.service';
3
+ import { RestService } from '../rest';
4
4
  import { Observable } from 'rxjs';
5
5
  import { UserRolesEnum } from 'taxtank-core/common';
6
- import { BestVehicleLogbookCollection } from '../../../collections';
6
+ import { BestVehicleLogbookCollection, VehicleClaimCollection } from '../../../collections';
7
7
  import { IEventListener } from '../../../interfaces';
8
8
  import * as i0 from "@angular/core";
9
- export declare class VehicleClaimService extends RestService<VehicleClaimBase, VehicleClaim> implements IEventListener {
9
+ export declare class VehicleClaimService extends RestService<VehicleClaimBase, VehicleClaim, VehicleClaimCollection> implements IEventListener {
10
10
  protected environment: any;
11
+ protected endpointUri: string;
11
12
  modelClass: typeof VehicleClaim;
12
- url: string;
13
+ collectionClass: typeof VehicleClaimCollection;
13
14
  roles: UserRolesEnum[];
14
15
  constructor(environment: any);
15
16
  listenEvents(): void;
16
- add(model: VehicleClaim): Observable<VehicleClaim>;
17
- update(model: VehicleClaim, queryParams?: object): Observable<VehicleClaim>;
18
17
  /**
19
18
  * Update workUsage for all vehicle claims if logbook best period changed
20
19
  * @TODO Vik: Best period move this and related logic to backend
@@ -1,6 +1,6 @@
1
1
  import { Vehicle as VehicleBase } from '../../../db/Models/vehicle/vehicle';
2
2
  import { Vehicle } from '../../../models';
3
- import { RestService } from '../rest/rest.service';
3
+ import { RestService } from '../rest';
4
4
  import { Collection } from '../../../collections';
5
5
  import * as i0 from "@angular/core";
6
6
  /**