Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuiantw1212 committed May 11, 2024
1 parent b0bf0be commit 9d3df54
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/calculator/benchmark.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function calculateLifeAssetChart(payload) {
// etfAsset
// })
const { irr } = props.asset
const { downpayTotalPrice } = props.mortgage
const { downpayTotalPrice, debtData, downpayYear } = props.mortgage
const { irrOverDecade } = props.retirement.pension
const chartData = {
datasets: {},
Expand Down
4 changes: 2 additions & 2 deletions components/calculator/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@

<h2 id="_五子登科" tabindex="-1">五子登科<a class="header-anchor" href="#五子登科"
aria-label="Permalink to &quot;五子登科&quot;">&ZeroWidthSpace;</a></h2>
<h3 id="_資產試算" tabindex="-1">證券試算<a class="header-anchor" href="#證券試算"
aria-label="Permalink to &quot;證券試算&quot;">&ZeroWidthSpace;</a></h3>
<h3 id="_資產試算" tabindex="-1">資產試算<a class="header-anchor" href="#資產試算"
aria-label="Permalink to &quot;資產試算&quot;">&ZeroWidthSpace;</a></h3>
<Asset v-model="userForm.asset" :config="config" :profile="userForm.profile" :career="userForm.career"
:spouse="userForm.spouse" :parenting="userForm.parenting" :mortgage="userForm.mortgage"
:retirement="userForm.retirement" ref="AssetRef" @update:model-value="onInvestmentChanged()">
Expand Down
3 changes: 1 addition & 2 deletions components/calculator/mortgage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,11 @@ function calculateMortgage(options: any = { propagate: true }) {
calculateTotalPrice()
calculateDownpayGoalPercent()
}
calculateMonthlyRepay()
// draw chart
debounce(() => {
drawDownpayChart(propagate)
calculateLoanAmount()
calculateMonthlyRepay()
const { headCount } = props.parenting
const { singleBedRoom, doubleBedRoom } = props.estateSize
if (headCount > singleBedRoom + doubleBedRoom * 2) {
Expand All @@ -337,7 +337,6 @@ function calculateTotalPriceEstimated() {
const totalPriceEstimated = Math.floor(Number(unitPrice) * Number(floorSize) * 10000)
mortgage.value.totalPriceEstimated = totalPriceEstimated
mortgage.value.totalPrice = totalPriceEstimated
// mortgage.value.downpayGoalStep = Math.floor(totalPriceEstimated / 10)
}
}
function setTotalPriceMarks() {
Expand Down

0 comments on commit 9d3df54

Please sign in to comment.