Portal-Abo: Abo-Anlage und Ausfuehrungsliste rendern ohne Fehler
Log-Analyse 26.08. (P0-1, P1-2): getContentByOrder() liefert ein Array, contains() darauf warf bei jeder Abo-Anlage im Portal einen 500. Die Ausfuehrungsliste nutzt CRM-Routen, die im Portal fehlen; dort gibt es jetzt user_order_detail als Alias auf die Portal-Bestellansicht, und die View prueft die Route vor dem Verlinken. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
316a9b76d6
commit
ede8e0532d
3 changed files with 6 additions and 3 deletions
|
|
@ -64,7 +64,7 @@
|
|||
@endif
|
||||
@else
|
||||
@if($user_abo->is_for === 'me')
|
||||
@if(!isset($only_show_products) || !$only_show_products)
|
||||
@if((!isset($only_show_products) || !$only_show_products) && Route::has('user_order_detail'))
|
||||
{!! '<a href="' . route('user_order_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-primary">'.$user_abo_order->shopping_order_id.'</a>' !!}
|
||||
|
||||
@else
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
@endif
|
||||
@endif
|
||||
@if($user_abo->is_for === 'ot')
|
||||
@if(!isset($only_show_products) || !$only_show_products)
|
||||
@if((!isset($only_show_products) || !$only_show_products) && Route::has('user_shop_order_detail'))
|
||||
{!! '<a href="' . route('user_shop_order_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-secondary">'.$user_abo_order->shopping_order_id.'</a>' !!}
|
||||
@else
|
||||
{{ $user_abo_order->shopping_order_id }}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@
|
|||
</div>
|
||||
@endforeach
|
||||
|
||||
@php($hasOneTimeRows = Yard::instance('subscription')->getContentByOrder()->contains(function ($item) { return (bool) ($item->options->abo_addon ?? false); }))
|
||||
@php($hasOneTimeRows = collect(Yard::instance('subscription')->getContentByOrder())->contains(function ($item) { return (bool) ($item->options->abo_addon ?? false); }))
|
||||
@if ($hasOneTimeRows)
|
||||
<div class="alert alert-info mt-3">
|
||||
<i class="fa fa-bolt text-warning"></i> {{ __('abo.onetime_create_info') }}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,9 @@ Route::domain(config('app.pre_url_portal').config('app.domain').config('app.tld_
|
|||
return redirect()->route('portal.my_data.edit');
|
||||
})->name('user_customer_edit');
|
||||
Route::get('portal/my-orders/detail/{id}', [OrderController::class, 'myOrderShow'])->name('user_shop_order_detail');
|
||||
// Kunden im Portal haben nur eine Bestellansicht; der CRM-Name wird fuer
|
||||
// admin.abo._executions (is_for === 'me') mit abgebildet.
|
||||
Route::get('portal/my-orders/own-detail/{id}', [OrderController::class, 'myOrderShow'])->name('user_order_detail');
|
||||
Route::get('portal/settings', [InController::class, 'settings'])->name('portal.settings');
|
||||
// Weitere Kunden-spezifische Routen
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue