From 38ac1327520941ff2a89e0bb06b6735217470dd4 Mon Sep 17 00:00:00 2001 From: fds2610-bot Date: Thu, 1 Oct 2026 14:37:50 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20n.n.:=20QR-Import=20=E2=80=93=20Meldung?= =?UTF-8?q?=20als=20einfliegendes=20Badge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- public/static/app.css | 2 -- public/static/qrimport.js | 7 ++----- src/Views/zahlungsverkehr/formular.php | 1 - tests/e2e/specs/qrimport.spec.js | 3 ++- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/public/static/app.css b/public/static/app.css index 1c6168b..5344990 100644 --- a/public/static/app.css +++ b/public/static/app.css @@ -2503,5 +2503,3 @@ table.liste.reihen [hidden] { display: none; } background: color-mix(in srgb, var(--akzent) 8%, transparent); color: var(--text); } - -.qrmeldung { margin: .5rem 0 0; } diff --git a/public/static/qrimport.js b/public/static/qrimport.js index 7e0a2e0..c65da20 100644 --- a/public/static/qrimport.js +++ b/public/static/qrimport.js @@ -134,13 +134,11 @@ if (!bereich || !dialog) { return; } - const meldung = document.querySelector('[data-qrmeldung]'); const dateiwahl = dialog.querySelector('[data-qrdatei]'); + // Die Meldung fliegt wie alle anderen oben ins Bild (FmMeldungen, app.js). function melden(text, fehler) { - meldung.textContent = text; - meldung.hidden = text === ''; - meldung.className = 'qrmeldung meldung ' + (fehler ? 'meldung-fehler' : 'meldung-erfolg'); + window.FmMeldungen.zeigen(text, fehler ? 'fehler' : 'erfolg'); } function uebernehmen(zahlung) { @@ -165,7 +163,6 @@ if (dialog.open) { dialog.close(); } - melden('Wird gelesen …', false); try { uebernehmen(await dateiAuslesen(datei)); } catch (fehler) { diff --git a/src/Views/zahlungsverkehr/formular.php b/src/Views/zahlungsverkehr/formular.php index e6f3253..2fa4aab 100644 --- a/src/Views/zahlungsverkehr/formular.php +++ b/src/Views/zahlungsverkehr/formular.php @@ -73,7 +73,6 @@ include __DIR__ . '/../layout/kopf.php'; - ein diff --git a/tests/e2e/specs/qrimport.spec.js b/tests/e2e/specs/qrimport.spec.js index 9b3a82b..7e27b88 100644 --- a/tests/e2e/specs/qrimport.spec.js +++ b/tests/e2e/specs/qrimport.spec.js @@ -21,6 +21,7 @@ async function anmelden(page) { } async function pruefeFelder(page) { + await expect(page.locator('.meldung')).toContainText('QR-Code gelesen') await expect(page.locator('#empfaenger')).toHaveValue('Rheinwerk Verlag GmbH') await expect(page.locator('#iban')).toHaveValue('DE26380601863001400028') await expect(page.locator('#bic')).toHaveValue('GENODED1BRS') @@ -80,7 +81,7 @@ test.describe('Überweisung erfassen: QR-Code einlesen', () => { // 1×1-Pixel-PNG buffer: Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==', 'base64'), }) - await expect(page.locator('[data-qrmeldung]')).toContainText('kein QR-Code') + await expect(page.locator('.meldung')).toContainText('kein QR-Code') await expect(page.locator('#iban')).toHaveValue('') }) })