taxtank-core 0.32.89 → 0.32.91
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/esm2022/lib/collections/client-movement.collection.mjs +5 -4
- package/esm2022/lib/collections/client.collection.mjs +1 -1
- package/esm2022/lib/collections/collection.mjs +5 -2
- package/esm2022/lib/collections/firm/employee-invite.collection.mjs +10 -0
- package/esm2022/lib/collections/firm/employee.collection.mjs +18 -0
- package/esm2022/lib/collections/firm/index.mjs +3 -0
- package/esm2022/lib/collections/income-source/income-source.collection.mjs +2 -2
- package/esm2022/lib/collections/index.mjs +3 -2
- package/esm2022/lib/collections/user/user.collection.mjs +4 -0
- package/esm2022/lib/db/Enums/firm/employee-invite-role.enum.mjs +6 -0
- package/esm2022/lib/db/Enums/firm/firm-type.enum.mjs +6 -0
- package/esm2022/lib/db/Enums/firm/index.mjs +3 -0
- package/esm2022/lib/db/Enums/index.mjs +2 -1
- package/esm2022/lib/db/Enums/user-roles.enum.mjs +2 -1
- package/esm2022/lib/db/Models/firm/client-invite.mjs +1 -1
- package/esm2022/lib/db/Models/firm/client-movement.mjs +1 -1
- package/esm2022/lib/db/Models/firm/employee-invite.mjs +1 -1
- package/esm2022/lib/db/Models/firm/firm.mjs +1 -1
- package/esm2022/lib/db/Models/user/employee-details.mjs +1 -1
- package/esm2022/lib/forms/abstract.form.mjs +7 -3
- package/esm2022/lib/forms/collection.form.mjs +29 -0
- package/esm2022/lib/forms/firm/client-invite-put.form.mjs +13 -0
- package/esm2022/lib/forms/firm/client-invite.form.mjs +17 -0
- package/esm2022/lib/forms/firm/client-movement.form.mjs +22 -0
- package/esm2022/lib/forms/firm/employee-details.form.mjs +21 -0
- package/esm2022/lib/forms/firm/employee-invite.form.mjs +23 -0
- package/esm2022/lib/forms/firm/firm-branch.form.mjs +13 -0
- package/esm2022/lib/forms/firm/firm-invite.form.mjs +17 -0
- package/esm2022/lib/forms/firm/index.mjs +8 -1
- package/esm2022/lib/forms/index.mjs +2 -1
- package/esm2022/lib/forms/register/register-client.form.mjs +8 -6
- package/esm2022/lib/forms/register/register-firm.form.mjs +4 -4
- package/esm2022/lib/forms/user/user.form.mjs +8 -8
- package/esm2022/lib/interceptors/rewardful.interceptor.mjs +2 -1
- package/esm2022/lib/models/client/client-invite.mjs +12 -5
- package/esm2022/lib/models/client/client-movement.mjs +8 -5
- package/esm2022/lib/models/employee/employee-details.mjs +8 -2
- package/esm2022/lib/models/employee/employee-invite.mjs +9 -2
- package/esm2022/lib/models/endpoint/endpoints.const.mjs +17 -13
- package/esm2022/lib/models/firm/firm-branch.interface.mjs +2 -0
- package/esm2022/lib/models/firm/firm-branch.mjs +22 -0
- package/esm2022/lib/models/firm/firm.mjs +2 -2
- package/esm2022/lib/models/firm/index.mjs +3 -0
- package/esm2022/lib/models/index.mjs +2 -1
- package/esm2022/lib/models/registration-invite/registration-invite.mjs +5 -1
- package/esm2022/lib/models/report/my-tax/my-tax-income-statements/my-tax-income-statements.mjs +2 -1
- package/esm2022/lib/models/user/user.mjs +5 -5
- package/esm2022/lib/services/account-setup/account-setup.service.mjs +3 -3
- package/esm2022/lib/services/firm/current-firm-branch.service.mjs +26 -0
- package/esm2022/lib/services/firm/index.mjs +2 -0
- package/esm2022/lib/services/http/firm/client-invite/client-invite-messages.enum.mjs +2 -2
- package/esm2022/lib/services/http/firm/client-invite/client-invite.service.mjs +4 -7
- package/esm2022/lib/services/http/firm/client-movement/client-movement.service.mjs +1 -1
- package/esm2022/lib/services/http/firm/employee/employee-messages.enum.mjs +2 -1
- package/esm2022/lib/services/http/firm/employee/employee.service.mjs +10 -4
- package/esm2022/lib/services/http/firm/employee-invite/employee-invite.service.mjs +5 -5
- package/esm2022/lib/services/http/firm/firm-branch/firm-branch-messages.enum.mjs +9 -0
- package/esm2022/lib/services/http/firm/firm-branch/firm-branch.service.mjs +23 -0
- package/esm2022/lib/services/http/firm/firm-branch/index.mjs +3 -0
- package/esm2022/lib/services/http/firm/firm.service.mjs +2 -2
- package/esm2022/lib/services/http/firm/index.mjs +2 -1
- package/esm2022/lib/services/index.mjs +2 -1
- package/esm2022/public-api.mjs +1 -2
- package/fesm2022/taxtank-core.mjs +326 -67
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/lib/collections/client-movement.collection.d.ts +2 -2
- package/lib/collections/client.collection.d.ts +1 -1
- package/lib/collections/firm/employee-invite.collection.d.ts +5 -0
- package/lib/collections/firm/employee.collection.d.ts +6 -0
- package/lib/collections/firm/index.d.ts +2 -0
- package/lib/collections/income-source/income-source.collection.d.ts +1 -1
- package/lib/collections/index.d.ts +2 -1
- package/lib/collections/user/user.collection.d.ts +4 -0
- package/lib/db/Enums/firm/employee-invite-role.enum.d.ts +4 -0
- package/lib/db/Enums/firm/index.d.ts +2 -0
- package/lib/db/Enums/index.d.ts +1 -0
- package/lib/db/Enums/user-roles.enum.d.ts +1 -0
- package/lib/db/Models/firm/client-invite.d.ts +6 -2
- package/lib/db/Models/firm/client-movement.d.ts +2 -2
- package/lib/db/Models/firm/employee-invite.d.ts +4 -2
- package/lib/db/Models/firm/firm.d.ts +1 -1
- package/lib/db/Models/user/employee-details.d.ts +2 -0
- package/lib/forms/abstract.form.d.ts +14 -7
- package/lib/forms/collection.form.d.ts +14 -0
- package/lib/forms/firm/client-invite-put.form.d.ts +11 -0
- package/lib/forms/firm/client-invite.form.d.ts +15 -0
- package/lib/forms/firm/client-movement.form.d.ts +14 -0
- package/lib/forms/firm/employee-details.form.d.ts +14 -0
- package/lib/forms/firm/employee-invite.form.d.ts +17 -0
- package/lib/forms/firm/firm-branch.form.d.ts +5 -0
- package/lib/forms/firm/firm-invite.form.d.ts +15 -0
- package/lib/forms/firm/index.d.ts +7 -0
- package/lib/forms/index.d.ts +1 -0
- package/lib/forms/register/register-client.form.d.ts +1 -1
- package/lib/forms/register/register-firm.form.d.ts +2 -2
- package/lib/forms/user/user.form.d.ts +15 -3
- package/lib/models/client/client-invite.d.ts +5 -2
- package/lib/models/client/client-movement.d.ts +3 -2
- package/lib/models/employee/employee-details.d.ts +3 -1
- package/lib/models/employee/employee-invite.d.ts +4 -1
- package/lib/models/firm/firm-branch.d.ts +12 -0
- package/lib/models/firm/firm-branch.interface.d.ts +7 -0
- package/lib/models/firm/index.d.ts +2 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/registration-invite/registration-invite.d.ts +2 -0
- package/lib/models/user/user.d.ts +1 -3
- package/lib/services/firm/current-firm-branch.service.d.ts +11 -0
- package/lib/services/firm/index.d.ts +1 -0
- package/lib/services/http/firm/client-invite/client-invite-messages.enum.d.ts +1 -1
- package/lib/services/http/firm/client-invite/client-invite.service.d.ts +0 -1
- package/lib/services/http/firm/client-movement/client-movement.service.d.ts +1 -1
- package/lib/services/http/firm/employee/employee-messages.enum.d.ts +2 -1
- package/lib/services/http/firm/employee/employee.service.d.ts +4 -3
- package/lib/services/http/firm/employee-invite/employee-invite.service.d.ts +3 -3
- package/lib/services/http/firm/firm-branch/firm-branch-messages.enum.d.ts +7 -0
- package/lib/services/http/firm/firm-branch/firm-branch.service.d.ts +13 -0
- package/lib/services/http/firm/firm-branch/index.d.ts +2 -0
- package/lib/services/http/firm/firm.service.d.ts +2 -2
- package/lib/services/http/firm/index.d.ts +1 -0
- package/lib/services/index.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/esm2022/lib/collections/employee.collection.mjs +0 -11
- package/esm2022/lib/db/Enums/firm-type.enum.mjs +0 -6
- package/lib/collections/employee.collection.d.ts +0 -6
- /package/lib/db/Enums/{firm-type.enum.d.ts → firm/firm-type.enum.d.ts} +0 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Collection } from './collection';
|
2
2
|
import { ClientMovement } from '../models';
|
3
|
-
import { EmployeeCollection } from './
|
3
|
+
import { EmployeeCollection } from './firm';
|
4
4
|
import { ClientCollection } from './client.collection';
|
5
|
-
import { FirmTypeEnum } from '../db/Enums
|
5
|
+
import { FirmTypeEnum } from '../db/Enums';
|
6
6
|
import { CollectionDictionary } from './collection-dictionary';
|
7
7
|
/**
|
8
8
|
* Collection of tax review
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { UserCollection } from '../user/user.collection';
|
2
|
+
import { CollectionDictionary } from '../collection-dictionary';
|
3
|
+
export declare class EmployeeCollection extends UserCollection {
|
4
|
+
groupByBranch(): CollectionDictionary<EmployeeCollection>;
|
5
|
+
filterByBranchIds(firmBranchIds: number[]): this;
|
6
|
+
}
|
@@ -9,7 +9,7 @@ import { IIncomeSourceForecast } from '../../interfaces';
|
|
9
9
|
export declare class IncomeSourceCollection extends Collection<IncomeSource> {
|
10
10
|
filterByTank(tank: TankTypeEnum): IncomeSource[];
|
11
11
|
/**
|
12
|
-
* Filter income sources by provided
|
12
|
+
* Filter income sources by provided types
|
13
13
|
* @param types
|
14
14
|
*/
|
15
15
|
filterByTypes(types: IncomeSourceTypeEnum[]): IncomeSource[];
|
@@ -21,7 +21,7 @@ export * from './client-portfolio-report.collection';
|
|
21
21
|
export * from './client.collection';
|
22
22
|
export * from './depreciation-forecast.collection';
|
23
23
|
export * from './depreciation.collection';
|
24
|
-
export * from './
|
24
|
+
export * from './firm';
|
25
25
|
export * from './exportable.collection';
|
26
26
|
export * from './income-source';
|
27
27
|
export * from './tax-review.collection';
|
@@ -29,3 +29,4 @@ export * from './user-event-setting.collection';
|
|
29
29
|
export * from './user-event-type-collection';
|
30
30
|
export * from './holding';
|
31
31
|
export * from './asset-sale.collection';
|
32
|
+
export * from './user/user.collection';
|
package/lib/db/Enums/index.d.ts
CHANGED
@@ -3,6 +3,7 @@ export * from './allocation-rule-condition-field.enum';
|
|
3
3
|
export * from './allocation-rule-condition-operator.enum';
|
4
4
|
export * from './allocation-rule-type.enum';
|
5
5
|
export * from './bank';
|
6
|
+
export * from './firm';
|
6
7
|
export * from './annual-frequency.enum';
|
7
8
|
export * from './chart-accounts';
|
8
9
|
export * from './document-type.enum';
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import { ClientInviteTypeEnum } from '../../Enums/client-invite-type.enum';
|
2
2
|
import { ClientInviteStatusEnum } from '../../Enums/client-invite-status.enum';
|
3
3
|
import { User } from '../user/user';
|
4
|
-
import { Firm } from './firm';
|
5
4
|
import { RegistrationInvite } from '../user/registration-invite';
|
6
5
|
import { ObservableModel } from '../observable-model';
|
6
|
+
import { FirmBranchInterface } from '../../../models/firm/firm-branch.interface';
|
7
|
+
import { Firm } from './firm';
|
8
|
+
import { Address } from '../address';
|
7
9
|
export declare class ClientInvite extends ObservableModel {
|
8
10
|
static className: string;
|
9
11
|
type?: ClientInviteTypeEnum;
|
@@ -12,6 +14,8 @@ export declare class ClientInvite extends ObservableModel {
|
|
12
14
|
updatedAt?: Date;
|
13
15
|
employee?: User;
|
14
16
|
client?: User;
|
15
|
-
firm?: Firm;
|
16
17
|
registrationInvite?: RegistrationInvite;
|
18
|
+
address?: Address;
|
19
|
+
firm?: Firm;
|
20
|
+
firmBranch?: FirmBranchInterface;
|
17
21
|
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { Firm } from './firm';
|
2
1
|
import { User } from '../user/user';
|
3
2
|
import { ObservableModel } from '../observable-model';
|
3
|
+
import { FirmBranch } from '../../../models';
|
4
4
|
export declare class ClientMovement extends ObservableModel {
|
5
5
|
static className: string;
|
6
6
|
dateFrom?: Date;
|
7
7
|
dateTo?: Date;
|
8
|
-
firm?: Firm;
|
9
8
|
client?: User;
|
10
9
|
employee?: User;
|
10
|
+
firmBranch?: FirmBranch;
|
11
11
|
}
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import { User } from '../user/user';
|
2
|
-
import { Firm } from './firm';
|
3
2
|
import { RegistrationInvite } from '../user/registration-invite';
|
4
3
|
import { AbstractModel } from '../abstract-model';
|
4
|
+
import { FirmBranch } from '../../../models';
|
5
|
+
import { EmployeeInviteRoleEnum } from '../../Enums';
|
5
6
|
export declare class EmployeeInvite extends AbstractModel {
|
6
7
|
employee?: User;
|
7
|
-
firm?: Firm;
|
8
8
|
registrationInvite?: RegistrationInvite;
|
9
|
+
firmBranches?: FirmBranch[];
|
10
|
+
role?: EmployeeInviteRoleEnum;
|
9
11
|
}
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { User } from './user';
|
2
2
|
import { Firm } from '../firm/firm';
|
3
3
|
import { AbstractModel } from '../abstract-model';
|
4
|
+
import { FirmBranchInterface } from '../../../models/firm/firm-branch.interface';
|
4
5
|
export declare class EmployeeDetails extends AbstractModel {
|
5
6
|
user?: User;
|
6
7
|
firm?: Firm;
|
8
|
+
firmBranches: FirmBranchInterface[];
|
7
9
|
}
|
@@ -1,16 +1,24 @@
|
|
1
|
-
import { AbstractControl, AbstractControlOptions, AsyncValidatorFn,
|
1
|
+
import { AbstractControl, AbstractControlOptions, AsyncValidatorFn, FormGroup, ValidatorFn } from '@angular/forms';
|
2
2
|
import { EventEmitter, Type } from '@angular/core';
|
3
|
+
/**
|
4
|
+
* Default Controls Interface with loose typing
|
5
|
+
*/
|
6
|
+
export interface ControlsInterface {
|
7
|
+
[key: string]: AbstractControl<any, any>;
|
8
|
+
}
|
3
9
|
/**
|
4
10
|
* Abstract form class
|
5
11
|
* @TODO rename to AbstractFormGroup
|
6
12
|
* @TODO Alex TT-2190: refactor: check and improve logic
|
13
|
+
* @TODO Model extends AbstractModel
|
7
14
|
*/
|
8
|
-
export declare abstract class AbstractForm<Model> extends
|
15
|
+
export declare abstract class AbstractForm<Model, Controls extends ControlsInterface = ControlsInterface> extends FormGroup<Controls> {
|
9
16
|
static inputMaxLength: number;
|
10
17
|
/**
|
11
18
|
* Initial form value for comparison with changes to check saved/unsaved state
|
19
|
+
* @TODO typehint to model interface when all db/models migrated to interfaces
|
12
20
|
*/
|
13
|
-
initialValue:
|
21
|
+
initialValue: any;
|
14
22
|
protected excludeExtraneousValues: boolean;
|
15
23
|
protected modelClass: Type<Model>;
|
16
24
|
model: Model;
|
@@ -21,11 +29,10 @@ export declare abstract class AbstractForm<Model> extends UntypedFormGroup {
|
|
21
29
|
*/
|
22
30
|
unsaved: boolean;
|
23
31
|
onSubmit: EventEmitter<Model>;
|
24
|
-
protected constructor(controls:
|
25
|
-
[key: string]: AbstractControl;
|
26
|
-
}, model?: Model, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
|
32
|
+
protected constructor(controls: Controls, model?: Model, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
|
27
33
|
get saved(): boolean;
|
28
34
|
get currentValue(): Model;
|
35
|
+
toggleEnabledState(): void;
|
29
36
|
/**
|
30
37
|
* Check validation and return a new instance of generic model.
|
31
38
|
* Merge form value to initial object
|
@@ -33,7 +40,7 @@ export declare abstract class AbstractForm<Model> extends UntypedFormGroup {
|
|
33
40
|
* @param includeDisabledFields ignore disabled fields
|
34
41
|
*/
|
35
42
|
submit(data?: object, includeDisabledFields?: boolean): Model;
|
36
|
-
addControl(name: string, control:
|
43
|
+
addControl(name: string, control: Controls[string], options?: {
|
37
44
|
emitEvent?: boolean;
|
38
45
|
}): this;
|
39
46
|
markAsUnsaved(): void;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FormArray } from '@angular/forms';
|
2
|
+
import { AbstractForm } from './';
|
3
|
+
import { AbstractModel } from '../db/Models';
|
4
|
+
export declare class CollectionForm<Form extends AbstractForm<Model>, Model extends AbstractModel> extends FormArray<Form> {
|
5
|
+
private formConstructor;
|
6
|
+
private args;
|
7
|
+
constructor(formConstructor: new (model?: Model, ...args: any[]) => Form, models?: Model[], ...args: any[]);
|
8
|
+
createFormGroup(model?: Model): Form;
|
9
|
+
add(model?: Model): void;
|
10
|
+
/**
|
11
|
+
* Submit form and return array of properties from form value
|
12
|
+
*/
|
13
|
+
submit(data?: object, includeDisabledFields?: boolean): Model[];
|
14
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
2
|
+
import { AbstractForm, ControlsInterface } from '../abstract.form';
|
3
|
+
import { ClientInvite, FirmBranch, User } from '../../models';
|
4
|
+
interface ClientInvitePutControlsInterface extends ControlsInterface {
|
5
|
+
employee: FormControl<User>;
|
6
|
+
firmBranch: FormControl<FirmBranch>;
|
7
|
+
}
|
8
|
+
export declare class ClientInvitePutForm extends AbstractForm<ClientInvite, ClientInvitePutControlsInterface> {
|
9
|
+
constructor(invite?: ClientInvite);
|
10
|
+
}
|
11
|
+
export {};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
2
|
+
import { AbstractForm, ControlsInterface } from '../abstract.form';
|
3
|
+
import { ClientInvite, User } from '../../models';
|
4
|
+
interface ClientInviteControlsInterface extends ControlsInterface {
|
5
|
+
employee: FormControl<User>;
|
6
|
+
registrationInvite: FormGroup<{
|
7
|
+
firstName: FormControl<string>;
|
8
|
+
lastName: FormControl<string>;
|
9
|
+
email: FormControl<string>;
|
10
|
+
}>;
|
11
|
+
}
|
12
|
+
export declare class ClientInviteForm extends AbstractForm<ClientInvite, ClientInviteControlsInterface> {
|
13
|
+
constructor(invite?: ClientInvite);
|
14
|
+
}
|
15
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
2
|
+
import { AbstractForm, ControlsInterface } from '../abstract.form';
|
3
|
+
import { ClientMovement, FirmBranch, User } from '../../models';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
interface ClientMovementControlsInterface extends ControlsInterface {
|
6
|
+
employee: FormControl<User>;
|
7
|
+
firmBranch: FormControl<FirmBranch>;
|
8
|
+
}
|
9
|
+
export declare class ClientMovementForm extends AbstractForm<ClientMovement, ClientMovementControlsInterface> {
|
10
|
+
constructor(clientMovement: ClientMovement);
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClientMovementForm, never>;
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ClientMovementForm>;
|
13
|
+
}
|
14
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
2
|
+
import { AbstractForm, ControlsInterface } from '../abstract.form';
|
3
|
+
import { FirmBranch } from '../../models';
|
4
|
+
import { EmployeeDetails } from '../../models/employee/employee-details';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
interface EmployeeDetailsControlsInterface extends ControlsInterface {
|
7
|
+
firmBranches: FormControl<FirmBranch[]>;
|
8
|
+
}
|
9
|
+
export declare class EmployeeDetailsForm extends AbstractForm<EmployeeDetails, EmployeeDetailsControlsInterface> {
|
10
|
+
constructor(employeeDetails: EmployeeDetails);
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmployeeDetailsForm, never>;
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EmployeeDetailsForm>;
|
13
|
+
}
|
14
|
+
export {};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
2
|
+
import { AbstractForm, ControlsInterface } from '../abstract.form';
|
3
|
+
import { EmployeeInvite } from '../../models/employee/employee-invite';
|
4
|
+
import { UniqueEmailValidator } from '../../validators';
|
5
|
+
import { EmployeeInviteRoleEnum } from '../../db/Enums';
|
6
|
+
interface EmployeeInviteControlsInterface extends ControlsInterface {
|
7
|
+
registrationInvite: FormGroup<{
|
8
|
+
firstName: FormControl<string>;
|
9
|
+
lastName: FormControl<string>;
|
10
|
+
email: FormControl<string>;
|
11
|
+
}>;
|
12
|
+
role: FormControl<EmployeeInviteRoleEnum>;
|
13
|
+
}
|
14
|
+
export declare class EmployeeInviteForm extends AbstractForm<EmployeeInvite, EmployeeInviteControlsInterface> {
|
15
|
+
constructor(invite?: EmployeeInvite, uniqueEmailValidator?: UniqueEmailValidator);
|
16
|
+
}
|
17
|
+
export {};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
2
|
+
import { AbstractForm, ControlsInterface } from '../abstract.form';
|
3
|
+
import { Address, ClientInvite } from '../../models';
|
4
|
+
interface ClientInvitePutControlsInterface extends ControlsInterface {
|
5
|
+
address: FormControl<Address>;
|
6
|
+
registrationInvite: FormGroup<{
|
7
|
+
firstName: FormControl<string>;
|
8
|
+
lastName: FormControl<string>;
|
9
|
+
email: FormControl<string>;
|
10
|
+
}>;
|
11
|
+
}
|
12
|
+
export declare class FirmInviteForm extends AbstractForm<ClientInvite, ClientInvitePutControlsInterface> {
|
13
|
+
constructor(invite?: ClientInvite);
|
14
|
+
}
|
15
|
+
export {};
|
@@ -1 +1,8 @@
|
|
1
1
|
export * from './firm.form';
|
2
|
+
export * from './firm-branch.form';
|
3
|
+
export * from './employee-invite.form';
|
4
|
+
export * from './client-movement.form';
|
5
|
+
export * from './employee-details.form';
|
6
|
+
export * from './client-invite.form';
|
7
|
+
export * from './client-invite-put.form';
|
8
|
+
export * from './firm-invite.form';
|
package/lib/forms/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AbstractForm } from '../abstract.form';
|
2
|
-
import { FirmTypeEnum } from '../../db/Enums
|
3
|
-
import { Firm } from '../../models
|
2
|
+
import { FirmTypeEnum } from '../../db/Enums';
|
3
|
+
import { Firm } from '../../models';
|
4
4
|
export declare class RegisterFirmForm extends AbstractForm<Firm> {
|
5
5
|
private firmType;
|
6
6
|
constructor(firmType: FirmTypeEnum, referenceCode?: string);
|
@@ -1,5 +1,17 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
1
|
+
import { FormControl } from '@angular/forms';
|
2
|
+
import { Address, AppFile, User } from '../../models';
|
3
|
+
import { AbstractForm, ControlsInterface } from '../abstract.form';
|
4
|
+
import { UserTitleEnum } from '../../db/Enums/user-title.enum';
|
5
|
+
import { Phone } from '../../models/phone/phone';
|
6
|
+
interface UserControlsInterface extends ControlsInterface {
|
7
|
+
title: FormControl<UserTitleEnum>;
|
8
|
+
firstName: FormControl<string>;
|
9
|
+
lastName: FormControl<string>;
|
10
|
+
address: FormControl<Address>;
|
11
|
+
phone: FormControl<Phone>;
|
12
|
+
file: FormControl<AppFile>;
|
13
|
+
}
|
14
|
+
export declare class UserForm extends AbstractForm<User, UserControlsInterface> {
|
4
15
|
constructor(user: User);
|
5
16
|
}
|
17
|
+
export {};
|
@@ -1,14 +1,17 @@
|
|
1
1
|
import { ClientInvite as ClientInviteBase } from '../../db/Models/firm/client-invite';
|
2
2
|
import { RegistrationInvite } from '../registration-invite/registration-invite';
|
3
|
-
import { Firm } from '../firm/firm';
|
4
3
|
import { User } from '../user';
|
4
|
+
import { Firm, FirmBranch } from '../firm';
|
5
|
+
import { Address } from '../address';
|
5
6
|
export declare class ClientInvite extends ClientInviteBase {
|
6
7
|
sentOn: Date;
|
7
8
|
updatedAt: Date;
|
8
|
-
firm: Firm;
|
9
9
|
client: User;
|
10
10
|
employee: User;
|
11
11
|
registrationInvite: RegistrationInvite;
|
12
|
+
address: Address;
|
13
|
+
firm: Firm;
|
14
|
+
firmBranch: FirmBranch;
|
12
15
|
/**
|
13
16
|
* Check if client invite status is pending
|
14
17
|
*/
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { ClientMovement as ClientMovementBase } from '../../db/Models/firm/client-movement';
|
2
|
-
import { Firm } from '../firm
|
2
|
+
import { Firm, FirmBranch } from '../firm';
|
3
3
|
import { User } from '../user';
|
4
4
|
export declare class ClientMovement extends ClientMovementBase {
|
5
|
-
firm: Firm;
|
6
5
|
client: User;
|
7
6
|
employee: User;
|
8
7
|
dateFrom: Date;
|
9
8
|
dateTo: Date;
|
9
|
+
firmBranch?: FirmBranch;
|
10
|
+
get firm(): Firm;
|
10
11
|
}
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import { EmployeeDetails as EmployeeDetailsBase } from '../../db/Models/user/employee-details';
|
2
|
-
import { Firm } from '../firm
|
2
|
+
import { Firm, FirmBranch } from '../firm';
|
3
3
|
export declare class EmployeeDetails extends EmployeeDetailsBase {
|
4
4
|
firm: Firm;
|
5
|
+
firmBranches: FirmBranch[];
|
6
|
+
get firmBranchNames(): string;
|
5
7
|
}
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import { EmployeeInvite as EmployeeInviteBase } from '../../db/Models/firm/employee-invite';
|
2
2
|
import { RegistrationInvite } from '../registration-invite/registration-invite';
|
3
|
-
import { User } from '../user
|
3
|
+
import { User } from '../user';
|
4
|
+
import { FirmBranch } from '../firm';
|
4
5
|
export declare class EmployeeInvite extends EmployeeInviteBase {
|
5
6
|
registrationInvite: RegistrationInvite;
|
6
7
|
employee: User;
|
8
|
+
firmBranches?: FirmBranch[];
|
9
|
+
get firmBranchNames(): string;
|
7
10
|
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Firm } from './firm';
|
2
|
+
import { Address } from '../address';
|
3
|
+
import { AbstractModel } from '../../db/Models';
|
4
|
+
import { FirmBranchInterface } from './firm-branch.interface';
|
5
|
+
import { Phone } from '../phone/phone';
|
6
|
+
export declare class FirmBranch extends AbstractModel implements FirmBranchInterface {
|
7
|
+
name: string;
|
8
|
+
isMain: boolean;
|
9
|
+
firm: Firm;
|
10
|
+
address: Address;
|
11
|
+
phone?: Phone;
|
12
|
+
}
|
package/lib/models/index.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
import { RegistrationInvite as RegistrationInviteBase } from '../../db/Models/user/registration-invite';
|
2
2
|
import { AppFile } from '../file';
|
3
|
+
import { User } from '../user';
|
3
4
|
export declare class RegistrationInvite extends RegistrationInviteBase {
|
4
5
|
file: AppFile;
|
6
|
+
user: User;
|
5
7
|
get fullName(): string;
|
6
8
|
}
|
@@ -46,9 +46,7 @@ export declare class User extends BaseUser {
|
|
46
46
|
* Check if current user is firm owner
|
47
47
|
*/
|
48
48
|
isFirmOwner(): boolean;
|
49
|
-
|
50
|
-
* Check if current user is firm manager
|
51
|
-
*/
|
49
|
+
isTopManager(): boolean;
|
52
50
|
isManager(): boolean;
|
53
51
|
/**
|
54
52
|
* check if user has property tank access
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
2
|
+
import { FirmBranch } from '../../models';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class CurrentFirmBranchService {
|
5
|
+
firmBranchIds$: BehaviorSubject<number[]>;
|
6
|
+
get(): Observable<number[]>;
|
7
|
+
getCache(): number[];
|
8
|
+
set(firmBranches: FirmBranch[]): void;
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CurrentFirmBranchService, never>;
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CurrentFirmBranchService>;
|
11
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './current-firm-branch.service';
|
@@ -6,7 +6,7 @@ export declare enum ClientInviteMessages {
|
|
6
6
|
SEND_INVITE_MESSAGES_TITLE = "TaxTank support is here to help",
|
7
7
|
SEND_INVITE_MESSAGES_DESCRIPTION = "Before inviting TaxTank support be sure to check out our help articles and message our support team.",
|
8
8
|
TT_ACCOUNTANT_INVITED = "Accountant invitation has been sent successfully",
|
9
|
-
|
9
|
+
TT_ACCOUNTANT_INVITED_TOOLTIP = "Need an accountant? TaxTank has partnered with ITP to deliver next level accounting services at the touch of a button! Experience a fast, seamless and cost-effective review and lodgment service that rewards your TaxTank efforts throughout the year. The ITP team brings their experience in tax and TaxTank to the virtual realm. It all starts with a 15-minute consultation that sets the stage for personalised service without the hassle. Step 1 - Invite ITP Accountants. Step 2 - ITP allocate the right accountant. Step 3 - Lock in a time for your 15-minute virtual consult that sets the stage for personalised service. Step 4 - Experience the difference :)",
|
10
10
|
CONFIRM_REJECT = "Are you sure you want to reject this invitation?",
|
11
11
|
REJECTED = "Invitation rejected",
|
12
12
|
ACCEPTED = "Client invitation accepted"
|
@@ -13,7 +13,6 @@ export declare class ClientInviteService extends RestService<ClientInviteBase, C
|
|
13
13
|
mercureTopic: string;
|
14
14
|
constructor(environment: any);
|
15
15
|
listenEvents(): void;
|
16
|
-
getFirmInvites(): Observable<ClientInviteCollection>;
|
17
16
|
/**
|
18
17
|
* Get invite which employee is TaxTank Advisor
|
19
18
|
* @TODO move to collection? but we need to inject enviroment
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ClientMovement as ClientMovementBase } from '../../../../db/Models/firm/client-movement';
|
2
2
|
import { Observable } from 'rxjs';
|
3
3
|
import { ClientMovementCollection } from '../../../../collections';
|
4
|
-
import { FirmTypeEnum } from '../../../../db/Enums
|
4
|
+
import { FirmTypeEnum } from '../../../../db/Enums';
|
5
5
|
import { RestService } from '../../rest';
|
6
6
|
import { ClientMovement } from '../../../../models';
|
7
7
|
import { IEventListener } from '../../../../interfaces';
|
@@ -7,5 +7,6 @@ export declare enum EmployeeMessagesEnum {
|
|
7
7
|
CONFIRM_ACTIVATE = "Are you sure you want to activate the employee account?",
|
8
8
|
ACTIVATED = "Employee account activated",
|
9
9
|
DEACTIVATED = "Employee account deactivated",
|
10
|
-
DEACTIVATE_ERROR = "All clients must be transferred prior to removing an accountant"
|
10
|
+
DEACTIVATE_ERROR = "All clients must be transferred prior to removing an accountant",
|
11
|
+
UPDATED = "Employee account updated"
|
11
12
|
}
|
@@ -3,18 +3,19 @@ import { User as UserBase } from '../../../../db/Models/user/user';
|
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
import { User } from '../../../../models';
|
5
5
|
import { EmployeeMessagesEnum } from './employee-messages.enum';
|
6
|
-
import {
|
6
|
+
import { EmployeeCollection } from '../../../../collections';
|
7
7
|
import { UserRolesEnum } from '../../../../db/Enums/user-roles.enum';
|
8
8
|
import * as i0 from "@angular/core";
|
9
|
-
export declare class EmployeeService extends RestService<UserBase, User,
|
9
|
+
export declare class EmployeeService extends RestService<UserBase, User, EmployeeCollection> {
|
10
10
|
protected endpointUri: string;
|
11
11
|
modelClass: typeof User;
|
12
|
-
collectionClass: typeof
|
12
|
+
collectionClass: typeof EmployeeCollection;
|
13
13
|
disabledMethods: RestMethod[];
|
14
14
|
messages: typeof EmployeeMessagesEnum;
|
15
15
|
roles: UserRolesEnum[];
|
16
16
|
activateEmployee(employee: User): Observable<User>;
|
17
17
|
deactivateEmployee(employee: User): Observable<User>;
|
18
|
+
toggleManagerRole(employee: User): Observable<User>;
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<EmployeeService, never>;
|
19
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<EmployeeService>;
|
20
21
|
}
|
@@ -3,11 +3,11 @@ import { Observable } from 'rxjs';
|
|
3
3
|
import { EmployeeInvite } from '../../../../models/employee/employee-invite';
|
4
4
|
import { RestService } from '../../rest';
|
5
5
|
import { UserRolesEnum } from '../../../../db/Enums/user-roles.enum';
|
6
|
-
import {
|
6
|
+
import { EmployeeInviteCollection } from '../../../../collections';
|
7
7
|
import * as i0 from "@angular/core";
|
8
|
-
export declare class EmployeeInviteService extends RestService<EmployeeInviteBase, EmployeeInvite,
|
8
|
+
export declare class EmployeeInviteService extends RestService<EmployeeInviteBase, EmployeeInvite, EmployeeInviteCollection> {
|
9
9
|
protected endpointUri: string;
|
10
|
-
collectionClass: typeof
|
10
|
+
collectionClass: typeof EmployeeInviteCollection;
|
11
11
|
modelClass: typeof EmployeeInvite;
|
12
12
|
roles: UserRolesEnum[];
|
13
13
|
/**
|