This commit is contained in:
2024-12-14 23:26:38 -05:00
parent 6f0bd26228
commit 8188adce57
2 changed files with 21 additions and 4 deletions

View File

@@ -71,11 +71,18 @@ document.body.addEventListener("click", event => {
.then( data => { UpdateSR(-1); event.target.textContent="QRCode"; } )
.catch( error => { console.log("Here is the error!"+error); ResponseError=error; UpdateSR(-1); })
} else {
const js=JSON.stringify( { ticket: id0 } );
const fetchtable={ method:'POST', headers: { 'Content-Type': 'application/json' }, body: js };
fetch('/qrcode',fetchtable)
.then( response => { if (!response.ok) throw new Error(`Server responded with status ${response.status}`); else return response.json(); } )
.then( data => { console.log("Data is: ",data); } )
.catch( error => { console.log("Here is the error!"+error); ResponseError=error; UpdateSR(-1); })
console.log("QRCode ",id0);
}
}
});
})
const checkboxes = document.querySelectorAll("[id$=-used]");