Öffne Katalog, Bibliothek und Testkauf für den MVP.
Deploy Test / test (push) Successful in 12s
Deploy Test / deploy (push) Successful in 21s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-15 09:04:08 +01:00
1 parent 463851d402
commit fd6860efda
51 files changed
+2331 -31

No files matched your search

+20
View File
@@ -261,6 +261,26 @@ .member-nav a[aria-current='page'] {
text-underline-offset: 0.3rem;
}
.catalog {
list-style: none;
padding: 0;
display: grid;
gap: 1rem;
}
.catalog li {
background: white;
border: 1px solid var(--color-line);
padding: 1rem 1.1rem;
display: grid;
gap: 0.4rem;
}
.catalog video {
width: min(100%, 40rem);
background: #111;
}
.empty {
background: white;
border: 1px solid var(--color-line);
@@ -0,0 +1 @@
Ihre Bestellung {{ $order->id }} ist bezahlt. Die dazugehörigen Inhalte liegen in der Bibliothek.
+29
View File
@@ -0,0 +1,29 @@
@extends('layouts.site')
@section('title', $article->code)
@section('content')
@include('member.partials.nav')
<h1>{{ $article->code }}</h1>
@if ($release === null)
<div class="empty"><p>Für diesen Artikel ist noch kein Stand veröffentlicht.</p></div>
@else
<p>Stand {{ $release->number }}@if ($release->change_note) · {{ $release->change_note }}@endif</p>
<ul class="catalog">
@foreach ($entries as $entry)
<li>
<strong>{{ $entry['content']->path }}</strong>
@if ($entry['allowed'] && $entry['url'])
@if ($entry['action'] === 'streamen' && filled($entry['version']->metadata['file'] ?? null))
<video controls preload="metadata" src="{{ $entry['url'] }}">Der Film kann hier abgespielt werden.</video>
@else
<a href="{{ $entry['url'] }}">Öffnen</a>
@endif
@else
<span>{{ $entry['reason'] }}</span>
@endif
</li>
@endforeach
</ul>
@endif
@endsection
+1 -1
View File
@@ -5,5 +5,5 @@
@section('content')
@include('member.partials.nav')
<h1>Guten Tag, {{ auth()->user()->name }}</h1>
<p class="lede">Hier liegen später die Materialien, die eine Berechtigung für Sie freigibt.</p>
<p class="lede">In der Bibliothek liegen die Inhalte Ihrer Berechtigungen. Angebote können Sie abrufen oder im Testmodus kaufen.</p>
@endsection
+15 -3
View File
@@ -5,7 +5,19 @@
@section('content')
@include('member.partials.nav')
<h1>Berechtigungen</h1>
<div class="empty">
<p>Ihnen ist noch keine Lizenz zugeordnet.</p>
</div>
@if ($grants->isEmpty())
<div class="empty">
<p>Ihnen ist noch keine Lizenz zugeordnet.</p>
</div>
@else
<ul class="catalog">
@foreach ($grants as $grant)
<li>
<strong>{{ $grant->article->code }}</strong>
<span>{{ $grant->rights_snapshot['purpose'] ?? '' }}</span>
<span>seit {{ $grant->valid_from?->timezone(config('app.timezone'))->format('d.m.Y') }}</span>
</li>
@endforeach
</ul>
@endif
@endsection
+15 -3
View File
@@ -5,7 +5,19 @@
@section('content')
@include('member.partials.nav')
<h1>Bibliothek</h1>
<div class="empty">
<p>Ihnen ist noch kein Material zugeordnet. Sobald eine Berechtigung vorliegt, erscheinen die freigegebenen Inhalte hier. Eine Rolle allein öffnet nichts.</p>
</div>
@if ($grants->isEmpty())
<div class="empty">
<p>Ihnen ist noch kein Material zugeordnet. Sobald eine Berechtigung vorliegt, erscheinen die freigegebenen Inhalte hier. Eine Rolle allein öffnet nichts.</p>
<p><a href="{{ route('member.offers') }}">Angebote ansehen</a></p>
</div>
@else
<ul class="catalog">
@foreach ($grants as $grant)
<li>
<a href="{{ route('member.article', $grant->article) }}">{{ $grant->article->code }}</a>
<span>{{ $grant->article->currentRelease?->change_note ?: 'Aktueller Stand' }}</span>
</li>
@endforeach
</ul>
@endif
@endsection
+18 -3
View File
@@ -5,7 +5,22 @@
@section('content')
@include('member.partials.nav')
<h1>Filme und Materialien</h1>
<div class="empty">
<p>Es sind noch keine Filme oder Materialien für Ihr Konto freigegeben.</p>
</div>
@php
$films = $grants->filter(function ($grant) {
return $grant->article->currentRelease?->contents->contains(
fn ($content) => in_array($content->elementVersion->element->output_class, ['film', 'audio'], true),
);
});
@endphp
@if ($films->isEmpty())
<div class="empty">
<p>Unter Ihren Berechtigungen ist gerade kein Film oder Hörstück.</p>
</div>
@else
<ul class="catalog">
@foreach ($films as $grant)
<li><a href="{{ route('member.article', $grant->article) }}">{{ $grant->article->code }}</a></li>
@endforeach
</ul>
@endif
@endsection
+36
View File
@@ -0,0 +1,36 @@
@extends('layouts.site')
@section('title', 'Angebote')
@section('content')
@include('member.partials.nav')
<h1>Angebote</h1>
@if ($errors->any())
<div class="errors" role="alert">{{ $errors->first() }}</div>
@endif
@if ($offers->isEmpty())
<div class="empty"><p>Gerade ist kein persönliches Angebot aktiv.</p></div>
@else
<ul class="catalog">
@foreach ($offers as $offer)
@php $version = $offer->versions->first(); @endphp
<li>
<strong>{{ $offer->name }}</strong>
@if ($version)
<span>
@if ($version->grant_kind === 'kauf')
{{ number_format($version->price_cents / 100, 2, ',', '.') }} € · Testzahlung
@else
Kostenlos
@endif
</span>
<form method="post" action="{{ $version->grant_kind === 'kauf' ? route('member.offers.buy', $offer) : route('member.offers.claim', $offer) }}">
@csrf
<button class="button" type="submit">{{ $version->grant_kind === 'kauf' ? 'Kaufen' : 'In die Bibliothek' }}</button>
</form>
@endif
</li>
@endforeach
</ul>
@endif
@endsection
+31
View File
@@ -0,0 +1,31 @@
@extends('layouts.site')
@section('title', 'Bestellung')
@section('content')
@include('member.partials.nav')
<h1>Bestellung {{ $order->id }}</h1>
@if ($errors->any())
<div class="errors" role="alert">{{ $errors->first() }}</div>
@endif
<p>Status: {{ $order->status }}</p>
@foreach ($order->lines as $line)
<p>{{ $line->offerVersion->offer->name ?? 'Angebot' }} · {{ number_format($line->price_cents / 100, 2, ',', '.') }} €</p>
@endforeach
@if ($testPayment && $order->status === 'offen')
<form method="post" action="{{ route('member.order.confirm', $order) }}">
@csrf
<button class="button" type="submit">Testzahlung bestätigen</button>
</form>
<form method="post" action="{{ route('member.order.fail', $order) }}">
@csrf
<button class="button" type="submit">Testzahlung ablehnen</button>
</form>
@endif
@if ($order->status === 'bezahlt')
<form method="post" action="{{ route('member.order.refund', $order) }}">
@csrf
<button class="button" type="submit">Widerrufen</button>
</form>
@endif
@endsection
@@ -3,6 +3,7 @@
<a href="{{ route('member.library') }}" @if(request()->routeIs('member.library')) aria-current="page" @endif>Bibliothek</a>
<a href="{{ route('member.materials') }}" @if(request()->routeIs('member.materials')) aria-current="page" @endif>Filme und Materialien</a>
<a href="{{ route('member.grants') }}" @if(request()->routeIs('member.grants')) aria-current="page" @endif>Berechtigungen</a>
<a href="{{ route('member.offers') }}" @if(request()->routeIs('member.offers')) aria-current="page" @endif>Angebote</a>
<a href="{{ route('member.profile') }}" @if(request()->routeIs('member.profile')) aria-current="page" @endif>Profil</a>
<form method="post" action="{{ route('logout') }}">
@csrf
+11
View File
@@ -0,0 +1,11 @@
@extends('layouts.site')
@section('title', $article->code)
@section('content')
@include('member.partials.nav')
<h1>{{ $version->element->working_title }}</h1>
<article class="prose">
{!! nl2br(e($version->body)) !!}
</article>
@endsection