taxtank-core 0.13.0 → 0.13.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.
- package/bundles/taxtank-core.umd.js +753 -678
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/account-setup-item.collection.js +3 -2
- package/esm2015/lib/collections/collection.js +3 -3
- package/esm2015/lib/collections/report/vehicle-expense/vehicle-expense.collection.js +20 -0
- package/esm2015/lib/db/Enums/user-roles.enum.js +2 -1
- package/esm2015/lib/models/account-setup/account-setup-item.js +4 -1
- package/esm2015/lib/models/account-setup/account-setup-items.const.js +9 -5
- package/esm2015/lib/models/report/vehicle-expense/vehicle-expense.js +14 -0
- package/esm2015/lib/models/user/user-roles.const.js +2 -1
- package/esm2015/lib/services/account-setup/account-setup.service.js +32 -5
- package/esm2015/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.js +8 -2
- package/esm2015/public-api.js +3 -1
- package/fesm2015/taxtank-core.js +608 -539
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/collection.d.ts +1 -1
- package/lib/collections/report/vehicle-expense/vehicle-expense.collection.d.ts +9 -0
- package/lib/db/Enums/user-roles.enum.d.ts +1 -0
- package/lib/models/account-setup/account-setup-item.d.ts +1 -0
- package/lib/models/report/vehicle-expense/vehicle-expense.d.ts +10 -0
- package/lib/services/account-setup/account-setup.service.d.ts +14 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -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(
|
|
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
|
+
}
|
|
@@ -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
|
-
|
|
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
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';
|