taxtank-core 0.9.1 → 0.9.2
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 +83 -19
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/transaction.collection.js +1 -8
- package/esm2015/lib/db/Models/transaction-base.js +12 -8
- package/esm2015/lib/models/chart-accounts/chart-accounts-categories.const.js +24 -3
- package/esm2015/lib/models/chart-accounts/chart-accounts.js +5 -1
- package/esm2015/lib/models/transaction/transaction.js +4 -2
- package/esm2015/lib/services/http/transaction/messages.enum.js +7 -0
- package/esm2015/lib/services/http/transaction/transaction.service.js +10 -4
- package/esm2015/lib/services/toast/toast.service.js +32 -1
- package/fesm2015/taxtank-core.js +83 -19
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/transaction.collection.d.ts +0 -6
- package/lib/db/Models/transaction-base.d.ts +4 -2
- package/lib/models/chart-accounts/chart-accounts-categories.const.d.ts +4 -0
- package/lib/models/chart-accounts/chart-accounts.d.ts +1 -0
- package/lib/services/http/transaction/messages.enum.d.ts +5 -0
- package/lib/services/http/transaction/transaction.service.d.ts +3 -1
- package/lib/services/toast/toast.service.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Collection } from './collection';
|
|
2
2
|
import { Transaction } from '../models/transaction/transaction';
|
|
3
3
|
import { TransactionAllocationCollection } from './transaction-allocation.collection';
|
|
4
|
-
import { TankTypeEnum } from '../db/Enums/tank-type.enum';
|
|
5
4
|
import { ChartAccountsCategoryEnum } from '../db/Enums/chart-accounts-category.enum';
|
|
6
5
|
/**
|
|
7
6
|
* Collection of transactions
|
|
@@ -21,11 +20,6 @@ export declare class TransactionCollection extends Collection<Transaction> {
|
|
|
21
20
|
* Cash position is equal to Total Amount because income is positive and expense is negative,
|
|
22
21
|
*/
|
|
23
22
|
get cashPosition(): number;
|
|
24
|
-
/**
|
|
25
|
-
* Get new collection of transactions filtered by tank type
|
|
26
|
-
* @param tankType
|
|
27
|
-
*/
|
|
28
|
-
getByTankType(tankType: TankTypeEnum): TransactionCollection;
|
|
29
23
|
/**
|
|
30
24
|
* get date of the last transaction
|
|
31
25
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Property } from './property/property';
|
|
2
2
|
import { ChartAccounts } from './chart-accounts';
|
|
3
|
-
import { TankTypeEnum } from '../Enums/tank-type.enum';
|
|
4
3
|
export declare class TransactionBase {
|
|
5
4
|
id?: number;
|
|
6
5
|
amount?: number;
|
|
@@ -10,7 +9,6 @@ export declare class TransactionBase {
|
|
|
10
9
|
description?: string;
|
|
11
10
|
file?: File;
|
|
12
11
|
claimPercent?: number;
|
|
13
|
-
tankType: TankTypeEnum;
|
|
14
12
|
/**
|
|
15
13
|
* Check if current tank is Property
|
|
16
14
|
*/
|
|
@@ -19,4 +17,8 @@ export declare class TransactionBase {
|
|
|
19
17
|
* Check if current tank is Work
|
|
20
18
|
*/
|
|
21
19
|
isWorkTank(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Check if current tank is Sole
|
|
22
|
+
*/
|
|
23
|
+
isSoleTank(): boolean;
|
|
22
24
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { ChartAccountsCategoryEnum } from '../../db/Enums/chart-accounts-category.enum';
|
|
2
|
+
/**
|
|
3
|
+
* Grouped chart accounts categories for fast work
|
|
4
|
+
* @TODO Alex: Clean up and/or remove some groups
|
|
5
|
+
*/
|
|
2
6
|
export declare const CHART_ACCOUNTS_CATEGORIES: {
|
|
3
7
|
[key: string]: ChartAccountsCategoryEnum[];
|
|
4
8
|
};
|
|
@@ -7,6 +7,7 @@ import { RestService } from '../rest/rest.service';
|
|
|
7
7
|
import { Transaction } from '../../../models/transaction/transaction';
|
|
8
8
|
import { ChartAccounts } from '../../../models/chart-accounts/chart-accounts';
|
|
9
9
|
import { ChartAccountsTaxLabelsEnum } from '../../../models/chart-accounts/chart-accounts-tax-labels.enum';
|
|
10
|
+
import { ToastService } from '../../toast/toast.service';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
/**
|
|
12
13
|
* Service for transactions business logic
|
|
@@ -15,10 +16,11 @@ export declare class TransactionService extends RestService<TransactionBase, Tra
|
|
|
15
16
|
protected http: HttpClient;
|
|
16
17
|
protected eventDispatcherService: EventDispatcherService;
|
|
17
18
|
protected environment: any;
|
|
19
|
+
protected toastService: ToastService;
|
|
18
20
|
url: string;
|
|
19
21
|
modelClass: typeof Transaction;
|
|
20
22
|
transactionDeleted: EventEmitter<Transaction>;
|
|
21
|
-
constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any);
|
|
23
|
+
constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService);
|
|
22
24
|
/**
|
|
23
25
|
* Listen events from Event Dispatcher services
|
|
24
26
|
*/
|
|
@@ -8,6 +8,10 @@ export declare class ToastService {
|
|
|
8
8
|
toast$: ReplaySubject<Toast>;
|
|
9
9
|
get(): Observable<Toast>;
|
|
10
10
|
add(toast: Toast): void;
|
|
11
|
+
success(message: string): void;
|
|
12
|
+
warning(message: string): void;
|
|
13
|
+
error(message: string): void;
|
|
14
|
+
info(message: string): void;
|
|
11
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
|
|
12
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<ToastService>;
|
|
13
17
|
}
|