@extends('layouts.shop-control-layout') @section('title', 'Замовлення (інд.)') @section('content')

Індивідуальні замовлення

{{ request('status_id') ? $orderStatuses->firstWhere('status_id', request('status_id'))->status_name : 'Всі замовлення' }}

@if (request('status_id')) Всі замовлення @endif @foreach ($orderStatuses as $status) @if ($status->status_id != request('status_id')) {{ $status->status_name }} @endif @endforeach
@foreach ($orders as $order)

Замовлення #{{ $order->order_id }}

{{ $order->productCategory->category_name }}

@foreach ($productCategories as $category) @if ($category->category_id != $order->productCategory->category_id) {{ $category->category_name }} @endif @endforeach
@php $className = ''; if ($order->orderStatus->status_name == 'Відмовлено') { $className = 'rejected'; } elseif ($order->orderStatus->status_name == 'Відмова (на пошті)') { $className = 'nottaken'; } elseif ($order->orderStatus->status_name == 'Завершено') { $className = 'finished'; } @endphp

{{ $order->orderStatus->status_name }}

@foreach ($orderStatuses as $status) @if ($status->status_id != $order->orderStatus->status_id) {{ $status->status_name }} @endif @endforeach

{{ $order->client_name }}

{{ $order->client_last_name }}

{{ $order->phone_number }}

{{ $order->description }}

@endforeach
@endsection