ldc-cocotte/resources/views/fo/tunnel/confirmed.blade.php
Jérémy Munsch 192e72f554
refactor(dto): enhance OrderLineDto with flattened product properties
- Added new properties for product details in OrderLineDto.
- Updated fromModel method to map product properties correctly.
- Adjusted toArray method to include new properties.
- Improved unit tests for OrderLineDto to validate new behavior.
2026-11-02 14:53:17 +01:00

97 lines
3.8 KiB
PHP

@extends('fo.layouts.layout')
@section('title', __('Order validation'))
@section('description', __('Validation of your order.'))
@section('breadcrumb', 'no')
@section('content')
@include('fo.tunnel.tunnel-stepper', ['step' => $step])
<div class="row justify-content-center">
<div class="col-12 col-md-10 col-lg-8">
<!-- Header -->
<div class="my-5 text-center">
<i class="bi bi-check-circle-fill text-success fs-4rem"></i>
<h1 class="mt-3">{{ __('Your order is registered!') }}</h1>
<p class="lead text-muted">{{ __('Thank you for this order!') }}</p>
<p>{{ __('A confirmation has just been sent to your email address') }}</p>
</div>
<!-- Order Details Card -->
<div class="card bg-light rounded-4 p-lg-5 mb-4 border-0 p-4">
<h3 class="mb-4">{{ __('Order details') }}</h3>
<p class="mb-3"><strong>{{ __('Reminder of your order ref: :ref', ['ref' => $order->reference]) }}</strong></p>
<div class="table-responsive">
<table class="table-borderless mb-0 table bg-transparent">
<caption class="visually-hidden">{{ __('Order details') }}</caption>
<tbody>
@foreach ($order->lines as $line)
<tr class="border-bottom border-dark-subtle">
<th class="fw-normal py-3 ps-0" scope="row">
<span class="fw-semibold">{{ $line->quantity }}</span> x {{ $line->product_name }}
</th>
<td class="fw-medium py-3 pe-0 text-end">@money($line->total_ttc)</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th class="fs-5 ps-0 pt-4" scope="row">{{ __('Estimated total') }}</th>
<td class="fs-5 fw-bold pe-0 pt-4 text-end">@money($order->total)</td>
</tr>
</tfoot>
</table>
</div>
</div>
<!-- Collection Details Card -->
<div class="card bg-light rounded-4 p-lg-5 mb-5 border-0 p-4">
<div class="d-flex align-items-center mb-4">
<i class="bi bi-shop fs-4 text-primary me-3"></i>
<h3 class="mb-3">{{ __('Collection details') }}</h3>
</div>
<div class="row g-4">
<div class="col-12 col-md-6">
<p class="text-muted mb-1">{{ __('To be collected on') }}</p>
<p class="fw-bold fs-5 text-capitalize mb-0">{{ $order->pickup_day->translatedFormat('l j F Y') }}</p>
</div>
<div class="col-12 col-md-6">
<p class="text-muted mb-1">{{ __('at the following address') }}</p>
<address class="mb-0">
<strong><a href="{{ $mapUrl }}" target="_blank" rel="noreferrer" class="text-dark" title="{{ __('View on map') }}" data-bs-toggle="tooltip">{{ $shop->name }}</a></strong><br>
{{ $shop->address }}<br>
{{ $shop->postcode }} {{ $shop->city }}
</address>
</div>
</div>
@if ($shop->latitude && $shop->longitude)
<div class="rounded-3 min-h-300px mt-4 overflow-hidden shadow-sm">
@php
$displayData = [
'lat' => $shop->latitude,
'lng' => $shop->longitude,
'name' => $shop->name,
'address' => $shop->address . ' - ' . $shop->postcode . ' ' . $shop->city,
];
@endphp
<div class="w-100 h-100 min-vh-25" id="map-location-display" data-json='@json($displayData)'></div>
</div>
@endif
</div>
<!-- Actions -->
<div class="mb-5 text-center">
<a class="btn btn-primary btn-lg rounded-pill fw-bold text-uppercase px-5" href="{{ route('fo.pages.home') }}">
{{ __('Back to shop') }}
</a>
</div>
</div>
</div>
</main>
@endsection