taxtank-core 0.13.0 → 0.13.3

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.
@@ -44,6 +44,6 @@ export declare class Collection<Model extends object> implements Iterable<Model>
44
44
  /**
45
45
  * Sort collection items by provided field
46
46
  */
47
- sortBy(filed?: string, isDesc?: boolean): void;
47
+ sortBy(field?: string, isDesc?: boolean): void;
48
48
  getByDateRange(from: Date, to: Date, dateField?: string): this;
49
49
  }
@@ -0,0 +1,9 @@
1
+ import { Collection } from '../../collection';
2
+ import { VehicleExpense } from '../../../models/report/vehicle-expense/vehicle-expense';
3
+ import { TransactionCollection } from '../../transaction.collection';
4
+ import { DepreciationCollection } from '../../depreciation.collection';
5
+ import { VehicleClaim } from '../../../models/logbook/vehicle-claim';
6
+ export declare class VehicleExpenseCollection extends Collection<VehicleExpense> {
7
+ constructor(transactions: TransactionCollection, depreciations: DepreciationCollection, vehicleClaim: VehicleClaim);
8
+ private setItems;
9
+ }
@@ -9,5 +9,6 @@ export declare enum UserRolesEnum {
9
9
  SUBSCRIPTION = "ROLE_USER_SUBSCRIPTION",
10
10
  WORK_TANK = "ROLE_USER_WORK",
11
11
  PROPERTY_TANK = "ROLE_USER_PROPERTY",
12
+ SOLE_TANK = "ROLE_USER_SOLE",
12
13
  SWITCH_USER = "ROLE_PREVIOUS_ADMIN"
13
14
  }
@@ -5,5 +5,7 @@ export declare class AccountSetupItem {
5
5
  title: string;
6
6
  description: string;
7
7
  url: string;
8
+ urlFragment: string;
9
+ clientIncomeTypes: string[];
8
10
  isCompleted: boolean;
9
11
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Vehicle expense for logbook section
3
+ */
4
+ export declare class VehicleExpense {
5
+ description: string;
6
+ amount: number;
7
+ claimPercent: number;
8
+ constructor(amount: number, claimPercent: number, description: string);
9
+ getClaimAmount(): number;
10
+ }
@@ -1,4 +1,6 @@
1
+ import { AccountSetupItem } from '../../models/account-setup/account-setup-item';
1
2
  import { BankAccountService } from '../http/bank/bank-account/bank-account.service';
3
+ import { ClientIncomeTypes } from '../../models/client/client-income-types';
2
4
  import { ClientIncomeTypesService } from '../http/firm/client-income/client-income-types.service';
3
5
  import { IncomeSourceService } from '../http/income-source/income-source.service';
4
6
  import { PropertyService } from '../http/property/property.service';
@@ -6,6 +8,7 @@ import { TransactionAllocationService } from '../http/transaction/transaction-al
6
8
  import { Observable, ReplaySubject } from 'rxjs';
7
9
  import { AccountSetupItemCollection } from '../../collections/account-setup-item.collection';
8
10
  import { VehicleClaimService } from '../http/vehicle/vehicle-claim.service';
11
+ import { TransactionService } from '../http/transaction/transaction.service';
9
12
  import * as i0 from "@angular/core";
10
13
  /**
11
14
  * Service handling user's account setup process.
@@ -18,13 +21,19 @@ export declare class AccountSetupService {
18
21
  private bankAccountsService;
19
22
  private transactionAllocationService;
20
23
  private vehicleClaimService;
24
+ private transactionService;
21
25
  cache: AccountSetupItemCollection;
22
26
  cacheSubject: ReplaySubject<AccountSetupItemCollection>;
23
- constructor(clientIncomeTypesService: ClientIncomeTypesService, propertyService: PropertyService, incomeSourceService: IncomeSourceService, bankAccountsService: BankAccountService, transactionAllocationService: TransactionAllocationService, vehicleClaimService: VehicleClaimService);
27
+ clientIncomeTypesId: number;
28
+ constructor(clientIncomeTypesService: ClientIncomeTypesService, propertyService: PropertyService, incomeSourceService: IncomeSourceService, bankAccountsService: BankAccountService, transactionAllocationService: TransactionAllocationService, vehicleClaimService: VehicleClaimService, transactionService: TransactionService);
24
29
  /**
25
30
  * Get list of account setup items for current user
26
31
  */
27
32
  get(): Observable<AccountSetupItemCollection>;
33
+ /**
34
+ * Prepare client income types to update to hide depended account setup items
35
+ */
36
+ prepareIncomeTypes(item: AccountSetupItem): ClientIncomeTypes;
28
37
  /**
29
38
  * Get a single AccountSetupItem and check it's completion
30
39
  */
@@ -38,6 +47,10 @@ export declare class AccountSetupService {
38
47
  * @TODO work with collection when services refactored
39
48
  */
40
49
  private getIncomeSourcesByType;
50
+ /**
51
+ * Show logbook item when user has at least 1 vehicle transaction
52
+ */
53
+ private getLogbookItem;
41
54
  static ɵfac: i0.ɵɵFactoryDeclaration<AccountSetupService, never>;
42
55
  static ɵprov: i0.ɵɵInjectableDeclaration<AccountSetupService>;
43
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.13.0",
3
+ "version": "0.13.3",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -26,6 +26,7 @@ export * from './lib/collections/report/depreciation/depreciation-report-item.co
26
26
  export * from './lib/collections/report/property/property-report-item.collection';
27
27
  export * from './lib/collections/report/property/property-report-item-transaction.collection';
28
28
  export * from './lib/collections/report/property/property-report-item-depreciation.collection';
29
+ export * from './lib/collections/report/vehicle-expense/vehicle-expense.collection';
29
30
  export * from './lib/collections/subscription/service-subscription.collection';
30
31
  export * from './lib/collections/tax-summary/report-item.collection';
31
32
  export * from './lib/collections/tax-review.collection';
@@ -237,6 +238,7 @@ export * from './lib/models/report/depreciation/depreciation-report-item';
237
238
  export * from './lib/models/report/depreciation/depreciation-lvp-asset-type.enum';
238
239
  export * from './lib/models/report/property/property-report-item';
239
240
  export * from './lib/models/report/property/property-report-item-transaction';
241
+ export * from './lib/models/report/vehicle-expense/vehicle-expense';
240
242
  export * from './lib/models/service-subscription/module-url-list.const';
241
243
  export * from './lib/models/service-subscription/service-payment';
242
244
  export * from './lib/models/service-subscription/service-price';