add helper buttons to Stage Zach/Bel Charge/Payment
cicd / ci (push) Successful in 46s
Details
cicd / ci (push) Successful in 46s
Details
parent
566b3ad571
commit
8fd1a4fedb
|
|
@ -80,7 +80,7 @@
|
|||
function loadLastNLines(lastNLines) {
|
||||
var result = `<form onsubmit="setLastNLines(this); return false;" action="#">`
|
||||
result += ` <div>${f}</div>`
|
||||
result += ` <textarea name="lastNLines" style="height: 30em;">`
|
||||
result += ` <textarea id="lastNLinesTextarea" name="lastNLines" style="height: 30em;">`
|
||||
for (var k in lastNLines) {
|
||||
result += lastNLines[k] + "\n"
|
||||
}
|
||||
|
|
@ -89,6 +89,22 @@
|
|||
result += `</form>`
|
||||
document.getElementById("lastNLines").innerHTML = result
|
||||
}
|
||||
function stage(who, contributesToHouse) {
|
||||
var benefactor = who
|
||||
var beneficiary = "AssetAccount:Chase:5876"
|
||||
if (!contributesToHouse) {
|
||||
var tmp = beneficiary
|
||||
beneficiary = benefactor
|
||||
benefactor = tmp
|
||||
}
|
||||
const zeroPad = (num, places) => String(num).padStart(places, '0')
|
||||
var d = new Date()
|
||||
const today = `${d.getFullYear()}-${zeroPad(1+d.getMonth(), 2)}-${zeroPad(d.getDate(), 2)}`
|
||||
console.log(`@${today} ${benefactor} gave to ${beneficiary}`)
|
||||
document.getElementById("lastNLinesTextarea").value += `\n${today} TODO moolah2`
|
||||
document.getElementById("lastNLinesTextarea").value += `\n ${beneficiary} $0.00`
|
||||
document.getElementById("lastNLinesTextarea").value += `\n ${benefactor}`
|
||||
}
|
||||
</script>
|
||||
</header>
|
||||
<body onload="init();" style="min-width: 1024px;">
|
||||
|
|
@ -104,6 +120,16 @@
|
|||
</details>
|
||||
<details open>
|
||||
<summary>Edit</summary>
|
||||
<div style="display:flex; flex-direction:row; width:100%; justify-content:space-between;">
|
||||
<div>
|
||||
<input type="button" onclick="stage('AssetAccount:Zach', true)" value="Stage Zach's Payment"/>
|
||||
<input type="button" onclick="stage('AssetAccount:Zach', false)" value="Stage Zach's Charge"/>
|
||||
</div>
|
||||
<div>
|
||||
<input type="button" onclick="stage('AssetAccount:Bel', true)" value="Stage Bel's Payment"/>
|
||||
<input type="button" onclick="stage('AssetAccount:Bel', false)" value="Stage Bel's Charge"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="lastNLinesStatus">
|
||||
</div>
|
||||
<div id="lastNLines">
|
||||
|
|
|
|||
Loading…
Reference in New Issue