taxtank-core 0.32.24 → 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 -3
- package/esm2022/lib/services/http/rest/rest.service.mjs +9 -47
- 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 -300
- 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,32 +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
|
-
// no other way to check interface
|
|
10972
|
-
if ('getMpData' in response[0]) {
|
|
10973
|
-
response.forEach((model) => {
|
|
10974
|
-
this.mpService.track(`${method}${this.modelClass.name}${postfix}`, model['getMpData'](mpData));
|
|
10975
|
-
});
|
|
10976
|
-
}
|
|
10977
|
-
}
|
|
10978
|
-
handleResponseError(response, method, mpData) {
|
|
10979
|
-
// @TODO error notification?
|
|
10980
|
-
this.track(response, method, mpData, 'Error');
|
|
10981
|
-
}
|
|
10982
10784
|
/**
|
|
10983
10785
|
* Handle response data - update cache and dispatch event if it is needed
|
|
10984
10786
|
*/
|
|
10985
|
-
handleResponse(response, method
|
|
10986
|
-
this.track(response, method, mpData);
|
|
10787
|
+
handleResponse(response, method) {
|
|
10987
10788
|
if (this.getCache()) {
|
|
10988
10789
|
this.updateCache(response, method);
|
|
10989
10790
|
}
|
|
@@ -11243,10 +11044,10 @@ class BankConnectionService extends RestService$1 {
|
|
|
11243
11044
|
}));
|
|
11244
11045
|
}
|
|
11245
11046
|
activate(bankConnection) {
|
|
11246
|
-
return this.put(bankConnection,
|
|
11047
|
+
return this.put(bankConnection, `${this.apiUrl}/${bankConnection.id}/activate`);
|
|
11247
11048
|
}
|
|
11248
11049
|
deactivate(bankConnection) {
|
|
11249
|
-
return this.put(bankConnection,
|
|
11050
|
+
return this.put(bankConnection, `${this.apiUrl}/${bankConnection.id}/deactivate`);
|
|
11250
11051
|
}
|
|
11251
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 }); }
|
|
11252
11053
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BankConnectionService, providedIn: 'root' }); }
|
|
@@ -12024,12 +11825,11 @@ class FacebookService {
|
|
|
12024
11825
|
/**
|
|
12025
11826
|
* @TODO when google login will be done, it needs to be moved to an abstract class
|
|
12026
11827
|
*/
|
|
12027
|
-
constructor(http, toastService, jwtService, router,
|
|
11828
|
+
constructor(http, toastService, jwtService, router, environment) {
|
|
12028
11829
|
this.http = http;
|
|
12029
11830
|
this.toastService = toastService;
|
|
12030
11831
|
this.jwtService = jwtService;
|
|
12031
11832
|
this.router = router;
|
|
12032
|
-
this.mpService = mpService;
|
|
12033
11833
|
this.environment = environment;
|
|
12034
11834
|
this.isLoggedInSubject = new BehaviorSubject(!this.jwtService.isTokenExpired());
|
|
12035
11835
|
this.isFacebookEnabled = !!environment['facebookAppId'];
|
|
@@ -12052,7 +11852,6 @@ class FacebookService {
|
|
|
12052
11852
|
setAuth(response) {
|
|
12053
11853
|
this.jwtService.saveTokens(response);
|
|
12054
11854
|
this.isLoggedInSubject.next(true);
|
|
12055
|
-
this.mpService.track('loginFB');
|
|
12056
11855
|
}
|
|
12057
11856
|
/**
|
|
12058
11857
|
* get facebook auth access token
|
|
@@ -12083,7 +11882,7 @@ class FacebookService {
|
|
|
12083
11882
|
});
|
|
12084
11883
|
});
|
|
12085
11884
|
}
|
|
12086
|
-
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 }); }
|
|
12087
11886
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FacebookService, providedIn: 'root' }); }
|
|
12088
11887
|
}
|
|
12089
11888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FacebookService, decorators: [{
|
|
@@ -12091,7 +11890,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
12091
11890
|
args: [{
|
|
12092
11891
|
providedIn: 'root'
|
|
12093
11892
|
}]
|
|
12094
|
-
}], 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: [{
|
|
12095
11894
|
type: Inject,
|
|
12096
11895
|
args: ['environment']
|
|
12097
11896
|
}] }]; } });
|
|
@@ -12140,7 +11939,6 @@ class GoogleService {
|
|
|
12140
11939
|
.subscribe((response) => {
|
|
12141
11940
|
this.jwtService.saveTokens(response);
|
|
12142
11941
|
this.isLoggedInSubject.next(true);
|
|
12143
|
-
this.mpService.track('loginGoogle');
|
|
12144
11942
|
this.router.navigate([redirectUrl]);
|
|
12145
11943
|
}, (error) => {
|
|
12146
11944
|
this.toastService.error(error.error.violations[0].message);
|
|
@@ -12268,7 +12066,7 @@ class ClientInviteService extends RestService$1 {
|
|
|
12268
12066
|
* Reject client invitation from firm to user
|
|
12269
12067
|
*/
|
|
12270
12068
|
reject(invite) {
|
|
12271
|
-
return super.put(invite,
|
|
12069
|
+
return super.put(invite, `${this.apiUrl}/${invite.id}/reject`);
|
|
12272
12070
|
}
|
|
12273
12071
|
/**
|
|
12274
12072
|
* Resend invitation from firm to client
|
|
@@ -12284,7 +12082,7 @@ class ClientInviteService extends RestService$1 {
|
|
|
12284
12082
|
* Send invitation from client to firm
|
|
12285
12083
|
*/
|
|
12286
12084
|
inviteFirmByUser(invite) {
|
|
12287
|
-
return super.post(invite,
|
|
12085
|
+
return super.post(invite, `${this.environment.apiV2}/firms/invite`)
|
|
12288
12086
|
.pipe(catchError((error) => {
|
|
12289
12087
|
if (error.error.email) {
|
|
12290
12088
|
this.toastService.error(error.error.email[0]);
|
|
@@ -12415,7 +12213,6 @@ class RestService {
|
|
|
12415
12213
|
this.eventDispatcherService = inject(EventDispatcherService);
|
|
12416
12214
|
// subject for service cache
|
|
12417
12215
|
this.cacheSubject = new ReplaySubject(1);
|
|
12418
|
-
this.mpService = inject(MixpanelService);
|
|
12419
12216
|
this.roles = [];
|
|
12420
12217
|
}
|
|
12421
12218
|
get apiUrl() {
|
|
@@ -13382,10 +13179,6 @@ class PropertyCategoryMovementService extends RestService$1 {
|
|
|
13382
13179
|
this.endpointUri = 'property-category-movements';
|
|
13383
13180
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
|
13384
13181
|
}
|
|
13385
|
-
post(movement, property) {
|
|
13386
|
-
movement.property = movement.valuation.property = plainToClass(Property, { id: property.id });
|
|
13387
|
-
return super.post(movement, property);
|
|
13388
|
-
}
|
|
13389
13182
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyCategoryMovementService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
13390
13183
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyCategoryMovementService, providedIn: 'root' }); }
|
|
13391
13184
|
}
|
|
@@ -13425,6 +13218,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
13425
13218
|
}]
|
|
13426
13219
|
}] });
|
|
13427
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
|
+
|
|
13428
13285
|
class TaxExemptionService extends DataService {
|
|
13429
13286
|
constructor() {
|
|
13430
13287
|
super();
|
|
@@ -13490,13 +13347,7 @@ class PropertyShareService extends RestService$1 {
|
|
|
13490
13347
|
* @param share user to share property
|
|
13491
13348
|
*/
|
|
13492
13349
|
reinvite(share) {
|
|
13493
|
-
return this.http.post(`${this.apiUrl}/${share.id}/reinvite`, {})
|
|
13494
|
-
.pipe(map(() => {
|
|
13495
|
-
this.mpService.track('reinvitePropertyShare', share.getMpData());
|
|
13496
|
-
}), catchError((error) => {
|
|
13497
|
-
this.mpService.track('reinvitePropertyShareError', share.getMpData());
|
|
13498
|
-
return throwError(error);
|
|
13499
|
-
}));
|
|
13350
|
+
return this.http.post(`${this.apiUrl}/${share.id}/reinvite`, {});
|
|
13500
13351
|
}
|
|
13501
13352
|
/**
|
|
13502
13353
|
* Listen to User updated event
|
|
@@ -13533,10 +13384,6 @@ class PropertyValuationService extends RestService$1 {
|
|
|
13533
13384
|
this.collectionClass = (Collection);
|
|
13534
13385
|
this.disabledMethods = ['postBatch', 'putBatch'];
|
|
13535
13386
|
}
|
|
13536
|
-
post(valuation, property) {
|
|
13537
|
-
valuation.property = plainToClass(Property, { id: property.id });
|
|
13538
|
-
return super.post(valuation, property);
|
|
13539
|
-
}
|
|
13540
13387
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyValuationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
13541
13388
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyValuationService, providedIn: 'root' }); }
|
|
13542
13389
|
}
|
|
@@ -13613,15 +13460,7 @@ class PropertyService extends RestService$1 {
|
|
|
13613
13460
|
.pipe(map((propertySubscriptionBase) => {
|
|
13614
13461
|
const newPropertySubscription = plainToClass(PropertySubscription, propertySubscriptionBase);
|
|
13615
13462
|
const activatedProperty = plainToClass(Property, Object.assign({}, property, { subscriptions: [newPropertySubscription] }));
|
|
13616
|
-
this.mpService.track(`postPropertySubscription`, {
|
|
13617
|
-
'Property': property.name,
|
|
13618
|
-
});
|
|
13619
13463
|
this.updateCache([activatedProperty], 'put');
|
|
13620
|
-
}), catchError((error) => {
|
|
13621
|
-
this.mpService.track('postPropertySubscriptionError', {
|
|
13622
|
-
'Property': property.name,
|
|
13623
|
-
});
|
|
13624
|
-
return throwError(error);
|
|
13625
13464
|
}));
|
|
13626
13465
|
}
|
|
13627
13466
|
/**
|
|
@@ -13632,15 +13471,7 @@ class PropertyService extends RestService$1 {
|
|
|
13632
13471
|
return this.http.delete(`${this.environment.apiV2}/property-subscriptions/${property.getCurrentSubscription().id}`)
|
|
13633
13472
|
.pipe(map(() => {
|
|
13634
13473
|
const deactivatedProperty = plainToClass(Property, Object.assign({}, property, { subscriptions: [] }));
|
|
13635
|
-
this.mpService.track(`deletePropertySubscription`, {
|
|
13636
|
-
'Property': property.name,
|
|
13637
|
-
});
|
|
13638
13474
|
this.updateCache([deactivatedProperty], 'put');
|
|
13639
|
-
}), catchError((error) => {
|
|
13640
|
-
this.mpService.track('deletePropertySubscriptionError', {
|
|
13641
|
-
'Property': property.name,
|
|
13642
|
-
});
|
|
13643
|
-
return throwError(error);
|
|
13644
13475
|
}));
|
|
13645
13476
|
}
|
|
13646
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 }); }
|
|
@@ -14167,7 +13998,7 @@ class SubscriptionService extends RestService$1 {
|
|
|
14167
13998
|
this.listenSSE();
|
|
14168
13999
|
}
|
|
14169
14000
|
startTrial(subscription) {
|
|
14170
|
-
return this.post(subscription,
|
|
14001
|
+
return this.post(subscription, `${this.apiUrl}/trial`);
|
|
14171
14002
|
}
|
|
14172
14003
|
postStripeSubscription(subscription) {
|
|
14173
14004
|
return this.http.post(this.apiUrl, classToPlain(subscription))
|
|
@@ -15414,9 +15245,6 @@ class UserEventSetting extends UserEventSetting$1 {
|
|
|
15414
15245
|
// flag indicates that the setting is updating now saved or not
|
|
15415
15246
|
this.isUpdating = false;
|
|
15416
15247
|
}
|
|
15417
|
-
getMpData() {
|
|
15418
|
-
return { type: this.type.name, byEmail: this.byEmail, byNotification: this.byNotification, frequency: this.type.frequencyLabel };
|
|
15419
|
-
}
|
|
15420
15248
|
}
|
|
15421
15249
|
__decorate([
|
|
15422
15250
|
Type(() => UserEventType)
|
|
@@ -15495,6 +15323,7 @@ class UserService extends RestService$1 {
|
|
|
15495
15323
|
this.collectionClass = Collection;
|
|
15496
15324
|
this.endpointUri = 'users';
|
|
15497
15325
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch', 'delete'];
|
|
15326
|
+
this.mpService = inject(MixpanelService);
|
|
15498
15327
|
this.listenEvents();
|
|
15499
15328
|
}
|
|
15500
15329
|
listenEvents() {
|
|
@@ -15516,53 +15345,22 @@ class UserService extends RestService$1 {
|
|
|
15516
15345
|
}));
|
|
15517
15346
|
}
|
|
15518
15347
|
changePassword(currentPassword, newPassword) {
|
|
15519
|
-
return this.http.put(`${this.apiUrl}/password/change`, { currentPassword, newPassword })
|
|
15520
|
-
.pipe(map((response) => {
|
|
15521
|
-
this.mpService.track('passwordChange');
|
|
15522
|
-
return response;
|
|
15523
|
-
}), catchError((error) => {
|
|
15524
|
-
this.mpService.track('passwordChangeError');
|
|
15525
|
-
return throwError(error);
|
|
15526
|
-
}));
|
|
15348
|
+
return this.http.put(`${this.apiUrl}/password/change`, { currentPassword, newPassword });
|
|
15527
15349
|
}
|
|
15528
15350
|
recoveryPassword(email) {
|
|
15529
|
-
return this.http.put(`${this.apiUrl}/password/recovery`, { email })
|
|
15530
|
-
.pipe(map((response) => {
|
|
15531
|
-
this.mpService.track('passwordRecovery', { email });
|
|
15532
|
-
return response;
|
|
15533
|
-
}), catchError((error) => {
|
|
15534
|
-
this.mpService.track('passwordRecoveryError', { email });
|
|
15535
|
-
return throwError(error);
|
|
15536
|
-
}));
|
|
15351
|
+
return this.http.put(`${this.apiUrl}/password/recovery`, { email });
|
|
15537
15352
|
}
|
|
15538
15353
|
resetPassword(newPassword, resetToken) {
|
|
15539
|
-
return this.http.put(`${this.apiUrl}/password/reset`, { newPassword, resetToken })
|
|
15540
|
-
.pipe(catchError((error) => {
|
|
15541
|
-
// success tracked on back-end side to attach it to existing user before login
|
|
15542
|
-
this.mpService.track('passwordResetError', { resetToken });
|
|
15543
|
-
return throwError(error);
|
|
15544
|
-
}));
|
|
15354
|
+
return this.http.put(`${this.apiUrl}/password/reset`, { newPassword, resetToken });
|
|
15545
15355
|
}
|
|
15546
15356
|
resendConfirmationEmail(email) {
|
|
15547
|
-
return this.http.post(`${this.apiUrl}/confirmation/resend`, { email })
|
|
15548
|
-
.pipe(map((response) => {
|
|
15549
|
-
this.mpService.track('emailConfirmResend', { email });
|
|
15550
|
-
return response;
|
|
15551
|
-
}), catchError((error) => {
|
|
15552
|
-
this.mpService.track('emailConfirmResendError', { email });
|
|
15553
|
-
return throwError(error);
|
|
15554
|
-
}));
|
|
15357
|
+
return this.http.post(`${this.apiUrl}/confirmation/resend`, { email });
|
|
15555
15358
|
}
|
|
15556
15359
|
/**
|
|
15557
15360
|
* Confirm registered user
|
|
15558
15361
|
*/
|
|
15559
15362
|
confirm(verificationCode) {
|
|
15560
|
-
return this.http.post(`${this.apiUrl}/confirmation`, { verificationCode })
|
|
15561
|
-
.pipe(catchError((error) => {
|
|
15562
|
-
// success tracked on back-end side to attach it to existing user before login
|
|
15563
|
-
this.mpService.track('emailConfirmError', { verificationCode });
|
|
15564
|
-
return throwError(error);
|
|
15565
|
-
}));
|
|
15363
|
+
return this.http.post(`${this.apiUrl}/confirmation`, { verificationCode });
|
|
15566
15364
|
}
|
|
15567
15365
|
/**
|
|
15568
15366
|
* Search existing user
|
|
@@ -15571,7 +15369,7 @@ class UserService extends RestService$1 {
|
|
|
15571
15369
|
return this.http.get(`${this.apiUrl}/search`, { params: { email } }).pipe(map((userBase) => this.createModelInstance(userBase)));
|
|
15572
15370
|
}
|
|
15573
15371
|
finishOnboarding(user) {
|
|
15574
|
-
return this.put(user,
|
|
15372
|
+
return this.put(user, `${this.apiUrl}/status`);
|
|
15575
15373
|
}
|
|
15576
15374
|
updatePhoto(photo) {
|
|
15577
15375
|
return this.http.post(`${this.apiUrl}/photo?_method=PUT`, photo).pipe(map((photoUrl) => {
|
|
@@ -15615,19 +15413,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
15615
15413
|
}] }]; } });
|
|
15616
15414
|
|
|
15617
15415
|
class FinancialYearService {
|
|
15618
|
-
constructor(http, environment
|
|
15416
|
+
constructor(http, environment) {
|
|
15619
15417
|
this.http = http;
|
|
15620
15418
|
this.environment = environment;
|
|
15621
|
-
this.mpService = mpService;
|
|
15622
15419
|
}
|
|
15623
15420
|
switch(year) {
|
|
15624
15421
|
return this.http.get(`${this.environment.apiV2}/financial-year/switch`, { params: new HttpParams({ fromString: `financialYear=${year}` }) }).pipe(map(() => {
|
|
15625
15422
|
localStorage.setItem('financialYear', year.toString());
|
|
15626
|
-
this.mpService.track('switchYear', { year });
|
|
15627
15423
|
window.location.reload();
|
|
15628
15424
|
}));
|
|
15629
15425
|
}
|
|
15630
|
-
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 }); }
|
|
15631
15427
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FinancialYearService, providedIn: 'root' }); }
|
|
15632
15428
|
}
|
|
15633
15429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FinancialYearService, decorators: [{
|
|
@@ -15638,7 +15434,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
15638
15434
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
15639
15435
|
type: Inject,
|
|
15640
15436
|
args: ['environment']
|
|
15641
|
-
}] }
|
|
15437
|
+
}] }]; } });
|
|
15642
15438
|
|
|
15643
15439
|
class HoldingService extends RestService$1 {
|
|
15644
15440
|
constructor(environment) {
|