taxtank-core 0.7.3 → 0.8.3
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 +191 -164
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/collection.js +7 -4
- package/esm2015/lib/collections/property/property.collection.js +2 -5
- package/esm2015/lib/db/Enums/property/property-share-access.enum.js +6 -0
- package/esm2015/lib/db/Enums/property/property-share-status.enum.js +7 -0
- package/esm2015/lib/db/Enums/user-event-type-client-type.enum.js +9 -9
- package/esm2015/lib/db/Models/client-details.js +1 -1
- package/esm2015/lib/db/Models/property/property-sale/property-sale.js +1 -1
- package/esm2015/lib/db/Models/property/property-share.js +3 -0
- package/esm2015/lib/db/Models/property/property.js +1 -1
- package/esm2015/lib/db/Models/user.js +1 -1
- package/esm2015/lib/models/bank/basiq-config.js +12 -0
- package/esm2015/lib/models/endpoint/endpoints.const.js +4 -4
- package/esm2015/lib/models/event/app-event-type.enum.js +2 -2
- package/esm2015/lib/models/notification/notification.js +3 -3
- package/esm2015/lib/models/property/property-sale/property-sale.js +1 -1
- package/esm2015/lib/models/property/{property-owner.js → property-share.js} +15 -15
- package/esm2015/lib/models/property/property.js +9 -8
- package/esm2015/lib/models/property/share-filter-options.enum.js +11 -0
- package/esm2015/lib/services/bank/bank-account.service.js +2 -2
- package/esm2015/lib/services/depreciation/depreciation.service.js +2 -2
- package/esm2015/lib/services/property/property-share/property-share.service.js +115 -0
- package/esm2015/lib/services/property/property.service.js +6 -6
- package/esm2015/lib/services/subscription/subscription.service.js +35 -16
- package/esm2015/public-api.js +8 -6
- package/fesm2015/taxtank-core.js +159 -135
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/collection.d.ts +2 -1
- package/lib/collections/property/property.collection.d.ts +1 -4
- package/lib/db/Enums/property/property-share-access.enum.d.ts +4 -0
- package/lib/db/Enums/property/{property-owner-status.enum.d.ts → property-share-status.enum.d.ts} +1 -1
- package/lib/db/Enums/user-event-type-client-type.enum.d.ts +8 -8
- package/lib/db/Models/client-details.d.ts +1 -0
- package/lib/db/Models/property/property-sale/property-sale.d.ts +4 -3
- package/lib/db/Models/property/{property-owner.d.ts → property-share.d.ts} +6 -6
- package/lib/db/Models/property/property.d.ts +2 -2
- package/lib/db/Models/user.d.ts +2 -2
- package/lib/models/bank/basiq-config.d.ts +17 -0
- package/lib/models/event/app-event-type.enum.d.ts +1 -1
- package/lib/models/property/{property-owner.d.ts → property-share.d.ts} +3 -3
- package/lib/models/property/property.d.ts +6 -5
- package/lib/models/property/share-filter-options.enum.d.ts +9 -0
- package/lib/services/property/property-share/property-share.service.d.ts +44 -0
- package/lib/services/property/property.service.d.ts +3 -3
- package/lib/services/subscription/subscription.service.d.ts +9 -4
- package/package.json +1 -1
- package/public-api.d.ts +7 -5
- package/esm2015/lib/db/Enums/property/property-owner-access.enum.js +0 -6
- package/esm2015/lib/db/Enums/property/property-owner-status.enum.js +0 -7
- package/esm2015/lib/db/Models/property/property-owner.js +0 -3
- package/esm2015/lib/models/property/ownership-filter-options.enum.js +0 -10
- package/esm2015/lib/services/property/property-owner/property-owner.service.js +0 -123
- package/lib/db/Enums/property/property-owner-access.enum.d.ts +0 -4
- package/lib/models/property/ownership-filter-options.enum.d.ts +0 -8
- 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
|
-
|
|
899
|
-
|
|
900
|
-
|
|
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'),
|
|
@@ -1226,9 +1226,6 @@
|
|
|
1226
1226
|
if (items === void 0) { items = []; }
|
|
1227
1227
|
return new this.constructor(items);
|
|
1228
1228
|
};
|
|
1229
|
-
Collection.prototype.getBy = function (field, value) {
|
|
1230
|
-
return this.create(this.items.filter(function (item) { return item[field] === value; }));
|
|
1231
|
-
};
|
|
1232
1229
|
Collection.prototype.groupBy = function (path) {
|
|
1233
1230
|
if (path === void 0) { path = ''; }
|
|
1234
1231
|
return new CollectionDictionary(this, path);
|
|
@@ -1264,6 +1261,12 @@
|
|
|
1264
1261
|
Collection.prototype.getIds = function () {
|
|
1265
1262
|
return this.items.map(function (item) { return item['id']; });
|
|
1266
1263
|
};
|
|
1264
|
+
Collection.prototype.getOneBy = function (path, value) {
|
|
1265
|
+
return this.items.find(function (item) { return get__default["default"](item, path) === value; });
|
|
1266
|
+
};
|
|
1267
|
+
Collection.prototype.getBy = function (path, value) {
|
|
1268
|
+
return this.create(this.items.filter(function (item) { return get__default["default"](item, path) === value; }));
|
|
1269
|
+
};
|
|
1267
1270
|
/**
|
|
1268
1271
|
* Get single item by id
|
|
1269
1272
|
*/
|
|
@@ -2354,10 +2357,7 @@
|
|
|
2354
2357
|
PropertyCollection.prototype.getActiveProperties = function () {
|
|
2355
2358
|
return new PropertyCollection(this.items.filter(function (property) { return property.isActive; }));
|
|
2356
2359
|
};
|
|
2357
|
-
|
|
2358
|
-
* Get new property collection filtered by owner
|
|
2359
|
-
*/
|
|
2360
|
-
PropertyCollection.prototype.getOwnProperties = function () {
|
|
2360
|
+
PropertyCollection.prototype.getCreatedProperties = function () {
|
|
2361
2361
|
return new PropertyCollection(this.items.filter(function (property) { return property.isOwn(); }));
|
|
2362
2362
|
};
|
|
2363
2363
|
/**
|
|
@@ -3291,18 +3291,18 @@
|
|
|
3291
3291
|
PropertyDepreciationCalculationEnum[PropertyDepreciationCalculationEnum["DIMINISHING"] = 2] = "DIMINISHING";
|
|
3292
3292
|
})(exports.PropertyDepreciationCalculationEnum || (exports.PropertyDepreciationCalculationEnum = {}));
|
|
3293
3293
|
|
|
3294
|
-
exports.
|
|
3295
|
-
(function (
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
})(exports.
|
|
3294
|
+
exports.PropertyShareAccessEnum = void 0;
|
|
3295
|
+
(function (PropertyShareAccessEnum) {
|
|
3296
|
+
PropertyShareAccessEnum[PropertyShareAccessEnum["VIEW"] = 1] = "VIEW";
|
|
3297
|
+
PropertyShareAccessEnum[PropertyShareAccessEnum["EDIT"] = 2] = "EDIT";
|
|
3298
|
+
})(exports.PropertyShareAccessEnum || (exports.PropertyShareAccessEnum = {}));
|
|
3299
3299
|
|
|
3300
|
-
exports.
|
|
3301
|
-
(function (
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
})(exports.
|
|
3300
|
+
exports.PropertyShareStatusEnum = void 0;
|
|
3301
|
+
(function (PropertyShareStatusEnum) {
|
|
3302
|
+
PropertyShareStatusEnum[PropertyShareStatusEnum["PENDING"] = 1] = "PENDING";
|
|
3303
|
+
PropertyShareStatusEnum[PropertyShareStatusEnum["APPROVED"] = 2] = "APPROVED";
|
|
3304
|
+
PropertyShareStatusEnum[PropertyShareStatusEnum["REJECTED"] = 3] = "REJECTED";
|
|
3305
|
+
})(exports.PropertyShareStatusEnum || (exports.PropertyShareStatusEnum = {}));
|
|
3306
3306
|
|
|
3307
3307
|
exports.RegistrationInviteStatusEnum = void 0;
|
|
3308
3308
|
(function (RegistrationInviteStatusEnum) {
|
|
@@ -3525,14 +3525,14 @@
|
|
|
3525
3525
|
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["FIRM_INVITE_ACCEPTED"] = 2012] = "FIRM_INVITE_ACCEPTED";
|
|
3526
3526
|
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["FIRM_INVITE_REJECTED"] = 2013] = "FIRM_INVITE_REJECTED";
|
|
3527
3527
|
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["FIRM_INVITE_REGISTERED"] = 2014] = "FIRM_INVITE_REGISTERED";
|
|
3528
|
-
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["
|
|
3529
|
-
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["
|
|
3530
|
-
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["
|
|
3531
|
-
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["
|
|
3532
|
-
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["
|
|
3533
|
-
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["
|
|
3534
|
-
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["
|
|
3535
|
-
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["
|
|
3528
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE"] = 2020] = "PROPERTY_SHARE_INVITE";
|
|
3529
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE_TO_REGISTER"] = 2021] = "PROPERTY_SHARE_INVITE_TO_REGISTER";
|
|
3530
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE_ACCEPTED"] = 2022] = "PROPERTY_SHARE_INVITE_ACCEPTED";
|
|
3531
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE_REJECTED"] = 2023] = "PROPERTY_SHARE_INVITE_REJECTED";
|
|
3532
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_INVITE_REGISTERED"] = 2024] = "PROPERTY_SHARE_INVITE_REGISTERED";
|
|
3533
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_CHANGE_REQUESTED"] = 2025] = "PROPERTY_SHARE_CHANGE_REQUESTED";
|
|
3534
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_CHANGE_ACCEPTED"] = 2026] = "PROPERTY_SHARE_CHANGE_ACCEPTED";
|
|
3535
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["PROPERTY_SHARE_CHANGE_REJECTED"] = 2027] = "PROPERTY_SHARE_CHANGE_REJECTED";
|
|
3536
3536
|
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["BASIQ_NEW_ACCOUNTS"] = 2030] = "BASIQ_NEW_ACCOUNTS";
|
|
3537
3537
|
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["BASIQ_FIRST_IMPORT_COMPLETE"] = 2031] = "BASIQ_FIRST_IMPORT_COMPLETE";
|
|
3538
3538
|
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["BASIQ_AUTHORIZATION_FAIL"] = 2032] = "BASIQ_AUTHORIZATION_FAIL";
|
|
@@ -3607,6 +3607,18 @@
|
|
|
3607
3607
|
VehicleLogbookPurposeEnum[VehicleLogbookPurposeEnum["PERSONAL"] = 2] = "PERSONAL";
|
|
3608
3608
|
})(exports.VehicleLogbookPurposeEnum || (exports.VehicleLogbookPurposeEnum = {}));
|
|
3609
3609
|
|
|
3610
|
+
exports.TaxExemptionEnum = void 0;
|
|
3611
|
+
(function (TaxExemptionEnum) {
|
|
3612
|
+
TaxExemptionEnum[TaxExemptionEnum["ONE_YEAR_RULE"] = 1] = "ONE_YEAR_RULE";
|
|
3613
|
+
// principle place of residence
|
|
3614
|
+
TaxExemptionEnum[TaxExemptionEnum["PPR"] = 2] = "PPR";
|
|
3615
|
+
TaxExemptionEnum[TaxExemptionEnum["SIX_YEARS_RULE"] = 3] = "SIX_YEARS_RULE";
|
|
3616
|
+
TaxExemptionEnum[TaxExemptionEnum["INVESTMENT_TO_PPR"] = 4] = "INVESTMENT_TO_PPR";
|
|
3617
|
+
TaxExemptionEnum[TaxExemptionEnum["PPR_TO_INVESTMENT"] = 5] = "PPR_TO_INVESTMENT";
|
|
3618
|
+
TaxExemptionEnum[TaxExemptionEnum["TRANSFER"] = 6] = "TRANSFER";
|
|
3619
|
+
TaxExemptionEnum[TaxExemptionEnum["OTHER"] = 7] = "OTHER";
|
|
3620
|
+
})(exports.TaxExemptionEnum || (exports.TaxExemptionEnum = {}));
|
|
3621
|
+
|
|
3610
3622
|
exports.TaxExemptionMetadataEnum = void 0;
|
|
3611
3623
|
(function (TaxExemptionMetadataEnum) {
|
|
3612
3624
|
// principle place of residence
|
|
@@ -4536,18 +4548,6 @@
|
|
|
4536
4548
|
classTransformer.Type(function () { return Date; })
|
|
4537
4549
|
], PropertyCategoryMovement.prototype, "toDate", void 0);
|
|
4538
4550
|
|
|
4539
|
-
var TaxExemptionEnum;
|
|
4540
|
-
(function (TaxExemptionEnum) {
|
|
4541
|
-
TaxExemptionEnum[TaxExemptionEnum["ONE_YEAR_RULE"] = 1] = "ONE_YEAR_RULE";
|
|
4542
|
-
// principle place of residence
|
|
4543
|
-
TaxExemptionEnum[TaxExemptionEnum["PPR"] = 2] = "PPR";
|
|
4544
|
-
TaxExemptionEnum[TaxExemptionEnum["SIX_YEARS_RULE"] = 3] = "SIX_YEARS_RULE";
|
|
4545
|
-
TaxExemptionEnum[TaxExemptionEnum["INVESTMENT_TO_PPR"] = 4] = "INVESTMENT_TO_PPR";
|
|
4546
|
-
TaxExemptionEnum[TaxExemptionEnum["PPR_TO_INVESTMENT"] = 5] = "PPR_TO_INVESTMENT";
|
|
4547
|
-
TaxExemptionEnum[TaxExemptionEnum["TRANSFER"] = 6] = "TRANSFER";
|
|
4548
|
-
TaxExemptionEnum[TaxExemptionEnum["OTHER"] = 7] = "OTHER";
|
|
4549
|
-
})(TaxExemptionEnum || (TaxExemptionEnum = {}));
|
|
4550
|
-
|
|
4551
4551
|
var PropertyCategoryListEnum;
|
|
4552
4552
|
(function (PropertyCategoryListEnum) {
|
|
4553
4553
|
PropertyCategoryListEnum[PropertyCategoryListEnum["OWNER_OCCUPIED"] = 3] = "OWNER_OCCUPIED";
|
|
@@ -4677,17 +4677,17 @@
|
|
|
4677
4677
|
});
|
|
4678
4678
|
Object.defineProperty(Property.prototype, "myShare", {
|
|
4679
4679
|
get: function () {
|
|
4680
|
-
return this.
|
|
4680
|
+
return this.shares.find(function (share) { return share.user.id === +localStorage.getItem('userId'); });
|
|
4681
4681
|
},
|
|
4682
4682
|
enumerable: false,
|
|
4683
4683
|
configurable: true
|
|
4684
4684
|
});
|
|
4685
|
-
Object.defineProperty(Property.prototype, "
|
|
4685
|
+
Object.defineProperty(Property.prototype, "shareClaimPercent", {
|
|
4686
4686
|
/**
|
|
4687
|
-
* exact claim
|
|
4687
|
+
* exact claim including share percent
|
|
4688
4688
|
*/
|
|
4689
4689
|
get: function () {
|
|
4690
|
-
return this.
|
|
4690
|
+
return this.sharePercent * this.claimPercent / 100;
|
|
4691
4691
|
},
|
|
4692
4692
|
enumerable: false,
|
|
4693
4693
|
configurable: true
|
|
@@ -4701,9 +4701,9 @@
|
|
|
4701
4701
|
enumerable: false,
|
|
4702
4702
|
configurable: true
|
|
4703
4703
|
});
|
|
4704
|
-
Object.defineProperty(Property.prototype, "
|
|
4704
|
+
Object.defineProperty(Property.prototype, "sharePercent", {
|
|
4705
4705
|
get: function () {
|
|
4706
|
-
return this.myShare.
|
|
4706
|
+
return this.myShare.percent;
|
|
4707
4707
|
},
|
|
4708
4708
|
enumerable: false,
|
|
4709
4709
|
configurable: true
|
|
@@ -4729,12 +4729,13 @@
|
|
|
4729
4729
|
};
|
|
4730
4730
|
Object.defineProperty(Property.prototype, "isShared", {
|
|
4731
4731
|
get: function () {
|
|
4732
|
-
return this.
|
|
4732
|
+
return this.shares.length > 1;
|
|
4733
4733
|
},
|
|
4734
4734
|
enumerable: false,
|
|
4735
4735
|
configurable: true
|
|
4736
4736
|
});
|
|
4737
4737
|
/**
|
|
4738
|
+
* @TODO consider to move methods related with propertySale to separated class, since used just in one module yet
|
|
4738
4739
|
* purchase costs - claimed costs, except `ppr to investment` exemption,
|
|
4739
4740
|
* in that case it's equal to market value, when property became an investment property
|
|
4740
4741
|
*/
|
|
@@ -4767,10 +4768,10 @@
|
|
|
4767
4768
|
switch (true) {
|
|
4768
4769
|
// exemption for main residence properties
|
|
4769
4770
|
case this.category.id === PropertyCategoryListEnum.OWNER_OCCUPIED:
|
|
4770
|
-
return TaxExemptionEnum.PPR;
|
|
4771
|
+
return exports.TaxExemptionEnum.PPR;
|
|
4771
4772
|
// exemption for investment properties owned for at least one year
|
|
4772
4773
|
case this.getOwnershipDuration(sale, 'years') >= 1:
|
|
4773
|
-
return TaxExemptionEnum.ONE_YEAR_RULE;
|
|
4774
|
+
return exports.TaxExemptionEnum.ONE_YEAR_RULE;
|
|
4774
4775
|
default:
|
|
4775
4776
|
return null;
|
|
4776
4777
|
}
|
|
@@ -4783,22 +4784,22 @@
|
|
|
4783
4784
|
var metadata = new PropertySaleTaxExemptionMetadataCollection(sale.taxExemptionMetadata);
|
|
4784
4785
|
switch ((_a = sale.taxExemption) === null || _a === void 0 ? void 0 : _a.id) {
|
|
4785
4786
|
// 50% exemption for investments owned for at least one year
|
|
4786
|
-
case TaxExemptionEnum.ONE_YEAR_RULE:
|
|
4787
|
+
case exports.TaxExemptionEnum.ONE_YEAR_RULE:
|
|
4787
4788
|
return 0.5;
|
|
4788
4789
|
// investment property become main residence (exemption for main residence ownership duration)
|
|
4789
|
-
case TaxExemptionEnum.INVESTMENT_TO_PPR:
|
|
4790
|
+
case exports.TaxExemptionEnum.INVESTMENT_TO_PPR:
|
|
4790
4791
|
var ownershipDays = this.getOwnershipDuration(sale);
|
|
4791
4792
|
return (ownershipDays - metadata.getPPRDays()) / ownershipDays;
|
|
4792
4793
|
// main residence become investment (exemption for home office percent usage)
|
|
4793
|
-
case TaxExemptionEnum.PPR_TO_INVESTMENT:
|
|
4794
|
+
case exports.TaxExemptionEnum.PPR_TO_INVESTMENT:
|
|
4794
4795
|
// 1 year CGT discount can still apply (on the income producing % if used for 12 months or more)
|
|
4795
4796
|
var ratio = this.getOwnershipDuration(sale, 'years') >= 1 ? 0.5 : 1;
|
|
4796
4797
|
return metadata.getClaimPercent() / 100 * ratio;
|
|
4797
4798
|
// full exemption
|
|
4798
|
-
case TaxExemptionEnum.PPR:
|
|
4799
|
-
case TaxExemptionEnum.SIX_YEARS_RULE:
|
|
4800
|
-
case TaxExemptionEnum.TRANSFER:
|
|
4801
|
-
case TaxExemptionEnum.OTHER:
|
|
4799
|
+
case exports.TaxExemptionEnum.PPR:
|
|
4800
|
+
case exports.TaxExemptionEnum.SIX_YEARS_RULE:
|
|
4801
|
+
case exports.TaxExemptionEnum.TRANSFER:
|
|
4802
|
+
case exports.TaxExemptionEnum.OTHER:
|
|
4802
4803
|
return 0;
|
|
4803
4804
|
// no exemption
|
|
4804
4805
|
default:
|
|
@@ -6219,6 +6220,19 @@
|
|
|
6219
6220
|
BankTransactionSummaryFieldsEnum["ALLOCATED_AMOUNT"] = "allocatedAmount";
|
|
6220
6221
|
})(exports.BankTransactionSummaryFieldsEnum || (exports.BankTransactionSummaryFieldsEnum = {}));
|
|
6221
6222
|
|
|
6223
|
+
/**
|
|
6224
|
+
* Class describe configuration options for basiq connect control
|
|
6225
|
+
* https://www.npmjs.com/package/@basiq/basiq-connect-control
|
|
6226
|
+
*/
|
|
6227
|
+
var BasiqConfig = /** @class */ (function () {
|
|
6228
|
+
function BasiqConfig(options) {
|
|
6229
|
+
// ID of the DOM element to which Basiq Connect Control will be rendered;
|
|
6230
|
+
this.containerId = 'basiq-control';
|
|
6231
|
+
Object.assign(this, options);
|
|
6232
|
+
}
|
|
6233
|
+
return BasiqConfig;
|
|
6234
|
+
}());
|
|
6235
|
+
|
|
6222
6236
|
/**
|
|
6223
6237
|
* access token, needed to access basiq connect ui (https://github.com/basiqio/basiq-connect-ui)
|
|
6224
6238
|
*/
|
|
@@ -6935,7 +6949,7 @@
|
|
|
6935
6949
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 22] = "PROPERTY_MOVEMENT_CREATED";
|
|
6936
6950
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 23] = "PROPERTY_MOVEMENT_UPDATED";
|
|
6937
6951
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 24] = "PROPERTY_MOVEMENT_DELETED";
|
|
6938
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
6952
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SHARE_UPDATED"] = 25] = "PROPERTY_SHARE_UPDATED";
|
|
6939
6953
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 26] = "PROPERTY_SUBSCRIPTION_ADDED";
|
|
6940
6954
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 27] = "PROPERTY_SUBSCRIPTION_DELETED";
|
|
6941
6955
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 28] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
|
|
@@ -7225,8 +7239,8 @@
|
|
|
7225
7239
|
// return '/client/bank-feeds';
|
|
7226
7240
|
// case NOTIFICATION_EVENT_TYPES.clientInvite.includes(obj.eventType):
|
|
7227
7241
|
// return '/client/users/invitations';
|
|
7228
|
-
// case NOTIFICATION_EVENT_TYPES.
|
|
7229
|
-
// return '/client/users/
|
|
7242
|
+
// case NOTIFICATION_EVENT_TYPES.propertyShare.includes(obj.eventType):
|
|
7243
|
+
// return '/client/users/shares';
|
|
7230
7244
|
// case NOTIFICATION_EVENT_TYPES.employeeInviteFromClient.includes(obj.eventType):
|
|
7231
7245
|
// return '/firm/clients/invites';
|
|
7232
7246
|
default:
|
|
@@ -7316,14 +7330,15 @@
|
|
|
7316
7330
|
];
|
|
7317
7331
|
|
|
7318
7332
|
/**
|
|
7333
|
+
* @TODO used only on dashboard, move from tt-core
|
|
7319
7334
|
* Enum with properties ownership filter options
|
|
7320
7335
|
*/
|
|
7321
|
-
exports.
|
|
7322
|
-
(function (
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
})(exports.
|
|
7336
|
+
exports.ShareFilterOptionsEnum = void 0;
|
|
7337
|
+
(function (ShareFilterOptionsEnum) {
|
|
7338
|
+
ShareFilterOptionsEnum[ShareFilterOptionsEnum["ALL"] = 1] = "ALL";
|
|
7339
|
+
ShareFilterOptionsEnum[ShareFilterOptionsEnum["CREATED"] = 2] = "CREATED";
|
|
7340
|
+
ShareFilterOptionsEnum[ShareFilterOptionsEnum["SHARED"] = 3] = "SHARED";
|
|
7341
|
+
})(exports.ShareFilterOptionsEnum || (exports.ShareFilterOptionsEnum = {}));
|
|
7327
7342
|
|
|
7328
7343
|
/**
|
|
7329
7344
|
* class contains equity information for passed financial year
|
|
@@ -7515,35 +7530,35 @@
|
|
|
7515
7530
|
return PropertyEquityChartData;
|
|
7516
7531
|
}());
|
|
7517
7532
|
|
|
7518
|
-
var
|
|
7519
|
-
function
|
|
7533
|
+
var PropertyShare$1 = /** @class */ (function () {
|
|
7534
|
+
function PropertyShare() {
|
|
7520
7535
|
}
|
|
7521
|
-
return
|
|
7536
|
+
return PropertyShare;
|
|
7522
7537
|
}());
|
|
7523
7538
|
|
|
7524
|
-
var
|
|
7525
|
-
__extends(
|
|
7526
|
-
function
|
|
7539
|
+
var PropertyShare = /** @class */ (function (_super) {
|
|
7540
|
+
__extends(PropertyShare, _super);
|
|
7541
|
+
function PropertyShare() {
|
|
7527
7542
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
7528
7543
|
}
|
|
7529
|
-
|
|
7530
|
-
return this.status === exports.
|
|
7544
|
+
PropertyShare.prototype.isAccepted = function () {
|
|
7545
|
+
return this.status === exports.PropertyShareStatusEnum.APPROVED;
|
|
7531
7546
|
};
|
|
7532
|
-
|
|
7533
|
-
return this.status === exports.
|
|
7547
|
+
PropertyShare.prototype.isPending = function () {
|
|
7548
|
+
return this.status === exports.PropertyShareStatusEnum.PENDING;
|
|
7534
7549
|
};
|
|
7535
|
-
|
|
7536
|
-
return this.status === exports.
|
|
7550
|
+
PropertyShare.prototype.isRejected = function () {
|
|
7551
|
+
return this.status === exports.PropertyShareStatusEnum.REJECTED;
|
|
7537
7552
|
};
|
|
7538
|
-
Object.defineProperty(
|
|
7553
|
+
Object.defineProperty(PropertyShare.prototype, "statusName", {
|
|
7539
7554
|
get: function () {
|
|
7540
7555
|
var _a;
|
|
7541
|
-
return (_a = exports.
|
|
7556
|
+
return (_a = exports.PropertyShareStatusEnum[this.status]) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
7542
7557
|
},
|
|
7543
7558
|
enumerable: false,
|
|
7544
7559
|
configurable: true
|
|
7545
7560
|
});
|
|
7546
|
-
Object.defineProperty(
|
|
7561
|
+
Object.defineProperty(PropertyShare.prototype, "userName", {
|
|
7547
7562
|
/**
|
|
7548
7563
|
* Return full user name if user is already registered.
|
|
7549
7564
|
* Otherwise - return first name from invitation
|
|
@@ -7554,29 +7569,29 @@
|
|
|
7554
7569
|
enumerable: false,
|
|
7555
7570
|
configurable: true
|
|
7556
7571
|
});
|
|
7557
|
-
return
|
|
7558
|
-
}(
|
|
7572
|
+
return PropertyShare;
|
|
7573
|
+
}(PropertyShare$1));
|
|
7559
7574
|
__decorate([
|
|
7560
7575
|
classTransformer.Type(function () { return Date; })
|
|
7561
|
-
],
|
|
7576
|
+
], PropertyShare.prototype, "fromDate", void 0);
|
|
7562
7577
|
__decorate([
|
|
7563
7578
|
classTransformer.Type(function () { return Date; })
|
|
7564
|
-
],
|
|
7579
|
+
], PropertyShare.prototype, "toDate", void 0);
|
|
7565
7580
|
__decorate([
|
|
7566
7581
|
classTransformer.Type(function () { return User; })
|
|
7567
|
-
],
|
|
7582
|
+
], PropertyShare.prototype, "user", void 0);
|
|
7568
7583
|
__decorate([
|
|
7569
7584
|
classTransformer.Type(function () { return RegistrationInvite; })
|
|
7570
|
-
],
|
|
7585
|
+
], PropertyShare.prototype, "invite", void 0);
|
|
7571
7586
|
__decorate([
|
|
7572
7587
|
classTransformer.Type(function () { return Property; })
|
|
7573
|
-
],
|
|
7588
|
+
], PropertyShare.prototype, "property", void 0);
|
|
7574
7589
|
__decorate([
|
|
7575
7590
|
classTransformer.Transform(function (_b) {
|
|
7576
7591
|
var obj = _b.obj;
|
|
7577
7592
|
return obj.user ? obj.user.email : obj.invite.email;
|
|
7578
7593
|
})
|
|
7579
|
-
],
|
|
7594
|
+
], PropertyShare.prototype, "email", void 0);
|
|
7580
7595
|
|
|
7581
7596
|
var PropertySale$1 = /** @class */ (function () {
|
|
7582
7597
|
function PropertySale() {
|
|
@@ -8546,7 +8561,7 @@
|
|
|
8546
8561
|
BankAccountService.prototype.listenToEventDispatcherChanges = function () {
|
|
8547
8562
|
var _this = this;
|
|
8548
8563
|
this.eventDispatcherService.on([
|
|
8549
|
-
exports.AppEventTypeEnum.
|
|
8564
|
+
exports.AppEventTypeEnum.PROPERTY_SHARE_UPDATED,
|
|
8550
8565
|
exports.AppEventTypeEnum.LOAN_PAYOUT_UPDATED,
|
|
8551
8566
|
exports.AppEventTypeEnum.BANK_CONNECTION_ADDED
|
|
8552
8567
|
]).subscribe(function () {
|
|
@@ -9768,7 +9783,7 @@
|
|
|
9768
9783
|
*/
|
|
9769
9784
|
DepreciationService.prototype.listenToUpdatedLoan = function () {
|
|
9770
9785
|
var _this = this;
|
|
9771
|
-
this.eventDispatcherService.on([exports.AppEventTypeEnum.LOAN_UPDATED, exports.AppEventTypeEnum.
|
|
9786
|
+
this.eventDispatcherService.on([exports.AppEventTypeEnum.LOAN_UPDATED, exports.AppEventTypeEnum.PROPERTY_SHARE_UPDATED]).subscribe(function () {
|
|
9772
9787
|
_this.fetch().subscribe();
|
|
9773
9788
|
});
|
|
9774
9789
|
};
|
|
@@ -10842,17 +10857,17 @@
|
|
|
10842
10857
|
return _this;
|
|
10843
10858
|
}
|
|
10844
10859
|
PropertyService.prototype.listenEvents = function () {
|
|
10845
|
-
this.
|
|
10860
|
+
this.listenShareInviteAccepted();
|
|
10846
10861
|
this.listenServiceSubscriptionUpdated();
|
|
10847
10862
|
// @TODO Alex: consider to refactor property movements logic similar to client-movements
|
|
10848
10863
|
this.listenMovementsChanged();
|
|
10849
10864
|
};
|
|
10850
10865
|
/**
|
|
10851
|
-
* Update cache when
|
|
10866
|
+
* Update cache when share invitation accepted
|
|
10852
10867
|
*/
|
|
10853
|
-
PropertyService.prototype.
|
|
10868
|
+
PropertyService.prototype.listenShareInviteAccepted = function () {
|
|
10854
10869
|
var _this = this;
|
|
10855
|
-
this.eventDispatcherService.on(exports.AppEventTypeEnum.
|
|
10870
|
+
this.eventDispatcherService.on(exports.AppEventTypeEnum.PROPERTY_SHARE_UPDATED).subscribe(function () { return _this.resetCache(); });
|
|
10856
10871
|
};
|
|
10857
10872
|
/**
|
|
10858
10873
|
* Update cache when user's service subscription is updated
|
|
@@ -10925,7 +10940,7 @@
|
|
|
10925
10940
|
_this.updateCache();
|
|
10926
10941
|
}));
|
|
10927
10942
|
};
|
|
10928
|
-
PropertyService.prototype.
|
|
10943
|
+
PropertyService.prototype.getByShareId = function (id) {
|
|
10929
10944
|
return this.get().pipe(operators.map(function (properties) {
|
|
10930
10945
|
return properties.filter(function (property) { return property.user.id === id; });
|
|
10931
10946
|
}));
|
|
@@ -11173,114 +11188,106 @@
|
|
|
11173
11188
|
} });
|
|
11174
11189
|
|
|
11175
11190
|
// @TODO check and improve logic during refactoring
|
|
11176
|
-
var
|
|
11177
|
-
__extends(
|
|
11178
|
-
function
|
|
11191
|
+
var PropertyShareService = /** @class */ (function (_super) {
|
|
11192
|
+
__extends(PropertyShareService, _super);
|
|
11193
|
+
function PropertyShareService(http, eventDispatcherService, environment) {
|
|
11179
11194
|
var _this = _super.call(this, http, eventDispatcherService, environment) || this;
|
|
11180
11195
|
_this.http = http;
|
|
11181
11196
|
_this.eventDispatcherService = eventDispatcherService;
|
|
11182
11197
|
_this.environment = environment;
|
|
11183
|
-
// api url parameter for properties
|
|
11184
|
-
_this.url = 'properties/
|
|
11185
|
-
_this.modelClass =
|
|
11198
|
+
// api url parameter for properties shares
|
|
11199
|
+
_this.url = 'properties/shares';
|
|
11200
|
+
_this.modelClass = PropertyShare;
|
|
11186
11201
|
_this.listenEvents();
|
|
11187
11202
|
return _this;
|
|
11188
11203
|
}
|
|
11189
11204
|
/**
|
|
11190
11205
|
* Listen to Event Dispatcher events
|
|
11191
11206
|
*/
|
|
11192
|
-
|
|
11207
|
+
PropertyShareService.prototype.listenEvents = function () {
|
|
11193
11208
|
this.listenUserUpdated();
|
|
11194
11209
|
};
|
|
11195
11210
|
/**
|
|
11196
11211
|
* Updated loan
|
|
11197
11212
|
*/
|
|
11198
|
-
|
|
11213
|
+
PropertyShareService.prototype.update = function (propertyShare) {
|
|
11199
11214
|
var _this = this;
|
|
11200
|
-
return this.http.put(this.environment.apiV2 + "/" + this.url + "/" +
|
|
11201
|
-
.pipe(operators.map(function (
|
|
11202
|
-
var
|
|
11215
|
+
return this.http.put(this.environment.apiV2 + "/" + this.url + "/" + propertyShare.id, propertyShare)
|
|
11216
|
+
.pipe(operators.map(function (updatedPropertyShareBase) {
|
|
11217
|
+
var updatedPropertyShare = classTransformer.plainToClass(PropertyShare, updatedPropertyShareBase);
|
|
11203
11218
|
// if loan type is NOT vehicle - fire EventDispatcher event
|
|
11204
|
-
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.
|
|
11205
|
-
replace(_this.cache,
|
|
11219
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.PROPERTY_SHARE_UPDATED, null));
|
|
11220
|
+
replace(_this.cache, updatedPropertyShare);
|
|
11206
11221
|
_this.updateCache();
|
|
11207
|
-
return
|
|
11222
|
+
return updatedPropertyShare;
|
|
11208
11223
|
}));
|
|
11209
11224
|
};
|
|
11210
11225
|
/**
|
|
11211
|
-
* Re-invite property
|
|
11226
|
+
* Re-invite property share
|
|
11212
11227
|
* @param share user to share property
|
|
11213
11228
|
*/
|
|
11214
|
-
|
|
11229
|
+
PropertyShareService.prototype.reinvite = function (share) {
|
|
11215
11230
|
return this.http.post(this.environment.apiV2 + "/" + this.url + "/" + share.id + "/reinvite", {});
|
|
11216
11231
|
};
|
|
11217
|
-
|
|
11218
|
-
* Get incoming property owners list
|
|
11219
|
-
*/
|
|
11220
|
-
PropertyOwnerService.prototype.getIncoming = function () {
|
|
11232
|
+
PropertyShareService.prototype.getIncoming = function () {
|
|
11221
11233
|
return this.get()
|
|
11222
|
-
.pipe(operators.map(function (
|
|
11223
|
-
var
|
|
11224
|
-
|
|
11234
|
+
.pipe(operators.map(function (propertyShares) {
|
|
11235
|
+
var propertySharesIncoming = [];
|
|
11236
|
+
propertyShares.forEach(function (propertyShare) {
|
|
11225
11237
|
var _a;
|
|
11226
|
-
if (((_a =
|
|
11227
|
-
|
|
11238
|
+
if (((_a = propertyShare.user) === null || _a === void 0 ? void 0 : _a.isLoggedIn()) && propertyShare.isPending() && propertyShare.property.user.id !== +localStorage.getItem('userId')) {
|
|
11239
|
+
propertySharesIncoming.push(propertyShare);
|
|
11228
11240
|
}
|
|
11229
11241
|
});
|
|
11230
|
-
return
|
|
11242
|
+
return propertySharesIncoming;
|
|
11231
11243
|
}));
|
|
11232
11244
|
};
|
|
11233
11245
|
/**
|
|
11234
|
-
* Get outcoming property
|
|
11246
|
+
* Get outcoming property shares list
|
|
11235
11247
|
*/
|
|
11236
|
-
|
|
11248
|
+
PropertyShareService.prototype.getOutcoming = function () {
|
|
11237
11249
|
var _this = this;
|
|
11238
|
-
return this.get().pipe(operators.map(function (
|
|
11239
|
-
return _this.filterOutcoming(
|
|
11250
|
+
return this.get().pipe(operators.map(function (propertyShares) {
|
|
11251
|
+
return _this.filterOutcoming(propertyShares);
|
|
11240
11252
|
}));
|
|
11241
11253
|
};
|
|
11242
11254
|
/**
|
|
11243
|
-
* Filter outcoming property
|
|
11244
|
-
* @param propertyOwners which should be filtered
|
|
11255
|
+
* Filter outcoming property shares
|
|
11245
11256
|
*/
|
|
11246
|
-
|
|
11247
|
-
var
|
|
11248
|
-
|
|
11257
|
+
PropertyShareService.prototype.filterOutcoming = function (propertyShares) {
|
|
11258
|
+
var propertySharesOutcoming = [];
|
|
11259
|
+
propertyShares.forEach(function (propertyShare) {
|
|
11249
11260
|
var _a;
|
|
11250
|
-
if (!((_a =
|
|
11251
|
-
|
|
11261
|
+
if (!((_a = propertyShare.user) === null || _a === void 0 ? void 0 : _a.isLoggedIn())) {
|
|
11262
|
+
propertySharesOutcoming.push(propertyShare);
|
|
11252
11263
|
}
|
|
11253
11264
|
});
|
|
11254
|
-
return
|
|
11265
|
+
return propertySharesOutcoming;
|
|
11255
11266
|
};
|
|
11256
|
-
|
|
11257
|
-
* Get list of co-owners filtered by property id
|
|
11258
|
-
* @param propertyId
|
|
11259
|
-
*/
|
|
11260
|
-
PropertyOwnerService.prototype.getByPropertyId = function (propertyId) {
|
|
11267
|
+
PropertyShareService.prototype.getByPropertyId = function (propertyId) {
|
|
11261
11268
|
return this.get()
|
|
11262
|
-
.pipe(operators.map(function (
|
|
11263
|
-
return
|
|
11269
|
+
.pipe(operators.map(function (propertyShares) {
|
|
11270
|
+
return propertyShares.filter(function (propertyShare) { return propertyShare.property.id === propertyId; });
|
|
11264
11271
|
}));
|
|
11265
11272
|
};
|
|
11266
11273
|
/**
|
|
11267
11274
|
* Listen to User updated event
|
|
11268
11275
|
*/
|
|
11269
|
-
|
|
11276
|
+
PropertyShareService.prototype.listenUserUpdated = function () {
|
|
11270
11277
|
var _this = this;
|
|
11271
11278
|
this.eventDispatcherService.on(exports.AppEventTypeEnum.USER_UPDATED)
|
|
11272
11279
|
.subscribe(function () {
|
|
11273
|
-
_this.fetch().subscribe(function (
|
|
11274
|
-
_this.cache =
|
|
11280
|
+
_this.fetch().subscribe(function (propertyShares) {
|
|
11281
|
+
_this.cache = propertyShares;
|
|
11275
11282
|
_this.updateCache();
|
|
11276
11283
|
});
|
|
11277
11284
|
});
|
|
11278
11285
|
};
|
|
11279
|
-
return
|
|
11286
|
+
return PropertyShareService;
|
|
11280
11287
|
}(BaseRestService));
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type:
|
|
11288
|
+
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 });
|
|
11289
|
+
PropertyShareService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyShareService, providedIn: 'root' });
|
|
11290
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyShareService, decorators: [{
|
|
11284
11291
|
type: i0.Injectable,
|
|
11285
11292
|
args: [{
|
|
11286
11293
|
providedIn: 'root'
|
|
@@ -11399,17 +11406,24 @@
|
|
|
11399
11406
|
}] });
|
|
11400
11407
|
|
|
11401
11408
|
var SubscriptionService = /** @class */ (function () {
|
|
11402
|
-
function SubscriptionService(http, eventDispatcherService, environment) {
|
|
11409
|
+
function SubscriptionService(http, eventDispatcherService, sseService, environment) {
|
|
11403
11410
|
this.http = http;
|
|
11404
11411
|
this.eventDispatcherService = eventDispatcherService;
|
|
11412
|
+
this.sseService = sseService;
|
|
11405
11413
|
this.environment = environment;
|
|
11406
11414
|
this.serviceSubscriptionSubject = new rxjs.ReplaySubject(1);
|
|
11407
11415
|
this.serviceSubscriptionsSubject = new rxjs.ReplaySubject(1);
|
|
11408
11416
|
this.servicePaymentsSubject = new rxjs.ReplaySubject(1);
|
|
11417
|
+
this.subscriptionChangeSubject = new rxjs.BehaviorSubject(null);
|
|
11418
|
+
this.listenEvents();
|
|
11409
11419
|
}
|
|
11410
|
-
SubscriptionService.prototype.
|
|
11420
|
+
SubscriptionService.prototype.listenEvents = function () {
|
|
11421
|
+
this.listenSubscriptions();
|
|
11422
|
+
};
|
|
11423
|
+
SubscriptionService.prototype.getSubscription = function (force) {
|
|
11411
11424
|
var _this = this;
|
|
11412
|
-
if (
|
|
11425
|
+
if (force === void 0) { force = false; }
|
|
11426
|
+
if (!this._serviceSubscription || force) {
|
|
11413
11427
|
this.http.get(this.environment.apiV2 + "/subscriptions/last")
|
|
11414
11428
|
.pipe(operators.map(function (response) {
|
|
11415
11429
|
return classTransformer.plainToClass(ServiceSubscription, response);
|
|
@@ -11436,8 +11450,18 @@
|
|
|
11436
11450
|
.subscribe(function (prices) {
|
|
11437
11451
|
_this._serviceSubscriptions = new ServiceSubscriptionCollection([
|
|
11438
11452
|
classTransformer.plainToClass(ServiceSubscription, { items: [] }),
|
|
11439
|
-
classTransformer.plainToClass(ServiceSubscription, {
|
|
11440
|
-
|
|
11453
|
+
classTransformer.plainToClass(ServiceSubscription, {
|
|
11454
|
+
items: [classTransformer.plainToClass(ServiceSubscriptionItem, {
|
|
11455
|
+
price: prices.property,
|
|
11456
|
+
quantity: 2
|
|
11457
|
+
})]
|
|
11458
|
+
}),
|
|
11459
|
+
classTransformer.plainToClass(ServiceSubscription, {
|
|
11460
|
+
items: [classTransformer.plainToClass(ServiceSubscriptionItem, {
|
|
11461
|
+
price: prices.property,
|
|
11462
|
+
quantity: 3
|
|
11463
|
+
})]
|
|
11464
|
+
})
|
|
11441
11465
|
]);
|
|
11442
11466
|
_this._serviceSubscriptions.items.forEach(function (subscription) {
|
|
11443
11467
|
subscription.items.push(classTransformer.plainToClass(ServiceSubscriptionItem, { price: prices.work, quantity: 1 }));
|
|
@@ -11507,19 +11531,21 @@
|
|
|
11507
11531
|
* Change subscription plan
|
|
11508
11532
|
*/
|
|
11509
11533
|
SubscriptionService.prototype.changeSubscription = function (items) {
|
|
11534
|
+
return this.http.put(this.environment.apiV2 + "/subscriptions/items", items);
|
|
11535
|
+
};
|
|
11536
|
+
SubscriptionService.prototype.listenSubscriptions = function () {
|
|
11510
11537
|
var _this = this;
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
_this.
|
|
11515
|
-
|
|
11538
|
+
this.sseService.on("serviceSubscriptions")
|
|
11539
|
+
.pipe(operators.map(function (event) { return classTransformer.plainToClass(ServiceSubscription, event); }))
|
|
11540
|
+
.subscribe(function (subscription) {
|
|
11541
|
+
_this.getSubscription(true).subscribe();
|
|
11542
|
+
_this.subscriptionChangeSubject.next(subscription);
|
|
11516
11543
|
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.SERVICE_SUBSCRIPTION_UPDATED, null));
|
|
11517
|
-
|
|
11518
|
-
}));
|
|
11544
|
+
});
|
|
11519
11545
|
};
|
|
11520
11546
|
return SubscriptionService;
|
|
11521
11547
|
}());
|
|
11522
|
-
SubscriptionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SubscriptionService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11548
|
+
SubscriptionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SubscriptionService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: SseService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11523
11549
|
SubscriptionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SubscriptionService, providedIn: 'root' });
|
|
11524
11550
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SubscriptionService, decorators: [{
|
|
11525
11551
|
type: i0.Injectable,
|
|
@@ -11527,7 +11553,7 @@
|
|
|
11527
11553
|
providedIn: 'root'
|
|
11528
11554
|
}]
|
|
11529
11555
|
}], ctorParameters: function () {
|
|
11530
|
-
return [{ type: i1__namespace.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
|
|
11556
|
+
return [{ type: i1__namespace.HttpClient }, { type: EventDispatcherService }, { type: SseService }, { type: undefined, decorators: [{
|
|
11531
11557
|
type: i0.Inject,
|
|
11532
11558
|
args: ['environment']
|
|
11533
11559
|
}] }];
|
|
@@ -12950,6 +12976,7 @@
|
|
|
12950
12976
|
exports.BankTransactionChartData = BankTransactionChartData;
|
|
12951
12977
|
exports.BankTransactionCollection = BankTransactionCollection;
|
|
12952
12978
|
exports.BankTransactionService = BankTransactionService;
|
|
12979
|
+
exports.BasiqConfig = BasiqConfig;
|
|
12953
12980
|
exports.BasiqJob = BasiqJob;
|
|
12954
12981
|
exports.BasiqService = BasiqService;
|
|
12955
12982
|
exports.BasiqToken = BasiqToken;
|
|
@@ -13064,12 +13091,12 @@
|
|
|
13064
13091
|
exports.PropertyEquityChartData = PropertyEquityChartData;
|
|
13065
13092
|
exports.PropertyEquityChartItem = PropertyEquityChartItem;
|
|
13066
13093
|
exports.PropertyForecast = PropertyForecast;
|
|
13067
|
-
exports.PropertyOwner = PropertyOwner;
|
|
13068
|
-
exports.PropertyOwnerService = PropertyOwnerService;
|
|
13069
13094
|
exports.PropertySale = PropertySale;
|
|
13070
13095
|
exports.PropertySaleService = PropertySaleService;
|
|
13071
13096
|
exports.PropertySaleTaxExemptionMetadata = PropertySaleTaxExemptionMetadata;
|
|
13072
13097
|
exports.PropertyService = PropertyService;
|
|
13098
|
+
exports.PropertyShare = PropertyShare;
|
|
13099
|
+
exports.PropertyShareService = PropertyShareService;
|
|
13073
13100
|
exports.PropertySubscription = PropertySubscription;
|
|
13074
13101
|
exports.PropertyValuation = PropertyValuation;
|
|
13075
13102
|
exports.RegisterClientForm = RegisterClientForm;
|