From 99aa823d0fb2f2b25939ccf8ac47d65a3e051e93 Mon Sep 17 00:00:00 2001 From: fds2610-bot Date: Thu, 14 May 2026 20:14:53 +0200 Subject: [PATCH] =?UTF-8?q?Feature:=20Beleg-Vorschau-Tooltip=20in=20Bank-Z?= =?UTF-8?q?uordnung,=20Gr=C3=B6=C3=9Fe=20in=20Einstellungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../050_beleg_vorschau_einstellungen.sql | 3 + src/Models/Setting.php | 5 +- src/Views/bank/show.php | 69 ++++++++++++++++++- src/Views/settings/form.php | 20 ++++++ 4 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 migrations/050_beleg_vorschau_einstellungen.sql diff --git a/migrations/050_beleg_vorschau_einstellungen.sql b/migrations/050_beleg_vorschau_einstellungen.sql new file mode 100644 index 0000000..6aafc58 --- /dev/null +++ b/migrations/050_beleg_vorschau_einstellungen.sql @@ -0,0 +1,3 @@ +ALTER TABLE company_settings + ADD COLUMN IF NOT EXISTS beleg_vorschau_breite INT NOT NULL DEFAULT 200, + ADD COLUMN IF NOT EXISTS beleg_vorschau_hoehe INT NOT NULL DEFAULT 300; diff --git a/src/Models/Setting.php b/src/Models/Setting.php index 289b763..d724f24 100644 --- a/src/Models/Setting.php +++ b/src/Models/Setting.php @@ -41,7 +41,8 @@ class Setting mail_from_name=?, mail_from_email=?, mail_subject_template=?, mail_body_template=?, logo_max_width=?, logo_max_height=?, - logo_position=?, logo_margin_side=?, logo_margin_top=? + logo_position=?, logo_margin_side=?, logo_margin_top=?, + beleg_vorschau_breite=?, beleg_vorschau_hoehe=? WHERE id=1', [ $data['firma'] ?? '', @@ -86,6 +87,8 @@ class Setting $logoPosition, max(0, (int)($data['logo_margin_side'] ?? 75)), max(0, (int)($data['logo_margin_top'] ?? 6)), + max(50, (int)($data['beleg_vorschau_breite'] ?? 200)), + max(50, (int)($data['beleg_vorschau_hoehe'] ?? 300)), ] ); } diff --git a/src/Views/bank/show.php b/src/Views/bank/show.php index 59f41c6..6905b52 100644 --- a/src/Views/bank/show.php +++ b/src/Views/bank/show.php @@ -1,11 +1,16 @@ View::h($v); $fmt = fn($v) => View::formatMoney($v); $wert = (float)$transaction['wert']; $isPlus = $wert >= 0; $color = $isPlus ? 'var(--color-success)' : 'var(--color-danger)'; + +$settings = Setting::get(); +$vorschauBreite = (int)($settings['beleg_vorschau_breite'] ?? 200); +$vorschauHoehe = (int)($settings['beleg_vorschau_hoehe'] ?? 300); ?> @@ -101,7 +106,9 @@ $color = $isPlus ? 'var(--color-success)' : 'var(--color-danger)'; - + @@ -127,3 +134,63 @@ $color = $isPlus ? 'var(--color-success)' : 'var(--color-danger)'; + + +
+ + diff --git a/src/Views/settings/form.php b/src/Views/settings/form.php index 8bec451..be65089 100644 --- a/src/Views/settings/form.php +++ b/src/Views/settings/form.php @@ -387,6 +387,26 @@ + +
+
Beleg-Vorschau (Tooltip)
+
+

Größe der Vorschau beim Hover über Beleg-Links in der Bank-Buchungs-Maske.

+
+
+ + +
+
+ + +
+
+
+
+