Travel: Poprawki strefy dostawcy

This commit is contained in:
2026-09-21 10:28:48 +02:00
parent 3e44cd18d4
commit 298178cb33
2 changed files with 211 additions and 64 deletions
+61
View File
@@ -99,6 +99,26 @@ include '../../header-invoice.php';
<span class="text-muted fw-bold">Przeciągnij fakturę tutaj lub kliknij</span>
<span class="small text-muted">(PDF, JPG, PNG)</span>
</div>
<!-- Wgrany plik / Podgląd (Początkowo ukryty, pokazywany w symulacji OCR) -->
<div class="d-flex align-items-center p-3 mb-3 border rounded bg-lighter d-none" id="ocr-preview-container">
<div class="me-3 cursor-pointer" data-bs-toggle="modal" data-bs-target="#invoicePreviewModal" title="Kliknij, aby powiększyć">
<img src="https://via.placeholder.com/150x200.png?text=Faktura+OCR" alt="Faktura" class="rounded border shadow-sm" style="width: 50px; height: 70px; object-fit: cover; opacity: 0.9; transition: 0.3s;" onmouseover="this.style.opacity='1'; this.style.transform='scale(1.05)';" onmouseout="this.style.opacity='0.9'; this.style.transform='scale(1)';">
</div>
<div class="flex-grow-1">
<h6 class="mb-1 text-truncate" style="max-width: 180px;">skan_faktury_02_2026.png</h6>
<small class="text-muted">Odczytano dane z pliku</small>
</div>
<div>
<button type="button" class="btn btn-sm btn-icon btn-outline-primary me-1" data-bs-toggle="modal" data-bs-target="#invoicePreviewModal" title="Pełny podgląd">
<i class="bx bx-fullscreen"></i>
</button>
<button type="button" class="btn btn-sm btn-icon btn-outline-danger" title="Usuń plik" onclick="document.getElementById('ocr-preview-container').classList.add('d-none');">
<i class="bx bx-trash"></i>
</button>
</div>
</div>
<button type="button" class="btn btn-label-primary w-100 mb-4" id="btn-ocr-read-page">
<i class="bx bx-scan me-1"></i> Odczytaj dane z pliku (OCR)
</button>
@@ -316,6 +336,20 @@ include '../../header-invoice.php';
<textarea class="form-control bg-lighter" rows="3"
placeholder="Wpisz uwagi widoczne tylko dla nas..."></textarea>
<div class="mt-3 mb-2">
<label class="form-label d-flex align-items-center fw-bold">
Numer konta bankowego (IBAN)
<i class="bx bx-info-circle ms-1 fs-6 text-muted" data-bs-toggle="tooltip"
data-bs-placement="top"
title="Numer konta sprzedawcy, na który zostanie wykonany przelew.">
</i>
</label>
<div class="input-group input-group-merge">
<span class="input-group-text"><i class="bx bx-credit-card"></i></span>
<input type="text" class="form-control" placeholder="PL 00 0000 0000 0000 0000 0000 0000">
</div>
</div>
<div class="row g-2 mb-3 mt-3">
<div class="col-md-4">
<label class="form-label d-flex align-items-center">
@@ -536,6 +570,12 @@ include '../../header-invoice.php';
const totalEl = document.getElementById('finalTotal');
if (totalEl) totalEl.innerText = '553,50 zł';
// Pokazanie podglądu pliku z OCR
const previewContainer = document.getElementById('ocr-preview-container');
if (previewContainer) {
previewContainer.classList.remove('d-none');
}
// 4. Restore Button
btn.disabled = false;
btn.innerHTML = '<i class="bx bx-check me-1"></i> Dane odczytane poprawnie';
@@ -562,6 +602,27 @@ include '../../header-invoice.php';
});
</script>
<!-- Modal: Podgląd Faktury -->
<div class="modal fade" id="invoicePreviewModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header border-bottom">
<h5 class="modal-title d-flex align-items-center">
<i class="bx bx-image me-2"></i> Podgląd dokumentu: skan_faktury_02_2026.png
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Zamknij"></button>
</div>
<div class="modal-body p-0 bg-lighter d-flex justify-content-center align-items-center" style="min-height: 70vh;">
<!-- Placeholder obrazka, docelowo pełen skan lub PDF w iframe -->
<img src="https://via.placeholder.com/800x1131.png?text=Faktura+Powi%C4%99kszona" alt="Podgląd Faktury" class="img-fluid" style="max-height: 80vh; object-fit: contain; box-shadow: 0 0 10px rgba(0,0,0,0.1);">
</div>
<div class="modal-footer border-top">
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Zamknij</button>
</div>
</div>
</div>
</div>
</body>
</html>