taxtank-core 0.8.2 → 0.8.6
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 +84 -62
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/collection.js +2 -2
- package/esm2015/lib/collections/depreciation.collection.js +3 -3
- package/esm2015/lib/collections/tax-summary/report-item.collection.js +141 -0
- package/esm2015/lib/models/property/property.js +7 -4
- package/esm2015/lib/models/tax-summary/report-item-details.js +9 -0
- package/esm2015/lib/models/tax-summary/report-item.js +15 -0
- package/esm2015/lib/models/tax-summary/tax-summary-section.js +5 -5
- package/esm2015/lib/services/subscription/subscription.service.js +35 -16
- package/esm2015/public-api.js +4 -4
- package/fesm2015/taxtank-core.js +49 -28
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/collection.d.ts +1 -1
- package/lib/collections/{tax-return-category-item.collection.d.ts → tax-summary/report-item.collection.d.ts} +5 -5
- package/lib/models/property/property.d.ts +1 -0
- package/lib/models/tax-summary/{tax-return-category-item-details.d.ts → report-item-details.d.ts} +2 -2
- package/lib/models/tax-summary/{tax-return-category-item.d.ts → report-item.d.ts} +4 -4
- package/lib/models/tax-summary/tax-summary-section.d.ts +2 -2
- package/lib/services/subscription/subscription.service.d.ts +9 -4
- package/package.json +1 -1
- package/public-api.d.ts +3 -3
- package/esm2015/lib/collections/tax-return-category-item.collection.js +0 -141
- package/esm2015/lib/models/tax-summary/tax-return-category-item-details.js +0 -9
- package/esm2015/lib/models/tax-summary/tax-return-category-item.js +0 -15
|
@@ -1261,7 +1261,7 @@
|
|
|
1261
1261
|
Collection.prototype.getIds = function () {
|
|
1262
1262
|
return this.items.map(function (item) { return item['id']; });
|
|
1263
1263
|
};
|
|
1264
|
-
Collection.prototype.
|
|
1264
|
+
Collection.prototype.findBy = function (path, value) {
|
|
1265
1265
|
return this.items.find(function (item) { return get__default["default"](item, path) === value; });
|
|
1266
1266
|
};
|
|
1267
1267
|
Collection.prototype.getBy = function (path, value) {
|
|
@@ -1952,8 +1952,8 @@
|
|
|
1952
1952
|
});
|
|
1953
1953
|
DepreciationCollection.prototype.getClaimAmountByYear = function (year) {
|
|
1954
1954
|
if (year === void 0) { year = +localStorage.getItem('financialYear'); }
|
|
1955
|
-
return this.items.reduce(function (sum, depreciation) {
|
|
1956
|
-
return sum + depreciation.
|
|
1955
|
+
return this.amount - this.items.reduce(function (sum, depreciation) {
|
|
1956
|
+
return sum + depreciation.getCloseBalanceByYear(year);
|
|
1957
1957
|
}, 0);
|
|
1958
1958
|
};
|
|
1959
1959
|
DepreciationCollection.prototype.getCloseBalanceByYear = function (year) {
|
|
@@ -2536,12 +2536,12 @@
|
|
|
2536
2536
|
/**
|
|
2537
2537
|
* collection for tax return category items
|
|
2538
2538
|
*/
|
|
2539
|
-
var
|
|
2540
|
-
__extends(
|
|
2541
|
-
function
|
|
2539
|
+
var ReportItemCollection = /** @class */ (function (_super) {
|
|
2540
|
+
__extends(ReportItemCollection, _super);
|
|
2541
|
+
function ReportItemCollection() {
|
|
2542
2542
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
2543
2543
|
}
|
|
2544
|
-
Object.defineProperty(
|
|
2544
|
+
Object.defineProperty(ReportItemCollection.prototype, "salary", {
|
|
2545
2545
|
/**
|
|
2546
2546
|
* Work income
|
|
2547
2547
|
*/
|
|
@@ -2552,7 +2552,7 @@
|
|
|
2552
2552
|
enumerable: false,
|
|
2553
2553
|
configurable: true
|
|
2554
2554
|
});
|
|
2555
|
-
Object.defineProperty(
|
|
2555
|
+
Object.defineProperty(ReportItemCollection.prototype, "workExpenses", {
|
|
2556
2556
|
/**
|
|
2557
2557
|
* Work expenses
|
|
2558
2558
|
*/
|
|
@@ -2563,7 +2563,7 @@
|
|
|
2563
2563
|
enumerable: false,
|
|
2564
2564
|
configurable: true
|
|
2565
2565
|
});
|
|
2566
|
-
Object.defineProperty(
|
|
2566
|
+
Object.defineProperty(ReportItemCollection.prototype, "rentalIncome", {
|
|
2567
2567
|
/**
|
|
2568
2568
|
* Property income
|
|
2569
2569
|
*/
|
|
@@ -2574,7 +2574,7 @@
|
|
|
2574
2574
|
enumerable: false,
|
|
2575
2575
|
configurable: true
|
|
2576
2576
|
});
|
|
2577
|
-
Object.defineProperty(
|
|
2577
|
+
Object.defineProperty(ReportItemCollection.prototype, "rentalDeductions", {
|
|
2578
2578
|
/**
|
|
2579
2579
|
* Property rental deductions
|
|
2580
2580
|
*/
|
|
@@ -2585,7 +2585,7 @@
|
|
|
2585
2585
|
enumerable: false,
|
|
2586
2586
|
configurable: true
|
|
2587
2587
|
});
|
|
2588
|
-
Object.defineProperty(
|
|
2588
|
+
Object.defineProperty(ReportItemCollection.prototype, "propertyExpenses", {
|
|
2589
2589
|
/**
|
|
2590
2590
|
* Property expenses
|
|
2591
2591
|
*/
|
|
@@ -2595,7 +2595,7 @@
|
|
|
2595
2595
|
enumerable: false,
|
|
2596
2596
|
configurable: true
|
|
2597
2597
|
});
|
|
2598
|
-
Object.defineProperty(
|
|
2598
|
+
Object.defineProperty(ReportItemCollection.prototype, "interestDeductions", {
|
|
2599
2599
|
/**
|
|
2600
2600
|
* Property interest
|
|
2601
2601
|
*/
|
|
@@ -2606,7 +2606,7 @@
|
|
|
2606
2606
|
enumerable: false,
|
|
2607
2607
|
configurable: true
|
|
2608
2608
|
});
|
|
2609
|
-
Object.defineProperty(
|
|
2609
|
+
Object.defineProperty(ReportItemCollection.prototype, "capitalWorks", {
|
|
2610
2610
|
/**
|
|
2611
2611
|
* Property capital works depreciations
|
|
2612
2612
|
*/
|
|
@@ -2617,7 +2617,7 @@
|
|
|
2617
2617
|
enumerable: false,
|
|
2618
2618
|
configurable: true
|
|
2619
2619
|
});
|
|
2620
|
-
Object.defineProperty(
|
|
2620
|
+
Object.defineProperty(ReportItemCollection.prototype, "plantEquipment", {
|
|
2621
2621
|
/**
|
|
2622
2622
|
* Property plant & equipment depreciations
|
|
2623
2623
|
*/
|
|
@@ -2628,7 +2628,7 @@
|
|
|
2628
2628
|
enumerable: false,
|
|
2629
2629
|
configurable: true
|
|
2630
2630
|
});
|
|
2631
|
-
Object.defineProperty(
|
|
2631
|
+
Object.defineProperty(ReportItemCollection.prototype, "propertyDepreciations", {
|
|
2632
2632
|
/**
|
|
2633
2633
|
* Total property depreciaions
|
|
2634
2634
|
*/
|
|
@@ -2638,7 +2638,7 @@
|
|
|
2638
2638
|
enumerable: false,
|
|
2639
2639
|
configurable: true
|
|
2640
2640
|
});
|
|
2641
|
-
Object.defineProperty(
|
|
2641
|
+
Object.defineProperty(ReportItemCollection.prototype, "partnershipsAndTrusts", {
|
|
2642
2642
|
get: function () {
|
|
2643
2643
|
var _a;
|
|
2644
2644
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.PARTNERSHIPS_TRUSTS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2646,7 +2646,7 @@
|
|
|
2646
2646
|
enumerable: false,
|
|
2647
2647
|
configurable: true
|
|
2648
2648
|
});
|
|
2649
|
-
Object.defineProperty(
|
|
2649
|
+
Object.defineProperty(ReportItemCollection.prototype, "pciAndSbeIncome", {
|
|
2650
2650
|
get: function () {
|
|
2651
2651
|
var _a;
|
|
2652
2652
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.PCI_SBE_INCOME)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2654,7 +2654,7 @@
|
|
|
2654
2654
|
enumerable: false,
|
|
2655
2655
|
configurable: true
|
|
2656
2656
|
});
|
|
2657
|
-
Object.defineProperty(
|
|
2657
|
+
Object.defineProperty(ReportItemCollection.prototype, "capitalGains", {
|
|
2658
2658
|
get: function () {
|
|
2659
2659
|
var _a;
|
|
2660
2660
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.CAPITAL_GAINS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2662,7 +2662,7 @@
|
|
|
2662
2662
|
enumerable: false,
|
|
2663
2663
|
configurable: true
|
|
2664
2664
|
});
|
|
2665
|
-
Object.defineProperty(
|
|
2665
|
+
Object.defineProperty(ReportItemCollection.prototype, "foreignSourceIncome", {
|
|
2666
2666
|
get: function () {
|
|
2667
2667
|
var _a;
|
|
2668
2668
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.FOREIGN_SOURCE_INCOME)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2670,7 +2670,7 @@
|
|
|
2670
2670
|
enumerable: false,
|
|
2671
2671
|
configurable: true
|
|
2672
2672
|
});
|
|
2673
|
-
Object.defineProperty(
|
|
2673
|
+
Object.defineProperty(ReportItemCollection.prototype, "otherIncome", {
|
|
2674
2674
|
/**
|
|
2675
2675
|
* Other income
|
|
2676
2676
|
*/
|
|
@@ -2685,7 +2685,7 @@
|
|
|
2685
2685
|
enumerable: false,
|
|
2686
2686
|
configurable: true
|
|
2687
2687
|
});
|
|
2688
|
-
Object.defineProperty(
|
|
2688
|
+
Object.defineProperty(ReportItemCollection.prototype, "otherDeductions", {
|
|
2689
2689
|
/**
|
|
2690
2690
|
* Other expenses
|
|
2691
2691
|
*/
|
|
@@ -2696,7 +2696,7 @@
|
|
|
2696
2696
|
enumerable: false,
|
|
2697
2697
|
configurable: true
|
|
2698
2698
|
});
|
|
2699
|
-
Object.defineProperty(
|
|
2699
|
+
Object.defineProperty(ReportItemCollection.prototype, "taxInstalments", {
|
|
2700
2700
|
get: function () {
|
|
2701
2701
|
var _a;
|
|
2702
2702
|
return ((_a = this.getTaxCreditsCollection().getByCategory(exports.TaxReturnCategoryListEnum.TAX_INSTALMENTS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2704,7 +2704,7 @@
|
|
|
2704
2704
|
enumerable: false,
|
|
2705
2705
|
configurable: true
|
|
2706
2706
|
});
|
|
2707
|
-
Object.defineProperty(
|
|
2707
|
+
Object.defineProperty(ReportItemCollection.prototype, "frankingCredits", {
|
|
2708
2708
|
get: function () {
|
|
2709
2709
|
var _a;
|
|
2710
2710
|
return ((_a = this.getTaxCreditsCollection().getByCategory(exports.TaxReturnCategoryListEnum.FRANKING_CREDITS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2712,7 +2712,7 @@
|
|
|
2712
2712
|
enumerable: false,
|
|
2713
2713
|
configurable: true
|
|
2714
2714
|
});
|
|
2715
|
-
Object.defineProperty(
|
|
2715
|
+
Object.defineProperty(ReportItemCollection.prototype, "taxOffsets", {
|
|
2716
2716
|
get: function () {
|
|
2717
2717
|
var _a;
|
|
2718
2718
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.TAX_OFFSETS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2720,7 +2720,7 @@
|
|
|
2720
2720
|
enumerable: false,
|
|
2721
2721
|
configurable: true
|
|
2722
2722
|
});
|
|
2723
|
-
Object.defineProperty(
|
|
2723
|
+
Object.defineProperty(ReportItemCollection.prototype, "borrowingExpenses", {
|
|
2724
2724
|
get: function () {
|
|
2725
2725
|
var _a;
|
|
2726
2726
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.BORROWING_EXPENSES)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2728,7 +2728,7 @@
|
|
|
2728
2728
|
enumerable: false,
|
|
2729
2729
|
configurable: true
|
|
2730
2730
|
});
|
|
2731
|
-
Object.defineProperty(
|
|
2731
|
+
Object.defineProperty(ReportItemCollection.prototype, "grossTaxPayable", {
|
|
2732
2732
|
get: function () {
|
|
2733
2733
|
var _a;
|
|
2734
2734
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.GROSS_TAX_PAYABLE)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2739,22 +2739,22 @@
|
|
|
2739
2739
|
/**
|
|
2740
2740
|
* taxWithheld by section (work or other)
|
|
2741
2741
|
*/
|
|
2742
|
-
|
|
2742
|
+
ReportItemCollection.prototype.getTaxWithheld = function (section) {
|
|
2743
2743
|
if (section === void 0) { section = exports.TaxReturnCategorySectionEnum.WORK_TANK; }
|
|
2744
2744
|
var _a;
|
|
2745
2745
|
return ((_a = this.getTaxCreditsCollection().getByCategory(exports.TaxReturnCategoryListEnum.TAX_WITHHELD)) === null || _a === void 0 ? void 0 : _a.details.filter(function (details) { return details.section === section; }).reduce(function (sum, details) { return sum + details.amount; }, 0)) || 0;
|
|
2746
2746
|
};
|
|
2747
|
-
|
|
2747
|
+
ReportItemCollection.prototype.getTaxCreditsCollection = function () {
|
|
2748
2748
|
var _a;
|
|
2749
|
-
return new
|
|
2749
|
+
return new ReportItemCollection(((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.TAX_CREDITS)) === null || _a === void 0 ? void 0 : _a.items) || []);
|
|
2750
2750
|
};
|
|
2751
|
-
|
|
2751
|
+
ReportItemCollection.prototype.getTotalAmountByIncomeSourceName = function (name) {
|
|
2752
2752
|
return this.items.reduce((function (sum, item) { return sum + item.getAmountByIncomeSourceName(name); }), 0);
|
|
2753
2753
|
};
|
|
2754
|
-
|
|
2754
|
+
ReportItemCollection.prototype.getByCategory = function (category) {
|
|
2755
2755
|
return this.items.find(function (item) { return item.taxReturnCategory.id === category; });
|
|
2756
2756
|
};
|
|
2757
|
-
return
|
|
2757
|
+
return ReportItemCollection;
|
|
2758
2758
|
}(Collection));
|
|
2759
2759
|
|
|
2760
2760
|
/**
|
|
@@ -4756,7 +4756,7 @@
|
|
|
4756
4756
|
* net capital gain tax (includes tax exemptions)
|
|
4757
4757
|
*/
|
|
4758
4758
|
Property.prototype.calculateNetCGT = function (sale) {
|
|
4759
|
-
return this.getCGTExemptionRatio(sale) *
|
|
4759
|
+
return this.getCGTExemptionRatio(sale) * sale.cgt;
|
|
4760
4760
|
};
|
|
4761
4761
|
/**
|
|
4762
4762
|
* guess tax exemption based on property details
|
|
@@ -4770,7 +4770,7 @@
|
|
|
4770
4770
|
case this.category.id === PropertyCategoryListEnum.OWNER_OCCUPIED:
|
|
4771
4771
|
return exports.TaxExemptionEnum.PPR;
|
|
4772
4772
|
// exemption for investment properties owned for at least one year
|
|
4773
|
-
case this.
|
|
4773
|
+
case this.isOneYearExemptionApplicable(sale):
|
|
4774
4774
|
return exports.TaxExemptionEnum.ONE_YEAR_RULE;
|
|
4775
4775
|
default:
|
|
4776
4776
|
return null;
|
|
@@ -4793,7 +4793,7 @@
|
|
|
4793
4793
|
// main residence become investment (exemption for home office percent usage)
|
|
4794
4794
|
case exports.TaxExemptionEnum.PPR_TO_INVESTMENT:
|
|
4795
4795
|
// 1 year CGT discount can still apply (on the income producing % if used for 12 months or more)
|
|
4796
|
-
var ratio = this.
|
|
4796
|
+
var ratio = this.isOneYearExemptionApplicable(sale) ? 0.5 : 1;
|
|
4797
4797
|
return metadata.getClaimPercent() / 100 * ratio;
|
|
4798
4798
|
// full exemption
|
|
4799
4799
|
case exports.TaxExemptionEnum.PPR:
|
|
@@ -4806,6 +4806,9 @@
|
|
|
4806
4806
|
return 1;
|
|
4807
4807
|
}
|
|
4808
4808
|
};
|
|
4809
|
+
Property.prototype.isOneYearExemptionApplicable = function (sale) {
|
|
4810
|
+
return sale.cgt > 0 && this.getOwnershipDuration(sale, 'years') > 0;
|
|
4811
|
+
};
|
|
4809
4812
|
/**
|
|
4810
4813
|
* ownership duration from purchase till sale
|
|
4811
4814
|
*/
|
|
@@ -7790,30 +7793,30 @@
|
|
|
7790
7793
|
* Used in tax summary reports to show amounts relating to a tax return category entity and details of what this
|
|
7791
7794
|
* amount is comprised of. Example here shows an amount of $951.96 and also details of what this amount is comprised of:
|
|
7792
7795
|
*/
|
|
7793
|
-
var
|
|
7794
|
-
function
|
|
7796
|
+
var ReportItem = /** @class */ (function () {
|
|
7797
|
+
function ReportItem() {
|
|
7795
7798
|
}
|
|
7796
7799
|
/**
|
|
7797
7800
|
* Get amount for one income source
|
|
7798
7801
|
* @param name Name of income source for filter
|
|
7799
7802
|
*/
|
|
7800
|
-
|
|
7803
|
+
ReportItem.prototype.getAmountByIncomeSourceName = function (name) {
|
|
7801
7804
|
var _a;
|
|
7802
7805
|
return ((_a = this.details.find(function (detail) { return detail.name === name; })) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
7803
7806
|
};
|
|
7804
|
-
return
|
|
7807
|
+
return ReportItem;
|
|
7805
7808
|
}());
|
|
7806
7809
|
|
|
7807
7810
|
/**
|
|
7808
7811
|
* Used in tax summary reports to show specific details relating to an amount in the report.
|
|
7809
|
-
* See structure in
|
|
7812
|
+
* See structure in ReportItem class.
|
|
7810
7813
|
* Example an amount of $550 for property income could be comprised of 2 different property amounts of $300 and $250.
|
|
7811
7814
|
* This is useful in providing drill-down information for the tax summary report.
|
|
7812
7815
|
*/
|
|
7813
|
-
var
|
|
7814
|
-
function
|
|
7816
|
+
var ReportItemDetails = /** @class */ (function () {
|
|
7817
|
+
function ReportItemDetails() {
|
|
7815
7818
|
}
|
|
7816
|
-
return
|
|
7819
|
+
return ReportItemDetails;
|
|
7817
7820
|
}());
|
|
7818
7821
|
|
|
7819
7822
|
/**
|
|
@@ -7826,10 +7829,10 @@
|
|
|
7826
7829
|
return TaxSummarySection;
|
|
7827
7830
|
}());
|
|
7828
7831
|
__decorate([
|
|
7829
|
-
classTransformer.Type(function () { return
|
|
7832
|
+
classTransformer.Type(function () { return ReportItem; }),
|
|
7830
7833
|
classTransformer.Transform(function (_a) {
|
|
7831
7834
|
var value = _a.value;
|
|
7832
|
-
return new
|
|
7835
|
+
return new ReportItemCollection(value);
|
|
7833
7836
|
})
|
|
7834
7837
|
], TaxSummarySection.prototype, "items", void 0);
|
|
7835
7838
|
__decorate([
|
|
@@ -11406,17 +11409,24 @@
|
|
|
11406
11409
|
}] });
|
|
11407
11410
|
|
|
11408
11411
|
var SubscriptionService = /** @class */ (function () {
|
|
11409
|
-
function SubscriptionService(http, eventDispatcherService, environment) {
|
|
11412
|
+
function SubscriptionService(http, eventDispatcherService, sseService, environment) {
|
|
11410
11413
|
this.http = http;
|
|
11411
11414
|
this.eventDispatcherService = eventDispatcherService;
|
|
11415
|
+
this.sseService = sseService;
|
|
11412
11416
|
this.environment = environment;
|
|
11413
11417
|
this.serviceSubscriptionSubject = new rxjs.ReplaySubject(1);
|
|
11414
11418
|
this.serviceSubscriptionsSubject = new rxjs.ReplaySubject(1);
|
|
11415
11419
|
this.servicePaymentsSubject = new rxjs.ReplaySubject(1);
|
|
11420
|
+
this.subscriptionChangeSubject = new rxjs.BehaviorSubject(null);
|
|
11421
|
+
this.listenEvents();
|
|
11416
11422
|
}
|
|
11417
|
-
SubscriptionService.prototype.
|
|
11423
|
+
SubscriptionService.prototype.listenEvents = function () {
|
|
11424
|
+
this.listenSubscriptions();
|
|
11425
|
+
};
|
|
11426
|
+
SubscriptionService.prototype.getSubscription = function (force) {
|
|
11418
11427
|
var _this = this;
|
|
11419
|
-
if (
|
|
11428
|
+
if (force === void 0) { force = false; }
|
|
11429
|
+
if (!this._serviceSubscription || force) {
|
|
11420
11430
|
this.http.get(this.environment.apiV2 + "/subscriptions/last")
|
|
11421
11431
|
.pipe(operators.map(function (response) {
|
|
11422
11432
|
return classTransformer.plainToClass(ServiceSubscription, response);
|
|
@@ -11443,8 +11453,18 @@
|
|
|
11443
11453
|
.subscribe(function (prices) {
|
|
11444
11454
|
_this._serviceSubscriptions = new ServiceSubscriptionCollection([
|
|
11445
11455
|
classTransformer.plainToClass(ServiceSubscription, { items: [] }),
|
|
11446
|
-
classTransformer.plainToClass(ServiceSubscription, {
|
|
11447
|
-
|
|
11456
|
+
classTransformer.plainToClass(ServiceSubscription, {
|
|
11457
|
+
items: [classTransformer.plainToClass(ServiceSubscriptionItem, {
|
|
11458
|
+
price: prices.property,
|
|
11459
|
+
quantity: 2
|
|
11460
|
+
})]
|
|
11461
|
+
}),
|
|
11462
|
+
classTransformer.plainToClass(ServiceSubscription, {
|
|
11463
|
+
items: [classTransformer.plainToClass(ServiceSubscriptionItem, {
|
|
11464
|
+
price: prices.property,
|
|
11465
|
+
quantity: 3
|
|
11466
|
+
})]
|
|
11467
|
+
})
|
|
11448
11468
|
]);
|
|
11449
11469
|
_this._serviceSubscriptions.items.forEach(function (subscription) {
|
|
11450
11470
|
subscription.items.push(classTransformer.plainToClass(ServiceSubscriptionItem, { price: prices.work, quantity: 1 }));
|
|
@@ -11514,19 +11534,21 @@
|
|
|
11514
11534
|
* Change subscription plan
|
|
11515
11535
|
*/
|
|
11516
11536
|
SubscriptionService.prototype.changeSubscription = function (items) {
|
|
11537
|
+
return this.http.put(this.environment.apiV2 + "/subscriptions/items", items);
|
|
11538
|
+
};
|
|
11539
|
+
SubscriptionService.prototype.listenSubscriptions = function () {
|
|
11517
11540
|
var _this = this;
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
_this.
|
|
11522
|
-
|
|
11541
|
+
this.sseService.on("serviceSubscriptions")
|
|
11542
|
+
.pipe(operators.map(function (event) { return classTransformer.plainToClass(ServiceSubscription, event); }))
|
|
11543
|
+
.subscribe(function (subscription) {
|
|
11544
|
+
_this.getSubscription(true).subscribe();
|
|
11545
|
+
_this.subscriptionChangeSubject.next(subscription);
|
|
11523
11546
|
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.SERVICE_SUBSCRIPTION_UPDATED, null));
|
|
11524
|
-
|
|
11525
|
-
}));
|
|
11547
|
+
});
|
|
11526
11548
|
};
|
|
11527
11549
|
return SubscriptionService;
|
|
11528
11550
|
}());
|
|
11529
|
-
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 });
|
|
11551
|
+
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 });
|
|
11530
11552
|
SubscriptionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SubscriptionService, providedIn: 'root' });
|
|
11531
11553
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SubscriptionService, decorators: [{
|
|
11532
11554
|
type: i0.Injectable,
|
|
@@ -11534,7 +11556,7 @@
|
|
|
11534
11556
|
providedIn: 'root'
|
|
11535
11557
|
}]
|
|
11536
11558
|
}], ctorParameters: function () {
|
|
11537
|
-
return [{ type: i1__namespace.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
|
|
11559
|
+
return [{ type: i1__namespace.HttpClient }, { type: EventDispatcherService }, { type: SseService }, { type: undefined, decorators: [{
|
|
11538
11560
|
type: i0.Inject,
|
|
11539
11561
|
args: ['environment']
|
|
11540
11562
|
}] }];
|
|
@@ -13083,6 +13105,9 @@
|
|
|
13083
13105
|
exports.RegisterClientForm = RegisterClientForm;
|
|
13084
13106
|
exports.RegisterFirmForm = RegisterFirmForm;
|
|
13085
13107
|
exports.RegistrationInvite = RegistrationInvite;
|
|
13108
|
+
exports.ReportItem = ReportItem;
|
|
13109
|
+
exports.ReportItemCollection = ReportItemCollection;
|
|
13110
|
+
exports.ReportItemDetails = ReportItemDetails;
|
|
13086
13111
|
exports.ResetPasswordForm = ResetPasswordForm;
|
|
13087
13112
|
exports.SUBSCRIPTION_DESCRIPTION = SUBSCRIPTION_DESCRIPTION;
|
|
13088
13113
|
exports.SUBSCRIPTION_TITLE = SUBSCRIPTION_TITLE;
|
|
@@ -13103,9 +13128,6 @@
|
|
|
13103
13128
|
exports.TaxExemption = TaxExemption;
|
|
13104
13129
|
exports.TaxExemptionMetadata = TaxExemptionMetadata;
|
|
13105
13130
|
exports.TaxExemptionService = TaxExemptionService;
|
|
13106
|
-
exports.TaxReturnCategoryItem = TaxReturnCategoryItem;
|
|
13107
|
-
exports.TaxReturnCategoryItemCollection = TaxReturnCategoryItemCollection;
|
|
13108
|
-
exports.TaxReturnCategoryItemDetails = TaxReturnCategoryItemDetails;
|
|
13109
13131
|
exports.TaxReview = TaxReview;
|
|
13110
13132
|
exports.TaxReviewCollection = TaxReviewCollection;
|
|
13111
13133
|
exports.TaxReviewHistoryService = TaxReviewHistoryService;
|