Skip to content

Commit

Permalink
feat: passed forecastParameters to Household too
Browse files Browse the repository at this point in the history
  • Loading branch information
zz-hh-aa committed Aug 30, 2024
1 parent 50e8e33 commit 8fe7e62
Showing 1 changed file with 4 additions and 32 deletions.
36 changes: 4 additions & 32 deletions app/models/Household.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ export class Household {
newBuildPrice: this.property.newBuildPrice,
depreciatedBuildPrice: this.property.depreciatedBuildPrice,
landPrice: this.property.landPrice,
propertyPriceGrowthPerYear:
this.forecastParameters.propertyPriceGrowthPerYear,
constructionPriceGrowthPerYear:
this.forecastParameters.constructionPriceGrowthPerYear,
yearsForecast: this.forecastParameters.yearsForecast,
maintenanceCostPercentage:
this.forecastParameters.maintenanceCostPercentage,
forecastParameters: this.forecastParameters,
});

const marketRent = new MarketRent({
Expand All @@ -81,14 +75,7 @@ export class Household {
depreciatedBuildPrice: this.property.depreciatedBuildPrice,
landPrice: this.property.landPrice,
incomeYearly: this.incomeYearly,
propertyPriceGrowthPerYear:
this.forecastParameters.propertyPriceGrowthPerYear,
constructionPriceGrowthPerYear:
this.forecastParameters.constructionPriceGrowthPerYear,
yearsForecast: this.forecastParameters.yearsForecast,
maintenanceCostPercentage:
this.forecastParameters.maintenanceCostPercentage,
rentGrowthPerYear: this.forecastParameters.rentGrowthPerYear,
forecastParameters: this.forecastParameters,
});

const socialRent = new SocialRent({
Expand All @@ -102,12 +89,7 @@ export class Household {
const fairholdLandPurchase = new FairholdLandPurchase({
newBuildPrice: this.property.newBuildPrice,
depreciatedBuildPrice: this.property.depreciatedBuildPrice,
constructionPriceGrowthPerYear:
this.forecastParameters.constructionPriceGrowthPerYear,
yearsForecast: this.forecastParameters.yearsForecast,
maintenanceCostPercentage:
this.forecastParameters.maintenanceCostPercentage,
incomeGrowthPerYear: this.forecastParameters.incomeGrowthPerYear,
forecastParameters: this.forecastParameters,
affordability: marketPurchase.affordability,
fairhold: new Fairhold({
affordability: marketPurchase.affordability,
Expand All @@ -122,17 +104,7 @@ export class Household {
depreciatedBuildPrice: this.property.depreciatedBuildPrice, // depreciated building price
landPrice: this.property.landPrice, // land price
incomeYearly: this.incomeYearly, // income
affordabilityThresholdIncomePercentage:
this.forecastParameters.affordabilityThresholdIncomePercentage, // affordability threshold percentage
propertyPriceGrowthPerYear:
this.forecastParameters.propertyPriceGrowthPerYear, // property price growth per year
constructionPriceGrowthPerYear:
this.forecastParameters.constructionPriceGrowthPerYear, // construction price growth per year
yearsForecast: this.forecastParameters.yearsForecast, // years forecast
maintenanceCostPercentage:
this.forecastParameters.maintenanceCostPercentage, // maintenance cost percentage
incomeGrowthPerYear: this.forecastParameters.incomeGrowthPerYear, // income growth per year
rentGrowthPerYear: this.forecastParameters.rentGrowthPerYear, // rent growth per year
forecastParameters: this.forecastParameters,

fairhold: new Fairhold({
affordability: marketRent.affordability,
Expand Down

0 comments on commit 8fe7e62

Please sign in to comment.