SHA256
feat: Anlass + Endgrund fields for records
Adds two optional free-text fields to describe why a transaction
started ("Anlass") and why it ended ("Endgrund") - chosen names instead
of the technical "Startursache"/"Endesuhrsache". Displayed as own table
columns and editable in the form; legacy records without those fields
render as "-". Payload is encrypted client-side like every other field
(no server change needed, opaque ciphertext).
Verified: node --check, crypto roundtrip incl. new fields, legacy-safe
access (?? ''), pytest 3/3.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
@@ -104,6 +104,8 @@ function renderRow(record, payload) {
|
||||
payload.personB,
|
||||
showTs(payload.tsStart),
|
||||
showTs(payload.tsEnd),
|
||||
showTs(payload.startCause),
|
||||
showTs(payload.endCause),
|
||||
payload.action,
|
||||
];
|
||||
for (const text of cells) {
|
||||
@@ -145,7 +147,7 @@ async function reload() {
|
||||
failures++;
|
||||
tbody.appendChild(
|
||||
el("tr", { class: "row-error" }, [
|
||||
el("td", { colspan: "6", text: "Datensatz nicht entschlüsselbar (falsche Passphrase oder manipuliert)." }),
|
||||
el("td", { colspan: "8", text: "Datensatz nicht entschlüsselbar (falsche Passphrase oder manipuliert)." }),
|
||||
])
|
||||
);
|
||||
}
|
||||
@@ -164,6 +166,8 @@ function openEditor(record, payload) {
|
||||
$("#f-personb").value = payload.personB ?? "";
|
||||
$("#f-tsstart").value = payload.tsStart ?? "";
|
||||
$("#f-tsend").value = payload.tsEnd ?? "";
|
||||
$("#f-startcause").value = payload.startCause ?? "";
|
||||
$("#f-endcause").value = payload.endCause ?? "";
|
||||
$("#f-action").value = payload.action ?? "";
|
||||
$("#editor-backdrop").hidden = false;
|
||||
}
|
||||
@@ -201,6 +205,8 @@ async function saveRecord(ev) {
|
||||
personB: $("#f-personb").value.trim(),
|
||||
tsStart: tsOrNull($("#f-tsstart").value),
|
||||
tsEnd: tsOrNull($("#f-tsend").value),
|
||||
startCause: tsOrNull($("#f-startcause").value),
|
||||
endCause: tsOrNull($("#f-endcause").value),
|
||||
action: $("#f-action").value.trim(),
|
||||
};
|
||||
if (!payload.personA || !payload.personB || !payload.action) {
|
||||
|
||||
Reference in New Issue
Block a user