Skip to content

Commit

Permalink
Render on for salary on load
Browse files Browse the repository at this point in the history
  • Loading branch information
neb417 committed Nov 18, 2023
1 parent d0f2f44 commit ce597a2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
6 changes: 4 additions & 2 deletions app/views/budget/_salary_budget.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
total_bi_weekly_cost: total_bi_weekly_cost,
income: income,
investing_amount: investing_amount,
savings_amount: savings_amount
} %>
savings_amount: savings_amount,
guilt_free: guilt_free
}
%>
</div>
<% end %>
3 changes: 2 additions & 1 deletion app/views/dashboard/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
total_monthly_cost: @total_monthly_cost,
total_bi_weekly_cost: @total_bi_weekly_cost, income: @salary_taxed,
investing_amount: @salary_invest,
savings_amount: @salary_saving
savings_amount: @salary_saving,
guilt_free: @guilt_free_salary
}
%>
</div>
Expand Down
14 changes: 7 additions & 7 deletions app/views/shared/_budget.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<%= humanized_money_with_symbol(savings_amount.daily_saving) %>
</div>
<div>
<%= humanized_money_with_symbol((income.daily_income) - total_annual_cost / 365) %>
<%= humanized_money_with_symbol((guilt_free.daily_guilt_free) - total_annual_cost / 365) %>
</div>
</div>

Expand All @@ -19,7 +19,7 @@
<div><%= humanized_money_with_symbol(investing_amount.weekly_saving) %></div>
<div><%= humanized_money_with_symbol(savings_amount.weekly_saving) %></div>
<div>
<%= humanized_money_with_symbol((income.weekly_income) - total_annual_cost / 52) %>
<%= humanized_money_with_symbol((guilt_free.weekly_guilt_free) - total_annual_cost / 52) %>
</div>
</div>

Expand All @@ -29,7 +29,7 @@
<div><%= humanized_money_with_symbol(investing_amount.bi_weekly_saving) %></div>
<div><%= humanized_money_with_symbol(savings_amount.bi_weekly_saving) %></div>
<div>
<%= humanized_money_with_symbol((income.bi_weekly_net_income) - total_bi_weekly_cost) %>
<%= humanized_money_with_symbol((guilt_free.bi_weekly_guilt_free) - total_bi_weekly_cost) %>
</div>
</div>

Expand All @@ -39,7 +39,7 @@
<div><%= humanized_money_with_symbol(investing_amount.monthly_saving) %></div>
<div><%= humanized_money_with_symbol(savings_amount.monthly_saving) %></div>
<div>
<%= humanized_money_with_symbol((income.monthly_income) - total_monthly_cost) %>
<%= humanized_money_with_symbol((guilt_free.monthly_guilt_free) - total_monthly_cost) %>
</div>
</div>

Expand All @@ -49,7 +49,7 @@
<div><%= humanized_money_with_symbol(investing_amount.quarterly_saving) %></div>
<div><%= humanized_money_with_symbol(savings_amount.quarterly_saving) %></div>
<div>
<%= humanized_money_with_symbol((income.quarterly_income) - total_annual_cost / 4) %>
<%= humanized_money_with_symbol((guilt_free.quarterly_guilt_free) - total_annual_cost / 4) %>
</div>
</div>

Expand All @@ -59,7 +59,7 @@
<div><%= humanized_money_with_symbol(investing_amount.biannual_saving) %></div>
<div><%= humanized_money_with_symbol(savings_amount.biannual_saving) %></div>
<div>
<%= humanized_money_with_symbol((income.biannual_income) - total_annual_cost / 2) %>
<%= humanized_money_with_symbol((guilt_free.biannual_guilt_free) - total_annual_cost / 2) %>
</div>
</div>

Expand All @@ -70,6 +70,6 @@
<div><%= humanized_money_with_symbol(investing_amount.annual_saving) %></div>
<div><%= humanized_money_with_symbol(savings_amount.annual_saving) %></div>
<div>
<%= humanized_money_with_symbol(income.total_net_income - total_annual_cost ) %>
<%= humanized_money_with_symbol(guilt_free.annual_guilt_free - total_annual_cost ) %>
</div>
</div>

0 comments on commit ce597a2

Please sign in to comment.