taxtank-core 0.21.0 → 0.21.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.
@@ -42,4 +42,9 @@ export declare class PropertyCollection extends Collection<Property> {
42
42
  * Get property with the lowest tax position
43
43
  */
44
44
  getBestPerformanceTaxProperty(transactions: TransactionCollection, depreciations: DepreciationCollection): Property;
45
+ /**
46
+ * Show best performance properties first
47
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677997/Property+Tank+Dashboard
48
+ */
49
+ sortByBestPerformance(transactions: TransactionCollection, depreciations: DepreciationCollection): this;
45
50
  }
@@ -1,5 +1,6 @@
1
1
  import { AbstractForm } from '../abstract.form';
2
- export declare class RegisterClientForm extends AbstractForm<object> {
2
+ import { User } from '../../models/user/user';
3
+ export declare class RegisterClientForm extends AbstractForm<User> {
3
4
  constructor(referenceCode?: string);
4
- submit(): object;
5
+ submit(data?: object): User;
5
6
  }
@@ -4,4 +4,5 @@ import { Firm } from '../../models/firm/firm';
4
4
  export declare class RegisterFirmForm extends AbstractForm<Firm> {
5
5
  private firmType;
6
6
  constructor(firmType: FirmTypeEnum, referenceCode?: string);
7
+ submit(data?: object): Firm;
7
8
  }
@@ -0,0 +1,6 @@
1
+ export declare enum BadgeColorEnum {
2
+ DEFAULT = "default",
3
+ GREEN = "green",
4
+ GOLD = "gold",
5
+ GRAY = "gray"
6
+ }
@@ -0,0 +1,10 @@
1
+ import { BadgeColorEnum } from './badge-color.enum';
2
+ import { AbstractModel } from '../../db/Models/abstract-model';
3
+ /**
4
+ * Class for UI element badge
5
+ */
6
+ export declare class Badge extends AbstractModel {
7
+ color: BadgeColorEnum;
8
+ text: string;
9
+ constructor(text: string, color?: BadgeColorEnum);
10
+ }
@@ -86,5 +86,10 @@ export declare class Property extends PropertyBase implements Photoable, Documen
86
86
  * ownership duration from purchase till sale
87
87
  */
88
88
  getOwnershipDuration(sale: PropertySale, unitOfTime?: unitOfTime.Diff): number;
89
+ /**
90
+ * Tax Position = Income - Expense - Interest - Depreciation
91
+ * Where (Income - Expense - Interest) is cash position.
92
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217415928/Dashboard+Property
93
+ */
89
94
  getTaxPosition(transactions: TransactionCollection, depreciations: DepreciationCollection): number;
90
95
  }
@@ -4,6 +4,8 @@ import { DepreciationCollection } from '../../../collections/depreciation.collec
4
4
  import { LoanCollection } from '../../../collections/loan/loan.collection';
5
5
  import { PropertyCollection } from '../../../collections/property/property.collection';
6
6
  import { TransactionCollection } from '../../../collections/transaction/transaction.collection';
7
+ import { Dictionary } from '../../../models/dictionary/dictionary';
8
+ import { Badge } from '../../../models/badge/badge';
7
9
  import * as i0 from "@angular/core";
8
10
  /**
9
11
  * Service with calculations methods for properties related with other entities.
@@ -28,6 +30,14 @@ export declare class PropertyCalculationService {
28
30
  getLvrGrowth$(properties$: Observable<PropertyCollection>, bankAccounts$: Observable<BankAccountCollection>, loans$: Observable<LoanCollection>): Observable<number>;
29
31
  getEquityPosition(properties: PropertyCollection, bankAccounts: BankAccountCollection): number;
30
32
  getPurchaseEquity(properties: PropertyCollection, bankAccounts: BankAccountCollection, loans: LoanCollection): number;
33
+ /**
34
+ * Get dictionary of badges for each property in collection
35
+ */
36
+ getBadgesByProperty(properties: PropertyCollection, transactions: TransactionCollection, depreciations: DepreciationCollection): Dictionary<Badge>;
37
+ /**
38
+ * Get Badge for single property in collection
39
+ */
40
+ private getBadge;
31
41
  static ɵfac: i0.ɵɵFactoryDeclaration<PropertyCalculationService, never>;
32
42
  static ɵprov: i0.ɵɵInjectableDeclaration<PropertyCalculationService>;
33
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.21.0",
3
+ "version": "0.21.3",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -138,6 +138,8 @@ export * from './lib/db/Enums/property/property-sale/tax-exemption-metadata.enum
138
138
  export * from './lib/models/account-setup/account-setup-item';
139
139
  export * from './lib/models/address/address';
140
140
  export * from './lib/models/address/country';
141
+ export * from './lib/models/badge/badge';
142
+ export * from './lib/models/badge/badge-color.enum';
141
143
  export * from './lib/models/bank/bank';
142
144
  export * from './lib/models/bank/bank-account';
143
145
  export * from './lib/models/bank/bank-account-chart-data';
@@ -174,6 +176,7 @@ export * from './lib/models/client/client-movement';
174
176
  export * from './lib/models/client/client-portfolio-chart-data';
175
177
  export * from './lib/models/client/client-portfolio-report';
176
178
  export * from './lib/models/color/alphabet-colors.enum';
179
+ export * from './lib/models/dictionary/dictionary';
177
180
  export * from './lib/models/depreciation/depreciation';
178
181
  export * from './lib/models/depreciation/depreciation-capital-project';
179
182
  export * from './lib/models/depreciation/depreciation-forecast';