QZ Tray thermal printing: PDF workflow, barcode fixes, margin adjustments, and layout improvements
This commit is contained in:
36
backup/db_test.html
Normal file
36
backup/db_test.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Database Test</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Database Connection Test</h2>
|
||||
<button id="test-btn">Test Database</button>
|
||||
<div id="result"></div>
|
||||
|
||||
<script>
|
||||
document.getElementById('test-btn').addEventListener('click', function() {
|
||||
const resultDiv = document.getElementById('result');
|
||||
resultDiv.innerHTML = 'Loading...';
|
||||
|
||||
fetch('/get_unprinted_orders')
|
||||
.then(response => {
|
||||
console.log('Response status:', response.status);
|
||||
if (response.ok) {
|
||||
return response.json();
|
||||
} else {
|
||||
throw new Error('HTTP ' + response.status);
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log('Data received:', data);
|
||||
resultDiv.innerHTML = `<pre>${JSON.stringify(data, null, 2)}</pre>`;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
resultDiv.innerHTML = 'Error: ' + error.message;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user