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.
- package/bundles/taxtank-core.umd.js +373 -278
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/chat.collection.js +26 -0
- package/esm2015/lib/collections/index.js +2 -1
- package/esm2015/lib/collections/message.collection.js +13 -1
- package/esm2015/lib/collections/property/index.js +4 -0
- package/esm2015/lib/collections/property/property-category-movement.collection.js +17 -0
- package/esm2015/lib/collections/property/property-sale/index.js +3 -0
- package/esm2015/lib/db/Enums/chat-status.enum.js +1 -1
- package/esm2015/lib/db/Enums/property/property-category-list.enum.js +2 -1
- package/esm2015/lib/forms/sole/sole-business.form.js +3 -3
- package/esm2015/lib/forms/sole/sole-invoice.form.js +3 -2
- package/esm2015/lib/models/bank/bank-account.js +7 -1
- package/esm2015/lib/models/chart-accounts/chart-accounts.js +12 -6
- package/esm2015/lib/models/chat/message.js +5 -1
- package/esm2015/lib/models/endpoint/endpoints.const.js +2 -1
- package/esm2015/lib/models/financial-year/financial-year.js +7 -2
- package/esm2015/lib/models/property/property-category.js +7 -3
- package/esm2015/public-api.js +2 -3
- package/fesm2015/taxtank-core.js +278 -205
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/chat.collection.d.ts +10 -0
- package/lib/collections/index.d.ts +1 -0
- package/lib/collections/message.collection.d.ts +5 -0
- package/lib/collections/property/index.d.ts +3 -0
- package/lib/collections/property/property-category-movement.collection.d.ts +11 -0
- package/lib/collections/property/property-sale/index.d.ts +2 -0
- package/lib/db/Enums/property/property-category-list.enum.d.ts +1 -0
- package/lib/models/bank/bank-account.d.ts +2 -0
- package/lib/models/chart-accounts/chart-accounts.d.ts +6 -1
- package/lib/models/chat/message.d.ts +2 -0
- package/lib/models/financial-year/financial-year.d.ts +1 -1
- package/lib/models/property/property-category.d.ts +1 -0
- package/package.json +1 -1
- 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
|
+
}
|
|
@@ -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,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
|
+
}
|
|
@@ -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;
|
package/package.json
CHANGED
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';
|