taxtank-core 0.32.25 → 0.32.26
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/esm2022/lib/db/Models/document/document-folder.mjs +1 -1
- package/esm2022/lib/db/Models/document/folder-document.mjs +4 -0
- package/esm2022/lib/db/Models/index.mjs +2 -3
- package/esm2022/lib/interfaces/index.mjs +1 -2
- package/esm2022/lib/models/budget/budget.mjs +1 -4
- package/esm2022/lib/models/client/annual-client-details.mjs +1 -13
- package/esm2022/lib/models/client/client-income-types.mjs +1 -4
- package/esm2022/lib/models/depreciation/depreciation-capital-project.mjs +1 -7
- package/esm2022/lib/models/document/document-folder.mjs +1 -4
- package/esm2022/lib/models/document/document.mjs +3 -6
- package/esm2022/lib/models/holding/holding-sale.mjs +1 -4
- package/esm2022/lib/models/holding/holding-type.mjs +1 -4
- package/esm2022/lib/models/holding/holding.mjs +1 -4
- package/esm2022/lib/models/property/property-category-movement.mjs +1 -7
- package/esm2022/lib/models/property/property-category.mjs +1 -6
- package/esm2022/lib/models/property/property-document.mjs +1 -6
- package/esm2022/lib/models/property/property-forecast.mjs +1 -7
- package/esm2022/lib/models/property/property-sale/property-sale.mjs +1 -8
- package/esm2022/lib/models/property/property-share.mjs +1 -7
- package/esm2022/lib/models/property/property-subscription.mjs +1 -1
- package/esm2022/lib/models/property/property-valuation.mjs +1 -7
- package/esm2022/lib/models/property/property.mjs +1 -9
- package/esm2022/lib/models/user/user.mjs +1 -6
- package/esm2022/lib/models/user-event/user-event-setting.mjs +1 -4
- package/esm2022/lib/services/auth/auth.service.mjs +3 -8
- package/esm2022/lib/services/auth/jwt.service.mjs +1 -1
- package/esm2022/lib/services/http/bank/bank-connection/bank-connection.service.mjs +3 -3
- package/esm2022/lib/services/http/document/document.service.mjs +1 -1
- package/esm2022/lib/services/http/facebook/facebook.service.mjs +4 -7
- package/esm2022/lib/services/http/firm/client-invite/client-invite.service.mjs +3 -3
- package/esm2022/lib/services/http/google/google.service.mjs +1 -2
- package/esm2022/lib/services/http/property/property-category-movement/property-category-movement.service.mjs +2 -7
- package/esm2022/lib/services/http/property/property-share/property-share.service.mjs +2 -10
- package/esm2022/lib/services/http/property/property-valuation/property-valuation.service.mjs +2 -7
- package/esm2022/lib/services/http/property/property.service.mjs +2 -19
- package/esm2022/lib/services/http/rest/rest-old.service.mjs +1 -7
- package/esm2022/lib/services/http/rest/rest.service.mjs +9 -53
- package/esm2022/lib/services/http/subscription/service-subscription/subscription.service.mjs +2 -2
- package/esm2022/lib/services/http/user/financial-year/financial-year.service.mjs +4 -7
- package/esm2022/lib/services/http/user/user.service.mjs +11 -41
- package/fesm2022/taxtank-core.mjs +96 -310
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/lib/db/Models/document/document-folder.d.ts.map +1 -0
- package/lib/db/Models/document/{document.d.ts → folder-document.d.ts} +1 -1
- package/lib/db/Models/document/folder-document.d.ts.map +1 -0
- package/lib/db/Models/index.d.ts +1 -2
- package/lib/db/Models/index.d.ts.map +1 -0
- package/lib/interfaces/index.d.ts +0 -1
- package/lib/interfaces/index.d.ts.map +1 -0
- package/lib/models/budget/budget.d.ts +1 -3
- package/lib/models/budget/budget.d.ts.map +1 -0
- package/lib/models/client/annual-client-details.d.ts +1 -12
- package/lib/models/client/annual-client-details.d.ts.map +1 -0
- package/lib/models/client/client-income-types.d.ts +1 -8
- package/lib/models/client/client-income-types.d.ts.map +1 -0
- package/lib/models/depreciation/depreciation-capital-project.d.ts +1 -7
- package/lib/models/depreciation/depreciation-capital-project.d.ts.map +1 -0
- package/lib/models/document/document-folder.d.ts +1 -5
- package/lib/models/document/document-folder.d.ts.map +1 -0
- package/lib/models/document/document.d.ts +2 -4
- package/lib/models/document/document.d.ts.map +1 -0
- package/lib/models/holding/holding-sale.d.ts +1 -7
- package/lib/models/holding/holding-sale.d.ts.map +1 -0
- package/lib/models/holding/holding-type.d.ts +1 -6
- package/lib/models/holding/holding-type.d.ts.map +1 -0
- package/lib/models/holding/holding.d.ts +1 -6
- package/lib/models/holding/holding.d.ts.map +1 -0
- package/lib/models/property/property-category-movement.d.ts +1 -6
- package/lib/models/property/property-category-movement.d.ts.map +1 -0
- package/lib/models/property/property-category.d.ts +1 -5
- package/lib/models/property/property-category.d.ts.map +1 -0
- package/lib/models/property/property-document.d.ts +1 -5
- package/lib/models/property/property-document.d.ts.map +1 -0
- package/lib/models/property/property-forecast.d.ts +1 -7
- package/lib/models/property/property-forecast.d.ts.map +1 -0
- package/lib/models/property/property-sale/property-sale.d.ts +1 -7
- package/lib/models/property/property-sale/property-sale.d.ts.map +1 -0
- package/lib/models/property/property-share.d.ts +1 -6
- package/lib/models/property/property-share.d.ts.map +1 -0
- package/lib/models/property/property-subscription.d.ts.map +1 -0
- package/lib/models/property/property-valuation.d.ts +1 -7
- package/lib/models/property/property-valuation.d.ts.map +1 -0
- package/lib/models/property/property.d.ts +1 -8
- package/lib/models/property/property.d.ts.map +1 -0
- package/lib/models/user/user.d.ts +1 -5
- package/lib/models/user/user.d.ts.map +1 -0
- package/lib/models/user-event/user-event-setting.d.ts +1 -8
- package/lib/models/user-event/user-event-setting.d.ts.map +1 -0
- package/lib/services/auth/auth.service.d.ts.map +1 -0
- package/lib/services/auth/jwt.service.d.ts.map +1 -0
- package/lib/services/http/bank/bank-connection/bank-connection.service.d.ts.map +1 -0
- package/lib/services/http/bank/bank.service.d.ts.map +1 -0
- package/lib/services/http/bank/basiq/basiq-token.service.d.ts.map +1 -0
- package/lib/services/http/budget/budget.service.d.ts.map +1 -0
- package/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.d.ts.map +1 -0
- package/lib/services/http/chart-accounts/chart-accounts.service.d.ts.map +1 -0
- package/lib/services/http/client/capital-gain/annual-client-details.service.d.ts.map +1 -0
- package/lib/services/http/depreciation/depreciation-capital-project/depreciation-capital-project.service.d.ts.map +1 -0
- package/lib/services/http/document/document-folder/document-folder.service.d.ts.map +1 -0
- package/lib/services/http/document/document.service.d.ts +2 -2
- package/lib/services/http/document/document.service.d.ts.map +1 -0
- package/lib/services/http/facebook/facebook.service.d.ts +1 -3
- package/lib/services/http/facebook/facebook.service.d.ts.map +1 -0
- package/lib/services/http/file/file.service.d.ts.map +1 -0
- package/lib/services/http/firm/client-income/client-income-types.service.d.ts.map +1 -0
- package/lib/services/http/firm/client-invite/client-invite.service.d.ts.map +1 -0
- package/lib/services/http/firm/employee/employee.service.d.ts.map +1 -0
- package/lib/services/http/firm/employee-invite/employee-invite.service.d.ts.map +1 -0
- package/lib/services/http/google/google.service.d.ts.map +1 -0
- package/lib/services/http/holding/holding-sale.service.d.ts.map +1 -0
- package/lib/services/http/holding/holding-type.service.d.ts.map +1 -0
- package/lib/services/http/property/borrowing-report/borrowing-report.service.d.ts.map +1 -0
- package/lib/services/http/property/property-category/property-category.service.d.ts.map +1 -0
- package/lib/services/http/property/property-category-movement/property-category-movement.service.d.ts +1 -3
- package/lib/services/http/property/property-category-movement/property-category-movement.service.d.ts.map +1 -0
- package/lib/services/http/property/property-document/property-document.service.d.ts.map +1 -0
- package/lib/services/http/property/property-sale/property-sale.service.d.ts.map +1 -0
- package/lib/services/http/property/property-share/property-share.service.d.ts +1 -1
- package/lib/services/http/property/property-share/property-share.service.d.ts.map +1 -0
- package/lib/services/http/property/property-valuation/property-valuation.service.d.ts +1 -3
- package/lib/services/http/property/property-valuation/property-valuation.service.d.ts.map +1 -0
- package/lib/services/http/property/property.service.d.ts.map +1 -0
- package/lib/services/http/rest/rest-old.service.d.ts +0 -2
- package/lib/services/http/rest/rest-old.service.d.ts.map +1 -0
- package/lib/services/http/rest/rest.service.d.ts +4 -8
- package/lib/services/http/rest/rest.service.d.ts.map +1 -0
- package/lib/services/http/setup-item/setup-item.service.d.ts.map +1 -0
- package/lib/services/http/sole/bas-report/bas-report.service.d.ts.map +1 -0
- package/lib/services/http/sole/sole-business/sole-business.service.d.ts.map +1 -0
- package/lib/services/http/sole/sole-business-activity/sole-business-activity.service.d.ts.map +1 -0
- package/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.d.ts.map +1 -0
- package/lib/services/http/sole/sole-contact/sole-contact.service.d.ts.map +1 -0
- package/lib/services/http/sole/sole-invoice-template/sole-invoice-template.service.d.ts.map +1 -0
- package/lib/services/http/subscription/service-payment/service-payment.service.d.ts.map +1 -0
- package/lib/services/http/subscription/service-price/service-price.service.d.ts.map +1 -0
- package/lib/services/http/subscription/service-product/service-product.service.d.ts.map +1 -0
- package/lib/services/http/subscription/service-subscription/subscription.service.d.ts.map +1 -0
- package/lib/services/http/transaction/transaction-allocation/allocation-rule/allocation-rule.service.d.ts.map +1 -0
- package/lib/services/http/user/financial-year/financial-year.service.d.ts +1 -3
- package/lib/services/http/user/financial-year/financial-year.service.d.ts.map +1 -0
- package/lib/services/http/user/user-event-setting/user-event-setting.service.d.ts.map +1 -0
- package/lib/services/http/user/user-event-type/user-event-type.service.d.ts.map +1 -0
- package/lib/services/http/user/user.service.d.ts +2 -0
- package/lib/services/http/user/user.service.d.ts.map +1 -0
- package/lib/services/http/user/users-invite/users-invite.service.d.ts.map +1 -0
- package/lib/services/http/vehicle/vehicle-claim.service.d.ts.map +1 -0
- package/lib/services/http/vehicle/vehicle-logbook/vehicle-logbook.service.d.ts.map +1 -0
- package/lib/services/http/vehicle/vehicle.service.d.ts.map +1 -0
- package/package.json +1 -1
- package/taxtank-core.d.ts.map +1 -0
- package/esm2022/lib/db/Models/document/document-base.mjs +0 -4
- package/esm2022/lib/db/Models/document/document.mjs +0 -4
- package/esm2022/lib/interfaces/mp-trackable.interface.mjs +0 -2
- package/lib/db/Models/document/document-base.d.ts +0 -10
- package/lib/interfaces/mp-trackable.interface.d.ts +0 -6
|
@@ -4,8 +4,8 @@ import * as i1$1 from '@angular/common';
|
|
|
4
4
|
import { formatDate, CommonModule, CurrencyPipe, DatePipe } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpParams, HttpClient, HttpErrorResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
7
|
-
import { map, mergeMap, filter,
|
|
8
|
-
import { ReplaySubject, Subject, BehaviorSubject,
|
|
7
|
+
import { map, mergeMap, filter, first as first$1, catchError, take, switchMap, finalize, debounceTime, distinctUntilChanged, startWith, delay } from 'rxjs/operators';
|
|
8
|
+
import { ReplaySubject, Subject, BehaviorSubject, Observable, throwError, combineLatest, forkJoin, of, from, merge as merge$1 } from 'rxjs';
|
|
9
9
|
import { plainToClass, Type, Transform, Exclude, Expose, classToPlain } from 'class-transformer';
|
|
10
10
|
import get from 'lodash/get';
|
|
11
11
|
import { __decorate } from 'tslib';
|
|
@@ -526,14 +526,11 @@ __decorate([
|
|
|
526
526
|
let Depreciation$1 = class Depreciation extends TransactionBase {
|
|
527
527
|
};
|
|
528
528
|
|
|
529
|
-
class DocumentBase extends AbstractModel {
|
|
530
|
-
}
|
|
531
|
-
|
|
532
529
|
let DocumentFolder$1 = class DocumentFolder extends AbstractModel {
|
|
533
530
|
};
|
|
534
531
|
|
|
535
|
-
|
|
536
|
-
}
|
|
532
|
+
class FolderDocument extends AbstractModel {
|
|
533
|
+
}
|
|
537
534
|
|
|
538
535
|
let PropertyDocument$1 = class PropertyDocument extends AbstractModel {
|
|
539
536
|
};
|
|
@@ -2319,12 +2316,6 @@ var DepreciationCalculationEnum;
|
|
|
2319
2316
|
})(DepreciationCalculationEnum || (DepreciationCalculationEnum = {}));
|
|
2320
2317
|
|
|
2321
2318
|
class DepreciationCapitalProject extends DepreciationCapitalProject$1 {
|
|
2322
|
-
getMpData(property) {
|
|
2323
|
-
return {
|
|
2324
|
-
'Property': property.name,
|
|
2325
|
-
'Name': this.projectName
|
|
2326
|
-
};
|
|
2327
|
-
}
|
|
2328
2319
|
}
|
|
2329
2320
|
__decorate([
|
|
2330
2321
|
Type(() => Date)
|
|
@@ -3882,70 +3873,6 @@ __decorate([
|
|
|
3882
3873
|
Type(() => Date)
|
|
3883
3874
|
], AssetSale.prototype, "date", void 0);
|
|
3884
3875
|
|
|
3885
|
-
var TaxExemptions = [
|
|
3886
|
-
{
|
|
3887
|
-
id: 1,
|
|
3888
|
-
name: "Apply 50% CGT Discount",
|
|
3889
|
-
description: "50% CGT discount applies when an investment property has been owned for more than 12 months (contract date to contract date). Foreign residents are not eligible",
|
|
3890
|
-
metaFields: [
|
|
3891
|
-
]
|
|
3892
|
-
},
|
|
3893
|
-
{
|
|
3894
|
-
id: 2,
|
|
3895
|
-
name: "Full Exemption (Principle place of residence)",
|
|
3896
|
-
description: "Your 'main residence' (home) is generally exempt from capital gains tax (CGT). You're not entitled to the exemption for a vacant block of land. Foreign residents are also excluded in most circumstances",
|
|
3897
|
-
metaFields: [
|
|
3898
|
-
]
|
|
3899
|
-
},
|
|
3900
|
-
{
|
|
3901
|
-
id: 3,
|
|
3902
|
-
name: "Full Exemption (6 year rule)",
|
|
3903
|
-
description: "You can nominate an investment property as your main residence for up to 6 years if it is used to produce income, or indefinitely if it is not used to produce income. However, you can not treat any other dwelling as your main residence for the same period",
|
|
3904
|
-
metaFields: [
|
|
3905
|
-
]
|
|
3906
|
-
},
|
|
3907
|
-
{
|
|
3908
|
-
id: 4,
|
|
3909
|
-
name: "Partial exemption (investment property became your main residence)",
|
|
3910
|
-
description: "The number of days the dwelling was not your main residence, and the total ownership days are used to calculate the taxable portion of any CGT",
|
|
3911
|
-
metaFields: [
|
|
3912
|
-
{
|
|
3913
|
-
id: 1,
|
|
3914
|
-
name: "Total amount of days the property was your main residence"
|
|
3915
|
-
}
|
|
3916
|
-
]
|
|
3917
|
-
},
|
|
3918
|
-
{
|
|
3919
|
-
id: 5,
|
|
3920
|
-
name: "Main Residence became your 'investment property' or 'home office'",
|
|
3921
|
-
description: "The market value at the time a principle place of residence became an investment property, or is used as a home business, becomes the adjusted cost base. The percentage of home office use (if applicable) is then applied",
|
|
3922
|
-
metaFields: [
|
|
3923
|
-
{
|
|
3924
|
-
id: 2,
|
|
3925
|
-
name: "Market Value"
|
|
3926
|
-
},
|
|
3927
|
-
{
|
|
3928
|
-
id: 2,
|
|
3929
|
-
name: "Home office percentage claimed"
|
|
3930
|
-
}
|
|
3931
|
-
]
|
|
3932
|
-
},
|
|
3933
|
-
{
|
|
3934
|
-
id: 6,
|
|
3935
|
-
name: "Property transfer (Relationship Breakdown)",
|
|
3936
|
-
description: "If you transfer an asset to your spouse because of a relationship breakdown a 'rollover' generally applies. This means the transferor spouse disregards any capital gain or loss that would otherwise arise",
|
|
3937
|
-
metaFields: [
|
|
3938
|
-
]
|
|
3939
|
-
},
|
|
3940
|
-
{
|
|
3941
|
-
id: 7,
|
|
3942
|
-
name: "Full exemption (Other)",
|
|
3943
|
-
description: "In some other instances a full exemption may apply, for example pre-CGT assets and some inheritance",
|
|
3944
|
-
metaFields: [
|
|
3945
|
-
]
|
|
3946
|
-
}
|
|
3947
|
-
];
|
|
3948
|
-
|
|
3949
3876
|
class PropertySale extends AssetSale {
|
|
3950
3877
|
get saleCostsTotalAmount() {
|
|
3951
3878
|
return this.commission + this.legalFees + this.otherCost;
|
|
@@ -3960,12 +3887,6 @@ class PropertySale extends AssetSale {
|
|
|
3960
3887
|
get netPrice() {
|
|
3961
3888
|
return this.price - this.saleCostsTotalAmount;
|
|
3962
3889
|
}
|
|
3963
|
-
getMpData(property) {
|
|
3964
|
-
return {
|
|
3965
|
-
'Property': property.name,
|
|
3966
|
-
'Concession': this.taxExemption ? TaxExemptions.find((taxExemption) => taxExemption.id === this.taxExemption.id).name : null
|
|
3967
|
-
};
|
|
3968
|
-
}
|
|
3969
3890
|
}
|
|
3970
3891
|
__decorate([
|
|
3971
3892
|
Type(() => Number)
|
|
@@ -4093,18 +4014,6 @@ class AnnualClientDetails extends AbstractModel {
|
|
|
4093
4014
|
get spouseMonthlyIncome() {
|
|
4094
4015
|
return this.spouseAnnualIncome / 12;
|
|
4095
4016
|
}
|
|
4096
|
-
getMpData() {
|
|
4097
|
-
return {
|
|
4098
|
-
capitalLoss: this.capitalLoss,
|
|
4099
|
-
privateHealthCare: this.privateHealthCare,
|
|
4100
|
-
spouse: this.spouse,
|
|
4101
|
-
dependants: this.dependants,
|
|
4102
|
-
studentLoanAmount: this.studentLoanAmount,
|
|
4103
|
-
financialYear: this.financialYear,
|
|
4104
|
-
reportableFringeBenefits: this.reportableFringeBenefits,
|
|
4105
|
-
exemptForeignEmploymentIncome: this.exemptForeignEmploymentIncome,
|
|
4106
|
-
};
|
|
4107
|
-
}
|
|
4108
4017
|
}
|
|
4109
4018
|
__decorate([
|
|
4110
4019
|
Type(() => ClientDetails)
|
|
@@ -4117,9 +4026,6 @@ class ClientIncomeTypes extends ClientIncomeTypes$1 {
|
|
|
4117
4026
|
get length() {
|
|
4118
4027
|
return Object.values(this).filter((value) => typeof value === 'boolean' && value).length;
|
|
4119
4028
|
}
|
|
4120
|
-
getMpData() {
|
|
4121
|
-
return { work: this.work, property: this.property, sole: this.sole, holding: this.holdings };
|
|
4122
|
-
}
|
|
4123
4029
|
}
|
|
4124
4030
|
|
|
4125
4031
|
var ClientInviteStatusEnum;
|
|
@@ -5443,11 +5349,6 @@ class User extends User$1 {
|
|
|
5443
5349
|
get financialYears() {
|
|
5444
5350
|
return range(Math.min(FinancialYear.toFinYear(this.createdAt) - 1, 2022), FinancialYear.toFinYear(new Date()) + 1);
|
|
5445
5351
|
}
|
|
5446
|
-
getMpData() {
|
|
5447
|
-
return {
|
|
5448
|
-
clientDetails: {}
|
|
5449
|
-
};
|
|
5450
|
-
}
|
|
5451
5352
|
}
|
|
5452
5353
|
__decorate([
|
|
5453
5354
|
Type(() => ServiceSubscription)
|
|
@@ -5507,22 +5408,12 @@ class PropertyCategory extends PropertyCategory$1 {
|
|
|
5507
5408
|
isShared() {
|
|
5508
5409
|
return this.id === PropertyCategoryListEnum.SHARED;
|
|
5509
5410
|
}
|
|
5510
|
-
getMpData() {
|
|
5511
|
-
return {
|
|
5512
|
-
'Name': this.name
|
|
5513
|
-
};
|
|
5514
|
-
}
|
|
5515
5411
|
}
|
|
5516
5412
|
|
|
5517
5413
|
class PropertyDocument extends PropertyDocument$1 {
|
|
5518
5414
|
get parent() {
|
|
5519
5415
|
return this.property;
|
|
5520
5416
|
}
|
|
5521
|
-
getMpData(property) {
|
|
5522
|
-
return {
|
|
5523
|
-
'Property': property.name
|
|
5524
|
-
};
|
|
5525
|
-
}
|
|
5526
5417
|
}
|
|
5527
5418
|
__decorate([
|
|
5528
5419
|
Type(() => Property)
|
|
@@ -5538,12 +5429,6 @@ class PropertyValuation extends PropertyValuation$1 {
|
|
|
5538
5429
|
isCurrentYear() {
|
|
5539
5430
|
return this.financialYear === new FinancialYear(new Date()).year;
|
|
5540
5431
|
}
|
|
5541
|
-
getMpData(property) {
|
|
5542
|
-
return {
|
|
5543
|
-
'Property': property.name,
|
|
5544
|
-
'Date': this.date
|
|
5545
|
-
};
|
|
5546
|
-
}
|
|
5547
5432
|
}
|
|
5548
5433
|
__decorate([
|
|
5549
5434
|
Type(() => Date)
|
|
@@ -5584,12 +5469,6 @@ class PropertyForecast extends PropertyForecast$1 {
|
|
|
5584
5469
|
isCurrentYear() {
|
|
5585
5470
|
return this.financialYear === new FinancialYear(new Date()).year;
|
|
5586
5471
|
}
|
|
5587
|
-
getMpData(property) {
|
|
5588
|
-
return {
|
|
5589
|
-
'Property': property.name,
|
|
5590
|
-
'Financial Year': this.financialYear,
|
|
5591
|
-
};
|
|
5592
|
-
}
|
|
5593
5472
|
}
|
|
5594
5473
|
__decorate([
|
|
5595
5474
|
Transform(({ value }) => +value)
|
|
@@ -5611,12 +5490,6 @@ __decorate([
|
|
|
5611
5490
|
], PropertyForecast.prototype, "marketValue", void 0);
|
|
5612
5491
|
|
|
5613
5492
|
class PropertyCategoryMovement extends PropertyCategoryMovement$1 {
|
|
5614
|
-
getMpData(property) {
|
|
5615
|
-
return {
|
|
5616
|
-
'Property': property.name,
|
|
5617
|
-
'Category': this.propertyCategory.name
|
|
5618
|
-
};
|
|
5619
|
-
}
|
|
5620
5493
|
}
|
|
5621
5494
|
__decorate([
|
|
5622
5495
|
Type(() => PropertyValuation)
|
|
@@ -5807,14 +5680,6 @@ class Property extends Property$1 {
|
|
|
5807
5680
|
get monthlyExpense() {
|
|
5808
5681
|
return this.currentYearForecast.expense / 12;
|
|
5809
5682
|
}
|
|
5810
|
-
getMpData() {
|
|
5811
|
-
return {
|
|
5812
|
-
'Category': this.category.name,
|
|
5813
|
-
'Taxable': this.category.isTaxInclusive ? 'Yes' : 'No',
|
|
5814
|
-
'Shared': this.isShared ? 'Yes' : 'No',
|
|
5815
|
-
'Ownership %': `${this.myShare.percent}%`
|
|
5816
|
-
};
|
|
5817
|
-
}
|
|
5818
5683
|
}
|
|
5819
5684
|
__decorate([
|
|
5820
5685
|
Type(() => Number)
|
|
@@ -6179,12 +6044,6 @@ class PropertyShare extends PropertyShare$1 {
|
|
|
6179
6044
|
get userName() {
|
|
6180
6045
|
return this.user ? this.user.fullName : `${this.invite.firstName}`;
|
|
6181
6046
|
}
|
|
6182
|
-
getMpData() {
|
|
6183
|
-
return {
|
|
6184
|
-
'Property': this.property.name,
|
|
6185
|
-
'User': this.user?.email
|
|
6186
|
-
};
|
|
6187
|
-
}
|
|
6188
6047
|
}
|
|
6189
6048
|
__decorate([
|
|
6190
6049
|
Type(() => Date)
|
|
@@ -10089,18 +9948,12 @@ __decorate([
|
|
|
10089
9948
|
], Notification.prototype, "redirectionLink", void 0);
|
|
10090
9949
|
|
|
10091
9950
|
class DocumentFolder extends DocumentFolder$1 {
|
|
10092
|
-
getMpData() {
|
|
10093
|
-
return { 'Name': this.name };
|
|
10094
|
-
}
|
|
10095
9951
|
}
|
|
10096
9952
|
|
|
10097
|
-
class Document extends
|
|
9953
|
+
class Document extends FolderDocument {
|
|
10098
9954
|
get parent() {
|
|
10099
9955
|
return this.folder;
|
|
10100
9956
|
}
|
|
10101
|
-
getMpData() {
|
|
10102
|
-
return {};
|
|
10103
|
-
}
|
|
10104
9957
|
}
|
|
10105
9958
|
__decorate([
|
|
10106
9959
|
Type(() => DocumentFolder)
|
|
@@ -10184,9 +10037,6 @@ class HoldingType extends AbstractModel {
|
|
|
10184
10037
|
isCrypto() {
|
|
10185
10038
|
return this.category === HoldingTypeCategoryEnum.CRYPTO;
|
|
10186
10039
|
}
|
|
10187
|
-
getMpData() {
|
|
10188
|
-
return { category: HoldingTypeCategoryEnum[this.category], name: this.name };
|
|
10189
|
-
}
|
|
10190
10040
|
}
|
|
10191
10041
|
__decorate([
|
|
10192
10042
|
Type(() => AppFile)
|
|
@@ -10229,9 +10079,6 @@ class HoldingSale extends AssetSale {
|
|
|
10229
10079
|
get cost() {
|
|
10230
10080
|
return this.price * this.quantity;
|
|
10231
10081
|
}
|
|
10232
|
-
getMpData(type) {
|
|
10233
|
-
return { holding: type.name, concession: this.concession };
|
|
10234
|
-
}
|
|
10235
10082
|
}
|
|
10236
10083
|
__decorate([
|
|
10237
10084
|
Transform(({ value }) => ({ id: value.id }), { toPlainOnly: true })
|
|
@@ -10276,9 +10123,6 @@ class Holding extends AbstractModel {
|
|
|
10276
10123
|
isSold() {
|
|
10277
10124
|
return this.currentQuantity === 0;
|
|
10278
10125
|
}
|
|
10279
|
-
getMpData() {
|
|
10280
|
-
return { type: this.type.name, date: this.formatDate(this.date) };
|
|
10281
|
-
}
|
|
10282
10126
|
}
|
|
10283
10127
|
__decorate([
|
|
10284
10128
|
Type(() => Date)
|
|
@@ -10344,9 +10188,6 @@ class Budget extends Budget$1 {
|
|
|
10344
10188
|
get rulesCollection() {
|
|
10345
10189
|
return new Collection(this.rules);
|
|
10346
10190
|
}
|
|
10347
|
-
getMpData() {
|
|
10348
|
-
return {};
|
|
10349
|
-
}
|
|
10350
10191
|
}
|
|
10351
10192
|
__decorate([
|
|
10352
10193
|
Type(() => BudgetRule)
|
|
@@ -10555,11 +10396,7 @@ class AuthService {
|
|
|
10555
10396
|
login(username, password) {
|
|
10556
10397
|
return this.http.post(`${this.environment.apiV2}/login`, { username, password }).pipe(map((response) => {
|
|
10557
10398
|
this.setAuth(response);
|
|
10558
|
-
this.mpService.track('login');
|
|
10559
10399
|
return response;
|
|
10560
|
-
}), catchError((error) => {
|
|
10561
|
-
this.mpService.track('loginError', { username });
|
|
10562
|
-
return throwError(error);
|
|
10563
10400
|
}));
|
|
10564
10401
|
}
|
|
10565
10402
|
refresh(refreshToken) {
|
|
@@ -10569,9 +10406,9 @@ class AuthService {
|
|
|
10569
10406
|
}));
|
|
10570
10407
|
}
|
|
10571
10408
|
logoutFront(url = '/login') {
|
|
10572
|
-
localStorage.clear();
|
|
10573
10409
|
this.mpService.track('logout');
|
|
10574
10410
|
this.mpService.reset();
|
|
10411
|
+
localStorage.clear();
|
|
10575
10412
|
location.replace(url);
|
|
10576
10413
|
}
|
|
10577
10414
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: JwtService }, { token: MixpanelService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -10809,7 +10646,6 @@ let RestService$1 = class RestService extends DataService {
|
|
|
10809
10646
|
* @TODO Alex: disable batch by default
|
|
10810
10647
|
*/
|
|
10811
10648
|
this.disabledMethods = [];
|
|
10812
|
-
this.mpService = inject(MixpanelService);
|
|
10813
10649
|
this.sseService = inject(SseService);
|
|
10814
10650
|
this.toastService = inject(ToastService);
|
|
10815
10651
|
this.http = inject(HttpClient);
|
|
@@ -10868,18 +10704,15 @@ let RestService$1 = class RestService extends DataService {
|
|
|
10868
10704
|
/**
|
|
10869
10705
|
* Create a new Model instance in database
|
|
10870
10706
|
*/
|
|
10871
|
-
post(model,
|
|
10707
|
+
post(model, path = this.apiUrl) {
|
|
10872
10708
|
this.handleAccessError('post');
|
|
10873
10709
|
return this.http.post(path, classToPlain(model))
|
|
10874
10710
|
.pipe(map((response) => {
|
|
10875
10711
|
const result = this.createModelInstance(response);
|
|
10876
10712
|
if (!this.mercureTopic) {
|
|
10877
|
-
this.handleResponse([result], 'post'
|
|
10713
|
+
this.handleResponse([result], 'post');
|
|
10878
10714
|
}
|
|
10879
10715
|
return result;
|
|
10880
|
-
}), catchError((error) => {
|
|
10881
|
-
this.handleResponseError([model], 'post', mpData);
|
|
10882
|
-
return throwError(error);
|
|
10883
10716
|
}));
|
|
10884
10717
|
}
|
|
10885
10718
|
/**
|
|
@@ -10894,26 +10727,20 @@ let RestService$1 = class RestService extends DataService {
|
|
|
10894
10727
|
this.handleResponse(result, 'post');
|
|
10895
10728
|
}
|
|
10896
10729
|
return result;
|
|
10897
|
-
}), catchError((error) => {
|
|
10898
|
-
this.handleResponseError(models, 'post');
|
|
10899
|
-
return throwError(error);
|
|
10900
10730
|
}));
|
|
10901
10731
|
}
|
|
10902
10732
|
/**
|
|
10903
10733
|
* Change an existing Model instance in database
|
|
10904
10734
|
*/
|
|
10905
|
-
put(model,
|
|
10735
|
+
put(model, path = `${this.apiUrl}/${model.id}`) {
|
|
10906
10736
|
this.handleAccessError('put');
|
|
10907
10737
|
return this.http.put(path, classToPlain(model))
|
|
10908
10738
|
.pipe(map((response) => {
|
|
10909
10739
|
const result = this.createModelInstance(response);
|
|
10910
10740
|
if (!this.mercureTopic) {
|
|
10911
|
-
this.handleResponse([result], 'put'
|
|
10741
|
+
this.handleResponse([result], 'put');
|
|
10912
10742
|
}
|
|
10913
10743
|
return result;
|
|
10914
|
-
}), catchError((error) => {
|
|
10915
|
-
this.handleResponseError([model], 'put', mpData);
|
|
10916
|
-
return throwError(error);
|
|
10917
10744
|
}));
|
|
10918
10745
|
}
|
|
10919
10746
|
/**
|
|
@@ -10928,24 +10755,18 @@ let RestService$1 = class RestService extends DataService {
|
|
|
10928
10755
|
this.handleResponse(result, 'put');
|
|
10929
10756
|
}
|
|
10930
10757
|
return result;
|
|
10931
|
-
}), catchError((error) => {
|
|
10932
|
-
this.handleResponseError(models, 'put');
|
|
10933
|
-
return throwError(error);
|
|
10934
10758
|
}));
|
|
10935
10759
|
}
|
|
10936
10760
|
/**
|
|
10937
10761
|
* Remove a Model instance from database
|
|
10938
10762
|
*/
|
|
10939
|
-
delete(model
|
|
10763
|
+
delete(model) {
|
|
10940
10764
|
this.handleAccessError('delete');
|
|
10941
10765
|
return this.http.delete(`${this.apiUrl}/${model.id}`)
|
|
10942
10766
|
.pipe(map(() => {
|
|
10943
10767
|
if (!this.mercureTopic) {
|
|
10944
|
-
this.handleResponse([model], 'delete'
|
|
10768
|
+
this.handleResponse([model], 'delete');
|
|
10945
10769
|
}
|
|
10946
|
-
}), catchError((error) => {
|
|
10947
|
-
this.handleResponseError([model], 'delete', mpData);
|
|
10948
|
-
return throwError(error);
|
|
10949
10770
|
}));
|
|
10950
10771
|
}
|
|
10951
10772
|
/**
|
|
@@ -10958,38 +10779,12 @@ let RestService$1 = class RestService extends DataService {
|
|
|
10958
10779
|
if (!this.mercureTopic) {
|
|
10959
10780
|
this.handleResponse(models, 'delete');
|
|
10960
10781
|
}
|
|
10961
|
-
}), catchError((error) => {
|
|
10962
|
-
this.handleResponseError(models, 'delete');
|
|
10963
|
-
return throwError(error);
|
|
10964
10782
|
}));
|
|
10965
10783
|
}
|
|
10966
|
-
track(response, method, mpData, postfix = '') {
|
|
10967
|
-
// check if result exist, sometimes response may be empty (for example ClientInvite accept/reject/etc)
|
|
10968
|
-
if (!response[0]) {
|
|
10969
|
-
return;
|
|
10970
|
-
}
|
|
10971
|
-
if (method === 'delete') {
|
|
10972
|
-
response.forEach(() => {
|
|
10973
|
-
this.mpService.track(`${method} ${this.modelClass.name}${postfix}`);
|
|
10974
|
-
});
|
|
10975
|
-
return;
|
|
10976
|
-
}
|
|
10977
|
-
// no other way to check interface
|
|
10978
|
-
if ('getMpData' in response[0]) {
|
|
10979
|
-
response.forEach((model) => {
|
|
10980
|
-
this.mpService.track(`${method} ${this.modelClass.name}${postfix}`, model['getMpData'](mpData));
|
|
10981
|
-
});
|
|
10982
|
-
}
|
|
10983
|
-
}
|
|
10984
|
-
handleResponseError(response, method, mpData) {
|
|
10985
|
-
// @TODO error notification?
|
|
10986
|
-
this.track(response, method, mpData, 'Error');
|
|
10987
|
-
}
|
|
10988
10784
|
/**
|
|
10989
10785
|
* Handle response data - update cache and dispatch event if it is needed
|
|
10990
10786
|
*/
|
|
10991
|
-
handleResponse(response, method
|
|
10992
|
-
this.track(response, method, mpData);
|
|
10787
|
+
handleResponse(response, method) {
|
|
10993
10788
|
if (this.getCache()) {
|
|
10994
10789
|
this.updateCache(response, method);
|
|
10995
10790
|
}
|
|
@@ -11249,10 +11044,10 @@ class BankConnectionService extends RestService$1 {
|
|
|
11249
11044
|
}));
|
|
11250
11045
|
}
|
|
11251
11046
|
activate(bankConnection) {
|
|
11252
|
-
return this.put(bankConnection,
|
|
11047
|
+
return this.put(bankConnection, `${this.apiUrl}/${bankConnection.id}/activate`);
|
|
11253
11048
|
}
|
|
11254
11049
|
deactivate(bankConnection) {
|
|
11255
|
-
return this.put(bankConnection,
|
|
11050
|
+
return this.put(bankConnection, `${this.apiUrl}/${bankConnection.id}/deactivate`);
|
|
11256
11051
|
}
|
|
11257
11052
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BankConnectionService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11258
11053
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BankConnectionService, providedIn: 'root' }); }
|
|
@@ -12030,12 +11825,11 @@ class FacebookService {
|
|
|
12030
11825
|
/**
|
|
12031
11826
|
* @TODO when google login will be done, it needs to be moved to an abstract class
|
|
12032
11827
|
*/
|
|
12033
|
-
constructor(http, toastService, jwtService, router,
|
|
11828
|
+
constructor(http, toastService, jwtService, router, environment) {
|
|
12034
11829
|
this.http = http;
|
|
12035
11830
|
this.toastService = toastService;
|
|
12036
11831
|
this.jwtService = jwtService;
|
|
12037
11832
|
this.router = router;
|
|
12038
|
-
this.mpService = mpService;
|
|
12039
11833
|
this.environment = environment;
|
|
12040
11834
|
this.isLoggedInSubject = new BehaviorSubject(!this.jwtService.isTokenExpired());
|
|
12041
11835
|
this.isFacebookEnabled = !!environment['facebookAppId'];
|
|
@@ -12058,7 +11852,6 @@ class FacebookService {
|
|
|
12058
11852
|
setAuth(response) {
|
|
12059
11853
|
this.jwtService.saveTokens(response);
|
|
12060
11854
|
this.isLoggedInSubject.next(true);
|
|
12061
|
-
this.mpService.track('loginFB');
|
|
12062
11855
|
}
|
|
12063
11856
|
/**
|
|
12064
11857
|
* get facebook auth access token
|
|
@@ -12089,7 +11882,7 @@ class FacebookService {
|
|
|
12089
11882
|
});
|
|
12090
11883
|
});
|
|
12091
11884
|
}
|
|
12092
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FacebookService, deps: [{ token: i1.HttpClient }, { token: ToastService }, { token: JwtService }, { token: i4.Router }, { token:
|
|
11885
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FacebookService, deps: [{ token: i1.HttpClient }, { token: ToastService }, { token: JwtService }, { token: i4.Router }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
12093
11886
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FacebookService, providedIn: 'root' }); }
|
|
12094
11887
|
}
|
|
12095
11888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FacebookService, decorators: [{
|
|
@@ -12097,7 +11890,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
12097
11890
|
args: [{
|
|
12098
11891
|
providedIn: 'root'
|
|
12099
11892
|
}]
|
|
12100
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: ToastService }, { type: JwtService }, { type: i4.Router }, { type:
|
|
11893
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: ToastService }, { type: JwtService }, { type: i4.Router }, { type: undefined, decorators: [{
|
|
12101
11894
|
type: Inject,
|
|
12102
11895
|
args: ['environment']
|
|
12103
11896
|
}] }]; } });
|
|
@@ -12146,7 +11939,6 @@ class GoogleService {
|
|
|
12146
11939
|
.subscribe((response) => {
|
|
12147
11940
|
this.jwtService.saveTokens(response);
|
|
12148
11941
|
this.isLoggedInSubject.next(true);
|
|
12149
|
-
this.mpService.track('loginGoogle');
|
|
12150
11942
|
this.router.navigate([redirectUrl]);
|
|
12151
11943
|
}, (error) => {
|
|
12152
11944
|
this.toastService.error(error.error.violations[0].message);
|
|
@@ -12274,7 +12066,7 @@ class ClientInviteService extends RestService$1 {
|
|
|
12274
12066
|
* Reject client invitation from firm to user
|
|
12275
12067
|
*/
|
|
12276
12068
|
reject(invite) {
|
|
12277
|
-
return super.put(invite,
|
|
12069
|
+
return super.put(invite, `${this.apiUrl}/${invite.id}/reject`);
|
|
12278
12070
|
}
|
|
12279
12071
|
/**
|
|
12280
12072
|
* Resend invitation from firm to client
|
|
@@ -12290,7 +12082,7 @@ class ClientInviteService extends RestService$1 {
|
|
|
12290
12082
|
* Send invitation from client to firm
|
|
12291
12083
|
*/
|
|
12292
12084
|
inviteFirmByUser(invite) {
|
|
12293
|
-
return super.post(invite,
|
|
12085
|
+
return super.post(invite, `${this.environment.apiV2}/firms/invite`)
|
|
12294
12086
|
.pipe(catchError((error) => {
|
|
12295
12087
|
if (error.error.email) {
|
|
12296
12088
|
this.toastService.error(error.error.email[0]);
|
|
@@ -12421,7 +12213,6 @@ class RestService {
|
|
|
12421
12213
|
this.eventDispatcherService = inject(EventDispatcherService);
|
|
12422
12214
|
// subject for service cache
|
|
12423
12215
|
this.cacheSubject = new ReplaySubject(1);
|
|
12424
|
-
this.mpService = inject(MixpanelService);
|
|
12425
12216
|
this.roles = [];
|
|
12426
12217
|
}
|
|
12427
12218
|
get apiUrl() {
|
|
@@ -12569,7 +12360,6 @@ class RestService {
|
|
|
12569
12360
|
if (this.messageDeleted) {
|
|
12570
12361
|
this.toastService.success(this.messageDeleted);
|
|
12571
12362
|
}
|
|
12572
|
-
this.mpService.track(`DELETE ${this.modelClass.name}`);
|
|
12573
12363
|
}));
|
|
12574
12364
|
}
|
|
12575
12365
|
/**
|
|
@@ -12585,9 +12375,6 @@ class RestService {
|
|
|
12585
12375
|
if (this.messageDeletedBatch) {
|
|
12586
12376
|
this.toastService.success(this.messageDeletedBatch);
|
|
12587
12377
|
}
|
|
12588
|
-
models.forEach(() => {
|
|
12589
|
-
this.mpService.track(`DELETE ${this.modelClass.name}`);
|
|
12590
|
-
});
|
|
12591
12378
|
}));
|
|
12592
12379
|
}
|
|
12593
12380
|
/**
|
|
@@ -13392,10 +13179,6 @@ class PropertyCategoryMovementService extends RestService$1 {
|
|
|
13392
13179
|
this.endpointUri = 'property-category-movements';
|
|
13393
13180
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
|
13394
13181
|
}
|
|
13395
|
-
post(movement, property) {
|
|
13396
|
-
movement.property = movement.valuation.property = plainToClass(Property, { id: property.id });
|
|
13397
|
-
return super.post(movement, property);
|
|
13398
|
-
}
|
|
13399
13182
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyCategoryMovementService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
13400
13183
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyCategoryMovementService, providedIn: 'root' }); }
|
|
13401
13184
|
}
|
|
@@ -13435,6 +13218,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
13435
13218
|
}]
|
|
13436
13219
|
}] });
|
|
13437
13220
|
|
|
13221
|
+
var TaxExemptions = [
|
|
13222
|
+
{
|
|
13223
|
+
id: 1,
|
|
13224
|
+
name: "Apply 50% CGT Discount",
|
|
13225
|
+
description: "50% CGT discount applies when an investment property has been owned for more than 12 months (contract date to contract date). Foreign residents are not eligible",
|
|
13226
|
+
metaFields: [
|
|
13227
|
+
]
|
|
13228
|
+
},
|
|
13229
|
+
{
|
|
13230
|
+
id: 2,
|
|
13231
|
+
name: "Full Exemption (Principle place of residence)",
|
|
13232
|
+
description: "Your 'main residence' (home) is generally exempt from capital gains tax (CGT). You're not entitled to the exemption for a vacant block of land. Foreign residents are also excluded in most circumstances",
|
|
13233
|
+
metaFields: [
|
|
13234
|
+
]
|
|
13235
|
+
},
|
|
13236
|
+
{
|
|
13237
|
+
id: 3,
|
|
13238
|
+
name: "Full Exemption (6 year rule)",
|
|
13239
|
+
description: "You can nominate an investment property as your main residence for up to 6 years if it is used to produce income, or indefinitely if it is not used to produce income. However, you can not treat any other dwelling as your main residence for the same period",
|
|
13240
|
+
metaFields: [
|
|
13241
|
+
]
|
|
13242
|
+
},
|
|
13243
|
+
{
|
|
13244
|
+
id: 4,
|
|
13245
|
+
name: "Partial exemption (investment property became your main residence)",
|
|
13246
|
+
description: "The number of days the dwelling was not your main residence, and the total ownership days are used to calculate the taxable portion of any CGT",
|
|
13247
|
+
metaFields: [
|
|
13248
|
+
{
|
|
13249
|
+
id: 1,
|
|
13250
|
+
name: "Total amount of days the property was your main residence"
|
|
13251
|
+
}
|
|
13252
|
+
]
|
|
13253
|
+
},
|
|
13254
|
+
{
|
|
13255
|
+
id: 5,
|
|
13256
|
+
name: "Main Residence became your 'investment property' or 'home office'",
|
|
13257
|
+
description: "The market value at the time a principle place of residence became an investment property, or is used as a home business, becomes the adjusted cost base. The percentage of home office use (if applicable) is then applied",
|
|
13258
|
+
metaFields: [
|
|
13259
|
+
{
|
|
13260
|
+
id: 2,
|
|
13261
|
+
name: "Market Value"
|
|
13262
|
+
},
|
|
13263
|
+
{
|
|
13264
|
+
id: 2,
|
|
13265
|
+
name: "Home office percentage claimed"
|
|
13266
|
+
}
|
|
13267
|
+
]
|
|
13268
|
+
},
|
|
13269
|
+
{
|
|
13270
|
+
id: 6,
|
|
13271
|
+
name: "Property transfer (Relationship Breakdown)",
|
|
13272
|
+
description: "If you transfer an asset to your spouse because of a relationship breakdown a 'rollover' generally applies. This means the transferor spouse disregards any capital gain or loss that would otherwise arise",
|
|
13273
|
+
metaFields: [
|
|
13274
|
+
]
|
|
13275
|
+
},
|
|
13276
|
+
{
|
|
13277
|
+
id: 7,
|
|
13278
|
+
name: "Full exemption (Other)",
|
|
13279
|
+
description: "In some other instances a full exemption may apply, for example pre-CGT assets and some inheritance",
|
|
13280
|
+
metaFields: [
|
|
13281
|
+
]
|
|
13282
|
+
}
|
|
13283
|
+
];
|
|
13284
|
+
|
|
13438
13285
|
class TaxExemptionService extends DataService {
|
|
13439
13286
|
constructor() {
|
|
13440
13287
|
super();
|
|
@@ -13500,13 +13347,7 @@ class PropertyShareService extends RestService$1 {
|
|
|
13500
13347
|
* @param share user to share property
|
|
13501
13348
|
*/
|
|
13502
13349
|
reinvite(share) {
|
|
13503
|
-
return this.http.post(`${this.apiUrl}/${share.id}/reinvite`, {})
|
|
13504
|
-
.pipe(map(() => {
|
|
13505
|
-
this.mpService.track('reinvitePropertyShare', share.getMpData());
|
|
13506
|
-
}), catchError((error) => {
|
|
13507
|
-
this.mpService.track('reinvitePropertyShareError', share.getMpData());
|
|
13508
|
-
return throwError(error);
|
|
13509
|
-
}));
|
|
13350
|
+
return this.http.post(`${this.apiUrl}/${share.id}/reinvite`, {});
|
|
13510
13351
|
}
|
|
13511
13352
|
/**
|
|
13512
13353
|
* Listen to User updated event
|
|
@@ -13543,10 +13384,6 @@ class PropertyValuationService extends RestService$1 {
|
|
|
13543
13384
|
this.collectionClass = (Collection);
|
|
13544
13385
|
this.disabledMethods = ['postBatch', 'putBatch'];
|
|
13545
13386
|
}
|
|
13546
|
-
post(valuation, property) {
|
|
13547
|
-
valuation.property = plainToClass(Property, { id: property.id });
|
|
13548
|
-
return super.post(valuation, property);
|
|
13549
|
-
}
|
|
13550
13387
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyValuationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
13551
13388
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyValuationService, providedIn: 'root' }); }
|
|
13552
13389
|
}
|
|
@@ -13623,15 +13460,7 @@ class PropertyService extends RestService$1 {
|
|
|
13623
13460
|
.pipe(map((propertySubscriptionBase) => {
|
|
13624
13461
|
const newPropertySubscription = plainToClass(PropertySubscription, propertySubscriptionBase);
|
|
13625
13462
|
const activatedProperty = plainToClass(Property, Object.assign({}, property, { subscriptions: [newPropertySubscription] }));
|
|
13626
|
-
this.mpService.track(`postPropertySubscription`, {
|
|
13627
|
-
'Property': property.name,
|
|
13628
|
-
});
|
|
13629
13463
|
this.updateCache([activatedProperty], 'put');
|
|
13630
|
-
}), catchError((error) => {
|
|
13631
|
-
this.mpService.track('postPropertySubscriptionError', {
|
|
13632
|
-
'Property': property.name,
|
|
13633
|
-
});
|
|
13634
|
-
return throwError(error);
|
|
13635
13464
|
}));
|
|
13636
13465
|
}
|
|
13637
13466
|
/**
|
|
@@ -13642,15 +13471,7 @@ class PropertyService extends RestService$1 {
|
|
|
13642
13471
|
return this.http.delete(`${this.environment.apiV2}/property-subscriptions/${property.getCurrentSubscription().id}`)
|
|
13643
13472
|
.pipe(map(() => {
|
|
13644
13473
|
const deactivatedProperty = plainToClass(Property, Object.assign({}, property, { subscriptions: [] }));
|
|
13645
|
-
this.mpService.track(`deletePropertySubscription`, {
|
|
13646
|
-
'Property': property.name,
|
|
13647
|
-
});
|
|
13648
13474
|
this.updateCache([deactivatedProperty], 'put');
|
|
13649
|
-
}), catchError((error) => {
|
|
13650
|
-
this.mpService.track('deletePropertySubscriptionError', {
|
|
13651
|
-
'Property': property.name,
|
|
13652
|
-
});
|
|
13653
|
-
return throwError(error);
|
|
13654
13475
|
}));
|
|
13655
13476
|
}
|
|
13656
13477
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -14177,7 +13998,7 @@ class SubscriptionService extends RestService$1 {
|
|
|
14177
13998
|
this.listenSSE();
|
|
14178
13999
|
}
|
|
14179
14000
|
startTrial(subscription) {
|
|
14180
|
-
return this.post(subscription,
|
|
14001
|
+
return this.post(subscription, `${this.apiUrl}/trial`);
|
|
14181
14002
|
}
|
|
14182
14003
|
postStripeSubscription(subscription) {
|
|
14183
14004
|
return this.http.post(this.apiUrl, classToPlain(subscription))
|
|
@@ -15424,9 +15245,6 @@ class UserEventSetting extends UserEventSetting$1 {
|
|
|
15424
15245
|
// flag indicates that the setting is updating now saved or not
|
|
15425
15246
|
this.isUpdating = false;
|
|
15426
15247
|
}
|
|
15427
|
-
getMpData() {
|
|
15428
|
-
return { type: this.type.name, byEmail: this.byEmail, byNotification: this.byNotification, frequency: this.type.frequencyLabel };
|
|
15429
|
-
}
|
|
15430
15248
|
}
|
|
15431
15249
|
__decorate([
|
|
15432
15250
|
Type(() => UserEventType)
|
|
@@ -15505,6 +15323,7 @@ class UserService extends RestService$1 {
|
|
|
15505
15323
|
this.collectionClass = Collection;
|
|
15506
15324
|
this.endpointUri = 'users';
|
|
15507
15325
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch', 'delete'];
|
|
15326
|
+
this.mpService = inject(MixpanelService);
|
|
15508
15327
|
this.listenEvents();
|
|
15509
15328
|
}
|
|
15510
15329
|
listenEvents() {
|
|
@@ -15526,53 +15345,22 @@ class UserService extends RestService$1 {
|
|
|
15526
15345
|
}));
|
|
15527
15346
|
}
|
|
15528
15347
|
changePassword(currentPassword, newPassword) {
|
|
15529
|
-
return this.http.put(`${this.apiUrl}/password/change`, { currentPassword, newPassword })
|
|
15530
|
-
.pipe(map((response) => {
|
|
15531
|
-
this.mpService.track('passwordChange');
|
|
15532
|
-
return response;
|
|
15533
|
-
}), catchError((error) => {
|
|
15534
|
-
this.mpService.track('passwordChangeError');
|
|
15535
|
-
return throwError(error);
|
|
15536
|
-
}));
|
|
15348
|
+
return this.http.put(`${this.apiUrl}/password/change`, { currentPassword, newPassword });
|
|
15537
15349
|
}
|
|
15538
15350
|
recoveryPassword(email) {
|
|
15539
|
-
return this.http.put(`${this.apiUrl}/password/recovery`, { email })
|
|
15540
|
-
.pipe(map((response) => {
|
|
15541
|
-
this.mpService.track('passwordRecovery', { email });
|
|
15542
|
-
return response;
|
|
15543
|
-
}), catchError((error) => {
|
|
15544
|
-
this.mpService.track('passwordRecoveryError', { email });
|
|
15545
|
-
return throwError(error);
|
|
15546
|
-
}));
|
|
15351
|
+
return this.http.put(`${this.apiUrl}/password/recovery`, { email });
|
|
15547
15352
|
}
|
|
15548
15353
|
resetPassword(newPassword, resetToken) {
|
|
15549
|
-
return this.http.put(`${this.apiUrl}/password/reset`, { newPassword, resetToken })
|
|
15550
|
-
.pipe(catchError((error) => {
|
|
15551
|
-
// success tracked on back-end side to attach it to existing user before login
|
|
15552
|
-
this.mpService.track('passwordResetError', { resetToken });
|
|
15553
|
-
return throwError(error);
|
|
15554
|
-
}));
|
|
15354
|
+
return this.http.put(`${this.apiUrl}/password/reset`, { newPassword, resetToken });
|
|
15555
15355
|
}
|
|
15556
15356
|
resendConfirmationEmail(email) {
|
|
15557
|
-
return this.http.post(`${this.apiUrl}/confirmation/resend`, { email })
|
|
15558
|
-
.pipe(map((response) => {
|
|
15559
|
-
this.mpService.track('emailConfirmResend', { email });
|
|
15560
|
-
return response;
|
|
15561
|
-
}), catchError((error) => {
|
|
15562
|
-
this.mpService.track('emailConfirmResendError', { email });
|
|
15563
|
-
return throwError(error);
|
|
15564
|
-
}));
|
|
15357
|
+
return this.http.post(`${this.apiUrl}/confirmation/resend`, { email });
|
|
15565
15358
|
}
|
|
15566
15359
|
/**
|
|
15567
15360
|
* Confirm registered user
|
|
15568
15361
|
*/
|
|
15569
15362
|
confirm(verificationCode) {
|
|
15570
|
-
return this.http.post(`${this.apiUrl}/confirmation`, { verificationCode })
|
|
15571
|
-
.pipe(catchError((error) => {
|
|
15572
|
-
// success tracked on back-end side to attach it to existing user before login
|
|
15573
|
-
this.mpService.track('emailConfirmError', { verificationCode });
|
|
15574
|
-
return throwError(error);
|
|
15575
|
-
}));
|
|
15363
|
+
return this.http.post(`${this.apiUrl}/confirmation`, { verificationCode });
|
|
15576
15364
|
}
|
|
15577
15365
|
/**
|
|
15578
15366
|
* Search existing user
|
|
@@ -15581,7 +15369,7 @@ class UserService extends RestService$1 {
|
|
|
15581
15369
|
return this.http.get(`${this.apiUrl}/search`, { params: { email } }).pipe(map((userBase) => this.createModelInstance(userBase)));
|
|
15582
15370
|
}
|
|
15583
15371
|
finishOnboarding(user) {
|
|
15584
|
-
return this.put(user,
|
|
15372
|
+
return this.put(user, `${this.apiUrl}/status`);
|
|
15585
15373
|
}
|
|
15586
15374
|
updatePhoto(photo) {
|
|
15587
15375
|
return this.http.post(`${this.apiUrl}/photo?_method=PUT`, photo).pipe(map((photoUrl) => {
|
|
@@ -15625,19 +15413,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
15625
15413
|
}] }]; } });
|
|
15626
15414
|
|
|
15627
15415
|
class FinancialYearService {
|
|
15628
|
-
constructor(http, environment
|
|
15416
|
+
constructor(http, environment) {
|
|
15629
15417
|
this.http = http;
|
|
15630
15418
|
this.environment = environment;
|
|
15631
|
-
this.mpService = mpService;
|
|
15632
15419
|
}
|
|
15633
15420
|
switch(year) {
|
|
15634
15421
|
return this.http.get(`${this.environment.apiV2}/financial-year/switch`, { params: new HttpParams({ fromString: `financialYear=${year}` }) }).pipe(map(() => {
|
|
15635
15422
|
localStorage.setItem('financialYear', year.toString());
|
|
15636
|
-
this.mpService.track('switchYear', { year });
|
|
15637
15423
|
window.location.reload();
|
|
15638
15424
|
}));
|
|
15639
15425
|
}
|
|
15640
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FinancialYearService, deps: [{ token: i1.HttpClient }, { token: 'environment' }
|
|
15426
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FinancialYearService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
15641
15427
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FinancialYearService, providedIn: 'root' }); }
|
|
15642
15428
|
}
|
|
15643
15429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FinancialYearService, decorators: [{
|
|
@@ -15648,7 +15434,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
15648
15434
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
15649
15435
|
type: Inject,
|
|
15650
15436
|
args: ['environment']
|
|
15651
|
-
}] }
|
|
15437
|
+
}] }]; } });
|
|
15652
15438
|
|
|
15653
15439
|
class HoldingService extends RestService$1 {
|
|
15654
15440
|
constructor(environment) {
|