WIP Workorder AH download

This commit is contained in:
Frank Schubert
2024-11-08 12:23:07 +01:00
parent 6c0d334bbc
commit 482e1a4989
4 changed files with 111 additions and 5 deletions

View File

@@ -939,12 +939,12 @@
return false;
}
function downloadWorkorderAh(workorder_id) {
async function downloadWorkorderAh(workorder_id) {
if(!workorder_id) return false;
var filename;
fetch('<?=self::getUrl("RimoWorkorder", "downloadAh")?>')
await fetch('<?=self::getUrl("RimoWorkorder", "downloadAh")?>?id=' + workorder_id)
.then(resp => {
const header = resp.headers.get("Content-disposition");
let matches = header.match(/filename=['"]?([^'"]+)/i);
@@ -970,7 +970,6 @@
})
.catch(() => window.notify("Fehler beim Download des AH-Blatts"));
}
</script>
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>