Bestelldetail: Herkunft zeigt "keine Angabe", wenn nichts eingetragen ist

Seit das Herkunftsfeld im Checkout freiwillig ist, fehlte der Block bei
Kundenbestellungen ohne Angabe ganz. Jetzt steht dort grau "keine Angabe".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin 2026-10-06 12:49:50 +00:00
parent b8a18b09cf
commit 9c30b56977
2 changed files with 5 additions and 2 deletions

View file

@ -209,7 +209,7 @@
<div class="text-muted small">{{ __('order.points_total') }}</div>
{{ $shopping_order->getFormattedPoints() }}
</div>
@if ((int) $shopping_order->payment_for === 6 && ($shopping_order->customer_order_source_comment || $shopping_order->customer_order_source))
@if ((int) $shopping_order->payment_for === 6)
<div class="col-md-3 mb-3">
<div class="text-muted small">Herkunft</div>
@if ($shopping_order->customer_order_source)
@ -217,8 +217,10 @@
@if ($shopping_order->customer_order_source_comment)
<div class="small text-muted mt-1">{{ $shopping_order->customer_order_source_comment }}</div>
@endif
@else
@elseif ($shopping_order->customer_order_source_comment)
{{ $shopping_order->customer_order_source_comment }}
@else
<span class="text-muted">keine Angabe</span>
@endif
</div>
@endif

View file

@ -397,6 +397,7 @@ it('erfasst die Herkunft bei Kundenbestellungen im Shop-Checkout', function () {
expect($checkoutRepository)->toContain('customer_order_source_comment');
expect($orderDetail)->toContain('getCustomerOrderSourceLabel');
expect($orderDetail)->toContain('customer_order_source_comment');
expect($orderDetail)->toContain('keine Angabe');
$shoppingOrder = (new ShoppingOrder)->forceFill([
'customer_order_source' => 'social_media',