TODO clicking on transactions switches them to a stub state that will be a form that submits amendments BUT ASSERTS ONLY 1 DELTA MODIFIED BEFORE SENDING and sends the first
cicd / ci (push) Successful in 56s Details

main
bel 2024-07-20 21:32:46 -06:00
parent 912c3a2659
commit b8323f731f
1 changed files with 7 additions and 33 deletions

View File

@ -60,12 +60,12 @@
var result = `<table>`
for (var t of transactions) {
result += `<tr>`
result += `<tr transaction='${btoa(JSON.stringify(t))}' style="cursor: crosshair;" onclick="stageEdit(this); return false;">`
result += ` <td style="width: 6em;">${t[0].Date}</td>`
result += ` <td style="width: 10em;">${t[0].Description}</td>`
result += ` <td><table style="margin: 0;">`
for (var delta of t) {
result += ` <tr delta='${btoa(JSON.stringify(delta))}' style="cursor: crosshair;" onclick="stageEdit(this); return false;">`
result += ` <tr>`
result += ` <td><span style="font-variant: petite-caps;">${delta.Name.split(":")[0]}</span><span style="opacity: 0.6;"> :${delta.Name.split(":").slice(1, 100).join(":")}</span></td>`
result += ` <td style="text-align: right; width: 2em;">${delta.Payee ? delta.Currency : ""}</td>`
result += ` <td style="text-align: right; width: 5em;">${delta.Payee ? delta.Value : ""}</td>`
@ -80,15 +80,11 @@
}
function stageEdit(row) {
const deltaJSON = atob(row.attributes.delta.value)
const delta = JSON.parse(deltaJSON)
document.getElementById("edit-date").value = delta.Date
document.getElementById("edit-description").value = delta.Description
document.getElementById("edit-name").value = delta.Name
document.getElementById("edit-value").value = delta.Value
document.getElementById("modal").showModal()
const xactionJSON = atob(row.attributes.transaction.value)
const xaction = JSON.parse(xactionJSON)
console.log(xaction)
row.innerHTML = `<td colspan="3"></td>`
TODO
}
function stage(who, contributesToHouse) {
@ -140,28 +136,6 @@
<div id="reg">
</div>
</details>
<dialog id="modal" style="width: 80%; height: 80%; margin: auto;">
<form method="dialog">
<div style="display: flex; flex-direction: row;">
<div style="flex-grow: 100;"></div>
<button type="submit">X</button>
</div>
<label>Date</label>
<input id="edit-date" type="text" style="width: 80%;"/>
<label>Description</label>
<input id="edit-description" type="text" style="width: 80%;"/>
<label>Name</label>
<input id="edit-name" type="text" style="width: 80%;"/>
<label>Value</label>
<input id="edit-value" type="text" style="width: 80%;"/>
<button type="submit" style="background-color: maroon;">Submit</button>
</form>
</dialog>
</body>
<footer>
</footer>