taxtank-core 1.0.19 → 1.0.20
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/fesm2022/taxtank-core.mjs +180 -234
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/collections/account-setup-item.collection.d.ts +1 -5
- package/src/lib/collections/bank-account.collection.d.ts +1 -1
- package/src/lib/collections/subscription/service-subscription.collection.d.ts +0 -1
- package/src/lib/db/Enums/index.d.ts +0 -1
- package/src/lib/db/Enums/setup-item-type.enum.d.ts +2 -8
- package/src/lib/db/Models/property/property.d.ts +0 -1
- package/src/lib/db/Models/setup-item.d.ts +1 -4
- package/src/lib/forms/transaction/allocation-rule-transaction.form.d.ts +1 -0
- package/src/lib/models/account-setup/account-setup-item.d.ts +12 -5
- package/src/lib/models/account-setup/account-setup-items.enum.d.ts +11 -29
- package/src/lib/models/index.d.ts +0 -1
- package/src/lib/models/user/user.d.ts +1 -1
- package/src/lib/services/account-setup/account-setup.service.d.ts +14 -32
- package/src/lib/services/http/firm/firm.service.d.ts +4 -0
- package/src/lib/services/http/loan/borrowing-expense/borrowing-expense.service.d.ts +1 -2
- package/src/lib/services/http/rest/rest-old.service.d.ts +0 -1
- package/src/lib/services/http/rest/rest.service.d.ts +0 -1
- package/src/lib/services/http/setup-item/setup-item.service.d.ts +1 -1
- package/src/lib/services/http/user/user.service.d.ts +0 -1
- package/src/lib/models/account-setup/account-setup-item-status.enum.d.ts +0 -5
- package/src/lib/models/account-setup/index.d.ts +0 -3
package/package.json
CHANGED
@@ -1,10 +1,6 @@
|
|
1
|
-
import { AccountSetupItem } from '../models';
|
1
|
+
import { AccountSetupItem } from '../models/account-setup/account-setup-item';
|
2
2
|
import { Collection } from './collection';
|
3
|
-
import { User } from '../models';
|
4
3
|
export declare class AccountSetupItemCollection extends Collection<AccountSetupItem> {
|
5
4
|
constructor(items: AccountSetupItem[]);
|
6
5
|
isCompleted(): boolean;
|
7
|
-
getByUser(user: User): this;
|
8
|
-
getScore(): number;
|
9
|
-
setUrlId(id: string): void;
|
10
6
|
}
|
@@ -31,7 +31,7 @@ export declare class BankAccountCollection extends Collection<BankAccount> {
|
|
31
31
|
/**
|
32
32
|
* Get Collection of bank accounts by tank type
|
33
33
|
*/
|
34
|
-
getByTankType(tankType
|
34
|
+
getByTankType(tankType: TankTypeEnum): BankAccountCollection;
|
35
35
|
/**
|
36
36
|
* Get list of all bank account properties
|
37
37
|
*/
|
@@ -19,6 +19,5 @@ export declare class ServiceSubscriptionCollection extends Collection<ServiceSub
|
|
19
19
|
findByProduct(product: ServiceProduct): ServiceSubscription;
|
20
20
|
filterByProduct(product: ServiceProduct): this;
|
21
21
|
filterByRole(role: UserRolesEnum): this;
|
22
|
-
findByRole(role: UserRolesEnum): ServiceSubscription;
|
23
22
|
hasPropertyTank(): boolean;
|
24
23
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SetupItemTypeEnum } from '../Enums';
|
1
|
+
import { SetupItemTypeEnum } from '../Enums/setup-item-type.enum';
|
2
2
|
import { UserRolesEnum } from 'taxtank-core/common';
|
3
3
|
import { AbstractModel } from './abstract-model';
|
4
4
|
export declare class SetupItem extends AbstractModel {
|
@@ -7,8 +7,5 @@ export declare class SetupItem extends AbstractModel {
|
|
7
7
|
description?: string;
|
8
8
|
url?: string;
|
9
9
|
urlFragment?: string;
|
10
|
-
isRequired?: boolean;
|
11
|
-
order?: number;
|
12
|
-
score?: number;
|
13
10
|
roles?: UserRolesEnum;
|
14
11
|
}
|
@@ -16,6 +16,7 @@ export declare class AllocationRuleTransactionForm extends AbstractForm<Allocati
|
|
16
16
|
get isSplit(): boolean;
|
17
17
|
isPersonal(): boolean;
|
18
18
|
addChildTransactionForm(): void;
|
19
|
+
buildTransactions(transaction: AllocationRuleTransaction): AllocationRuleTransaction[];
|
19
20
|
submit(): AllocationRuleTransaction;
|
20
21
|
listenEvents(): void;
|
21
22
|
private listenChartAccountsChanges;
|
@@ -1,8 +1,15 @@
|
|
1
1
|
import { SetupItem } from '../../db/Models/setup-item';
|
2
2
|
export declare class AccountSetupItem extends SetupItem {
|
3
|
-
|
4
|
-
get
|
5
|
-
get
|
6
|
-
get
|
7
|
-
get
|
3
|
+
isCompleted: boolean;
|
4
|
+
get isSalary(): boolean;
|
5
|
+
get isOtherIncome(): boolean;
|
6
|
+
get isProperty(): boolean;
|
7
|
+
get isBankFeeds(): boolean;
|
8
|
+
get isWorkLogbook(): boolean;
|
9
|
+
get isTransactionAllocate(): boolean;
|
10
|
+
get isSoleBusiness(): boolean;
|
11
|
+
get isHoldings(): boolean;
|
12
|
+
get isFirmDetails(): boolean;
|
13
|
+
get isInviteTeam(): boolean;
|
14
|
+
get isInviteClients(): boolean;
|
8
15
|
}
|
@@ -1,35 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* Enum list of all possible account setup items ids. Using with [ACCOUNT_SETUP_ITEMS]{@link ACCOUNT_SETUP_ITEMS}
|
3
|
+
* @TODO Vik/Nikita: Do we need to generate it from backend? If some ids changed?
|
3
4
|
*/
|
4
5
|
export declare enum AccountSetupItemsEnum {
|
5
|
-
|
6
|
-
|
7
|
-
FIRM_CLIENTS = 11,
|
8
|
-
WORK_SALARY = 1,
|
9
|
-
WORK_OTHER_INCOME = 2,
|
10
|
-
WORK_VEHICLE_CLAIM = 5,
|
11
|
-
WORK_HOME_OFFICE = 13,
|
12
|
-
WORK_BANK_ACCOUNT = 14,
|
13
|
-
WORK_DEPRECIATION = 15,
|
6
|
+
SALARY = 1,
|
7
|
+
OTHER_INCOME = 2,
|
14
8
|
PROPERTY = 3,
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
PROPERTY_RENT_INCOME = 18,
|
19
|
-
PROPERTY_DEPRECIATION = 19,
|
20
|
-
PROPERTY_CO_OWNER = 20,
|
9
|
+
BANK_FEEDS = 4,
|
10
|
+
WORK_LOGBOOK = 5,
|
11
|
+
TRANSACTION_ALLOCATE = 6,
|
21
12
|
SOLE_BUSINESS = 7,
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
SOLE_BANK_ACCOUNT = 23,
|
27
|
-
HOLDING_TRADE = 8,
|
28
|
-
HOLDING_INTEGRATION = 25,
|
29
|
-
HOLDING_REPORTS = 36,
|
30
|
-
BANK_CONNECTION = 4,
|
31
|
-
BANK_ACCOUNT = 26,
|
32
|
-
BANK_ALLOCATION = 6,
|
33
|
-
BANK_RULE = 27,
|
34
|
-
BANK_BORROWING_EXPENSE = 28
|
13
|
+
HOLDINGS = 8,
|
14
|
+
FIRM_DETAILS = 9,
|
15
|
+
INVITE_TEAM = 10,
|
16
|
+
INVITE_CLIENTS = 11
|
35
17
|
}
|
@@ -7,7 +7,7 @@ import { Phone } from '../phone/phone';
|
|
7
7
|
import { ServiceSubscription } from '../service-subscription';
|
8
8
|
import { SoleDetails } from '../sole';
|
9
9
|
import { AppFile } from '../file';
|
10
|
-
import { AccountSetupItem } from '../account-setup';
|
10
|
+
import { AccountSetupItem } from '../account-setup/account-setup-item';
|
11
11
|
import { TankTypeEnum } from '../../db/Enums/tank-type.enum';
|
12
12
|
export declare class User extends BaseUser {
|
13
13
|
subscriptions: ServiceSubscription[];
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { BankAccountService, ClientInviteService, ClientMovementService, EmployeeInviteService, EmployeeService, FirmService, HoldingTradeService, IncomeSourceService, PropertyService, SoleBusinessService, TransactionAllocationService, TransactionService, UserService, VehicleClaimService } from '../http';
|
2
|
+
import { User } from '../../models';
|
3
3
|
import { AccountSetupItemCollection } from '../../collections';
|
4
4
|
import { Observable } from 'rxjs';
|
5
|
+
import { SetupItemTypeEnum } from '../../db/Enums/setup-item-type.enum';
|
5
6
|
import { SetupItemService } from '../http/setup-item/setup-item.service';
|
6
7
|
import * as i0 from "@angular/core";
|
7
8
|
/**
|
@@ -12,15 +13,10 @@ export declare class AccountSetupService {
|
|
12
13
|
private setupItemService;
|
13
14
|
private propertyService;
|
14
15
|
private incomeSourceService;
|
15
|
-
private bankConnectionService;
|
16
16
|
private bankAccountsService;
|
17
|
-
private loanService;
|
18
|
-
private allocationRuleService;
|
19
17
|
private transactionAllocationService;
|
20
18
|
private vehicleClaimService;
|
21
|
-
private homeOfficeClaimService;
|
22
19
|
private transactionService;
|
23
|
-
private depreciationService;
|
24
20
|
private soleBusinessService;
|
25
21
|
private holdingService;
|
26
22
|
private userService;
|
@@ -29,46 +25,32 @@ export declare class AccountSetupService {
|
|
29
25
|
private employeeService;
|
30
26
|
private employeeInviteService;
|
31
27
|
private firmService;
|
32
|
-
private sharesightDetailsService;
|
33
|
-
private propertyShareService;
|
34
28
|
items: AccountSetupItemCollection;
|
35
29
|
user: User;
|
36
|
-
constructor(setupItemService: SetupItemService, propertyService: PropertyService, incomeSourceService: IncomeSourceService,
|
30
|
+
constructor(setupItemService: SetupItemService, propertyService: PropertyService, incomeSourceService: IncomeSourceService, bankAccountsService: BankAccountService, transactionAllocationService: TransactionAllocationService, vehicleClaimService: VehicleClaimService, transactionService: TransactionService, soleBusinessService: SoleBusinessService, holdingService: HoldingTradeService, userService: UserService, clientMovementService: ClientMovementService, clientInviteService: ClientInviteService, employeeService: EmployeeService, employeeInviteService: EmployeeInviteService, firmService: FirmService);
|
37
31
|
/**
|
38
32
|
* Get list of account setup items for current user/firm
|
39
33
|
*/
|
40
|
-
get(
|
41
|
-
|
34
|
+
get(type: SetupItemTypeEnum): Observable<AccountSetupItemCollection>;
|
35
|
+
getClientItems$(): Observable<AccountSetupItemCollection>;
|
36
|
+
getFirmItems$(): Observable<AccountSetupItemCollection>;
|
42
37
|
/**
|
43
38
|
* Check and update isCompleted flag for passed item
|
44
39
|
*/
|
45
40
|
private setItemStatus;
|
46
|
-
private getProperties;
|
47
|
-
private getTransactions;
|
48
|
-
private getCoOwners;
|
49
41
|
/**
|
50
|
-
*
|
51
|
-
|
52
|
-
private getClients;
|
53
|
-
/**
|
54
|
-
* AccountSetupItemsEnum.FIRM_EMPLOYEES completed when employee invites sent or accepted
|
42
|
+
* @TODO Alex: work with collection when services refactored
|
43
|
+
* @TODO Vik: waiting for income sources refactoring
|
55
44
|
*/
|
56
|
-
private
|
45
|
+
private getIncomeSources;
|
57
46
|
/**
|
58
|
-
*
|
47
|
+
* Show logbook item when user has at least 1 vehicle transaction
|
59
48
|
*/
|
60
|
-
private
|
49
|
+
private getLogbookItem;
|
61
50
|
/**
|
62
|
-
*
|
63
|
-
* @TODO Vik: waiting for income sources refactoring
|
51
|
+
* Hide bank feeds item when user has only holding tank
|
64
52
|
*/
|
65
|
-
private
|
66
|
-
private getVehicleClaims;
|
67
|
-
private getHomeOfficeClaims;
|
68
|
-
private getBankAccounts;
|
69
|
-
private getDepreciations;
|
70
|
-
private getSharesightDetails;
|
71
|
-
private getBorrowingExpenses;
|
53
|
+
private getBankFeedsItem;
|
72
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<AccountSetupService, never>;
|
73
55
|
static ɵprov: i0.ɵɵInjectableDeclaration<AccountSetupService>;
|
74
56
|
}
|
@@ -9,6 +9,10 @@ export declare class FirmService {
|
|
9
9
|
firm: Firm;
|
10
10
|
firmSubject: ReplaySubject<Firm>;
|
11
11
|
constructor(http: HttpClient, environment: any);
|
12
|
+
/**
|
13
|
+
* Register new firm
|
14
|
+
* @param data: firm and firm owner data to register
|
15
|
+
*/
|
12
16
|
register(data: Firm): Observable<Firm>;
|
13
17
|
get(): Observable<Firm>;
|
14
18
|
update(firm: Firm): Observable<void>;
|
@@ -2,7 +2,6 @@ import { Observable, ReplaySubject } from 'rxjs';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
3
3
|
import { BorrowingExpense } from '../../../../models/borrowing-expense/borrowing-expense';
|
4
4
|
import { Loan } from '../../../../models/loan/loan';
|
5
|
-
import { BorrowingExpenseLoan } from '../../../../models/borrowing-expense/borrowing-expense-loan';
|
6
5
|
import * as i0 from "@angular/core";
|
7
6
|
/**
|
8
7
|
* @TODO Alex (TT-1777): Refactor with rest service
|
@@ -17,7 +16,7 @@ export declare class BorrowingExpenseService {
|
|
17
16
|
* Get borrowing expenses
|
18
17
|
*/
|
19
18
|
get(): Observable<BorrowingExpense[]>;
|
20
|
-
getLoanBorrowingExpenses(loan?: Loan): Observable<
|
19
|
+
getLoanBorrowingExpenses(loan?: Loan): Observable<any>;
|
21
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<BorrowingExpenseService, never>;
|
22
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<BorrowingExpenseService>;
|
23
22
|
}
|
@@ -13,7 +13,6 @@ import * as i0 from "@angular/core";
|
|
13
13
|
*/
|
14
14
|
export declare abstract class RestService<BaseModel, Model extends BaseModel> {
|
15
15
|
protected environment: any;
|
16
|
-
private inFlight$?;
|
17
16
|
protected toastService: ToastService;
|
18
17
|
protected http: HttpClient;
|
19
18
|
protected eventDispatcherService: EventDispatcherService;
|
@@ -19,7 +19,6 @@ import * as i0 from "@angular/core";
|
|
19
19
|
*/
|
20
20
|
export declare abstract class RestService<BaseModel, Model extends AbstractModel, CollectionModel extends Collection<Model>> extends DataService<BaseModel, Model, CollectionModel> {
|
21
21
|
protected environment: any;
|
22
|
-
private inFlight$?;
|
23
22
|
/**
|
24
23
|
* Url part for service entity API
|
25
24
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AccountSetupItemCollection } from '../../../collections';
|
2
2
|
import { SetupItem } from '../../../db/Models/setup-item';
|
3
|
-
import { AccountSetupItem } from '../../../models';
|
3
|
+
import { AccountSetupItem } from '../../../models/account-setup/account-setup-item';
|
4
4
|
import { RestMethod, RestService } from '../rest';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export declare class SetupItemService extends RestService<SetupItem, AccountSetupItem, AccountSetupItemCollection> {
|
@@ -35,7 +35,6 @@ export declare class UserService extends RestService<UserBase, User, Collection<
|
|
35
35
|
updatePhoto(photo: FormData): Observable<void>;
|
36
36
|
createBasiq(): Observable<string>;
|
37
37
|
skipSetupItem(item: AccountSetupItem): Observable<User>;
|
38
|
-
restoreSetupItem(item: AccountSetupItem): Observable<User>;
|
39
38
|
/**
|
40
39
|
* Update cache when user's service subscription is updated
|
41
40
|
*/
|