ldc-cocotte/resources/views/fo/customer/orders/index.blade.php
Jérémy Munsch 0edef37e50
fix(orders): correct closing tag for order reference span
This change fixes a typo in the order reference display by correcting the closing tag.
2026-10-28 15:25:28 +01:00

97 lines
4 KiB
PHP

@extends('fo.layouts.layout')
@section('title', __('My Orders'))
@section('description', __('My Orders'))
@section('content')
<main class="container my-5">
<div class="mb-4">
<a class="btn btn-outline-secondary rounded-4" data-bs-toggle="tooltip" href="{{ route('fo.account.dashboard') }}"
title="{{ __('Back to :page', ['page' => __('My Account')]) }}">
<i class="fa-solid fa-arrow-left"></i>
</a>
</div>
<h1 class="mb-4 text-center">{{ __('My Orders') }}</h1>
<div class="rounded p-4 shadow-sm">
{{-- Pagination Haut --}}
@if ($orders->count() > \Domain\Enums\Pagination\ItemsPerPaginationEnum::twelve->value())
<div class="d-flex justify-content-center mb-4">
{{ $orders->withQueryString()->onEachSide(1)->links() }}
</div>
@endif
@if (count($orders) > 0)
{{-- VUE BUREAU : Tableau standard Bootstrap (Caché sur mobile) --}}
<div class="table-responsive d-none d-md-block">
<table class="table-striped table-hover mb-0 table">
<thead>
<tr>
<th class="text-center align-middle" scope="col">{{ __('Reference') }}</th>
<th class="text-center align-middle" scope="col">{{ __('Date') }}</th>
<th class="text-center align-middle" scope="col">{{ __('Total') }}</th>
<th class="text-center align-middle" scope="col">{{ __('Status') }}</th>
</tr>
</thead>
<tbody>
@foreach ($orders as $order)
<tr>
<td class="text-center align-middle">
<a class="btn btn-primary rounded-4 mx-auto" href="{{ route('fo.account.orders.show', $order) }}">
<span class="fw-semibold px-2">{{ $order->reference }}</span>
</a>
</td>
<td class="text-center align-middle">
{{ $order->created_at->isoFormat('ddd DD/MM/Y') }}
</td>
<td class="text-center align-middle">
@money($order->total)
</td>
<td class="text-center align-middle">{{ $order->status->label() }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{-- VUE MOBILE : Cartes (Cachées sur bureau) --}}
<div class="d-block d-md-none">
@foreach ($orders as $order)
<div class="card rounded-4 mb-3 shadow-sm">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center border-bottom mb-2 pb-2">
<span class="fw-medium text-muted">{{ __('Reference') }}</span>
<a class="btn btn-sm btn-primary rounded-4"
href="{{ route('fo.account.orders.show', $order) }}">{{ $order->reference }}</a>
</div>
<div class="d-flex justify-content-between align-items-center mb-2">
<span class="fw-medium text-muted">{{ __('Date') }}</span>
<span>{{ $order->created_at->isoFormat('ddd DD/MM/Y') }}</span>
</div>
<div class="d-flex justify-content-between align-items-center mb-2">
<span class="fw-medium text-muted">{{ __('Total') }}</span>
<span class="fw-bold">@money($order->total)</span>
</div>
<div class="d-flex justify-content-between align-items-center">
<span class="fw-medium text-muted">{{ __('Status') }}</span>
<span>{{ $order->status->label() }}</span>
</div>
</div>
</div>
@endforeach
</div>
@else
<p class="mb-0 text-center">{{ __('You have no orders') }}</p>
@endif
{{-- Pagination Bas --}}
<div class="d-flex justify-content-center mt-4">
{{ $orders->withQueryString()->onEachSide(1)->links() }}
</div>
</div>
</main>
@endsection