taxtank-core 0.30.69 → 0.30.70
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/esm2020/lib/collections/collection.mjs +4 -1
- package/esm2020/lib/forms/holding/holding-reinvest.form.mjs +61 -0
- package/esm2020/lib/forms/holding/index.mjs +2 -1
- package/esm2020/lib/models/holding/holding-reinvest.mjs +22 -0
- package/esm2020/lib/models/holding/index.mjs +2 -1
- package/esm2020/lib/models/property/property-sale/property-sale.mjs +1 -1
- package/esm2020/lib/services/http/holding/holding-messages.enum.mjs +2 -1
- package/fesm2015/taxtank-core.mjs +76 -1
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +76 -1
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/collections/collection.d.ts +1 -0
- package/lib/forms/holding/holding-reinvest.form.d.ts +22 -0
- package/lib/forms/holding/index.d.ts +1 -0
- package/lib/models/holding/holding-reinvest.d.ts +13 -0
- package/lib/models/holding/index.d.ts +1 -0
- package/lib/services/http/holding/holding-messages.enum.d.ts +2 -1
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ export declare class Collection<Model extends AbstractModel> implements Iterable
|
|
|
24
24
|
next(): Model;
|
|
25
25
|
back(): Model;
|
|
26
26
|
getIds(): number[];
|
|
27
|
+
map(callback: (item: Model) => any): any[];
|
|
27
28
|
mapBy(path: string): any[];
|
|
28
29
|
sortBy(field?: string, isDesc?: boolean): this;
|
|
29
30
|
sort(callback: (a: Model, b: Model) => number): this;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HoldingReinvest } from '../../models';
|
|
2
|
+
import { IEventListener } from '../../interfaces';
|
|
3
|
+
import { AbstractForm } from '../abstract.form';
|
|
4
|
+
export declare class HoldingReinvestForm extends AbstractForm<HoldingReinvest> implements IEventListener {
|
|
5
|
+
private reinvest;
|
|
6
|
+
constructor(reinvest: HoldingReinvest);
|
|
7
|
+
listenEvents(): void;
|
|
8
|
+
private get transactionForm();
|
|
9
|
+
private get holdingForm();
|
|
10
|
+
/**
|
|
11
|
+
* Set transaction amount based on holding quantity and price
|
|
12
|
+
*/
|
|
13
|
+
private listenHoldingChanges;
|
|
14
|
+
/**
|
|
15
|
+
* Set holding date the same as transaction date
|
|
16
|
+
*/
|
|
17
|
+
private listenDateChanges;
|
|
18
|
+
/**
|
|
19
|
+
* @TODO Alex (TT-2847): attach file to both (transaction and holding) when files system refactored
|
|
20
|
+
*/
|
|
21
|
+
submit(): HoldingReinvest;
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Transaction } from '../transaction';
|
|
2
|
+
import { Holding } from './holding';
|
|
3
|
+
import { AbstractModel } from '../../db/Models';
|
|
4
|
+
import { HoldingType } from './holding-type';
|
|
5
|
+
/**
|
|
6
|
+
* Helper class for holding reinvest functionality.
|
|
7
|
+
* Reinvest - get dividends and directly buy holdings
|
|
8
|
+
*/
|
|
9
|
+
export declare class HoldingReinvest extends AbstractModel {
|
|
10
|
+
transaction: Transaction;
|
|
11
|
+
holding: Holding;
|
|
12
|
+
holdingType: HoldingType;
|
|
13
|
+
}
|
|
@@ -3,5 +3,6 @@ export declare enum HoldingMessagesEnum {
|
|
|
3
3
|
UPDATED = "Holding updated successfully",
|
|
4
4
|
CONFIRM_DELETE = "Are you sure you want to delete this holding?",
|
|
5
5
|
DELETED = "Holding deleted successfully",
|
|
6
|
-
DELETE_ASSET_ERROR = "In the \"SOLD\" section click on the \"REDO\" button for the current asset"
|
|
6
|
+
DELETE_ASSET_ERROR = "In the \"SOLD\" section click on the \"REDO\" button for the current asset",
|
|
7
|
+
REINVESTED = "Reinvested successfully"
|
|
7
8
|
}
|