HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/inzigd.komma.pro/resources/views/kms/shop/shipments/index.blade.php
@extends('kms.layouts.kms')

@php /** @var \App\Komma\Globalization\RegionInfo $shopRegionInfo */@endphp
@section('content')
    <h1>{{ ucfirst(__('shop/shipments.shipments')) }}</h1>

    @if ($errors->any())
        <div class="alert alert-danger">
            <h2>@lang('shop/shipments.search_error'):</h2>
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
    <h2>@lang('shop/shipments.search')</h2>
    <form action="{{ route('shipments.search') }}" method="GET">
        <label for="id">{{ ucfirst(__('kms/global.id')) }}:</label> <input dusk="id" type="text" id="id" name="id" value="{{ old('id') }}"><br>
        <label for="order_number">{{ ucfirst(__('shop/orders.order_number')) }}:</label> <input dusk="order_number" type="text" id="order_number" name="order_number" value="{{ old('order_number') }}"><br>

        <label for="status">{{ ucfirst(__('shop/orders.status_name')) }}:</label>
        <select name="status" id="status">
            <option value="each">@lang('shop/shipments.all_statuses')</option>
            @foreach(__('shop/shipments.status') as $orderStatusKey => $translation)
                <option @if(old('status') === $orderStatusKey) selected @endif value="{{ $orderStatusKey }}">{{ $translation }}</option>
            @endforeach
        </select><br>
        <label for="id">{{ ucfirst(__('shop/shipments.tracking_code')) }}:</label> <input dusk="id" type="text" id="tracking_code" name="tracking_code" value="{{ old('tracking_code') }}"><br>

        <label for="perPage">{{ ucfirst(__('shop/shipments.results_per_page')) }}:</label>
        <select name="perPage" id="perPage">
            <option {{ (isset($perPage) && $perPage == 5) ? 'selected' : '' }} value="5">5</option>
            <option {{ (isset($perPage) && $perPage == 10) ? 'selected' : '' }} value="10">10</option>
            <option {{ (isset($perPage) && $perPage == 20) ? 'selected' : '' }} value="20">20</option>
            <option {{ (isset($perPage) && $perPage == 50) ? 'selected' : '' }} value="50">50</option>
            <option {{ (isset($perPage) && $perPage == 100) ? 'selected' : '' }} value="100">100</option>
        </select>

        <input type="submit" dusk="search_shipments_button" value="{{ ucfirst(__('shop/shipments.search')) }}">
    </form>

    @if(isset($shipments)) <!--Only is set when a search was done or latest shipments where included.-->
        <h2>{{ $resultsTypeTranslation }}</h2>
        @if(count($shipments) > 0)
            <form action="{{ route('shipments.batch_edit') }}" method="POST">
                {{ method_field('PATCH') }}
                <table class="shipment-table">
                <thead>
                    <tr>
                        <th></th>
                        <th></th>
                        <th>Id</th>
                        <th>{{ ucfirst(__('shop/orders.order_number')) }}</th>
                        <th>{{ ucfirst(__('shop/shipments.status_name')) }}</th>
                        <th>{{ ucfirst(__('shop/shipments.tracking_code')) }}</th>
                        <th>{{ ucfirst(__('shop/shipments.comment')) }}</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($shipments as $shipment)
                        @php /** @var \App\Komma\Shop\Shipments\Shipment $shipment */@endphp
                        <tr>
                            <td>
                                <a href="{{ route('orders.show', ['order' => $shipment->order]) }}">@lang('shop/orders.order')</a><br>
                                <a href="{{ route('shipments.show', ['shipment' => $shipment]) }}">@lang('shop/shipments.shipment')</a>
                            </td>
                            <td><input type="checkbox" name="shipment_ids[]" value="{{ $shipment->id }}"></td>
                            <td>{{ $shipment->id }}</td>
                            <td>{{ $shipment->order->order_number }}</td>
                            <td>{{ __('shop/shipments.status.'.$shipment->status) }}</td>
                            <td>{{ $shipment->tracking_code }}</td>
                            <td>{{ $shipment->comment }}</td>
                        </tr>
                    @endforeach
                </tbody>
                </table>
            </form>
            @if(method_exists($shipments, 'links')) {{ $shipments->links() }} @endif
        @else
            <p>@lang('shop/shipments.no_results')</p>
        @endif
    @endif
@stop