taxtank-core 0.7.0 → 0.8.0

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 (59) hide show
  1. package/bundles/taxtank-core.umd.js +193 -158
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/collection.js +7 -1
  4. package/esm2015/lib/collections/property/property.collection.js +2 -5
  5. package/esm2015/lib/db/Enums/property/property-share-access.enum.js +6 -0
  6. package/esm2015/lib/db/Enums/property/property-share-status.enum.js +7 -0
  7. package/esm2015/lib/db/Enums/user-event-type-client-type.enum.js +9 -9
  8. package/esm2015/lib/db/Models/property/property-sale/property-sale.js +1 -1
  9. package/esm2015/lib/db/Models/property/property-sale/tax-exemption.js +1 -1
  10. package/esm2015/lib/db/Models/property/property-share.js +3 -0
  11. package/esm2015/lib/db/Models/property/property.js +1 -1
  12. package/esm2015/lib/db/Models/user.js +1 -1
  13. package/esm2015/lib/models/depreciation/depreciation-lvp-rate.enum.js +6 -0
  14. package/esm2015/lib/models/depreciation/depreciation.js +6 -3
  15. package/esm2015/lib/models/endpoint/endpoints.const.js +4 -4
  16. package/esm2015/lib/models/event/app-event-type.enum.js +2 -2
  17. package/esm2015/lib/models/notification/notification.js +3 -3
  18. package/esm2015/lib/models/pdf/pdf-config.js +11 -3
  19. package/esm2015/lib/models/property/property-sale/property-sale.js +1 -1
  20. package/esm2015/lib/models/property/{property-owner.js → property-share.js} +15 -15
  21. package/esm2015/lib/models/property/property.js +12 -10
  22. package/esm2015/lib/models/property/share-filter-options.enum.js +11 -0
  23. package/esm2015/lib/services/bank/bank-account.service.js +2 -2
  24. package/esm2015/lib/services/depreciation/depreciation.service.js +2 -2
  25. package/esm2015/lib/services/pdf/pdf.service.js +26 -6
  26. package/esm2015/lib/services/property/property-share/property-share.service.js +115 -0
  27. package/esm2015/lib/services/property/property.service.js +6 -6
  28. package/esm2015/public-api.js +8 -6
  29. package/fesm2015/taxtank-core.js +164 -129
  30. package/fesm2015/taxtank-core.js.map +1 -1
  31. package/lib/collections/collection.d.ts +4 -0
  32. package/lib/collections/property/property.collection.d.ts +1 -4
  33. package/lib/db/Enums/property/property-share-access.enum.d.ts +4 -0
  34. package/lib/db/Enums/property/{property-owner-status.enum.d.ts → property-share-status.enum.d.ts} +1 -1
  35. package/lib/db/Enums/user-event-type-client-type.enum.d.ts +8 -8
  36. package/lib/db/Models/property/property-sale/property-sale.d.ts +4 -3
  37. package/lib/db/Models/property/property-sale/tax-exemption.d.ts +1 -0
  38. package/lib/db/Models/property/{property-owner.d.ts → property-share.d.ts} +6 -6
  39. package/lib/db/Models/property/property.d.ts +2 -2
  40. package/lib/db/Models/user.d.ts +2 -2
  41. package/lib/models/depreciation/depreciation-lvp-rate.enum.d.ts +4 -0
  42. package/lib/models/depreciation/depreciation.d.ts +1 -0
  43. package/lib/models/event/app-event-type.enum.d.ts +1 -1
  44. package/lib/models/property/{property-owner.d.ts → property-share.d.ts} +3 -3
  45. package/lib/models/property/property.d.ts +6 -5
  46. package/lib/models/property/share-filter-options.enum.d.ts +9 -0
  47. package/lib/services/pdf/pdf.service.d.ts +1 -0
  48. package/lib/services/property/property-share/property-share.service.d.ts +44 -0
  49. package/lib/services/property/property.service.d.ts +3 -3
  50. package/package.json +1 -1
  51. package/public-api.d.ts +7 -5
  52. package/esm2015/lib/db/Enums/property/property-owner-access.enum.js +0 -6
  53. package/esm2015/lib/db/Enums/property/property-owner-status.enum.js +0 -7
  54. package/esm2015/lib/db/Models/property/property-owner.js +0 -3
  55. package/esm2015/lib/models/property/ownership-filter-options.enum.js +0 -10
  56. package/esm2015/lib/services/property/property-owner/property-owner.service.js +0 -123
  57. package/lib/db/Enums/property/property-owner-access.enum.d.ts +0 -4
  58. package/lib/models/property/ownership-filter-options.enum.d.ts +0 -8
  59. package/lib/services/property/property-owner/property-owner.service.d.ts +0 -52
@@ -895,9 +895,9 @@
895
895
  PROPERTIES_CATEGORIES_POST: new Endpoint('POST', '\\/properties\\/categories'),
896
896
  PROPERTIES_CATEGORY_MOVEMENTS_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/category-movements'),
897
897
  PROPERTIES_CATEGORY_MOVEMENTS_PUT: new Endpoint('PUT', '\\/properties\\/\\d+\\/category-movements\\/\\d+'),
898
- PROPERTIES_CO_OWNERS_PUT: new Endpoint('PUT', '\\/properties\\/co-owners\\/\\d+'),
899
- PROPERTIES_CO_OWNERS_GET: new Endpoint('GET', '\\/properties\\/co-owners'),
900
- PROPERTIES_CO_OWNERS_POST: new Endpoint('POST', '\\/properties\\/co-owners'),
898
+ PROPERTIES_SHARES_PUT: new Endpoint('PUT', '\\/properties\\/shares\\/\\d+'),
899
+ PROPERTIES_SHARES_GET: new Endpoint('GET', '\\/properties\\/shares'),
900
+ PROPERTIES_SHARES_POST: new Endpoint('POST', '\\/properties\\/shares'),
901
901
  PROPERTIES_DEACTIVATE_PUT: new Endpoint('PUT', '\\/properties\\/\\d+\\/deactivate'),
902
902
  PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_GET: new Endpoint('GET', '\\/properties\\/\\d+\\/depreciation-capital-projects'),
903
903
  PROPERTIES_DEPRECIATION_CAPITAL_PROJECT_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/depreciation-capital-projects'),
@@ -1283,6 +1283,12 @@
1283
1283
  Collection.prototype.toArray = function () {
1284
1284
  return __spreadArray([], __read(this.items));
1285
1285
  };
1286
+ /**
1287
+ * Filter items by specific provided callback
1288
+ */
1289
+ Collection.prototype.filter = function (callback) {
1290
+ return new Collection(this.items.filter(callback));
1291
+ };
1286
1292
  Object.defineProperty(Collection.prototype, "first", {
1287
1293
  get: function () {
1288
1294
  return first__default["default"](this.items);
@@ -2348,10 +2354,7 @@
2348
2354
  PropertyCollection.prototype.getActiveProperties = function () {
2349
2355
  return new PropertyCollection(this.items.filter(function (property) { return property.isActive; }));
2350
2356
  };
2351
- /**
2352
- * Get new property collection filtered by owner
2353
- */
2354
- PropertyCollection.prototype.getOwnProperties = function () {
2357
+ PropertyCollection.prototype.getCreatedProperties = function () {
2355
2358
  return new PropertyCollection(this.items.filter(function (property) { return property.isOwn(); }));
2356
2359
  };
2357
2360
  /**
@@ -3285,18 +3288,18 @@
3285
3288
  PropertyDepreciationCalculationEnum[PropertyDepreciationCalculationEnum["DIMINISHING"] = 2] = "DIMINISHING";
3286
3289
  })(exports.PropertyDepreciationCalculationEnum || (exports.PropertyDepreciationCalculationEnum = {}));
3287
3290
 
3288
- exports.PropertyOwnerAccessEnum = void 0;
3289
- (function (PropertyOwnerAccessEnum) {
3290
- PropertyOwnerAccessEnum[PropertyOwnerAccessEnum["VIEW"] = 1] = "VIEW";
3291
- PropertyOwnerAccessEnum[PropertyOwnerAccessEnum["EDIT"] = 2] = "EDIT";
3292
- })(exports.PropertyOwnerAccessEnum || (exports.PropertyOwnerAccessEnum = {}));
3291
+ exports.PropertyShareAccessEnum = void 0;
3292
+ (function (PropertyShareAccessEnum) {
3293
+ PropertyShareAccessEnum[PropertyShareAccessEnum["VIEW"] = 1] = "VIEW";
3294
+ PropertyShareAccessEnum[PropertyShareAccessEnum["EDIT"] = 2] = "EDIT";
3295
+ })(exports.PropertyShareAccessEnum || (exports.PropertyShareAccessEnum = {}));
3293
3296
 
3294
- exports.PropertyOwnerStatusEnum = void 0;
3295
- (function (PropertyOwnerStatusEnum) {
3296
- PropertyOwnerStatusEnum[PropertyOwnerStatusEnum["PENDING"] = 1] = "PENDING";
3297
- PropertyOwnerStatusEnum[PropertyOwnerStatusEnum["APPROVED"] = 2] = "APPROVED";
3298
- PropertyOwnerStatusEnum[PropertyOwnerStatusEnum["REJECTED"] = 3] = "REJECTED";
3299
- })(exports.PropertyOwnerStatusEnum || (exports.PropertyOwnerStatusEnum = {}));
3297
+ exports.PropertyShareStatusEnum = void 0;
3298
+ (function (PropertyShareStatusEnum) {
3299
+ PropertyShareStatusEnum[PropertyShareStatusEnum["PENDING"] = 1] = "PENDING";
3300
+ PropertyShareStatusEnum[PropertyShareStatusEnum["APPROVED"] = 2] = "APPROVED";
3301
+ PropertyShareStatusEnum[PropertyShareStatusEnum["REJECTED"] = 3] = "REJECTED";
3302
+ })(exports.PropertyShareStatusEnum || (exports.PropertyShareStatusEnum = {}));
3300
3303
 
3301
3304
  exports.RegistrationInviteStatusEnum = void 0;
3302
3305
  (function (RegistrationInviteStatusEnum) {
@@ -3519,14 +3522,14 @@
3519
3522
  UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["FIRM_INVITE_ACCEPTED"] = 2012] = "FIRM_INVITE_ACCEPTED";
3520
3523
  UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["FIRM_INVITE_REJECTED"] = 2013] = "FIRM_INVITE_REJECTED";
3521
3524
  UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["FIRM_INVITE_REGISTERED"] = 2014] = "FIRM_INVITE_REGISTERED";
3522
- UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE"] = 2020] = "CO_OWNER_INVITE";
3523
- UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE_TO_REGISTER"] = 2021] = "CO_OWNER_INVITE_TO_REGISTER";
3524
- UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE_ACCEPTED"] = 2022] = "CO_OWNER_INVITE_ACCEPTED";
3525
- UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE_REJECTED"] = 2023] = "CO_OWNER_INVITE_REJECTED";
3526
- UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE_REGISTERED"] = 2024] = "CO_OWNER_INVITE_REGISTERED";
3527
- UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_CHANGE_REQUESTED"] = 2025] = "CO_OWNER_CHANGE_REQUESTED";
3528
- UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_CHANGE_ACCEPTED"] = 2026] = "CO_OWNER_CHANGE_ACCEPTED";
3529
- UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_CHANGE_REJECTED"] = 2027] = "CO_OWNER_CHANGE_REJECTED";
3525
+ UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE"] = 2020] = "PROPERTY_SHARE_INVITE";
3526
+ UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE_TO_REGISTER"] = 2021] = "PROPERTY_SHARE_INVITE_TO_REGISTER";
3527
+ UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE_ACCEPTED"] = 2022] = "PROPERTY_SHARE_INVITE_ACCEPTED";
3528
+ UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE_REJECTED"] = 2023] = "PROPERTY_SHARE_INVITE_REJECTED";
3529
+ UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE_REGISTERED"] = 2024] = "PROPERTY_SHARE_INVITE_REGISTERED";
3530
+ UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_CHANGE_REQUESTED"] = 2025] = "PROPERTY_SHARE_CHANGE_REQUESTED";
3531
+ UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_CHANGE_ACCEPTED"] = 2026] = "PROPERTY_SHARE_CHANGE_ACCEPTED";
3532
+ UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_CHANGE_REJECTED"] = 2027] = "PROPERTY_SHARE_CHANGE_REJECTED";
3530
3533
  UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["BASIQ_NEW_ACCOUNTS"] = 2030] = "BASIQ_NEW_ACCOUNTS";
3531
3534
  UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["BASIQ_FIRST_IMPORT_COMPLETE"] = 2031] = "BASIQ_FIRST_IMPORT_COMPLETE";
3532
3535
  UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["BASIQ_AUTHORIZATION_FAIL"] = 2032] = "BASIQ_AUTHORIZATION_FAIL";
@@ -3601,6 +3604,18 @@
3601
3604
  VehicleLogbookPurposeEnum[VehicleLogbookPurposeEnum["PERSONAL"] = 2] = "PERSONAL";
3602
3605
  })(exports.VehicleLogbookPurposeEnum || (exports.VehicleLogbookPurposeEnum = {}));
3603
3606
 
3607
+ exports.TaxExemptionEnum = void 0;
3608
+ (function (TaxExemptionEnum) {
3609
+ TaxExemptionEnum[TaxExemptionEnum["ONE_YEAR_RULE"] = 1] = "ONE_YEAR_RULE";
3610
+ // principle place of residence
3611
+ TaxExemptionEnum[TaxExemptionEnum["PPR"] = 2] = "PPR";
3612
+ TaxExemptionEnum[TaxExemptionEnum["SIX_YEARS_RULE"] = 3] = "SIX_YEARS_RULE";
3613
+ TaxExemptionEnum[TaxExemptionEnum["INVESTMENT_TO_PPR"] = 4] = "INVESTMENT_TO_PPR";
3614
+ TaxExemptionEnum[TaxExemptionEnum["PPR_TO_INVESTMENT"] = 5] = "PPR_TO_INVESTMENT";
3615
+ TaxExemptionEnum[TaxExemptionEnum["TRANSFER"] = 6] = "TRANSFER";
3616
+ TaxExemptionEnum[TaxExemptionEnum["OTHER"] = 7] = "OTHER";
3617
+ })(exports.TaxExemptionEnum || (exports.TaxExemptionEnum = {}));
3618
+
3604
3619
  exports.TaxExemptionMetadataEnum = void 0;
3605
3620
  (function (TaxExemptionMetadataEnum) {
3606
3621
  // principle place of residence
@@ -4530,18 +4545,6 @@
4530
4545
  classTransformer.Type(function () { return Date; })
4531
4546
  ], PropertyCategoryMovement.prototype, "toDate", void 0);
4532
4547
 
4533
- var TaxExemptionEnum;
4534
- (function (TaxExemptionEnum) {
4535
- TaxExemptionEnum[TaxExemptionEnum["ONE_YEAR_RULE"] = 1] = "ONE_YEAR_RULE";
4536
- // principle place of residence
4537
- TaxExemptionEnum[TaxExemptionEnum["PPR"] = 2] = "PPR";
4538
- TaxExemptionEnum[TaxExemptionEnum["SIX_YEARS_RULE"] = 3] = "SIX_YEARS_RULE";
4539
- TaxExemptionEnum[TaxExemptionEnum["INVESTMENT_TO_PPR"] = 4] = "INVESTMENT_TO_PPR";
4540
- TaxExemptionEnum[TaxExemptionEnum["PPR_TO_INVESTMENT"] = 5] = "PPR_TO_INVESTMENT";
4541
- TaxExemptionEnum[TaxExemptionEnum["TRANSFER"] = 6] = "TRANSFER";
4542
- TaxExemptionEnum[TaxExemptionEnum["OTHER"] = 7] = "OTHER";
4543
- })(TaxExemptionEnum || (TaxExemptionEnum = {}));
4544
-
4545
4548
  var PropertyCategoryListEnum;
4546
4549
  (function (PropertyCategoryListEnum) {
4547
4550
  PropertyCategoryListEnum[PropertyCategoryListEnum["OWNER_OCCUPIED"] = 3] = "OWNER_OCCUPIED";
@@ -4671,17 +4674,17 @@
4671
4674
  });
4672
4675
  Object.defineProperty(Property.prototype, "myShare", {
4673
4676
  get: function () {
4674
- return this.owners.find(function (owner) { return owner.user.id === +localStorage.getItem('userId'); });
4677
+ return this.shares.find(function (share) { return share.user.id === +localStorage.getItem('userId'); });
4675
4678
  },
4676
4679
  enumerable: false,
4677
4680
  configurable: true
4678
4681
  });
4679
- Object.defineProperty(Property.prototype, "ownershipClaimPercent", {
4682
+ Object.defineProperty(Property.prototype, "shareClaimPercent", {
4680
4683
  /**
4681
- * exact claim percent includes ownership
4684
+ * exact claim including share percent
4682
4685
  */
4683
4686
  get: function () {
4684
- return this.ownershipPercent * this.claimPercent / 100;
4687
+ return this.sharePercent * this.claimPercent / 100;
4685
4688
  },
4686
4689
  enumerable: false,
4687
4690
  configurable: true
@@ -4695,9 +4698,9 @@
4695
4698
  enumerable: false,
4696
4699
  configurable: true
4697
4700
  });
4698
- Object.defineProperty(Property.prototype, "ownershipPercent", {
4701
+ Object.defineProperty(Property.prototype, "sharePercent", {
4699
4702
  get: function () {
4700
- return this.myShare.ownershipPercent;
4703
+ return this.myShare.percent;
4701
4704
  },
4702
4705
  enumerable: false,
4703
4706
  configurable: true
@@ -4723,12 +4726,13 @@
4723
4726
  };
4724
4727
  Object.defineProperty(Property.prototype, "isShared", {
4725
4728
  get: function () {
4726
- return this.owners.length > 1;
4729
+ return this.shares.length > 1;
4727
4730
  },
4728
4731
  enumerable: false,
4729
4732
  configurable: true
4730
4733
  });
4731
4734
  /**
4735
+ * @TODO consider to move methods related with propertySale to separated class, since used just in one module yet
4732
4736
  * purchase costs - claimed costs, except `ppr to investment` exemption,
4733
4737
  * in that case it's equal to market value, when property became an investment property
4734
4738
  */
@@ -4743,7 +4747,6 @@
4743
4747
  * gross capital gain tax: sale costs - cost base
4744
4748
  */
4745
4749
  Property.prototype.calculateCGT = function (sale) {
4746
- console.log(sale.price, sale.saleCostsTotalAmount, sale.capitalLoss, this.calculateCostBase(sale));
4747
4750
  return sale.price - sale.saleCostsTotalAmount - sale.capitalLoss - this.calculateCostBase(sale);
4748
4751
  };
4749
4752
  /**
@@ -4762,10 +4765,10 @@
4762
4765
  switch (true) {
4763
4766
  // exemption for main residence properties
4764
4767
  case this.category.id === PropertyCategoryListEnum.OWNER_OCCUPIED:
4765
- return TaxExemptionEnum.PPR;
4768
+ return exports.TaxExemptionEnum.PPR;
4766
4769
  // exemption for investment properties owned for at least one year
4767
4770
  case this.getOwnershipDuration(sale, 'years') >= 1:
4768
- return TaxExemptionEnum.ONE_YEAR_RULE;
4771
+ return exports.TaxExemptionEnum.ONE_YEAR_RULE;
4769
4772
  default:
4770
4773
  return null;
4771
4774
  }
@@ -4778,20 +4781,22 @@
4778
4781
  var metadata = new PropertySaleTaxExemptionMetadataCollection(sale.taxExemptionMetadata);
4779
4782
  switch ((_a = sale.taxExemption) === null || _a === void 0 ? void 0 : _a.id) {
4780
4783
  // 50% exemption for investments owned for at least one year
4781
- case TaxExemptionEnum.ONE_YEAR_RULE:
4784
+ case exports.TaxExemptionEnum.ONE_YEAR_RULE:
4782
4785
  return 0.5;
4783
4786
  // investment property become main residence (exemption for main residence ownership duration)
4784
- case TaxExemptionEnum.INVESTMENT_TO_PPR:
4787
+ case exports.TaxExemptionEnum.INVESTMENT_TO_PPR:
4785
4788
  var ownershipDays = this.getOwnershipDuration(sale);
4786
4789
  return (ownershipDays - metadata.getPPRDays()) / ownershipDays;
4787
4790
  // main residence become investment (exemption for home office percent usage)
4788
- case TaxExemptionEnum.PPR_TO_INVESTMENT:
4789
- return metadata.getClaimPercent() / 100;
4791
+ case exports.TaxExemptionEnum.PPR_TO_INVESTMENT:
4792
+ // 1 year CGT discount can still apply (on the income producing % if used for 12 months or more)
4793
+ var ratio = this.getOwnershipDuration(sale, 'years') >= 1 ? 0.5 : 1;
4794
+ return metadata.getClaimPercent() / 100 * ratio;
4790
4795
  // full exemption
4791
- case TaxExemptionEnum.PPR:
4792
- case TaxExemptionEnum.SIX_YEARS_RULE:
4793
- case TaxExemptionEnum.TRANSFER:
4794
- case TaxExemptionEnum.OTHER:
4796
+ case exports.TaxExemptionEnum.PPR:
4797
+ case exports.TaxExemptionEnum.SIX_YEARS_RULE:
4798
+ case exports.TaxExemptionEnum.TRANSFER:
4799
+ case exports.TaxExemptionEnum.OTHER:
4795
4800
  return 0;
4796
4801
  // no exemption
4797
4802
  default:
@@ -5599,7 +5604,7 @@
5599
5604
  * @TODO new FinancialYear(this.writeOffDate) === new FinancialYear()
5600
5605
  */
5601
5606
  Depreciation.prototype.isLowValuePool = function () {
5602
- return this.isAsset && !this.isWrittenOff() &&
5607
+ return this.isAsset &&
5603
5608
  this.calculation === exports.DepreciationCalculationEnum.DIMINISHING &&
5604
5609
  this.amount > Depreciation.WRITTEN_OFF_THRESHOLD &&
5605
5610
  this.amount <= Depreciation.LOW_VALUE_POOL_THRESHOLD;
@@ -5693,7 +5698,7 @@
5693
5698
  * Create a new transaction from current depreciation
5694
5699
  */
5695
5700
  Depreciation.prototype.toTransaction = function () {
5696
- return classTransformer.plainToClass(Transaction, this);
5701
+ return classTransformer.plainToClass(Transaction, Object.assign({}, this, { amount: this.getCurrentYearForecastAmount() }));
5697
5702
  };
5698
5703
  return Depreciation;
5699
5704
  }(Depreciation$1));
@@ -5705,6 +5710,9 @@
5705
5710
  __decorate([
5706
5711
  classTransformer.Type(function () { return Date; })
5707
5712
  ], Depreciation.prototype, "date", void 0);
5713
+ __decorate([
5714
+ classTransformer.Type(function () { return Date; })
5715
+ ], Depreciation.prototype, "lowValuePoolDate", void 0);
5708
5716
  __decorate([
5709
5717
  classTransformer.Type(function () { return Date; })
5710
5718
  ], Depreciation.prototype, "writeOffManualDate", void 0);
@@ -6696,6 +6704,12 @@
6696
6704
  return DataTableColumn;
6697
6705
  }());
6698
6706
 
6707
+ exports.DepreciationLvpRateEnum = void 0;
6708
+ (function (DepreciationLvpRateEnum) {
6709
+ DepreciationLvpRateEnum[DepreciationLvpRateEnum["FIRST_YEAR"] = 0.1875] = "FIRST_YEAR";
6710
+ DepreciationLvpRateEnum[DepreciationLvpRateEnum["DEFAULT"] = 0.375] = "DEFAULT";
6711
+ })(exports.DepreciationLvpRateEnum || (exports.DepreciationLvpRateEnum = {}));
6712
+
6699
6713
  exports.DepreciationGroupEnum = void 0;
6700
6714
  (function (DepreciationGroupEnum) {
6701
6715
  DepreciationGroupEnum[DepreciationGroupEnum["BUILDING_IMPROVEMENTS"] = 0] = "BUILDING_IMPROVEMENTS";
@@ -6919,7 +6933,7 @@
6919
6933
  AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 22] = "PROPERTY_MOVEMENT_CREATED";
6920
6934
  AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 23] = "PROPERTY_MOVEMENT_UPDATED";
6921
6935
  AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 24] = "PROPERTY_MOVEMENT_DELETED";
6922
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_OWNER_UPDATED"] = 25] = "PROPERTY_OWNER_UPDATED";
6936
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SHARE_UPDATED"] = 25] = "PROPERTY_SHARE_UPDATED";
6923
6937
  AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 26] = "PROPERTY_SUBSCRIPTION_ADDED";
6924
6938
  AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 27] = "PROPERTY_SUBSCRIPTION_DELETED";
6925
6939
  AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 28] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
@@ -7209,8 +7223,8 @@
7209
7223
  // return '/client/bank-feeds';
7210
7224
  // case NOTIFICATION_EVENT_TYPES.clientInvite.includes(obj.eventType):
7211
7225
  // return '/client/users/invitations';
7212
- // case NOTIFICATION_EVENT_TYPES.propertyOwner.includes(obj.eventType):
7213
- // return '/client/users/co-owners';
7226
+ // case NOTIFICATION_EVENT_TYPES.propertyShare.includes(obj.eventType):
7227
+ // return '/client/users/shares';
7214
7228
  // case NOTIFICATION_EVENT_TYPES.employeeInviteFromClient.includes(obj.eventType):
7215
7229
  // return '/firm/clients/invites';
7216
7230
  default:
@@ -7300,14 +7314,15 @@
7300
7314
  ];
7301
7315
 
7302
7316
  /**
7317
+ * @TODO used only on dashboard, move from tt-core
7303
7318
  * Enum with properties ownership filter options
7304
7319
  */
7305
- exports.OwnershipFilterOptionsEnum = void 0;
7306
- (function (OwnershipFilterOptionsEnum) {
7307
- OwnershipFilterOptionsEnum[OwnershipFilterOptionsEnum["ALL_PROPERTIES"] = 1] = "ALL_PROPERTIES";
7308
- OwnershipFilterOptionsEnum[OwnershipFilterOptionsEnum["OWN_PROPERTIES"] = 2] = "OWN_PROPERTIES";
7309
- OwnershipFilterOptionsEnum[OwnershipFilterOptionsEnum["SHARED_PROPERTIES"] = 3] = "SHARED_PROPERTIES";
7310
- })(exports.OwnershipFilterOptionsEnum || (exports.OwnershipFilterOptionsEnum = {}));
7320
+ exports.ShareFilterOptionsEnum = void 0;
7321
+ (function (ShareFilterOptionsEnum) {
7322
+ ShareFilterOptionsEnum[ShareFilterOptionsEnum["ALL"] = 1] = "ALL";
7323
+ ShareFilterOptionsEnum[ShareFilterOptionsEnum["CREATED"] = 2] = "CREATED";
7324
+ ShareFilterOptionsEnum[ShareFilterOptionsEnum["SHARED"] = 3] = "SHARED";
7325
+ })(exports.ShareFilterOptionsEnum || (exports.ShareFilterOptionsEnum = {}));
7311
7326
 
7312
7327
  /**
7313
7328
  * class contains equity information for passed financial year
@@ -7499,35 +7514,35 @@
7499
7514
  return PropertyEquityChartData;
7500
7515
  }());
7501
7516
 
7502
- var PropertyOwner$1 = /** @class */ (function () {
7503
- function PropertyOwner() {
7517
+ var PropertyShare$1 = /** @class */ (function () {
7518
+ function PropertyShare() {
7504
7519
  }
7505
- return PropertyOwner;
7520
+ return PropertyShare;
7506
7521
  }());
7507
7522
 
7508
- var PropertyOwner = /** @class */ (function (_super) {
7509
- __extends(PropertyOwner, _super);
7510
- function PropertyOwner() {
7523
+ var PropertyShare = /** @class */ (function (_super) {
7524
+ __extends(PropertyShare, _super);
7525
+ function PropertyShare() {
7511
7526
  return _super !== null && _super.apply(this, arguments) || this;
7512
7527
  }
7513
- PropertyOwner.prototype.isAccepted = function () {
7514
- return this.status === exports.PropertyOwnerStatusEnum.APPROVED;
7528
+ PropertyShare.prototype.isAccepted = function () {
7529
+ return this.status === exports.PropertyShareStatusEnum.APPROVED;
7515
7530
  };
7516
- PropertyOwner.prototype.isPending = function () {
7517
- return this.status === exports.PropertyOwnerStatusEnum.PENDING;
7531
+ PropertyShare.prototype.isPending = function () {
7532
+ return this.status === exports.PropertyShareStatusEnum.PENDING;
7518
7533
  };
7519
- PropertyOwner.prototype.isRejected = function () {
7520
- return this.status === exports.PropertyOwnerStatusEnum.REJECTED;
7534
+ PropertyShare.prototype.isRejected = function () {
7535
+ return this.status === exports.PropertyShareStatusEnum.REJECTED;
7521
7536
  };
7522
- Object.defineProperty(PropertyOwner.prototype, "statusName", {
7537
+ Object.defineProperty(PropertyShare.prototype, "statusName", {
7523
7538
  get: function () {
7524
7539
  var _a;
7525
- return (_a = exports.PropertyOwnerStatusEnum[this.status]) === null || _a === void 0 ? void 0 : _a.toLowerCase();
7540
+ return (_a = exports.PropertyShareStatusEnum[this.status]) === null || _a === void 0 ? void 0 : _a.toLowerCase();
7526
7541
  },
7527
7542
  enumerable: false,
7528
7543
  configurable: true
7529
7544
  });
7530
- Object.defineProperty(PropertyOwner.prototype, "fullName", {
7545
+ Object.defineProperty(PropertyShare.prototype, "userName", {
7531
7546
  /**
7532
7547
  * Return full user name if user is already registered.
7533
7548
  * Otherwise - return first name from invitation
@@ -7538,29 +7553,29 @@
7538
7553
  enumerable: false,
7539
7554
  configurable: true
7540
7555
  });
7541
- return PropertyOwner;
7542
- }(PropertyOwner$1));
7556
+ return PropertyShare;
7557
+ }(PropertyShare$1));
7543
7558
  __decorate([
7544
7559
  classTransformer.Type(function () { return Date; })
7545
- ], PropertyOwner.prototype, "fromDate", void 0);
7560
+ ], PropertyShare.prototype, "fromDate", void 0);
7546
7561
  __decorate([
7547
7562
  classTransformer.Type(function () { return Date; })
7548
- ], PropertyOwner.prototype, "toDate", void 0);
7563
+ ], PropertyShare.prototype, "toDate", void 0);
7549
7564
  __decorate([
7550
7565
  classTransformer.Type(function () { return User; })
7551
- ], PropertyOwner.prototype, "user", void 0);
7566
+ ], PropertyShare.prototype, "user", void 0);
7552
7567
  __decorate([
7553
7568
  classTransformer.Type(function () { return RegistrationInvite; })
7554
- ], PropertyOwner.prototype, "invite", void 0);
7569
+ ], PropertyShare.prototype, "invite", void 0);
7555
7570
  __decorate([
7556
7571
  classTransformer.Type(function () { return Property; })
7557
- ], PropertyOwner.prototype, "property", void 0);
7572
+ ], PropertyShare.prototype, "property", void 0);
7558
7573
  __decorate([
7559
7574
  classTransformer.Transform(function (_b) {
7560
7575
  var obj = _b.obj;
7561
7576
  return obj.user ? obj.user.email : obj.invite.email;
7562
7577
  })
7563
- ], PropertyOwner.prototype, "email", void 0);
7578
+ ], PropertyShare.prototype, "email", void 0);
7564
7579
 
7565
7580
  var PropertySale$1 = /** @class */ (function () {
7566
7581
  function PropertySale() {
@@ -8530,7 +8545,7 @@
8530
8545
  BankAccountService.prototype.listenToEventDispatcherChanges = function () {
8531
8546
  var _this = this;
8532
8547
  this.eventDispatcherService.on([
8533
- exports.AppEventTypeEnum.PROPERTY_OWNER_UPDATED,
8548
+ exports.AppEventTypeEnum.PROPERTY_SHARE_UPDATED,
8534
8549
  exports.AppEventTypeEnum.LOAN_PAYOUT_UPDATED,
8535
8550
  exports.AppEventTypeEnum.BANK_CONNECTION_ADDED
8536
8551
  ]).subscribe(function () {
@@ -9752,7 +9767,7 @@
9752
9767
  */
9753
9768
  DepreciationService.prototype.listenToUpdatedLoan = function () {
9754
9769
  var _this = this;
9755
- this.eventDispatcherService.on([exports.AppEventTypeEnum.LOAN_UPDATED, exports.AppEventTypeEnum.PROPERTY_OWNER_UPDATED]).subscribe(function () {
9770
+ this.eventDispatcherService.on([exports.AppEventTypeEnum.LOAN_UPDATED, exports.AppEventTypeEnum.PROPERTY_SHARE_UPDATED]).subscribe(function () {
9756
9771
  _this.fetch().subscribe();
9757
9772
  });
9758
9773
  };
@@ -10677,8 +10692,16 @@
10677
10692
  fontWeight: 'bold',
10678
10693
  positionX: 14,
10679
10694
  positionY: 10,
10680
- fillColor: 255,
10681
- textColor: 0
10695
+ colorWhite: '#ffffff',
10696
+ colorBlack: '#000000',
10697
+ colorPrimary: '#00b7f0'
10698
+ },
10699
+ logo: {
10700
+ src: '/assets/img/icons/logo.png',
10701
+ width: 30,
10702
+ height: 7,
10703
+ positionX: 168,
10704
+ positionY: 6
10682
10705
  },
10683
10706
  // coords for file section title (group, table, e.t.c.)
10684
10707
  contentTitleCoords: {
@@ -10717,20 +10740,35 @@
10717
10740
  PdfService.prototype.generateFromTables = function (tables, title) {
10718
10741
  var pdf = new jsPDF__default["default"]();
10719
10742
  this.setDocumentTitle(pdf, title);
10743
+ this.setDocumentLogo(pdf);
10720
10744
  tables.forEach(function (table) {
10721
- var _a, _b;
10745
+ var _a;
10746
+ // Add table caption if not provided
10747
+ if (!table.caption) {
10748
+ table.createCaption();
10749
+ table.caption.innerText = '';
10750
+ }
10722
10751
  // coords of last table
10723
10752
  var lastTableCoords = pdf['lastAutoTable'].finalY || PDF_CONFIG.contentCoords.marginTop;
10724
- pdf.text((_a = table.caption) === null || _a === void 0 ? void 0 : _a.innerText, PDF_CONFIG.contentCoords.marginLeft, lastTableCoords + PDF_CONFIG.contentCoords.marginTop);
10753
+ pdf.text(table.caption.innerText, PDF_CONFIG.contentCoords.marginLeft, lastTableCoords + PDF_CONFIG.contentCoords.marginTop);
10725
10754
  // get caption height based on caption content height
10726
- var captionHeight = pdf.getTextDimensions(pdf.splitTextToSize((_b = table.caption) === null || _b === void 0 ? void 0 : _b.innerText, pdf.internal.pageSize.width)).h;
10755
+ var captionHeight = pdf.getTextDimensions(pdf.splitTextToSize((_a = table.caption) === null || _a === void 0 ? void 0 : _a.innerText, pdf.internal.pageSize.width)).h;
10727
10756
  // table options
10728
10757
  var options = {
10729
10758
  html: table,
10730
10759
  startY: lastTableCoords + captionHeight + PDF_CONFIG.contentTitleCoords.marginTop,
10760
+ headStyles: {
10761
+ fillColor: PDF_CONFIG.text.colorPrimary,
10762
+ },
10731
10763
  footStyles: {
10732
- fillColor: PDF_CONFIG.text.fillColor,
10733
- textColor: PDF_CONFIG.text.textColor
10764
+ fillColor: PDF_CONFIG.text.colorWhite,
10765
+ textColor: PDF_CONFIG.text.colorBlack
10766
+ },
10767
+ didParseCell: function (data) {
10768
+ // Align last column content to right
10769
+ if (data.table.columns.length > 1 && (data.column.index === data.table.columns.length - 1)) {
10770
+ data.cell.styles.halign = 'right';
10771
+ }
10734
10772
  }
10735
10773
  };
10736
10774
  autoTable__default["default"](pdf, options);
@@ -10742,6 +10780,11 @@
10742
10780
  .setFont(PDF_CONFIG.text.fontName, PDF_CONFIG.text.fontStyle, PDF_CONFIG.text.fontWeight)
10743
10781
  .text(title, PDF_CONFIG.text.positionX, PDF_CONFIG.text.positionY);
10744
10782
  };
10783
+ PdfService.prototype.setDocumentLogo = function (doc) {
10784
+ var logo = new Image();
10785
+ logo.src = PDF_CONFIG.logo.src;
10786
+ doc.addImage(logo, 'PNG', PDF_CONFIG.logo.positionX, PDF_CONFIG.logo.positionY, PDF_CONFIG.logo.width, PDF_CONFIG.logo.height);
10787
+ };
10745
10788
  /**
10746
10789
  * @Todo remove/refactor when all DataTable dependent methods will be cleared-up
10747
10790
  * Generate PDF file from provided data
@@ -10798,17 +10841,17 @@
10798
10841
  return _this;
10799
10842
  }
10800
10843
  PropertyService.prototype.listenEvents = function () {
10801
- this.listenCoOwnerInviteAccepted();
10844
+ this.listenShareInviteAccepted();
10802
10845
  this.listenServiceSubscriptionUpdated();
10803
10846
  // @TODO Alex: consider to refactor property movements logic similar to client-movements
10804
10847
  this.listenMovementsChanged();
10805
10848
  };
10806
10849
  /**
10807
- * Update cache when owner invitation accepted
10850
+ * Update cache when share invitation accepted
10808
10851
  */
10809
- PropertyService.prototype.listenCoOwnerInviteAccepted = function () {
10852
+ PropertyService.prototype.listenShareInviteAccepted = function () {
10810
10853
  var _this = this;
10811
- this.eventDispatcherService.on(exports.AppEventTypeEnum.PROPERTY_OWNER_UPDATED).subscribe(function () { return _this.resetCache(); });
10854
+ this.eventDispatcherService.on(exports.AppEventTypeEnum.PROPERTY_SHARE_UPDATED).subscribe(function () { return _this.resetCache(); });
10812
10855
  };
10813
10856
  /**
10814
10857
  * Update cache when user's service subscription is updated
@@ -10881,7 +10924,7 @@
10881
10924
  _this.updateCache();
10882
10925
  }));
10883
10926
  };
10884
- PropertyService.prototype.getByCoOwnerId = function (id) {
10927
+ PropertyService.prototype.getByShareId = function (id) {
10885
10928
  return this.get().pipe(operators.map(function (properties) {
10886
10929
  return properties.filter(function (property) { return property.user.id === id; });
10887
10930
  }));
@@ -11129,114 +11172,106 @@
11129
11172
  } });
11130
11173
 
11131
11174
  // @TODO check and improve logic during refactoring
11132
- var PropertyOwnerService = /** @class */ (function (_super) {
11133
- __extends(PropertyOwnerService, _super);
11134
- function PropertyOwnerService(http, eventDispatcherService, environment) {
11175
+ var PropertyShareService = /** @class */ (function (_super) {
11176
+ __extends(PropertyShareService, _super);
11177
+ function PropertyShareService(http, eventDispatcherService, environment) {
11135
11178
  var _this = _super.call(this, http, eventDispatcherService, environment) || this;
11136
11179
  _this.http = http;
11137
11180
  _this.eventDispatcherService = eventDispatcherService;
11138
11181
  _this.environment = environment;
11139
- // api url parameter for properties co-owners
11140
- _this.url = 'properties/co-owners';
11141
- _this.modelClass = PropertyOwner;
11182
+ // api url parameter for properties shares
11183
+ _this.url = 'properties/shares';
11184
+ _this.modelClass = PropertyShare;
11142
11185
  _this.listenEvents();
11143
11186
  return _this;
11144
11187
  }
11145
11188
  /**
11146
11189
  * Listen to Event Dispatcher events
11147
11190
  */
11148
- PropertyOwnerService.prototype.listenEvents = function () {
11191
+ PropertyShareService.prototype.listenEvents = function () {
11149
11192
  this.listenUserUpdated();
11150
11193
  };
11151
11194
  /**
11152
11195
  * Updated loan
11153
11196
  */
11154
- PropertyOwnerService.prototype.update = function (propertyOwner) {
11197
+ PropertyShareService.prototype.update = function (propertyShare) {
11155
11198
  var _this = this;
11156
- return this.http.put(this.environment.apiV2 + "/" + this.url + "/" + propertyOwner.id, propertyOwner)
11157
- .pipe(operators.map(function (updatedPropertyOwnerBase) {
11158
- var updatedPropertyOwner = classTransformer.plainToClass(PropertyOwner, updatedPropertyOwnerBase);
11199
+ return this.http.put(this.environment.apiV2 + "/" + this.url + "/" + propertyShare.id, propertyShare)
11200
+ .pipe(operators.map(function (updatedPropertyShareBase) {
11201
+ var updatedPropertyShare = classTransformer.plainToClass(PropertyShare, updatedPropertyShareBase);
11159
11202
  // if loan type is NOT vehicle - fire EventDispatcher event
11160
- _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.PROPERTY_OWNER_UPDATED, null));
11161
- replace(_this.cache, updatedPropertyOwner);
11203
+ _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.PROPERTY_SHARE_UPDATED, null));
11204
+ replace(_this.cache, updatedPropertyShare);
11162
11205
  _this.updateCache();
11163
- return updatedPropertyOwner;
11206
+ return updatedPropertyShare;
11164
11207
  }));
11165
11208
  };
11166
11209
  /**
11167
- * Re-invite property owner
11210
+ * Re-invite property share
11168
11211
  * @param share user to share property
11169
11212
  */
11170
- PropertyOwnerService.prototype.reinvite = function (share) {
11213
+ PropertyShareService.prototype.reinvite = function (share) {
11171
11214
  return this.http.post(this.environment.apiV2 + "/" + this.url + "/" + share.id + "/reinvite", {});
11172
11215
  };
11173
- /**
11174
- * Get incoming property owners list
11175
- */
11176
- PropertyOwnerService.prototype.getIncoming = function () {
11216
+ PropertyShareService.prototype.getIncoming = function () {
11177
11217
  return this.get()
11178
- .pipe(operators.map(function (propertyOwners) {
11179
- var propertyOwnersIncoming = [];
11180
- propertyOwners.forEach(function (propertyOwner) {
11218
+ .pipe(operators.map(function (propertyShares) {
11219
+ var propertySharesIncoming = [];
11220
+ propertyShares.forEach(function (propertyShare) {
11181
11221
  var _a;
11182
- if (((_a = propertyOwner.user) === null || _a === void 0 ? void 0 : _a.isLoggedIn()) && propertyOwner.isPending() && propertyOwner.property.user.id !== +localStorage.getItem('userId')) {
11183
- propertyOwnersIncoming.push(propertyOwner);
11222
+ if (((_a = propertyShare.user) === null || _a === void 0 ? void 0 : _a.isLoggedIn()) && propertyShare.isPending() && propertyShare.property.user.id !== +localStorage.getItem('userId')) {
11223
+ propertySharesIncoming.push(propertyShare);
11184
11224
  }
11185
11225
  });
11186
- return propertyOwnersIncoming;
11226
+ return propertySharesIncoming;
11187
11227
  }));
11188
11228
  };
11189
11229
  /**
11190
- * Get outcoming property owners list
11230
+ * Get outcoming property shares list
11191
11231
  */
11192
- PropertyOwnerService.prototype.getOutcoming = function () {
11232
+ PropertyShareService.prototype.getOutcoming = function () {
11193
11233
  var _this = this;
11194
- return this.get().pipe(operators.map(function (propertyOwners) {
11195
- return _this.filterOutcoming(propertyOwners);
11234
+ return this.get().pipe(operators.map(function (propertyShares) {
11235
+ return _this.filterOutcoming(propertyShares);
11196
11236
  }));
11197
11237
  };
11198
11238
  /**
11199
- * Filter outcoming property owners
11200
- * @param propertyOwners which should be filtered
11239
+ * Filter outcoming property shares
11201
11240
  */
11202
- PropertyOwnerService.prototype.filterOutcoming = function (propertyOwners) {
11203
- var propertyOwnersOutcoming = [];
11204
- propertyOwners.forEach(function (propertyOwner) {
11241
+ PropertyShareService.prototype.filterOutcoming = function (propertyShares) {
11242
+ var propertySharesOutcoming = [];
11243
+ propertyShares.forEach(function (propertyShare) {
11205
11244
  var _a;
11206
- if (!((_a = propertyOwner.user) === null || _a === void 0 ? void 0 : _a.isLoggedIn())) {
11207
- propertyOwnersOutcoming.push(propertyOwner);
11245
+ if (!((_a = propertyShare.user) === null || _a === void 0 ? void 0 : _a.isLoggedIn())) {
11246
+ propertySharesOutcoming.push(propertyShare);
11208
11247
  }
11209
11248
  });
11210
- return propertyOwnersOutcoming;
11249
+ return propertySharesOutcoming;
11211
11250
  };
11212
- /**
11213
- * Get list of co-owners filtered by property id
11214
- * @param propertyId
11215
- */
11216
- PropertyOwnerService.prototype.getByPropertyId = function (propertyId) {
11251
+ PropertyShareService.prototype.getByPropertyId = function (propertyId) {
11217
11252
  return this.get()
11218
- .pipe(operators.map(function (propertyOwners) {
11219
- return propertyOwners.filter(function (propertyOwner) { return propertyOwner.property.id === propertyId; });
11253
+ .pipe(operators.map(function (propertyShares) {
11254
+ return propertyShares.filter(function (propertyShare) { return propertyShare.property.id === propertyId; });
11220
11255
  }));
11221
11256
  };
11222
11257
  /**
11223
11258
  * Listen to User updated event
11224
11259
  */
11225
- PropertyOwnerService.prototype.listenUserUpdated = function () {
11260
+ PropertyShareService.prototype.listenUserUpdated = function () {
11226
11261
  var _this = this;
11227
11262
  this.eventDispatcherService.on(exports.AppEventTypeEnum.USER_UPDATED)
11228
11263
  .subscribe(function () {
11229
- _this.fetch().subscribe(function (propertyOwners) {
11230
- _this.cache = propertyOwners;
11264
+ _this.fetch().subscribe(function (propertyShares) {
11265
+ _this.cache = propertyShares;
11231
11266
  _this.updateCache();
11232
11267
  });
11233
11268
  });
11234
11269
  };
11235
- return PropertyOwnerService;
11270
+ return PropertyShareService;
11236
11271
  }(BaseRestService));
11237
- PropertyOwnerService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyOwnerService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
11238
- PropertyOwnerService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyOwnerService, providedIn: 'root' });
11239
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyOwnerService, decorators: [{
11272
+ PropertyShareService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyShareService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
11273
+ PropertyShareService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyShareService, providedIn: 'root' });
11274
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyShareService, decorators: [{
11240
11275
  type: i0.Injectable,
11241
11276
  args: [{
11242
11277
  providedIn: 'root'
@@ -13020,12 +13055,12 @@
13020
13055
  exports.PropertyEquityChartData = PropertyEquityChartData;
13021
13056
  exports.PropertyEquityChartItem = PropertyEquityChartItem;
13022
13057
  exports.PropertyForecast = PropertyForecast;
13023
- exports.PropertyOwner = PropertyOwner;
13024
- exports.PropertyOwnerService = PropertyOwnerService;
13025
13058
  exports.PropertySale = PropertySale;
13026
13059
  exports.PropertySaleService = PropertySaleService;
13027
13060
  exports.PropertySaleTaxExemptionMetadata = PropertySaleTaxExemptionMetadata;
13028
13061
  exports.PropertyService = PropertyService;
13062
+ exports.PropertyShare = PropertyShare;
13063
+ exports.PropertyShareService = PropertyShareService;
13029
13064
  exports.PropertySubscription = PropertySubscription;
13030
13065
  exports.PropertyValuation = PropertyValuation;
13031
13066
  exports.RegisterClientForm = RegisterClientForm;