This commit is contained in:
2026-09-18 21:30:02 +03:00
parent 51d86d49e3
commit bf6fc2ee88
4 changed files with 296 additions and 214 deletions

View File

@ -250,21 +250,20 @@ export function createPrintStore() {
}
}
async function refreshJob() {
if (!job) return;
try {
const res = await fetch(`/api/print/${job.job_id}`);
if (!res.ok) return;
job = await res.json();
// Автопродолжение срабатывает ТОЛЬКО для awaiting_pickup
if (job.phase === 'awaiting_pickup' && autoContinue) {
advanceJob();
}
} catch (e) {
console.error('refresh error:', e);
}
}
async function refreshJob() {
if (!job) return;
try {
const res = await fetch(`/api/print/${job.job_id}`);
if (!res.ok) return;
job = await res.json();
if (job.phase === 'awaiting_pickup' && autoContinue) {
advanceJob();
}
} catch (e) {
console.error('refresh error:', e);
}
}
async function cancelJob() {
if (!job) return;