Biete Lizenzartikel mit mehreren Optionen direkt am Artikel an
CI Feature / test (push) Successful in 3m32s
Deploy Test / test (push) Successful in 3m23s
Deploy Test / deploy (push) Successful in 28s

Am Lizenzartikel gibt es den Abschnitt "Im Shop verkaufen": Er listet die
Optionen mit Preis, Rechten, Nutzerkreis und Zustand. "Option hinzufuegen"
fragt nur Rechteprofil, Preis, Eignung, Nutzerkreis und eine Bezeichnung ab;
Artikel, Inhalt und Vergabe stehen fest. Aendern und Aus dem Verkauf nehmen
laufen am selben Ort.

OfferService::offerArticle legt Angebot und erste Fassung in einer
Transaktion an, damit eine fehlgeschlagene Pruefung kein leeres Angebot
hinterlaesst. reviseArticleOption aktiviert die naechste Fassung und lehnt
Optionen anderer Artikel ab. Aus der Angebotsmaske entfaellt die Auswahl
"Programmfassung, die abgedeckt sein muss"; die Pruefung bleibt im Dienst.
Pakete und der Altbestand behalten die Angebotsmaske.
This commit is contained in:
Lars committed 2026-11-25 22:23:14 +01:00
1 parent 93ae01c986
commit 3b0b4c955e
9 files changed
+673 -18

No files matched your search

@@ -40,6 +40,7 @@
@include('filament.verwaltung.abgang', ['offen' => $offen])
<div class="vw-medien-raster">
<div class="vw-spalte">
<section class="vw-karte-box" aria-labelledby="artikel-redaktion">
<div class="vw-spalte-kopf">
<h2 id="artikel-redaktion">Präsentation des Artikels</h2>
@@ -66,6 +67,46 @@
<div><button type="button" class="vw-btn is-line" wire:click="openRedaktion('texte')">@include('filament.verwaltung.icon', ['name' => 'stift'])Redaktion bearbeiten</button></div>
@endif
</section>
<section class="vw-karte-box" aria-labelledby="artikel-optionen" id="optionen">
<div class="vw-spalte-kopf">
<h2 id="artikel-optionen">Im Shop verkaufen</h2>
<span class="vw-feld-hilfe">Jede Option ist eine Lizenz mit Rechteprofil und Preis. Alle Optionen erscheinen auf der Produktseite dieses Artikels.</span>
</div>
@if (! $this->canOffer())
<p class="vw-feld-hilfe">Zuerst den Inhalt festlegen: Ohne veröffentlichten Stand lizenziert der Artikel nichts und lässt sich nicht verkaufen.</p>
@else
@php($optionen = $this->optionRows())
@if ($optionen === [])
<div class="vw-leer">
<strong>Noch keine Option</strong>
<p>Lege fest, mit welchem Rechteprofil und zu welchem Preis der Artikel verkauft wird. Mehrere Optionen, etwa für Privatpersonen und für Vereine, sind möglich.</p>
</div>
@else
<ul class="vw-verwendungsliste">
@foreach ($optionen as $option)
<li>
<strong>{{ $option['name'] }}</strong>
<span @class(['vw-zustand', 'is-'.$option['zustand']['ton']])>{{ $option['zustand']['label'] }}</span>
<span class="vw-feld-hilfe">{{ $option['price'] }} · {{ $option['licence'] }} · {{ $option['for'] }} · Rechte: {{ $option['rights'] }} · Fassung {{ $option['number'] }}</span>
<span class="vw-zeilenaktionen">
<button type="button" class="vw-link" wire:click="mountAction('option', { offer: {{ $option['offer'] }} })">{{ $option['active'] ? 'Ändern' : 'Wieder anbieten' }}</button>
@if ($option['active'])
<button type="button" class="vw-link is-quiet" wire:click="mountAction('optionEnd', { offer: {{ $option['offer'] }} })">Aus dem Verkauf nehmen</button>
@endif
@if ($option['page'])
<a class="vw-link is-quiet" href="{{ $option['page'] }}" target="_blank" rel="noopener">Produktseite ansehen</a>
@endif
<a class="vw-link is-quiet" href="{{ $option['url'] }}">Angebot öffnen</a>
</span>
</li>
@endforeach
</ul>
@endif
<div><button type="button" class="vw-btn is-line" wire:click="mountAction('option')">@include('filament.verwaltung.icon', ['name' => 'plus'])Option hinzufügen</button></div>
@endif
</section>
</div>
<aside class="vw-spalte">
@include('filament.verwaltung.voraussetzungen', ['voraussetzungen' => $voraussetzungen])
<section class="vw-karte-box" aria-labelledby="artikel-stand">
@@ -378,6 +378,7 @@
.vw-schritt.is-erledigt .vw-schritt-text { color: var(--vw-quiet); }
@media (max-width: 640px) { .vw-schritt { grid-template-columns: minmax(0, 1fr); } .vw-schritt .vw-btn { grid-column: 1; grid-row: auto; justify-self: start; } }
.vw-verwendungsliste li { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px solid var(--vw-line); }
.vw-zeilenaktionen { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.vw-vorschaubild.is-gross { max-width: 40rem; }
.vw-trennlinie { padding-top: 0.85rem; border-top: 1px solid var(--vw-line); }
.vw-inhaltsvorschau { width: 100%; height: 34rem; border: 1px solid var(--vw-line); border-radius: var(--vw-radius); background: #fff; }