Fix: Drag & Drop Merge, UI Layouts und Bugfixes (final)
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 58s
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 58s
This commit is contained in:
@@ -688,6 +688,28 @@ $conn->close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const isFromBackpack = evt.from.id !== 'table-container' && evt.from.classList.contains('nested-sortable');
|
||||
const isToTable = evt.to.id === 'table-container';
|
||||
if (isFromBackpack && isToTable) {
|
||||
const articleId = itemEl.dataset.articleId;
|
||||
const qtyInput = itemEl.querySelector('.quantity-input');
|
||||
const qty = parseInt(qtyInput ? qtyInput.value : 1, 10);
|
||||
|
||||
const tableContainer = document.getElementById('table-container');
|
||||
const existingEl = Array.from(tableContainer.children).find(el =>
|
||||
el !== itemEl && el.classList.contains('packed-item-container') && String(el.dataset.articleId) === String(articleId)
|
||||
);
|
||||
|
||||
if (existingEl) {
|
||||
const exInput = existingEl.querySelector('.quantity-input');
|
||||
if (exInput) {
|
||||
exInput.value = parseInt(exInput.value, 10) + qty;
|
||||
}
|
||||
itemEl.remove();
|
||||
}
|
||||
}
|
||||
|
||||
syncListState();
|
||||
}
|
||||
|
||||
|
||||
@@ -323,8 +323,8 @@ function render_item_row($item, $level, $items_by_parent) {
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mb-4 mb-lg-0">
|
||||
<div class="card h-100">
|
||||
<div class="col-lg-8 mb-4 mb-lg-0 d-flex flex-column">
|
||||
<div class="card flex-grow-1">
|
||||
<div class="card-header"><h5 class="mb-0"><i class="fas fa-box-open me-2"></i>Gepackte Artikel</h5></div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
@@ -629,4 +629,4 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php require_once 'footer.php'; ?>
|
||||
<?php require_once 'footer.php'; ?>hp require_once 'footer.php'; ?>
|
||||
Reference in New Issue
Block a user