Skip to content

Commit

Permalink
yoseph history almost done
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyHubert committed Aug 5, 2024
1 parent 1e0cfa2 commit b988287
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions yoseph/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ document.querySelector(`#savings-expense-enter`).addEventListener(`click`, () =>
const savingsHistoryItem = {
description: document.querySelector(`#savings-expense-description`).value,
amount: SavingsSubtract,
date: Date.now(), // new Date(item.date)
date: Date.now(),
account: "savings"
}
History.push(savingsHistoryItem)
Expand Down Expand Up @@ -97,8 +97,19 @@ document.querySelector(`#view-history`).addEventListener(`click`, () => {
History
.map((info) => {
return `
<div>
${info.date} ${info.account} ${info.amount}$ ${info.description}
<div class="line">
<div class="date">
${info.date}
</div>
<div class="account">
${info.account}
</div>
<div class="amount">
${info.amount}$
</div>
<div class="description">
${info.description}
</div>
</div>
`
})
Expand Down

0 comments on commit b988287

Please sign in to comment.