taxtank-core 1.0.33 → 1.0.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^19.0.2",
package/public-api.d.ts CHANGED
@@ -157,6 +157,7 @@ export * from './src/lib/models/user-event/user-event-type';
157
157
  * Services
158
158
  */
159
159
  export * from './src/lib/services';
160
+ export * from './src/lib/resolvers';
160
161
  /**
161
162
  * Interfaces
162
163
  */
@@ -11,6 +11,10 @@ export declare class ServiceSubscriptionCollection extends Collection<ServiceSub
11
11
  getExpiredAfter(date?: Date): this;
12
12
  getPaid(): this;
13
13
  getRoles(): UserRolesEnum[];
14
+ /**
15
+ * search roles including hierarchy
16
+ */
17
+ hasRoles(roles: UserRolesEnum | UserRolesEnum[]): boolean;
14
18
  getActivePaid(): ServiceSubscription;
15
19
  /**
16
20
  * @TODO vik remove trials replaced by paid item
@@ -1,4 +1,7 @@
1
1
  import { TaxReturnCategoryListEnum } from '../../db/Enums';
2
+ /**
3
+ * @TODO vik check (tax_return_category/tax_return_item/chart_accounts)
4
+ */
2
5
  export declare const TAX_RETURN_CATEGORIES: {
3
6
  [key: string]: {
4
7
  [key: string]: TaxReturnCategoryListEnum[];
@@ -3,8 +3,9 @@ export declare enum SetupItemTypeEnum {
3
3
  WORK = 1,
4
4
  PROPERTIES = 2,
5
5
  PROPERTY = 3,
6
- BUSINESS = 4,
6
+ BUSINESSES = 4,
7
7
  HOLDING = 5,
8
8
  BANK_ACCOUNTS = 6,
9
- BANK_ACCOUNT = 7
9
+ BANK_ACCOUNT = 7,
10
+ BUSINESS = 8
10
11
  }
@@ -12,13 +12,10 @@ export declare enum TaxReturnCategoryListEnum {
12
12
  DIVIDENDS = 6,
13
13
  SHARE_SCHEMES = 35,
14
14
  GROSS_RENT = 8,
15
- PARTNERSHIPS_TRUSTS = 13,
16
15
  PARTNERSHIPS = 36,
17
16
  TRUSTS = 37,
18
17
  PSI_SBE_INCOME = 14,
19
- SOLE_TRADER_BUSINESS_INCOME = 38,
20
18
  CAPITAL_GAINS = 15,
21
- FOREIGN_SOURCE_INCOME = 16,
22
19
  BONUSES_FROM_LIFE_INSURANCE = 17,
23
20
  FORESTRY_MANAGED_INVESTMENT_SCHEMES = 39,
24
21
  OTHER_INCOME = 40,
@@ -45,6 +42,7 @@ export declare enum TaxReturnCategoryListEnum {
45
42
  DEPRECIATION_EXPENSES = 56,
46
43
  MOTOR_VEHICLE_EXPENSES = 57,
47
44
  ALL_OTHER_EXPENSES = 58,
45
+ WORK_RELATED_DEPRECIATION = 69,
48
46
  GROSS_TAX_PAYABLE = 19,
49
47
  TAX_ON_TAXABLE_INCOME = 20,
50
48
  MEDICARE = 21,
@@ -60,5 +58,8 @@ export declare enum TaxReturnCategoryListEnum {
60
58
  TAX_PAYABLE = 28,
61
59
  BUSINESS_INCOME_OR_LOSS = 59,
62
60
  DEFERRED_BUSINESS_LOSSES = 60,
61
+ TAX_OFFSET_LOW = 61,
62
+ tAX_OFFSET_MIDDLE = 62,
63
+ TAX_OFFSET_SOLE = 63,
63
64
  DEFERRED_BUSINESS_LOSSES_FROM_PRIOR_YEAR = 64
64
65
  }
@@ -1,7 +1,8 @@
1
1
  export declare enum TaxSummarySectionEnum {
2
2
  WORK_TANK = 1,
3
3
  PROPERTY_TANK = 2,
4
- OTHER_TANK = 3,
5
- SOLE_TANK = 4,
6
- SUMMARY = 5
4
+ HOLDINGS_TANK = 3,
5
+ CAPITAL_GAINS = 4,
6
+ SOLE_TANK = 5,
7
+ SUMMARY = 6
7
8
  }
@@ -3,5 +3,12 @@ export declare enum YoutubeVideosEnum {
3
3
  MONEY_ONBOARDING = "E9NU14ndjhc",
4
4
  PROPERTY_ONBOARDING = "llUV98-EMdI",
5
5
  SOLE_ONBOARDING = "rqfTQFGwkUM",
6
- WORK_ONBOARDING = "QEKolzS1B0U"
6
+ WORK_ONBOARDING = "QEKolzS1B0U",
7
+ PROPERTY_RENTAL = "E9NU14ndjhc",
8
+ PROPERTY_DEPRECIATION = "E9NU14ndjhc",
9
+ SOLE_VEHICLE_CLAIM = "E9NU14ndjhc",
10
+ HOME_OFFICE = "E9NU14ndjhc",
11
+ SOLE_DEPRECIATION = "E9NU14ndjhc",
12
+ WORK_VEHICLE_CLAIM = "E9NU14ndjhc",
13
+ WORK_DEPRECIATION = "E9NU14ndjhc"
7
14
  }
@@ -16,7 +16,6 @@ export declare class SoleBusiness extends ObservableModel {
16
16
  name?: string;
17
17
  description?: string;
18
18
  website?: string;
19
- logo?: string;
20
19
  deletedAt?: Date;
21
20
  user?: User;
22
21
  activity?: SoleBusinessActivity;
@@ -61,6 +61,9 @@ export declare abstract class AbstractForm<Model, Controls extends ControlsInter
61
61
  * upgraded version of patchValue to skip duplicated changes
62
62
  */
63
63
  patchField(name: string, value: any): void;
64
+ patch(fields: {
65
+ [key: string]: any;
66
+ }): void;
64
67
  fieldChanged(name: string): boolean;
65
68
  addValidators(validators: ValidatorFn | ValidatorFn[], controls?: AbstractControl[]): void;
66
69
  removeValidators(validators: ValidatorFn | ValidatorFn[], controls?: AbstractControl[]): void;
@@ -24,6 +24,7 @@ export declare enum AccountSetupItemsEnum {
24
24
  SOLE_HOME_OFFICE = 21,
25
25
  SOLE_DEPRECIATION = 22,
26
26
  SOLE_BANK_ACCOUNT = 23,
27
+ SOLE_LOGO = 24,
27
28
  HOLDING_TRADE = 8,
28
29
  HOLDING_INTEGRATION = 25,
29
30
  HOLDING_REPORTS = 36,
@@ -8,7 +8,7 @@ import { SoleBusiness } from '../sole';
8
8
  export declare class TaxSummary {
9
9
  work: TaxSummarySection;
10
10
  property: TaxSummarySection;
11
- other: TaxSummarySection;
11
+ holdings: TaxSummarySection;
12
12
  sole: TaxSummarySection;
13
13
  summary: TaxSummarySection;
14
14
  projectedTaxPosition: number;
@@ -40,15 +40,15 @@ export declare class TaxSummary {
40
40
  */
41
41
  get propertyNetTotal(): number;
42
42
  /**
43
- * Other Net Cash = gross income – expenses – tax withheld - tax instalments
43
+ * Holdings Net Cash = gross income – expenses – tax withheld - tax instalments
44
44
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
45
45
  */
46
- get otherNetCash(): number;
46
+ get holdingsNetCash(): number;
47
47
  /**
48
- * Other Net Total = Gross income - expenses + tax offsets + tax instalments + franking credits
48
+ * Holding Net Total = Gross income - expenses + tax offsets + tax instalments + franking credits
49
49
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
50
50
  */
51
- get otherNetTotal(): number;
51
+ get holdingsNetTotal(): number;
52
52
  /**
53
53
  * Sole Net Cash = gross income – expenses
54
54
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
@@ -29,6 +29,7 @@ export declare class User extends BaseUser {
29
29
  *
30
30
  */
31
31
  get position(): string;
32
+ addRoles(roles?: UserRolesEnum[]): void;
32
33
  /**
33
34
  * search roles including hierarchy
34
35
  */
@@ -0,0 +1,11 @@
1
+ import { Observable } from 'rxjs';
2
+ import { SoleDetails } from '../../models';
3
+ import { SoleDetailsService } from '../../services';
4
+ import * as i0 from "@angular/core";
5
+ export declare class BusinessResolver {
6
+ private soleDetailsService;
7
+ constructor(soleDetailsService: SoleDetailsService);
8
+ resolve(): Observable<SoleDetails>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<BusinessResolver, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<BusinessResolver>;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { Observable } from 'rxjs';
2
+ import { SoleDetails } from '../../models';
3
+ import { SoleDetailsService } from '../../services';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SoleDetailsResolver {
6
+ private soleDetails;
7
+ constructor(soleDetails: SoleDetailsService);
8
+ resolve(): Observable<SoleDetails>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SoleDetailsResolver, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<SoleDetailsResolver>;
11
+ }
@@ -0,0 +1,2 @@
1
+ export * from './business/business.resolver';
2
+ export * from './business/sole-details.resolver';
@@ -1,4 +1,4 @@
1
- import { Property, User } from '../../models';
1
+ import { Property, SoleBusiness, User } from '../../models';
2
2
  import { AllocationRuleService, BankAccountService, BankConnectionService, ClientInviteService, ClientMovementService, DepreciationService, EmployeeInviteService, EmployeeService, FirmService, HoldingTradeService, HomeOfficeClaimService, IncomeSourceService, LoanService, PropertyService, PropertyShareService, SharesightDetailsService, SoleBusinessService, TransactionAllocationService, TransactionService, UserService, VehicleClaimService } from '../http';
3
3
  import { AccountSetupItemCollection } from '../../collections';
4
4
  import { Observable } from 'rxjs';
@@ -21,7 +21,7 @@ export declare class AccountSetupService {
21
21
  private homeOfficeClaimService;
22
22
  private transactionService;
23
23
  private depreciationService;
24
- private soleBusinessService;
24
+ private businessService;
25
25
  private holdingService;
26
26
  private userService;
27
27
  private clientMovementService;
@@ -33,17 +33,16 @@ export declare class AccountSetupService {
33
33
  private propertyShareService;
34
34
  items: AccountSetupItemCollection;
35
35
  user: User;
36
- constructor(setupItemService: SetupItemService, propertyService: PropertyService, incomeSourceService: IncomeSourceService, bankConnectionService: BankConnectionService, bankAccountsService: BankAccountService, loanService: LoanService, allocationRuleService: AllocationRuleService, transactionAllocationService: TransactionAllocationService, vehicleClaimService: VehicleClaimService, homeOfficeClaimService: HomeOfficeClaimService, transactionService: TransactionService, depreciationService: DepreciationService, soleBusinessService: SoleBusinessService, holdingService: HoldingTradeService, userService: UserService, clientMovementService: ClientMovementService, clientInviteService: ClientInviteService, employeeService: EmployeeService, employeeInviteService: EmployeeInviteService, firmService: FirmService, sharesightDetailsService: SharesightDetailsService, propertyShareService: PropertyShareService);
36
+ constructor(setupItemService: SetupItemService, propertyService: PropertyService, incomeSourceService: IncomeSourceService, bankConnectionService: BankConnectionService, bankAccountsService: BankAccountService, loanService: LoanService, allocationRuleService: AllocationRuleService, transactionAllocationService: TransactionAllocationService, vehicleClaimService: VehicleClaimService, homeOfficeClaimService: HomeOfficeClaimService, transactionService: TransactionService, depreciationService: DepreciationService, businessService: SoleBusinessService, holdingService: HoldingTradeService, userService: UserService, clientMovementService: ClientMovementService, clientInviteService: ClientInviteService, employeeService: EmployeeService, employeeInviteService: EmployeeInviteService, firmService: FirmService, sharesightDetailsService: SharesightDetailsService, propertyShareService: PropertyShareService);
37
37
  /**
38
38
  * Get list of account setup items for current user/firm
39
39
  */
40
- get(property?: Property): Observable<AccountSetupItemCollection>;
41
- setItemsStatus(property?: Property): Observable<AccountSetupItemCollection>;
40
+ get(property?: Property, business?: SoleBusiness): Observable<AccountSetupItemCollection>;
41
+ setItemsStatus(property?: Property, business?: SoleBusiness): Observable<AccountSetupItemCollection>;
42
42
  /**
43
43
  * Check and update isCompleted flag for passed item
44
44
  */
45
45
  private setItemStatus;
46
- private getProperties;
47
46
  private getTransactions;
48
47
  private getCoOwners;
49
48
  /**
@@ -36,6 +36,7 @@ export declare class SubscriptionService extends RestService<ServiceSubscription
36
36
  cancel(subscription: ServiceSubscription): Observable<object>;
37
37
  renew(subscription: ServiceSubscription): Observable<object>;
38
38
  getCoupon(code: string): Observable<any>;
39
+ setCache(data: any[], next?: boolean): void;
39
40
  static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionService, never>;
40
41
  static ɵprov: i0.ɵɵInjectableDeclaration<SubscriptionService>;
41
42
  }
@@ -36,6 +36,7 @@ export declare class UserService extends RestService<UserBase, User, Collection<
36
36
  skipSetupItem(item: AccountSetupItem): Observable<User>;
37
37
  restoreSetupItem(item: AccountSetupItem): Observable<User>;
38
38
  /**
39
+ * @TODO stop using user for roles
39
40
  * Update cache when user's service subscription is updated
40
41
  */
41
42
  private listenServiceSubscriptionUpdated;