HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: /var/www/admin.javaapp.co.uk/resources/views/partials/action.blade.php
@if (isset($isAvailable) && $isAvailable)
    <label class="switch s-coffee-medium-light ml-3 mr-3 mb-0">
        <input type="checkbox" name="cafe_type" id="cafe_type" value="1"
            {{ isset($row->is_active) && $row->is_active == 1 ? 'checked=' : '' }}>
        <span class="slider round change-status" data-href="{{ route($currentRoute . '.status', encrypt($row->id)) }}"
            data-status="{{ isset($withStatus) ? $withStatus : false }}"></span>
    </label>
@endif

@if (isset($isStatus) && $isStatus)
    <label class="switch s-coffee-medium-light ml-3 mr-3 mb-0">
        <input type="checkbox" name="cafe_type" id="cafe_type" value="1"
            {{ isset($row->status) && $row->status == 1 ? 'checked=' : '' }}>
        <span class="slider round change-status" data-href="{{ route($currentRoute . '.status', encrypt($row->id)) }}"
            data-status="{{ isset($withStatus) ? $withStatus : false }}"></span>
    </label>
@endif

@if (isset($is_admin_approved) && $is_admin_approved)
    @if($row->is_admin_approved == 0 )
    <label class="switch s-coffee-medium-light ml-3 mr-3 mb-0">
        <input type="checkbox" name="is_admin_approved" id="is_admin_approved" value="1"
            {{ isset($row->is_admin_approved) && $row->is_admin_approved == 1 ? 'checked' : '' }}>
        <span class="slider round change-admin-approval" data-href="{{ route($currentRoute . '.change-admin-approval', encrypt($row->id)) }}"
            data-status="{{ isset($row->is_admin_approved) ? $row->is_admin_approved : false }}"></span>
    </label>
    @else
        <h3 class="btn btn-coffee-dark">Approved</h3>
    @endif
@endif

@if (isset($isView) && $isView)
    <a href="{{ route($currentRoute . '.show', encrypt($row->id)) }}" class="btn btn-coffee-medium dt-btn">
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
            stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye">
            <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
            <circle cx="12" cy="12" r="3"></circle>
        </svg>
    </a>
@endif

@if (isset($isApproved) && $isApproved)
    @if ($row->approved == 0)
        <a data-href="{{ route($currentRoute . '.approve', encrypt($row->id)) }}"
            class="btn btn-coffee-edit approve-btn dt-btn">
            {{-- {{ $row->approved == 1 ? __('common.approved') : __('common.notApproved') }} --}}
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                stroke-linecap="round" stroke-linejoin="round" class="feather feather-check">
                <polyline points="20 6 9 17 4 12"></polyline>
            </svg>
        </a>
    @endif
@endif

@if (isset($isEdit) && $isEdit)
    <a href="{{ route($currentRoute . '.edit', encrypt($row->id)) }}" class="btn btn-coffee-edit dt-btn">
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
            stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-3">
            <path d="M12 20h9"></path>
            <path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
        </svg>
    </a>
@endif

@if (isset($isDelete) && $isDelete)
    <a data-href="{{ route($currentRoute . '.destroy', encrypt($row->id)) }}"
        class="btn btn-coffee-dark dt-btn delete-btn">
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
            stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2">
            <polyline points="3 6 5 6 21 6"></polyline>
            <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
            <line x1="10" y1="11" x2="10" y2="17"></line>
            <line x1="14" y1="11" x2="14" y2="17"></line>
        </svg>
    </a>
@endif
{{-- Render the order items --}}

@if(isset($orderItems) && (is_array($orderItems) || is_object($orderItems)))
    @foreach($orderItems as $item)
        <div>
            <img src="{{ htmlspecialchars($item->item_image) }}" alt="{{ htmlspecialchars($item->item_name) }}" style="width: 20px; height: 20px;"/>
            <strong>{{ htmlspecialchars($item->item_name) }}</strong> ({{ intval($item->item_quantity) }})<br>
            <span>Size: {{ htmlspecialchars($item->item_size) }}</span><br>
            @php
                // Assuming item_amount is a formatted string, convert to float for formatting
                $amount = $item->item_amount; 
                echo 'Amount: ' . $amount . '<br>';
            @endphp            
            @if(!empty($item->addon_sizes))
                <strong>Add-ons:</strong><br>
                <ul>
                    @foreach($item->addon_sizes as $addon)
                        <li>
                            Category: {{ htmlspecialchars($addon->addon_name) }}<br>
                            Name: {{ htmlspecialchars($addon->addon_size_name) }}<br>
                            Price: {{ htmlspecialchars($addon->addon_size_price) }}<br>
                        </li>
                    @endforeach                    
                </ul>
            @else
                <span>No Add-ons</span>
            @endif        
        </div>
    @endforeach
@endif

@if (isset($order_completed))
    <label class="switch s-coffee-medium-light ml-3 mr-3 mb-0" style="{{ isset($row->order_completed) && $row->order_completed == 1 ? 'display: none;' : '' }}">
        <input type="checkbox" name="order_completed" id="order_completed_{{ $row->id }}" value="1"
            {{ isset($row->order_completed) && $row->order_completed == 1 ? 'checked' : '' }}>
        <span class="slider round change-order-completed" 
              data-href="#" 
              data-status="{{ $row->order_completed ?? 0 }}" 
              data-id="{{ $row->id }}"></span>
    </label>

    @if (isset($row->order_completed) && $row->order_completed == 1)
    <button class="completed-message success-btn dt-btn status-btn">Completed</button>
    @endif
@endif