taxtank-core 0.33.60 → 0.33.61

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. package/esm2022/src/lib/collections/asset-sale.collection.mjs +4 -1
  2. package/esm2022/src/lib/collections/collection-dictionary.mjs +10 -1
  3. package/esm2022/src/lib/collections/collection.mjs +1 -1
  4. package/esm2022/src/lib/collections/holding/holding-sale.collection.mjs +3 -3
  5. package/esm2022/src/lib/collections/holding/holding-trade.collection.mjs +78 -0
  6. package/esm2022/src/lib/collections/holding/holding.collection.mjs +19 -54
  7. package/esm2022/src/lib/collections/holding/index.mjs +3 -2
  8. package/esm2022/src/lib/db/Enums/holding/holding-trade-type.enum.mjs +6 -0
  9. package/esm2022/src/lib/db/Enums/holding/holding-type-category.enum.mjs +1 -1
  10. package/esm2022/src/lib/db/Enums/holding/index.mjs +2 -1
  11. package/esm2022/src/lib/db/Models/holding/holding-sale.mjs +1 -1
  12. package/esm2022/src/lib/db/Models/holding/holding-trade-import.mjs +3 -0
  13. package/esm2022/src/lib/db/Models/holding/holding-trade.mjs +3 -0
  14. package/esm2022/src/lib/db/Models/holding/index.mjs +2 -2
  15. package/esm2022/src/lib/forms/abstract.form.mjs +6 -1
  16. package/esm2022/src/lib/forms/holding/holding-reinvest.form.mjs +14 -14
  17. package/esm2022/src/lib/forms/holding/holding-sale.form.mjs +3 -2
  18. package/esm2022/src/lib/forms/holding/holding-trade/holding-trade-filter.form.mjs +25 -0
  19. package/esm2022/src/lib/forms/holding/holding-trade/holding-trade.form.mjs +30 -0
  20. package/esm2022/src/lib/forms/holding/holding-trade/index.mjs +3 -0
  21. package/esm2022/src/lib/forms/holding/holding-trade-import.form.mjs +25 -0
  22. package/esm2022/src/lib/forms/holding/index.mjs +3 -3
  23. package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +9 -9
  24. package/esm2022/src/lib/models/holding/holding-reinvest.mjs +4 -4
  25. package/esm2022/src/lib/models/holding/holding-sale.mjs +10 -1
  26. package/esm2022/src/lib/models/holding/holding-trade-import.mjs +16 -0
  27. package/esm2022/src/lib/models/holding/holding-trade.mjs +77 -0
  28. package/esm2022/src/lib/models/holding/holding-type-exchange.mjs +4 -1
  29. package/esm2022/src/lib/models/holding/holding-type.mjs +4 -1
  30. package/esm2022/src/lib/models/holding/holding.mjs +44 -71
  31. package/esm2022/src/lib/models/holding/index.mjs +4 -3
  32. package/esm2022/src/lib/services/account-setup/account-setup.service.mjs +3 -3
  33. package/esm2022/src/lib/services/http/holding/holding-trade-import/holding-trade-import-messages.enum.mjs +9 -0
  34. package/esm2022/src/lib/services/http/holding/holding-trade-import/holding-trade-import.service.mjs +37 -0
  35. package/esm2022/src/lib/services/http/holding/holding-trade-messages.enum.mjs +10 -0
  36. package/esm2022/src/lib/services/http/holding/holding-trade.service.mjs +44 -0
  37. package/esm2022/src/lib/services/http/holding/index.mjs +5 -6
  38. package/fesm2022/taxtank-core.mjs +330 -185
  39. package/fesm2022/taxtank-core.mjs.map +1 -1
  40. package/package.json +1 -1
  41. package/src/lib/collections/asset-sale.collection.d.ts +3 -0
  42. package/src/lib/collections/collection-dictionary.d.ts +1 -0
  43. package/src/lib/collections/holding/holding-sale.collection.d.ts +4 -4
  44. package/src/lib/collections/holding/holding-trade.collection.d.ts +21 -0
  45. package/src/lib/collections/holding/holding.collection.d.ts +7 -10
  46. package/src/lib/collections/holding/index.d.ts +2 -1
  47. package/src/lib/db/Enums/holding/holding-trade-type.enum.d.ts +4 -0
  48. package/src/lib/db/Enums/holding/index.d.ts +1 -0
  49. package/src/lib/db/Models/holding/holding-sale.d.ts +2 -2
  50. package/src/lib/db/Models/holding/holding-trade-import.d.ts +8 -0
  51. package/src/lib/db/Models/holding/{holding.d.ts → holding-trade.d.ts} +1 -1
  52. package/src/lib/db/Models/holding/index.d.ts +1 -1
  53. package/src/lib/forms/abstract.form.d.ts +2 -0
  54. package/src/lib/forms/holding/holding-reinvest.form.d.ts +5 -5
  55. package/src/lib/forms/holding/holding-sale.form.d.ts +2 -2
  56. package/src/lib/forms/holding/holding-trade/holding-trade-filter.form.d.ts +9 -0
  57. package/src/lib/forms/holding/holding-trade/holding-trade.form.d.ts +9 -0
  58. package/src/lib/forms/holding/holding-trade/index.d.ts +2 -0
  59. package/src/lib/forms/holding/holding-trade-import.form.d.ts +8 -0
  60. package/src/lib/forms/holding/index.d.ts +2 -2
  61. package/src/lib/models/holding/holding-reinvest.d.ts +2 -2
  62. package/src/lib/models/holding/holding-sale.d.ts +16 -4
  63. package/src/lib/models/holding/holding-trade-import.d.ts +8 -0
  64. package/src/lib/models/holding/holding-trade.d.ts +41 -0
  65. package/src/lib/models/holding/holding-type-exchange.d.ts +3 -0
  66. package/src/lib/models/holding/holding-type.d.ts +3 -0
  67. package/src/lib/models/holding/holding.d.ts +18 -34
  68. package/src/lib/models/holding/index.d.ts +3 -2
  69. package/src/lib/services/account-setup/account-setup.service.d.ts +2 -2
  70. package/src/lib/services/http/holding/{holding-import/holding-import-messages.enum.d.ts → holding-trade-import/holding-trade-import-messages.enum.d.ts} +1 -1
  71. package/src/lib/services/http/holding/holding-trade-import/holding-trade-import.service.d.ts +17 -0
  72. package/src/lib/services/http/holding/{holding-messages.enum.d.ts → holding-trade-messages.enum.d.ts} +1 -1
  73. package/src/lib/services/http/holding/holding-trade.service.d.ts +20 -0
  74. package/src/lib/services/http/holding/index.d.ts +4 -5
  75. package/esm2022/src/lib/db/Models/holding/holding-import.mjs +0 -3
  76. package/esm2022/src/lib/db/Models/holding/holding.mjs +0 -3
  77. package/esm2022/src/lib/forms/holding/holding-import.form.mjs +0 -25
  78. package/esm2022/src/lib/forms/holding/holding.form.mjs +0 -28
  79. package/esm2022/src/lib/models/holding/holding-import.mjs +0 -16
  80. package/esm2022/src/lib/services/http/holding/holding-import/holding-import-messages.enum.mjs +0 -9
  81. package/esm2022/src/lib/services/http/holding/holding-import/holding-import.service.mjs +0 -37
  82. package/esm2022/src/lib/services/http/holding/holding-messages.enum.mjs +0 -10
  83. package/esm2022/src/lib/services/http/holding/holding-sale-messages.enum.mjs +0 -8
  84. package/esm2022/src/lib/services/http/holding/holding.service.mjs +0 -44
  85. package/src/lib/db/Models/holding/holding-import.d.ts +0 -8
  86. package/src/lib/forms/holding/holding-import.form.d.ts +0 -8
  87. package/src/lib/forms/holding/holding.form.d.ts +0 -8
  88. package/src/lib/models/holding/holding-import.d.ts +0 -8
  89. package/src/lib/services/http/holding/holding-import/holding-import.service.d.ts +0 -17
  90. package/src/lib/services/http/holding/holding-sale-messages.enum.d.ts +0 -6
  91. package/src/lib/services/http/holding/holding.service.d.ts +0 -20
@@ -2,6 +2,7 @@ import { FormGroup, Validators } from '@angular/forms';
2
2
  import { EventEmitter } from '@angular/core';
3
3
  import { plainToClass } from 'class-transformer';
4
4
  import isEqual from 'lodash/isEqual';
5
+ import { combineLatest } from 'rxjs';
5
6
  /**
6
7
  * Abstract form class
7
8
  * @TODO rename to AbstractFormGroup
@@ -149,5 +150,9 @@ export class AbstractForm extends FormGroup {
149
150
  control.enable(opts);
150
151
  });
151
152
  }
153
+ controlsChanges(controlNames) {
154
+ const controls = controlNames.map(controlName => this.get(controlName));
155
+ return combineLatest(controls.map(control => control.valueChanges));
156
+ }
152
157
  }
153
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJzdHJhY3QuZm9ybS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9mb3Jtcy9hYnN0cmFjdC5mb3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBMEUsU0FBUyxFQUFlLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzVJLE9BQU8sRUFBRSxZQUFZLEVBQVEsTUFBTSxlQUFlLENBQUM7QUFDbkQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ2pELE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y5sZW5ndGgpIHtcbiAgICAgIHJldHVybiBzdXBlci5yZW1vdmVWYWxpZGF0b3JzKHZhbGlkYXRvcnMpO1xuICAgIH1cblxuICAgIGNvbnRyb2xzLmZvckVhY2goY29udHJvbCA9PiB7XG4gICAgICBjb250cm9sLnJlbW92ZVZhbGlkYXRvcnMoVmFsaWRhdG9ycy5yZXF1aXJlZCk7XG4gICAgfSk7XG4gIH1cblxuICBkaXNhYmxlKG9wdHM/OiB7IG9ubHlTZWxmPzogYm9vbGVhbjsgZW1pdEV2ZW50PzogYm9vbGVhbjsgfSwgY29udHJvbHM6IEFic3RyYWN0Q29udHJvbFtdID0gW10pOiB2b2lkIHtcbiAgICBpZiAoIWNvbnRyb2xzLmxlbmd0aCkge1xuICAgICAgcmV0dXJuIHN1cGVyLmRpc2FibGUob3B0cyk7XG4gICAgfVxuXG4gICAgY29udHJvbHMuZm9yRWFjaChjb250cm9sID0+IHtcbiAgICAgIGNvbnRyb2wuZGlzYWJsZShvcHRzKTtcbiAgICB9KTtcbiAgfVxuXG4gIGVuYWJsZShvcHRzPzogeyBvbmx5U2VsZj86IGJvb2xlYW47IGVtaXRFdmVudD86IGJvb2xlYW47IH0sIGNvbnRyb2xzOiBBYnN0cmFjdENvbnRyb2xbXSA9IFtdKTogdm9pZCB7XG4gICAgaWYgKCFjb250cm9scy5sZW5ndGgpIHtcbiAgICAgIHJldHVybiBzdXBlci5lbmFibGUob3B0cyk7XG4gICAgfVxuXG4gICAgY29udHJvbHMuZm9yRWFjaChjb250cm9sID0+IHtcbiAgICAgIGNvbnRyb2wuZW5hYmxlKG9wdHMpO1xuICAgIH0pO1xuICB9XG59XG4iXX0=
158
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJzdHJhY3QuZm9ybS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2x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HJhY3RDb250cm9sW10gPSBbXSk6IHZvaWQge1xuICAgIGlmICghY29udHJvbHMubGVuZ3RoKSB7XG4gICAgICByZXR1cm4gc3VwZXIuZGlzYWJsZShvcHRzKTtcbiAgICB9XG5cbiAgICBjb250cm9scy5mb3JFYWNoKGNvbnRyb2wgPT4ge1xuICAgICAgY29udHJvbC5kaXNhYmxlKG9wdHMpO1xuICAgIH0pO1xuICB9XG5cbiAgZW5hYmxlKG9wdHM/OiB7IG9ubHlTZWxmPzogYm9vbGVhbjsgZW1pdEV2ZW50PzogYm9vbGVhbjsgfSwgY29udHJvbHM6IEFic3RyYWN0Q29udHJvbFtdID0gW10pOiB2b2lkIHtcbiAgICBpZiAoIWNvbnRyb2xzLmxlbmd0aCkge1xuICAgICAgcmV0dXJuIHN1cGVyLmVuYWJsZShvcHRzKTtcbiAgICB9XG5cbiAgICBjb250cm9scy5mb3JFYWNoKGNvbnRyb2wgPT4ge1xuICAgICAgY29udHJvbC5lbmFibGUob3B0cyk7XG4gICAgfSk7XG4gIH1cblxuICBjb250cm9sc0NoYW5nZXMoY29udHJvbE5hbWVzOiBzdHJpbmdbXSk6IE9ic2VydmFibGU8YW55PiB7XG4gICAgY29uc3QgY29udHJvbHMgPSBjb250cm9sTmFtZXMubWFwKGNvbnRyb2xOYW1lID0+IHRoaXMuZ2V0KGNvbnRyb2xOYW1lKSk7XG5cbiAgICByZXR1cm4gY29tYmluZUxhdGVzdChcbiAgICAgIGNvbnRyb2xzLm1hcChjb250cm9sID0+IGNvbnRyb2wudmFsdWVDaGFuZ2VzKVxuICAgICk7XG4gIH1cbn1cbiJdfQ==
@@ -1,5 +1,5 @@
1
1
  import { AbstractForm } from '../abstract.form';
2
- import { HoldingForm } from './holding.form';
2
+ import { HoldingTradeForm } from './holding-trade';
3
3
  import { HoldingIncomeForm } from '../transaction';
4
4
  import { TransactionTypeEnum } from '../../db/Enums/transaction-type.enum';
5
5
  import { FormControl, Validators } from '@angular/forms';
@@ -12,7 +12,7 @@ export class HoldingReinvestForm extends AbstractForm {
12
12
  // the difference between dividends amount and given shares (shares=dividendsAmount/sharePrice)
13
13
  cashVariance: new FormControl({ value: 0, disabled: true }, Validators.required),
14
14
  transaction: new HoldingIncomeForm(reinvest.transaction, null, []),
15
- holding: new HoldingForm(reinvest.holding)
15
+ trade: new HoldingTradeForm(reinvest.trade)
16
16
  }, reinvest);
17
17
  this.reinvest = reinvest;
18
18
  this.listenEvents();
@@ -27,15 +27,15 @@ export class HoldingReinvestForm extends AbstractForm {
27
27
  });
28
28
  }
29
29
  listenEvents() {
30
- this.listenHoldingChanges();
30
+ this.listenTradeChanges();
31
31
  this.listenDateChanges();
32
32
  this.listenAmountChanges();
33
33
  }
34
34
  get transactionForm() {
35
35
  return this.get('transaction');
36
36
  }
37
- get holdingForm() {
38
- return this.get('holding');
37
+ get tradeForm() {
38
+ return this.get('trade');
39
39
  }
40
40
  /**
41
41
  * calculated automatically as cashVariance=transactionAmount-frankedAmount-unfrankedAmount
@@ -47,11 +47,11 @@ export class HoldingReinvestForm extends AbstractForm {
47
47
  });
48
48
  }
49
49
  /**
50
- * Set transaction amount based on holding quantity and price
50
+ * Set transaction amount based on trade quantity and price
51
51
  */
52
- listenHoldingChanges() {
53
- // we can watch the whole holding form because we have only 2 fields in the form template
54
- this.get('holding').valueChanges.subscribe((value) => {
52
+ listenTradeChanges() {
53
+ // we can watch the whole trade form because we have only 2 fields in the form template
54
+ this.get('trade').valueChanges.subscribe((value) => {
55
55
  if (!value.quantity || !value.price) {
56
56
  this.get(['transaction', 'amount']).setValue(0);
57
57
  return;
@@ -60,15 +60,15 @@ export class HoldingReinvestForm extends AbstractForm {
60
60
  });
61
61
  }
62
62
  /**
63
- * Set holding date the same as transaction date
63
+ * Set trade date the same as transaction date
64
64
  */
65
65
  listenDateChanges() {
66
66
  this.get(['transaction', 'date']).valueChanges.subscribe((date) => {
67
- this.get(['holding', 'date']).setValue(date);
67
+ this.get(['trade', 'date']).setValue(date);
68
68
  });
69
69
  }
70
70
  /**
71
- * @TODO Alex (TT-2847): attach file to both (transaction and holding) when files system refactored
71
+ * @TODO Alex (TT-2847): attach file to both (transaction and trade) when files system refactored
72
72
  */
73
73
  submit() {
74
74
  const value = this.transactionForm.getRawValue();
@@ -78,8 +78,8 @@ export class HoldingReinvestForm extends AbstractForm {
78
78
  description: `Reinvestment - ${value.incomeSource?.name}`,
79
79
  amount: value.amount - this.get('cashVariance').value
80
80
  }),
81
- holding: this.holdingForm.submit()
81
+ trade: this.tradeForm.submit()
82
82
  });
83
83
  }
84
84
  }
85
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy1yZWludmVzdC5mb3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2Zvcm1zL2hvbGRpbmcvaG9sZGluZy1yZWludmVzdC5mb3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNoRCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDN0MsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDbkQsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sc0NBQXNDLENBQUM7QUFDM0UsT0FBTyxFQUFFLFdBQVcsRUFBRSxVQUFVLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUV6RDs7R0FFRztBQUNILE1BQU0sT0FBTyxtQkFBb0IsU0FBUSxZQUE2QjtJQUNwRSxZQUFvQixRQUF5QjtRQUMzQyxLQUFLLENBQUM7WUFDSiwrRkFBK0Y7WUFDL0YsWUFBWSxFQUFFLElBQUksV0FBVyxDQUFDLEVBQUUsS0FBSyxFQUF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yk6IGF0dGFjaCBmaWxlIHRvIGJvdGggKHRyYW5zYWN0aW9uIGFuZCB0cmFkZSkgd2hlbiBmaWxlcyBzeXN0ZW0gcmVmYWN0b3JlZFxuICAgKi9cbiAgc3VibWl0KCk6IEhvbGRpbmdSZWludmVzdCB7XG4gICAgY29uc3QgdmFsdWUgPSB0aGlzLnRyYW5zYWN0aW9uRm9ybS5nZXRSYXdWYWx1ZSgpO1xuXG4gICAgcmV0dXJuIHN1cGVyLnN1Ym1pdCh7XG4gICAgICB0cmFuc2FjdGlvbjogdGhpcy50cmFuc2FjdGlvbkZvcm0uc3VibWl0KHtcbiAgICAgICAgdHlwZTogVHJhbnNhY3Rpb25UeXBlRW51bS5DUkVESVQsXG4gICAgICAgIGRlc2NyaXB0aW9uOiBgUmVpbnZlc3RtZW50IC0gJHt2YWx1ZS5pbmNvbWVTb3VyY2U/Lm5hbWV9YCxcbiAgICAgICAgYW1vdW50OiB2YWx1ZS5hbW91bnQgLSB0aGlzLmdldCgnY2FzaFZhcmlhbmNlJykudmFsdWVcbiAgICAgIH0pLFxuICAgICAgdHJhZGU6IHRoaXMudHJhZGVGb3JtLnN1Ym1pdCgpXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==
@@ -6,7 +6,8 @@ import { greaterThanValidator } from '../../validators';
6
6
  export class HoldingSaleForm extends AbstractForm {
7
7
  constructor(sale, holding, type, isResident) {
8
8
  super({
9
- quantity: new UntypedFormControl(sale.quantity, [Validators.required, Validators.max(holding.currentQuantity + sale.quantity), greaterThanValidator(0)]),
9
+ // @TODO Validators.max(holding.currentQuantity + sale.quantity)
10
+ quantity: new UntypedFormControl(sale.quantity, [Validators.required, greaterThanValidator(0)]),
10
11
  price: new UntypedFormControl(sale.price || type.price, Validators.required),
11
12
  fee: new UntypedFormControl(sale.fee, Validators.required),
12
13
  date: new UntypedFormControl(sale.date, Validators.required),
@@ -49,4 +50,4 @@ export class HoldingSaleForm extends AbstractForm {
49
50
  return this.isResident && netCapitalGain > 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U6IG51bWJlciwgcXVhbnRpdHk6IG51bWJlciwgZmVlOiBudW1iZXIpOiBudW1iZXIge1xuICAgIGNvbnN0IGZlZXMgPSBxdWFudGl0eSAqIHRoaXMuaG9sZGluZy5mZWUgLyB0aGlzLmhvbGRpbmcucXVhbnRpdHkgKyBmZWU7XG4gICAgY29uc3QgdG90YWxDYXBpdGFsR2FpbiA9IChwcmljZSAtIHRoaXMuaG9sZGluZy5wcmljZSkgKiBxdWFudGl0eSAtIGZlZXM7XG5cbiAgICByZXR1cm4gdG90YWxDYXBpdGFsR2FpbiAqIHRoaXMuaG9sZGluZy5vd25lcnNoaXBQZXJjZW50IC8gMTAwO1xuICB9XG5cbiAgcHJpdmF0ZSBjYWxjdWxhdGVOZXRDYXBpdGFsR2Fpbihncm9zc0NhcGl0YWxHYWluOiBudW1iZXIsIGRhdGU6IERhdGUpOiBudW1iZXIge1xuICAgIGxldCBuZXRDYXBpdGFsR2FpbiA9IGdyb3NzQ2FwaXRhbEdhaW47XG5cbiAgICBpZiAodGhpcy5pc09uZVllYXJFeGVtcHRpb25BcHBsaWNhYmxlKG5ldENhcGl0YWxHYWluLCBkYXRlKSkge1xuICAgICAgbmV0Q2FwaXRhbEdhaW4gPSBuZXRDYXBpdGFsR2FpbiAvIDI7XG4gICAgfVxuXG4gICAgcmV0dXJuIG5ldENhcGl0YWxHYWluO1xuICB9XG5cbiAgcHJpdmF0ZSBpc09uZVllYXJFeGVtcHRpb25BcHBsaWNhYmxlKG5ldENhcGl0YWxHYWluOiBudW1iZXIsIGRhdGU6IERhdGUpOiBib29sZWFuIHtcbiAgICByZXR1cm4gdGhpcy5pc1Jlc2lkZW50ICYmIG5ldENhcGl0YWxHYWluID4gMCAmJiBtb21lbnQoZGF0ZSkuZGlmZihtb21lbnQodGhpcy5ob2xkaW5nLmRhdGUpLCAneWVhcicpID4gMDtcbiAgfVxufVxuIl19
@@ -0,0 +1,25 @@
1
+ import { UntypedFormControl } from '@angular/forms';
2
+ import { AbstractForm } from '../../abstract.form';
3
+ import { HoldingTypeCategoryEnum } from '../../../db/Enums';
4
+ export class HoldingTradeFilterForm extends AbstractForm {
5
+ constructor() {
6
+ super({
7
+ category: new UntypedFormControl(),
8
+ isTaxFree: new UntypedFormControl(false),
9
+ });
10
+ this.categories = [];
11
+ this.get('category').valueChanges.subscribe(category => {
12
+ this.categories = category === HoldingTypeCategoryEnum.OTHER
13
+ ? [HoldingTypeCategoryEnum.OTHER, HoldingTypeCategoryEnum.COLLECTIBLE, HoldingTypeCategoryEnum.UNLISTED_STOCK, HoldingTypeCategoryEnum.UNLISTED_UNIT]
14
+ : [category];
15
+ });
16
+ }
17
+ filter(trades) {
18
+ let filteredTrades = trades.filterBy('isTaxFree', this.value.isTaxFree);
19
+ if (this.categories.length) {
20
+ filteredTrades = filteredTrades.filterBy('holdingType.category', this.categories);
21
+ }
22
+ return filteredTrades;
23
+ }
24
+ }
25
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy10cmFkZS1maWx0ZXIuZm9ybS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9mb3Jtcy9ob2xkaW5nL2hvbGRpbmctdHJhZGUvaG9sZGluZy10cmFkZS1maWx0ZXIuZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUVwRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFFbkQsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFNUQsTUFBTSxPQUFPLHNCQUF1QixTQUFRLFlBQTBCO0lBRXBFO1FBQ0UsS0FBSyxDQUFDO1lBQ0osUUFBUSx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pbHRlcih0cmFkZXM6IEhvbGRpbmdUcmFkZUNvbGxlY3Rpb24pOiBIb2xkaW5nVHJhZGVDb2xsZWN0aW9uIHtcbiAgICBsZXQgZmlsdGVyZWRUcmFkZXMgPSB0cmFkZXMuZmlsdGVyQnkoJ2lzVGF4RnJlZScsIHRoaXMudmFsdWUuaXNUYXhGcmVlKTtcbiAgICBpZiAodGhpcy5jYXRlZ29yaWVzLmxlbmd0aCkge1xuICAgICAgZmlsdGVyZWRUcmFkZXMgPSBmaWx0ZXJlZFRyYWRlcy5maWx0ZXJCeSgnaG9sZGluZ1R5cGUuY2F0ZWdvcnknLCB0aGlzLmNhdGVnb3JpZXMpO1xuICAgIH1cblxuICAgIHJldHVybiBmaWx0ZXJlZFRyYWRlcztcbiAgfVxufVxuIl19
@@ -0,0 +1,30 @@
1
+ import { UntypedFormControl, Validators } from '@angular/forms';
2
+ import { AbstractForm } from '../../abstract.form';
3
+ import { greaterThanValidator } from '../../../validators';
4
+ export class HoldingTradeForm extends AbstractForm {
5
+ constructor(holdingTrade) {
6
+ super({
7
+ category: new UntypedFormControl(holdingTrade.category),
8
+ isTaxFree: new UntypedFormControl(holdingTrade.isTaxFree, Validators.required),
9
+ type: new UntypedFormControl(holdingTrade.type, Validators.required),
10
+ quantity: new UntypedFormControl(holdingTrade.quantity, [Validators.required, greaterThanValidator(0)]),
11
+ price: new UntypedFormControl(holdingTrade.price, [Validators.required, Validators.min(0)]),
12
+ fee: new UntypedFormControl(holdingTrade.fee, [Validators.required, Validators.min(0)]),
13
+ date: new UntypedFormControl(holdingTrade.date, Validators.required),
14
+ holdingType: new UntypedFormControl(holdingTrade.holdingType, Validators.required),
15
+ ownershipPercent: new UntypedFormControl(holdingTrade.ownershipPercent || 100, Validators.required),
16
+ file: new UntypedFormControl(holdingTrade.file)
17
+ }, holdingTrade);
18
+ this.purchaseValue = 0;
19
+ this.listenEvents();
20
+ }
21
+ listenEvents() {
22
+ this.controlsChanges(['quantity', 'price', 'fee']).subscribe(([quantity, price, fee]) => {
23
+ this.purchaseValue = quantity * price + fee;
24
+ });
25
+ }
26
+ submit(data = {}, includeDisabledFields = false) {
27
+ return super.submit(data, includeDisabledFields);
28
+ }
29
+ }
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy10cmFkZS5mb3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2Zvcm1zL2hvbGRpbmcvaG9sZGluZy10cmFkZS9ob2xkaW5nLXRyYWRlLmZvcm0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRWhFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUVuRCxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUUzRCxNQUFNLE9BQU8sZ0JBQWlCLFNBQVEsWUFBMEI7SUFFOUQsWUFBWSxZQUEwQjtRQUNwQyxLQUFLLENBQUM7WUFDSixRQUFRLEVBQUUsSUFBSSxrQkFBa0IsQ0FBQyxZQUFZLENBQUMsUUFBUSxDQUFDO1lBQ3ZELFNBQVMsRUFBRSxJQUFJLGtCQUFrQixDQUFDLFlBQVksQ0FBQyxTQUFTLEVBQUUsVUFBVSxDQUFDLFFBQVEsQ0FBQztZQUM5RSxJQUFJLEVBQUUsSUFBSSxrQkFBa0IsQ0FBQyxZQUFZLENBQUMsSUFBSSxFQUFFLFVBQVUsQ0FBQyxRQUFRLENBQUM7WUFDcEUsUUFBUSxFQUFFLElBQUksa0JBQWtCLENBQUMsWUFBWSxDQUFDLFFBQVEsRUFBRSxDQUFDLFVBQVUsQ0FBQyxRQUFRLEVBQUU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VudHMoKTtcbiAgfVxuXG4gIGxpc3RlbkV2ZW50cygpOiB2b2lkIHtcbiAgICB0aGlzLmNvbnRyb2xzQ2hhbmdlcyhbJ3F1YW50aXR5JywgJ3ByaWNlJywgJ2ZlZSddKS5zdWJzY3JpYmUoKFtxdWFudGl0eSwgcHJpY2UsIGZlZV0pID0+IHtcbiAgICAgIHRoaXMucHVyY2hhc2VWYWx1ZSA9IHF1YW50aXR5ICogcHJpY2UgKyBmZWVcbiAgICB9KTtcbiAgfVxuXG4gIHN1Ym1pdChkYXRhOiBvYmplY3QgPSB7fSwgaW5jbHVkZURpc2FibGVkRmllbGRzID0gZmFsc2UpOiBIb2xkaW5nVHJhZGUge1xuICAgIHJldHVybiBzdXBlci5zdWJtaXQoZGF0YSwgaW5jbHVkZURpc2FibGVkRmllbGRzKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,3 @@
1
+ export * from './holding-trade.form';
2
+ export * from './holding-trade-filter.form';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZm9ybXMvaG9sZGluZy9ob2xkaW5nLXRyYWRlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyw2QkFBNkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy10cmFkZS5mb3JtJztcbmV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy10cmFkZS1maWx0ZXIuZm9ybSc7XG4iXX0=
@@ -0,0 +1,25 @@
1
+ import { UntypedFormControl, Validators } from '@angular/forms';
2
+ import { AbstractForm } from '../abstract.form';
3
+ import { HoldingTypeCategoryEnum } from '../../db/Enums';
4
+ import { HoldingTypeExchangeListEnum } from '../../db/Enums';
5
+ export class HoldingTradeImportForm extends AbstractForm {
6
+ constructor() {
7
+ super({
8
+ category: new UntypedFormControl(HoldingTypeCategoryEnum.STOCK, Validators.required),
9
+ exchangeId: new UntypedFormControl(HoldingTypeExchangeListEnum.AU, Validators.required),
10
+ isTaxFree: new UntypedFormControl(false, Validators.required),
11
+ file: new UntypedFormControl(null, Validators.required)
12
+ });
13
+ this.listenEvents();
14
+ }
15
+ listenEvents() {
16
+ this.get('category').valueChanges.subscribe((category) => {
17
+ this.get('exchangeId').setValue(category === HoldingTypeCategoryEnum.CRYPTO ? HoldingTypeExchangeListEnum.CC : HoldingTypeExchangeListEnum.AU);
18
+ });
19
+ }
20
+ submit() {
21
+ // @TODO TypeError: Failed to construct 'File': 2 arguments required, but only 0 present.
22
+ return super.submit({ file: null });
23
+ }
24
+ }
25
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy10cmFkZS1pbXBvcnQuZm9ybS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9mb3Jtcy9ob2xkaW5nL2hvbGRpbmctdHJhZGUtaW1wb3J0LmZvcm0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ2hFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUVoRCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUN6RCxPQUFPLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUc3RCxNQUFNLE9BQU8sc0JBQXVCLFNBQVEsWUF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gICB0aGlzLmxpc3RlbkV2ZW50cygpO1xuICB9XG5cbiAgbGlzdGVuRXZlbnRzKCk6IHZvaWQge1xuICAgIHRoaXMuZ2V0KCdjYXRlZ29yeScpLnZhbHVlQ2hhbmdlcy5zdWJzY3JpYmUoKGNhdGVnb3J5OiBIb2xkaW5nVHlwZUNhdGVnb3J5RW51bSkgPT4ge1xuICAgICAgdGhpcy5nZXQoJ2V4Y2hhbmdlSWQnKS5zZXRWYWx1ZShcbiAgICAgICAgY2F0ZWdvcnkgPT09IEhvbGRpbmdUeXBlQ2F0ZWdvcnlFbnVtLkNSWVBUTyA/IEhvbGRpbmdUeXBlRXhjaGFuZ2VMaXN0RW51bS5DQyA6IEhvbGRpbmdUeXBlRXhjaGFuZ2VMaXN0RW51bS5BVVxuICAgICAgKTtcbiAgICB9KTtcbiAgfVxuXG4gIHN1Ym1pdCgpOiBIb2xkaW5nVHJhZGVJbXBvcnQge1xuICAgIC8vIEBUT0RPIFR5cGVFcnJvcjogRmFpbGVkIHRvIGNvbnN0cnVjdCAnRmlsZSc6IDIgYXJndW1lbnRzIHJlcXVpcmVkLCBidXQgb25seSAwIHByZXNlbnQuXG4gICAgcmV0dXJuIHN1cGVyLnN1Ym1pdCh7IGZpbGU6IG51bGwgfSk7XG4gIH1cbn1cbiJdfQ==
@@ -1,6 +1,6 @@
1
+ export * from './holding-trade';
1
2
  export * from './holding-sale.form';
2
3
  export * from './holding-type.form';
3
- export * from './holding.form';
4
4
  export * from './holding-reinvest.form';
5
- export * from './holding-import.form';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZm9ybXMvaG9sZGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLHlCQUF5QixDQUFDO0FBQ3hDLGNBQWMsdUJBQXVCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2hvbGRpbmctc2FsZS5mb3JtJztcbmV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy10eXBlLmZvcm0nO1xuZXhwb3J0ICogZnJvbSAnLi9ob2xkaW5nLmZvcm0nO1xuZXhwb3J0ICogZnJvbSAnLi9ob2xkaW5nLXJlaW52ZXN0LmZvcm0nO1xuZXhwb3J0ICogZnJvbSAnLi9ob2xkaW5nLWltcG9ydC5mb3JtJztcbiJdfQ==
5
+ export * from './holding-trade-import.form';
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZm9ybXMvaG9sZGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLHlCQUF5QixDQUFDO0FBQ3hDLGNBQWMsNkJBQTZCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2hvbGRpbmctdHJhZGUnO1xuZXhwb3J0ICogZnJvbSAnLi9ob2xkaW5nLXNhbGUuZm9ybSc7XG5leHBvcnQgKiBmcm9tICcuL2hvbGRpbmctdHlwZS5mb3JtJztcbmV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy1yZWludmVzdC5mb3JtJztcbmV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy10cmFkZS1pbXBvcnQuZm9ybSc7XG4iXX0=