Feat: Order Controller updates

This commit is contained in:
2026-09-30 19:50:03 +03:00
parent 92016256ce
commit a7cdfbd1cb
6 changed files with 87 additions and 17 deletions
@@ -1,4 +1,4 @@
{{-- Core passes only the order reference here (and the amount for payment emails). Greek on purpose: sent from the queue in the app default locale. --}}
{{-- Core passes the order, its reference and its active shipments. Greek on purpose: sent from the queue in the app default locale. --}}
@extends('emails.layout')
@section('title', "Η παραγγελία σου στάλθηκε")
@@ -10,12 +10,23 @@
Η παραγγελία σου στάλθηκε
</h1>
<p style="margin:0 0 32px;">Η παραγγελία σου <strong>#{{ $reference }}</strong> είναι καθ’ οδόν. Θα τη λάβεις σύντομα.</p>
<p style="margin:0 0 24px;">Η παραγγελία σου <strong>#{{ $reference }}</strong> είναι καθ’ οδόν. Θα τη λάβεις σύντομα.</p>
@include('emails.partials.button', [
'url' => route('account.orders', ['locale' => 'el']),
'label' => 'Οι παραγγελίες μου',
])
@foreach ($shipments ?? [] as $shipment)
<p style="margin:0 0 8px;">
{{ $shipment->carrierLabel() }} · Αριθμός αποστολής: <strong>{{ $shipment->tracking_reference }}</strong>
@if ($carrierUrl = $shipment->trackingUrl())
· <a href="{{ $carrierUrl }}" style="color:#000000;text-decoration:underline;">Παρακολούθηση στη σελίδα του courier</a>
@endif
</p>
@endforeach
<div style="height:24px;"></div>
{{-- Orders with an account: their order page shows the tracking history we sync from the courier. --}}
@include('emails.partials.button', $order->customer_id
? ['url' => route('account.orders.show', ['locale' => 'el', 'orderId' => $order->id]), 'label' => 'Παρακολούθηση παραγγελίας']
: ['url' => route('account.orders', ['locale' => 'el']), 'label' => 'Οι παραγγελίες μου'])
@endsection
@section('footer')
@@ -46,7 +46,7 @@
<p style="margin:0 0 24px;">
Λάβαμε την παραγγελία σου <strong>#{{ $reference }}</strong>
στις {{ $order->placed_at?->format('d/m/Y') }}.
στις {{ $order->placed_at?->inDisplayTimezone()->format('d/m/Y') }}.
Θα σε ενημερώσουμε με email μόλις σταλεί.
</p>