taxtank-core 0.28.18 → 0.28.21

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.
Files changed (35) hide show
  1. package/bundles/taxtank-core.umd.js +373 -278
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/chat.collection.js +26 -0
  4. package/esm2015/lib/collections/index.js +2 -1
  5. package/esm2015/lib/collections/message.collection.js +13 -1
  6. package/esm2015/lib/collections/property/index.js +4 -0
  7. package/esm2015/lib/collections/property/property-category-movement.collection.js +17 -0
  8. package/esm2015/lib/collections/property/property-sale/index.js +3 -0
  9. package/esm2015/lib/db/Enums/chat-status.enum.js +1 -1
  10. package/esm2015/lib/db/Enums/property/property-category-list.enum.js +2 -1
  11. package/esm2015/lib/forms/sole/sole-business.form.js +3 -3
  12. package/esm2015/lib/forms/sole/sole-invoice.form.js +3 -2
  13. package/esm2015/lib/models/bank/bank-account.js +7 -1
  14. package/esm2015/lib/models/chart-accounts/chart-accounts.js +12 -6
  15. package/esm2015/lib/models/chat/message.js +5 -1
  16. package/esm2015/lib/models/endpoint/endpoints.const.js +2 -1
  17. package/esm2015/lib/models/financial-year/financial-year.js +7 -2
  18. package/esm2015/lib/models/property/property-category.js +7 -3
  19. package/esm2015/public-api.js +2 -3
  20. package/fesm2015/taxtank-core.js +278 -205
  21. package/fesm2015/taxtank-core.js.map +1 -1
  22. package/lib/collections/chat.collection.d.ts +10 -0
  23. package/lib/collections/index.d.ts +1 -0
  24. package/lib/collections/message.collection.d.ts +5 -0
  25. package/lib/collections/property/index.d.ts +3 -0
  26. package/lib/collections/property/property-category-movement.collection.d.ts +11 -0
  27. package/lib/collections/property/property-sale/index.d.ts +2 -0
  28. package/lib/db/Enums/property/property-category-list.enum.d.ts +1 -0
  29. package/lib/models/bank/bank-account.d.ts +2 -0
  30. package/lib/models/chart-accounts/chart-accounts.d.ts +6 -1
  31. package/lib/models/chat/message.d.ts +2 -0
  32. package/lib/models/financial-year/financial-year.d.ts +1 -1
  33. package/lib/models/property/property-category.d.ts +1 -0
  34. package/package.json +1 -1
  35. package/public-api.d.ts +1 -2
@@ -0,0 +1,10 @@
1
+ import { Collection } from './collection';
2
+ import { Chat } from '../models/chat/chat';
3
+ import { Message } from '../models/chat/message';
4
+ export declare class ChatCollection extends Collection<Chat> {
5
+ /**
6
+ * Sort chats by last messages (newest first) + empty chats in the end
7
+ */
8
+ getSortedByNewest(messages: Message[]): this;
9
+ getActive(): this;
10
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './vehicle';
2
2
  export * from './sole';
3
+ export * from './property';
@@ -7,6 +7,11 @@ export declare class MessageCollection extends Collection<Message> {
7
7
  * Get List of unread chats
8
8
  */
9
9
  getUnread(): Message[];
10
+ getFromActiveChats(): this;
11
+ /**
12
+ * Get amount of chats that contains unread messages
13
+ */
14
+ getUnreadChatsAmount(isFromEmployee?: boolean): number;
10
15
  /**
11
16
  * Check if chat has unread chats
12
17
  */
@@ -0,0 +1,3 @@
1
+ export * from './property-sale';
2
+ export * from './property.collection';
3
+ export * from './property-category-movement.collection';
@@ -0,0 +1,11 @@
1
+ import { Collection } from '../collection';
2
+ import { PropertyCategoryMovement } from '../../models/property/property-category-movement';
3
+ import { PropertyForecast } from '../../models/property/property-forecast';
4
+ import { Property } from '../../models/property/property';
5
+ export declare class PropertyCategoryMovementCollection extends Collection<PropertyCategoryMovement> {
6
+ /**
7
+ * @TODO TT-2355 Alex refactor propertyForecast, use separated api (then I can remove property from param)
8
+ */
9
+ getByForecast(property: Property, forecast: PropertyForecast): this;
10
+ hasCategory(categoryId: number): boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ export * from './property-sale.collection';
2
+ export * from './property-sale-tax-exemption-metadata.collection';
@@ -1,4 +1,5 @@
1
1
  export declare enum PropertyCategoryListEnum {
2
2
  OWNER_OCCUPIED = 3,
3
+ SHARED = 4,
3
4
  VACANT_LAND = 5
4
5
  }
@@ -15,6 +15,8 @@ export declare class BankAccount extends BankAccountBase {
15
15
  bankConnection: BankConnection;
16
16
  type: BankAccountTypeEnum;
17
17
  get bank(): Bank;
18
+ get bsb(): string;
19
+ get number(): string;
18
20
  /**
19
21
  * Get current opening balance amount
20
22
  */
@@ -56,6 +56,7 @@ export declare class ChartAccounts extends ChartAccountsBase {
56
56
  */
57
57
  isOtherIncome(): boolean;
58
58
  isIncome(): boolean;
59
+ isExpense(): boolean;
59
60
  isProperty(): boolean;
60
61
  isWorkExpense(): boolean;
61
62
  isSoleExpense(): boolean;
@@ -69,7 +70,6 @@ export declare class ChartAccounts extends ChartAccountsBase {
69
70
  isPropertyIncome(): boolean;
70
71
  isPersonal(): boolean;
71
72
  isPersonalExpense(): boolean;
72
- isPropertyDepreciation(): boolean;
73
73
  /**
74
74
  * Check if chart accounts category is depreciation
75
75
  */
@@ -86,4 +86,9 @@ export declare class ChartAccounts extends ChartAccountsBase {
86
86
  * Get chart accounts value by financial year
87
87
  */
88
88
  getValueByYear(year: number): ChartAccountsValue;
89
+ /**
90
+ * no way to check how much used for work/sole, so we let user adjust it
91
+ * except vehicle expense, which is equal to vehicleClaim.workUsage and personal, which is equal to 0
92
+ */
93
+ isClaimPercentEditable(): boolean;
89
94
  }
@@ -1,9 +1,11 @@
1
1
  import { Message as MessageBase } from '../../db/Models/firm/message';
2
2
  import { User } from '../user/user';
3
3
  import { MessageDocument } from './message-document';
4
+ import { Chat } from './chat';
4
5
  export declare class Message extends MessageBase {
5
6
  createdAt: Date;
6
7
  employee: User;
8
+ chat: Chat;
7
9
  documents: MessageDocument[];
8
10
  /**
9
11
  * Check if message created today or not
@@ -1,5 +1,4 @@
1
1
  export declare class FinancialYear {
2
- constructor(date?: Date);
3
2
  static weeksInYear: number;
4
3
  static startMonthIndex: number;
5
4
  year: number;
@@ -7,6 +6,7 @@ export declare class FinancialYear {
7
6
  endDate: Date;
8
7
  private yearStartDate;
9
8
  private yearEndDate;
9
+ constructor(date?: Date | number);
10
10
  includes(date: Date): boolean;
11
11
  static toFinYear(date: Date): number;
12
12
  get prevFinYear(): FinancialYear;
@@ -2,4 +2,5 @@ import { PropertyCategory as PropertyCategoryBase } from '../../db/Models/proper
2
2
  export declare class PropertyCategory extends PropertyCategoryBase {
3
3
  isOwnerOccupied(): boolean;
4
4
  isVacantLand(): boolean;
5
+ isShared(): boolean;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.18",
3
+ "version": "0.28.21",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from './lib/collections/account-setup-item.collection';
11
11
  export * from './lib/collections/bank-account.collection';
12
12
  export * from './lib/collections/bank-transaction.collection';
13
13
  export * from './lib/collections/chart-accounts.collection';
14
+ export * from './lib/collections/chat.collection';
14
15
  export * from './lib/collections/client.collection';
15
16
  export * from './lib/collections/client-movement.collection';
16
17
  export * from './lib/collections/client-portfolio-report.collection';
@@ -23,8 +24,6 @@ export * from './lib/collections/loan/loan.collection';
23
24
  export * from './lib/collections/loan/loan-payment.collection';
24
25
  export * from './lib/collections/message.collection';
25
26
  export * from './lib/collections/message-document.collection';
26
- export * from './lib/collections/property/property.collection';
27
- export * from './lib/collections/property/property-sale/property-sale.collection';
28
27
  export * from './lib/collections/report/depreciation/depreciation-lvp-report-item.collection';
29
28
  export * from './lib/collections/report/depreciation/depreciation-report-item.collection';
30
29
  export * from './lib/collections/report/property/property-report-item.collection';