feat(v1.5): complete phases 40-43 workflow cleanup
This commit is contained in:
@@ -144,12 +144,23 @@ $currentStatusFilter = (string) ($printStatusFilter ?? '');
|
||||
<td><span class="print-status-badge <?= $e($badgeClass) ?>"><?= $e($badgeLabel) ?></span></td>
|
||||
<td class="text-nowrap"><?= $e($jobCompletedAt !== '' ? $jobCompletedAt : '-') ?></td>
|
||||
<td>
|
||||
<?php if ($jobStatus === 'failed' && $jobPackageId > 0): ?>
|
||||
<button type="button"
|
||||
class="btn btn--sm btn--secondary btn-retry-print"
|
||||
data-package-id="<?= $e((string) $jobPackageId) ?>"
|
||||
data-csrf="<?= $e((string) ($csrfToken ?? '')) ?>">Ponow</button>
|
||||
<?php endif; ?>
|
||||
<div class="print-queue-actions">
|
||||
<?php if ($jobStatus === 'failed' && $jobPackageId > 0): ?>
|
||||
<button type="button"
|
||||
class="btn btn--sm btn--secondary btn-retry-print"
|
||||
data-package-id="<?= $e((string) $jobPackageId) ?>"
|
||||
data-csrf="<?= $e((string) ($csrfToken ?? '')) ?>">Ponow</button>
|
||||
<?php endif; ?>
|
||||
<form method="post" action="/settings/printing/jobs/delete" class="print-queue-delete-form">
|
||||
<input type="hidden" name="_token" value="<?= $e((string) ($csrfToken ?? '')) ?>">
|
||||
<input type="hidden" name="id" value="<?= $e((string) $jobId) ?>">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn--sm btn--danger js-delete-print-job"
|
||||
data-job-id="<?= $e((string) $jobId) ?>"
|
||||
>Usun</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@@ -161,6 +172,20 @@ $currentStatusFilter = (string) ($printStatusFilter ?? '');
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
document.querySelectorAll('.js-delete-print-job').forEach(function (btn) {
|
||||
btn.addEventListener('click', function () {
|
||||
var form = btn.closest('form');
|
||||
if (!form) return;
|
||||
if (window.OrderProAlerts && window.OrderProAlerts.confirm) {
|
||||
window.OrderProAlerts.confirm(
|
||||
'Usuwanie wpisu z kolejki',
|
||||
'Czy na pewno chcesz usunac ten wpis kolejki wydruku?',
|
||||
function () { form.submit(); }
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('.btn-retry-print').forEach(function (btn) {
|
||||
btn.addEventListener('click', function () {
|
||||
var packageId = btn.getAttribute('data-package-id');
|
||||
|
||||
Reference in New Issue
Block a user