transactions.html can edit though needs some kinda user feedback of the changed row or something...
All checks were successful
cicd / ci (push) Successful in 1m28s
All checks were successful
cicd / ci (push) Successful in 1m28s
This commit is contained in:
@@ -8,17 +8,17 @@
|
||||
</style>
|
||||
<script>
|
||||
function http(method, remote, callback, body) {
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
var xmlhttp = new XMLHttpRequest()
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
if (xmlhttp.readyState == XMLHttpRequest.DONE) {
|
||||
callback(xmlhttp.responseText, xmlhttp.status)
|
||||
}
|
||||
};
|
||||
xmlhttp.open(method, remote, true);
|
||||
}
|
||||
xmlhttp.open(method, remote, true)
|
||||
if (typeof body == "undefined") {
|
||||
body = null
|
||||
}
|
||||
xmlhttp.send(body);
|
||||
xmlhttp.send(body)
|
||||
}
|
||||
|
||||
function callback(responseBody, responseStatus) {
|
||||
@@ -134,12 +134,16 @@
|
||||
const idx = btn.name.split("submit")[1]
|
||||
const form = btn.parentElement.parentElement
|
||||
|
||||
now.Value = form[`value${idx}`].value
|
||||
now.Value = parseFloat(form[`value${idx}`].value)
|
||||
now.Name = form[`name${idx}`].value
|
||||
now.Description = form[`description`].value
|
||||
now.Date = form[`date`].value
|
||||
|
||||
if (JSON.stringify(old) === JSON.stringify(now)) {
|
||||
var different = false
|
||||
for(var k in old) {
|
||||
different = different || old[k] != now[k]
|
||||
}
|
||||
if (!different) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -147,10 +151,10 @@
|
||||
if (status != 200)
|
||||
throw(`Unexpected status ${status}: ${body}`)
|
||||
load()
|
||||
}, {
|
||||
}, JSON.stringify({
|
||||
old: old,
|
||||
now: now,
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
function stage(who, contributesToHouse) {
|
||||
|
||||
Reference in New Issue
Block a user