obsluga pdf

This commit is contained in:
Mateusz Gruszczyński
2025-08-04 22:13:29 +02:00
parent 1cd4f62004
commit 8337be6469
4 changed files with 52 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ if (!window.receiptUploaderInitialized) {
const form = document.getElementById("receiptForm");
const inputCamera = document.getElementById("cameraInput");
const inputGallery = document.getElementById("galleryInput");
const inputPDF = document.getElementById("pdfInput");
const galleryBtn = document.getElementById("galleryBtn");
const galleryBtnText = document.getElementById("galleryBtnText");
const cameraBtn = document.getElementById("cameraBtn");
@@ -12,7 +13,7 @@ if (!window.receiptUploaderInitialized) {
const progressBar = document.getElementById("progressBar");
const gallery = document.getElementById("receiptGallery");
if (!form || !inputCamera || !inputGallery || !gallery) return;
if (!form || !gallery) return;
const isDesktop = window.matchMedia("(pointer: fine)").matches;
@@ -105,6 +106,7 @@ if (!window.receiptUploaderInitialized) {
inputCamera?.addEventListener("change", () => handleFileUpload(inputCamera));
inputGallery?.addEventListener("change", () => handleFileUpload(inputGallery));
inputPDF?.addEventListener("change", () => handleFileUpload(inputPDF));
});
window.receiptUploaderInitialized = true;