95 lines
3.7 KiB
PHP
95 lines
3.7 KiB
PHP
@extends('fo.layouts.layout')
|
|
|
|
@section('title', __('Final order validation'))
|
|
@section('description', __('Check all your information before confirming.'))
|
|
|
|
@section('breadcrumb', request()->route()->getName())
|
|
|
|
@section('content')
|
|
@include('fo.tunnel.tunnel-stepper', ['step' => $step])
|
|
|
|
<main class="container pb-4">
|
|
<div class="row justify-content-center">
|
|
<div class="col-12 col-lg-8 mt-lg-0 mt-5">
|
|
<h1 class="text-uppercase text-lg-start mb-4 text-center">
|
|
{{ __('Final Validation') }}
|
|
</h1>
|
|
|
|
@if (session()->has('message'))
|
|
<div class="alert alert-danger">
|
|
{{ session('message') }}
|
|
</div>
|
|
@endif
|
|
|
|
<div class="card bg-light rounded-4 mb-4 border-0 p-4">
|
|
<h3 class="mb-3">{{ __('Your basket') }}</h3>
|
|
<ul class="list-unstyled mb-0">
|
|
@foreach ($basket->items() as $item)
|
|
<li class="d-flex justify-content-between border-bottom py-2">
|
|
<span>{{ $item->qty }} x {{ $item->name }}</span>
|
|
<span class="fw-medium">@money($item->totalTtc())</span>
|
|
</li>
|
|
@endforeach
|
|
<li class="d-flex justify-content-between fw-bold fs-5 pt-3">
|
|
<span>{{ __('Total TTC') }}</span>
|
|
<span>@money($basket->totalTaxIncluded())</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="card bg-light rounded-4 mb-4 border-0 p-4">
|
|
<h3 class="mb-3">{{ __('Your collection') }}</h3>
|
|
<p class="mb-1">
|
|
<strong>{{ __('Location') }}</strong> {{ $shop->name }} - {{ $shop->address }}
|
|
</p>
|
|
<p class="mb-0">
|
|
<strong>{{ __('Collection date') }}</strong>
|
|
{{ __('On') }} {{ \Carbon\Carbon::instance($builder->getPickupTimeSlot()->getAt())->translatedFormat('l j F Y') }}
|
|
</p>
|
|
</div>
|
|
|
|
<form id="order-confirmation-form" method="POST" action="{{ route('fo.sales.confirmation.submit') }}">
|
|
@csrf
|
|
<div class="form-check d-flex justify-content-end align-items-center my-4 flex-row-reverse gap-2 p-0">
|
|
<label class="form-check-label cursor-pointer" for="ok-cgv">
|
|
{{ __('I have read and accept the') }} <a href="{{ route('fo.pages.terms') }}"
|
|
target="_blank">{{ __('general terms and conditions of sale') }}</a>
|
|
</label>
|
|
<input class="form-check-input @error('ok_cgv') is-invalid @enderror m-0 ms-auto cursor-pointer" id="ok-cgv" name="ok_cgv"
|
|
type="checkbox" required>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-between mt-5">
|
|
<a class="btn btn-outline-secondary rounded-5 text-uppercase fw-bold me-3 ms-auto px-4"
|
|
href="{{ route('fo.sales.pick-time-slot') }}">
|
|
<i class="fas fa-chevron-left me-2"></i> {{ __('Back') }}
|
|
</a>
|
|
<button id="order-confirmation-submit" class="btn btn-primary rounded-5 text-uppercase fw-bold px-4" type="submit">
|
|
<i class="fas fa-cash-register me-2"></i> {{ __('Confirm order') }}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</main>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<script nonce="{{ Vite::cspNonce() }}">
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
const form = document.getElementById('order-confirmation-form');
|
|
const submitButton = document.getElementById('order-confirmation-submit');
|
|
if (!form || !submitButton) {
|
|
return;
|
|
}
|
|
|
|
form.addEventListener('submit', function () {
|
|
if (!form.checkValidity()) {
|
|
return;
|
|
}
|
|
submitButton.disabled = true;
|
|
});
|
|
});
|
|
</script>
|
|
@endpush
|