diff --git a/public/index.html b/public/index.html
index 3988450..13365f8 100644
--- a/public/index.html
+++ b/public/index.html
@@ -29,19 +29,19 @@
one += "
"
one += " "
- one += ` | `
+ one += ` ${i} | `
for(var key of ["Date", "Description"])
- one += ` | `
+ one += ` ${transaction[key]} | `
one += " "
one += " "
one += " | | "
for(var key of ["Payee", "Amount"])
- one += ` | `
+ one += ` ${transaction[key]} | `
one += " "
one += " "
one += " | | "
for(var key of ["Payer"])
- one += ` | `
+ one += ` ${transaction[key]} | `
one += " "
one += " | "
@@ -52,11 +52,14 @@
document.getElementById("transactions").innerHTML = innerHTML
}
function saveTransaction(row) {
- const inputs = row.getElementsByTagName("textarea")
+ const inputs = row.getElementsByTagName("td")
var kvs = {}
for (var i = 0; i < inputs.length; i++) {
const key = inputs[i].getAttribute("key")
- const value = inputs[i].value
+ if (!key) {
+ continue
+ }
+ const value = inputs[i].innerHTML
kvs[key] = value
if (!isNaN(value))
kvs[key] = parseFloat(value)