aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-07-12 13:59:17 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2026-07-12 13:59:17 +0200
commitf17f1ca7ada63eb28436acf8462cec5eda0e4214 (patch)
treeae17ebe4e469ce6c21cd58ef3b9510025186c29b
parent0c57fde6a995be81068b43cff8f0ec25530f2301 (diff)
downloadbycs-sol-f17f1ca7ada63eb28436acf8462cec5eda0e4214.tar.gz
bycs-sol-f17f1ca7ada63eb28436acf8462cec5eda0e4214.zip
add simple red point notice print layout
-rw-r--r--mass-graducation/src/main.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/mass-graducation/src/main.js b/mass-graducation/src/main.js
index 8d009b0..4224942 100644
--- a/mass-graducation/src/main.js
+++ b/mass-graducation/src/main.js
@@ -278,8 +278,28 @@ function submitMassGraduation() {
});
}
+let prePrintBody = null;
function printRedPointNote(li) {
+ // save the current DOM
+ prePrintBody = document.body;
+
+ // prepare the printable red point notice
+ const printBdy = document.createElement("body");
+ const reason = li.querySelector(".group-member-point-reason").value;
+ const dateStr = datetimeStringNow();
+
+ printBdy.innerHTML = `
+<h2>Roter Punkt Dokumentation</h2>
+<p>Schüler*in: ${li.student.name}</p>
+<p>Datum: ${dateStr}</p>
+<h3>Begründung</h3>
+<p>${reason}</p>
+<p>Lehrkraft: ${name}</p>`;
+
+ document.body = printBdy;
print();
+ // Restore the DOM after printing the red point note
+ document.body = prePrintBody;
}
async function init() {