kunde: PM-Liste zeigt Firmen-Kontext unter der Headline und Bild-Thumbnails
Der aktive Firmen-Kontext (Firmen-Umschalter) steht jetzt prominent unter der Überschrift — Firmenname oder „Alle Firmen" — statt als kleiner Hinweistext. Neue Spalte „Bild" zwischen Status und Titel mit dem Titelbild (thumb-Variante, is_preview zuerst), dem gewählten Platzhalter bei bildlosen PMs oder einem generischen Icon-Fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
17e22d2d46
commit
45dc4ce66c
4 changed files with 100 additions and 8 deletions
|
|
@ -98,7 +98,8 @@ test('customer press release list is filtered by selected company context', func
|
|||
->withSession([CustomerCompanyContext::SessionKey => $company->id]);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.index')
|
||||
->assertSee('Gefiltert auf Alpha GmbH')
|
||||
->assertSee('Alpha GmbH')
|
||||
->assertDontSee('Alle Firmen')
|
||||
->assertSee('Alpha Produktmeldung')
|
||||
->assertDontSee('Beta Produktmeldung');
|
||||
});
|
||||
|
|
@ -124,6 +125,7 @@ test('customer press release list can filter unassigned legacy press releases',
|
|||
|
||||
LivewireVolt::test('customer.press-releases.index')
|
||||
->set('companyFilter', 'unassigned')
|
||||
->assertSee('Alle Firmen')
|
||||
->assertSee('Legacy ohne Firma')
|
||||
->assertDontSee('Alpha Firmenmeldung');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -205,3 +205,49 @@ test('admin list filtert nach KI-Klassifikation', function () {
|
|||
->assertSee('Gelber Grenzfall')
|
||||
->assertDontSee('Grüne Mitteilung');
|
||||
});
|
||||
|
||||
test('customer list zeigt das Titelbild als Thumbnail in der Bild-Spalte', function () {
|
||||
/** @var TestCase $this */
|
||||
$customer = makeCustomerForIndexPhase8b();
|
||||
$this->actingAs($customer);
|
||||
|
||||
$pr = PressRelease::factory()->create([
|
||||
'user_id' => $customer->id,
|
||||
'title' => 'PM mit Titelbild',
|
||||
]);
|
||||
// Zweitbild zuerst angelegt — das Titelbild (is_preview) muss trotzdem gewinnen.
|
||||
$pr->images()->create([
|
||||
'disk' => 'public',
|
||||
'path' => 'press/second.jpg',
|
||||
'variants' => ['thumb' => 'press/second-thumb.jpg'],
|
||||
'is_preview' => false,
|
||||
'sort_order' => 2,
|
||||
]);
|
||||
$pr->images()->create([
|
||||
'disk' => 'public',
|
||||
'path' => 'press/cover.jpg',
|
||||
'variants' => ['thumb' => 'press/cover-thumb.jpg'],
|
||||
'is_preview' => true,
|
||||
'sort_order' => 1,
|
||||
]);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.index')
|
||||
->assertSee('Bild')
|
||||
->assertSee('storage/press/cover-thumb.jpg', false)
|
||||
->assertDontSee('storage/press/second-thumb.jpg', false);
|
||||
});
|
||||
|
||||
test('customer list zeigt den gewählten Platzhalter als Thumbnail bei bildlosen PMs', function () {
|
||||
/** @var TestCase $this */
|
||||
$customer = makeCustomerForIndexPhase8b();
|
||||
$this->actingAs($customer);
|
||||
|
||||
PressRelease::factory()->create([
|
||||
'user_id' => $customer->id,
|
||||
'title' => 'PM ohne Bild',
|
||||
'placeholder_variant' => '05-lines-green',
|
||||
]);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.index')
|
||||
->assertSee('press-release-placeholders/05-lines-green.svg', false);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue