Skip to content

Commit

Permalink
Merge branch 'main' into gg/ui-shadcn
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielegranello authored Oct 25, 2024
2 parents 9f9bbab + ca4cce8 commit 7667427
Show file tree
Hide file tree
Showing 5 changed files with 775 additions and 25 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
.pnp.js
.yarn/install-state.gz

# docs
/docs

# testing
/coverage

Expand Down
6 changes: 3 additions & 3 deletions app/models/Mortgage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Mortgage {
*/
initialDeposit: number;
/**
* The principle is the value of the property, minus the deposit
* The principal is the value of the property, minus the deposit
*/
principal: number;
monthlyPayment: number;
Expand All @@ -44,7 +44,7 @@ export class Mortgage {
this.termYears = params.mortgageTerm || DEFAULT_MORTGAGE_TERM;

// Computed properties, order is significant
this.principal = this.calculateMortgagePrinciple();
this.principal = this.calculateMortgagePrincipal();

const { monthlyPayment, totalMortgageCost } =
this.calculateMonthlyMortgagePayment();
Expand All @@ -55,7 +55,7 @@ export class Mortgage {
this.totalInterest = this.calculateTotalInterest();
}

private calculateMortgagePrinciple() {
private calculateMortgagePrincipal() {
const principal = this.propertyValue * (1 - this.initialDeposit);
return principal;
}
Expand Down
Loading

0 comments on commit 7667427

Please sign in to comment.