HifiPlanet-Website/hifi/api
Maaxxs 34efe79658 Rebuild the admin package editor as a per-model batch workflow
Client feedback: creating ~30 models x 8 packages through the old
one-at-a-time form (free-text name, rows={3} description box) was
unworkable. Package names are always the same eight tiers, so the form
asked for information that was never variable.

The page is now a batch editor: pick brand + model, get the eight
standard tiers (Base, Clear, Drive, Prime, Elite R, Apex, The Statement,
Limitless - new shared constant in constants/packageTiers.js) as
checkbox rows. Checking a row opens a large auto-growing description
textarea and the markup fields; icon/tagline/price-text/featured/sort
live in a collapsed details block. One "Alle speichern" button creates
and updates everything in one pass, with per-row error reporting and
failed rows keeping their input. Existing packages load pre-filled;
packages with non-standard names appear in a read-only-named legacy
section, still editable and deletable. Deleting stays behind an explicit
button - unchecking never deletes. The old all-packages table remains
below as a collapsible overview, and its Bearbeiten action now jumps
into the batch editor.

New endpoint POST /models/{id}/copy-packages copies every package of a
source model - including linked package_products rows with their cached
scrape data, so no re-scraping - onto the target, skipping tiers whose
slug already exists there (backed by uniq_model_slug), all in one
transaction. The editor exposes it as "Pakete von anderem Modell
kopieren" with a copied/skipped result line: set up one model, replicate
to the other 29, adjust.

The public tier theming is intentionally untouched: ModelPage keeps
assigning card themes by price rank, so legacy package names continue to
render correctly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 17:02:54 +02:00
..
config Simplify to always run at domain root instead of dual /hifi vs / support 2026-07-05 15:04:39 +02:00
database Implement client feedback: calmer cursor, price override text, 3D coverflow layout 2026-07-12 15:13:08 +02:00
public Rebuild the admin package editor as a per-model batch workflow 2026-07-19 17:02:54 +02:00
scripts Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
src Rebuild the admin package editor as a per-model batch workflow 2026-07-19 17:02:54 +02:00
uploads Populate the gallery with the full photo collection from the old hifi-planet.de site 2026-07-07 19:50:49 +02:00
composer.json Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
composer.lock Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00