Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: calculate resale values in Lifetime class #149

Merged
merged 13 commits into from
Jan 6, 2025

Conversation

zz-hh-aa
Copy link
Collaborator

@zz-hh-aa zz-hh-aa commented Nov 27, 2024

What's new in this PR

In Lifetime.ts

  • Added depreciatedHouseResaleValue, fairholdLandPurchaseResaleValue and houseAge properties for resale values (as these will be calculated over 'lifetimes' as well)
  • Adds the above classes to the for loop to iterate through them too & push them to lifetime
  • Tidied the file slightly
  • Made calculateDepreciatedBuildPrice() method in Property public because we'll need to call it in Lifetime

Why

For story 4 in the calculator, we'll need resale values. Since they also need to be calculated over longer timespans eg lifetime, I thought it made sense to add them to the Lifetime class, as it had the most appropriate data structure.

I would like to merge #151 first so that I can use the helper functions to write tests for this class (that's why this is still a draft, no test file exists for Lifetime.ts yet).

Closes #153

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fairhold-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2025 11:19am

@zz-hh-aa zz-hh-aa changed the base branch from main to oz/depreciation-update November 27, 2024 16:01
@zz-hh-aa zz-hh-aa requested a review from a team November 29, 2024 09:24
@zz-hh-aa zz-hh-aa changed the title wip: feat: calculate resale values in Lifetime class feat: calculate resale values in Lifetime class Dec 9, 2024
@zz-hh-aa zz-hh-aa merged commit 27fffba into oz/depreciation-update Jan 6, 2025
2 checks passed
@zz-hh-aa zz-hh-aa deleted the oz/resale-values branch January 6, 2025 11:19
@zz-hh-aa zz-hh-aa restored the oz/resale-values branch January 6, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants