- Öffentliches Widerrufsformular /widerruf mit Bestell-Lookup (throttled) - Bestätigungsmail an Kunde + Weiterleitung an bestellungen@ (config app.withdrawal_mail) - Admin-Übersicht/-Detail unter /admin/withdrawals inkl. Sidenav-Eintrag - Widerruf-Button in Portal-Bestellansicht und Footer-Links - Model OrderWithdrawal + Migration + Factory + Tests Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
98 lines
4.7 KiB
PHP
98 lines
4.7 KiB
PHP
@extends('layouts.layout-2')
|
|
|
|
@section('content')
|
|
<h4 class="font-weight-bold py-2 mb-2">
|
|
<a href="{{ route('admin_withdrawals') }}" class="btn btn-sm btn-default float-right">{{ __('back') }}</a>
|
|
{{ __('navigation.withdrawals') }} <span class="text-muted">#{{ $withdrawal->id }}</span>
|
|
</h4>
|
|
|
|
@if (Session::has('alert-success'))
|
|
<div class="alert alert-success p-2 mt-2">{{ Session::get('alert-success') }}</div>
|
|
@endif
|
|
@if (Session::has('alert-error'))
|
|
<div class="alert alert-danger p-2 mt-2">{{ Session::get('alert-error') }}</div>
|
|
@endif
|
|
|
|
<div class="row">
|
|
<div class="col-md-7">
|
|
<div class="card mb-4">
|
|
<div class="card-body">
|
|
<table class="table table-borderless mb-0">
|
|
<tr>
|
|
<th>{{ __('withdrawal.success_received_at') }}</th>
|
|
<td>{{ optional($withdrawal->declared_at)->format('d.m.Y H:i') }} {{ __('withdrawal.clock') }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ __('withdrawal.order_number') }}</th>
|
|
<td>
|
|
#{{ $withdrawal->order_reference }}
|
|
@if ($withdrawal->shopping_order_id)
|
|
<a href="{{ route('admin_sales_customers_detail', [$withdrawal->shopping_order->shopping_user_id ?? 0]) }}"
|
|
class="btn btn-xs btn-outline-primary ml-1"><i class="fa fa-external-link-alt"></i></a>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ __('withdrawal.choose_scope_hl') }}</th>
|
|
<td>
|
|
@if ($withdrawal->isFullWithdrawal())
|
|
{{ __('withdrawal.scope_full') }}
|
|
@else
|
|
{{ __('withdrawal.scope_partial') }}
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Kunde</th>
|
|
<td>{{ $withdrawal->customer_name }}<br><small>{{ $withdrawal->customer_email }}</small></td>
|
|
</tr>
|
|
@if ($withdrawal->user_shop)
|
|
<tr>
|
|
<th>Shop</th>
|
|
<td>{{ $withdrawal->user_shop->name }}</td>
|
|
</tr>
|
|
@endif
|
|
@if ($withdrawal->reason)
|
|
<tr>
|
|
<th>{{ __('withdrawal.reason') }}</th>
|
|
<td>{{ $withdrawal->reason }}</td>
|
|
</tr>
|
|
@endif
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
@if (! empty($withdrawal->items))
|
|
<div class="card mb-4">
|
|
<div class="card-header font-weight-bold">{{ __('withdrawal.mail_items_hl') }}</div>
|
|
<div class="card-body">
|
|
<ul class="mb-0">
|
|
@foreach ($withdrawal->items as $item)
|
|
<li>{{ $item['qty'] }} × {{ $item['name'] }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="col-md-5">
|
|
<div class="card mb-4">
|
|
<div class="card-header font-weight-bold">Status & Notiz</div>
|
|
<div class="card-body">
|
|
{!! Form::open(['route' => ['admin_withdrawals_update', $withdrawal->id], 'method' => 'post']) !!}
|
|
<div class="form-group">
|
|
{!! Form::label('status', 'Status') !!}
|
|
{!! Form::select('status', collect($statuses)->mapWithKeys(fn ($s) => [$s => ucfirst($s)])->all(), $withdrawal->status, ['class' => 'form-control']) !!}
|
|
</div>
|
|
<div class="form-group">
|
|
{!! Form::label('admin_note', 'Interne Notiz') !!}
|
|
{!! Form::textarea('admin_note', $withdrawal->admin_note, ['class' => 'form-control', 'rows' => 5]) !!}
|
|
</div>
|
|
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> {{ __('save') }}</button>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|