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/shop.komma.nl/resources/views/vendor/KMS/shipments/shipments.blade.php
<div class="o-shipments">
    <form class="o-shipments__settings" action="{{ route('shipments.search') }}" method="GET" id="entity-form"
          name="search_shipments">
        <div class="o-shipments__status">
            <label class="o-shipments__label" for="status">{{ ucfirst(__('KMS::shipments.show_status')) }}:</label>
            <select class="c-select js-status" name="status" id="status">
                <option value="each">@lang('KMS::shipments.all_statuses')</option>
                @foreach(__('KMS::shipments.status') as $shipmentstatusKey => $translation)
                    <option @if(old('status') === $shipmentstatusKey) selected
                            @endif value="{{ $shipmentstatusKey }}">{{ $translation }}</option>
                @endforeach
            </select>
        </div>
        <div class="o-shipments__filters">
            <div class="o-shipments__filter-list">
                <label for="filter-list">Filter op</label>
                <select class="c-select" name="search_for" id="filter-list">
                    <option @if(old('search_for') === 'id') selected @endif value="id">@lang('KMS::shipments.shipment_number')</option>
                    <option @if(old('search_for') === 'tracking_code') selected @endif value="tracking_code">@lang('KMS::shipments.tracking_code')</option>
                    <option @if(old('search_for') === 'order_number') selected @endif value="order_number">@lang('KMS::shipments.order_number')</option>
                    <option @if(old('search_for') === 'first_name') selected @endif value="first_name">@lang('KMS::shipments.first_name')</option>
                    <option @if(old('search_for') === 'last_name') selected @endif value="last_name">@lang('KMS::shipments.last_name')</option>
                    <option @if(old('search_for') === 'email') selected @endif value="email">@lang('KMS::shipments.email')</option>
                    <option @if(old('search_for') === 'shipping_street') selected @endif value="shipping_street">@lang('KMS::shipments.street')</option>
                    <option @if(old('search_for') === 'shipping_house_number') selected @endif value="shipping_house_number">@lang('KMS::shipments.house_number')</option>
                </select>
            </div>
            <div class="o-shipments__filter-value">
                <label for="filter-list">@lang('KMS::shipments.value')</label>
                <div class="">
                    <input class="c-input" type="text" name="search_value" value="{{ old('search_value') }}"/>
                </div>
            </div>
            <div class="o-shipments__filter-action">
                <button class="c-button">Filter</button>
            </div>
        </div>
    </form>

<!--Only is set when a search was done or latest shipments where included.-->
    <form class="o-shipments__results" action="{{ route('shipments.batch_edit') }}" method="POST" data-test="shipment_table" name="batch_edit_shipments">
        {{ method_field('PATCH') }}
        {{ csrf_field() }}
        @if(isset($shipments) && count($shipments) > 0)
            <table class="o-shipment__table" data-test="shipment_shipments_table">
                <col width="auto"/>
                <col width="auto"/>
                <col width="330px"/>
                <col width="auto"/>
                <col width="auto"/>
                <thead>
                    <tr>
                        <th class="o-shipment__th  batch-checkbox-header"></th>
                        <th class="o-shipment__th">{{ ucfirst(__('KMS::shipments.shipment_number')) }}</th>
                        <th class="o-shipment__th">{{ ucfirst(__('KMS::shipments.tracking_code')) }}</th>
                        <th class="o-shipment__th">{{ ucfirst(__('KMS::shipments.order')) }}</th>
                        <th class="o-shipment__th">{{ ucfirst(__('KMS::shipments.customer')) }}</th>
                        <th class="o-shipment__th">{{ ucfirst(__('KMS::shipments.comment')) }}</th>
                        <th class="o-shipment__th">{{ ucfirst(__('KMS::shipments.status_name')) }}</th>
                    </tr>
                </thead>
                <tbody>
                @foreach($shipments as $count => $shipment)
                    @php /** @var \App\shipments\Models\shipment $shipment */@endphp
                    <tr class="o-shipment__row">
                        <td class="o-shipment__cell  o-shipment__cell--checkbox">
                            <input type="checkbox" class="batch-checkbox js-batch-checkbox" name="shipment_ids[]" value="{{ $shipment->id }}" data-test="shipment_checkbox_{{ $shipment->id }}" @if(old('shipment_ids['.$count.']')) checked @endif>
                        </td>
                        <td class="o-shipment__cell">
                            <a class="o-order__link" href="{{ route('shipments.show', ['shipment' => $shipment]) }}" data-test="shipment_{{ $shipment->id }}">{{ $shipment->id }}</a>
                        </td>
                        <td class="o-shipment__cell">
                            @if(!empty($shipment->tracking_url))
                                <a href="{{ $shipment->tracking_url }}">{{ $shipment->displayTrackingCode() }}</a>
                            @else
                                {{ $shipment->displayTrackingCode() }}
                            @endif
                        </td>
                        <td class="o-shipment__cell">{!! $shipment->orderLinkOrText() !!}</td>
                        <td class="o-shipment__cell">{!! $shipment->customerLinkOrText() !!}</td>
                        <td class="o-shipment__cell">{{ Str::limit($shipment->comment, 20, '...') }}</td>
                        <td class="o-shipment__cell">
                            <span class="c-tag" data-status="{{ $shipment->statusColor() ?? 'negative'  }}">{{ __('KMS::shipments.status.'.$shipment->status ?? '') }}</span>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        @else
            <p>@lang('KMS::shipments.no_results')</p>
        @endif

        <div class="o-shipments__controls" data-test="batch_edit_controls">
            <div class="o-shipments__edit">
                @if(count($shipments) > 0)
                    <div class="o-shipments__edit-selection">
                        <label class="o-shipments__label" for="change_status_to">@lang('KMS::shipments.batch.change_status'):</label>
                        <select class="c-select" name="change_status_to" id="change_status_to" data-test="change_status_to">
                            @foreach(__('KMS::shipments.editable_status') as $value => $shipment_status)
                                <option value="{{ $value }}">{{ $shipment_status }}</option>
                            @endforeach
{{--                            @foreach(__('KMS::shipments.editable_status') as $enum => $shipment_status)--}}
{{--                                <option value="{{ $enum }}">@lang('KMS::shipments.status.'.$enum)</option>--}}
{{--                            @endforeach--}}
                        </select>
                    </div>
                @endif
                <div class="o-shipments__edit-action">
                    @if(count($shipments) > 0)
                        <button class="c-button" type="submit" name="change_status" value="change_status" data-test="change_status">@lang('KMS::shipments.batch.edit')</button>
                        <button class="c-button" type="submit" name="delete" value="delete">@lang('KMS::shipments.delete')</button>
                        <button class="c-button" type="submit" name="notifyCarrier" value="announce">@lang('KMS::shipments.announce')</button>
                        <button class="c-button" type="submit" name="cancelShipments" value="cancelShipments">@lang('KMS::shipments.cancel_shipments')</button>
                        <button class="c-button" type="submit" name="toCsv" value="toCsv">@lang('KMS::shipments.to_csv')</button>
                    @endif
                </div>
            </div>

            <div class="o-shipments__pagination">
                @include('components.pagination.list', ['paginator' => $shipments])
            </div>

            @if(count($shipments) > 0)
                <div class="o-shipments__per-page" data-key="perPage">
                    <label class="o-shipments__label"
                           for="perPageFake">{{ ucfirst(__('KMS::shipments.results_per_page')) }}:</label>
                    <select class="c-select  c-select--small js-per-page" name="perPage" id="perPage">
                        <option {{ (request()->get('perpage', $perpage) == 5) ? 'selected' : '' }} value="5">5</option>
                        <option {{ (request()->get('perpage', $perpage) == 10) ? 'selected' : '' }} value="10">10</option>
                        <option {{ (request()->get('perpage', $perpage) == 20) ? 'selected' : '' }} value="20">20</option>
                        <option {{ (request()->get('perpage', $perpage) == 50) ? 'selected' : '' }} value="50">50</option>
                        <option {{ (request()->get('perpage', $perpage) == 100) ? 'selected' : '' }} value="100">100</option>
                    </select>
                </div>
            @endif
        </div>

        <p class="o-shipments__new">
            @if($nonFulFilledOrders)
                <label for="order">@lang('KMS::shipments.new')</label><br>
                @lang('KMS::shipments.for_order')
                <select name="order" id="order">
                    @foreach($nonFulFilledOrders as $nonFulFilledOrder)
                        <option value="{{ $nonFulFilledOrder->id }}">{{ $nonFulFilledOrder->order_number }}</option>
                    @endforeach
                </select><br>
                <button class="c-button" type="submit" name="new" value="new">@lang('KMS::shipments.create')</button>
            @else
                <label>@lang('KMS::shipments.no_orders_needing_shipments')</label><br>
            @endif
        </p>
    </form>
</div>