From b96d2fcd05cd0fe0d0c6b9b2a98fba140f249d21 Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Mon, 20 Jul 2026 06:43:49 +0200 Subject: [PATCH] Drop icon/slogan config from the package editor and unclip the featured badge The public package tiles stopped showing per-package icons and taglines, so their admin inputs were dead weight - the IconPicker alone dominated the form. Both fields are gone from the batch editor and the overview table; stored values stay untouched because the fields remain in the save payload, they just can't be edited anymore. The "Empfohlen" badge sat at -top-3, half outside a card that clips via overflow-hidden (rounded corners + road artwork), cutting the badge in half. It now sits at top-2 fully inside the tile, above the name. Co-Authored-By: Claude Fable 5 --- hifi-src/src/pages/admin/Packages.jsx | 24 +++++------------------- hifi-src/src/pages/public/ModelPage.jsx | 4 +++- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/hifi-src/src/pages/admin/Packages.jsx b/hifi-src/src/pages/admin/Packages.jsx index 52ebfc9..233b2fa 100644 --- a/hifi-src/src/pages/admin/Packages.jsx +++ b/hifi-src/src/pages/admin/Packages.jsx @@ -1,8 +1,6 @@ import { useEffect, useMemo, useState } from 'react'; import { Link } from 'react-router-dom'; import { api } from '../../api/client.js'; -import IconPicker from '../../components/IconPicker.jsx'; -import DynamicIcon from '../../components/DynamicIcon.jsx'; import { PACKAGE_TIERS, tierSortOrder } from '../../constants/packageTiers.js'; const inputCls = @@ -338,7 +336,6 @@ export default function Packages() { {pkg.brand_name} {pkg.model_name} - {pkg.icon_name && } {pkg.name} {pkg.is_featured && ( @@ -474,8 +471,7 @@ export default function Packages() { onChange={(e) => toggleRow(row.key, e.target.checked)} className="h-5 w-5 rounded border-neutral-300 text-brand-600 focus:ring-brand-500 disabled:opacity-60" /> - - {row.form.icon_name && } + {row.tierName ?? row.existing.name} @@ -548,24 +544,14 @@ export default function Packages() {

+ {/* icon_name/tagline bleiben im Form-State und Payload erhalten (Bestandsdaten + nicht wegwischen), sind aber nicht mehr konfigurierbar - das Frontend + zeigt beides auf den Kacheln nicht mehr an. */}
- Weitere Optionen (Icon, Slogan, Preis-Text, Sortierung) + Weitere Optionen (Preis-Text, Empfohlen, Sortierung)
-
- - updateRowForm(row.key, { icon_name: name })} /> -
-
- - updateRowForm(row.key, { tagline: e.target.value })} - placeholder="z. B. Perfekt für den Einstieg" - className={inputCls} - /> -
)} + {/* top-2 statt -top-3: die Karte hat overflow-hidden (runde Ecken + Straßenbild), + ein halb herausragender Badge wuerde oben abgeschnitten. */} {pkg.is_featured && ( - + {t('modelPage.featuredBadge')} )}