Files
Additional/resources/views/filament/resources/order-resource/pages/view-order.blade.php
T
twotalesanimation 6de01c13c5 New Initial Commit
2025-12-09 12:04:54 +02:00

67 lines
3.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<x-filament-panels::page>
{{-- Default form fields will be rendered here by Filament --}}
{{ $this->form }}
{{-- Custom Order Items Section --}}
<div class="mt-6">
<x-filament::section>
<x-slot name="heading">
Order Items
</x-slot>
@if($this->record->items && $this->record->items->count() > 0)
<div class="overflow-x-auto">
<table class="w-full text-sm">
<thead class="border-b">
<tr class="text-left">
<th class="px-4 py-3 font-medium">Product</th>
<th class="px-4 py-3 font-medium">Print Stock</th>
<th class="px-4 py-3 font-medium">Type</th>
<th class="px-4 py-3 font-medium">Specifications</th>
<th class="px-4 py-3 font-medium text-right">Price</th>
</tr>
</thead>
<tbody class="divide-y">
@foreach($this->record->items as $item)
<tr>
<td class="px-4 py-3">
{{ $item->product->name ?? 'N/A' }}
</td>
<td class="px-4 py-3">
{{ $item->printStock->name ?? 'N/A' }}
</td>
<td class="px-4 py-3">
<x-filament::badge>
{{ ucfirst($item->type) }}
</x-filament::badge>
</td>
<td class="px-4 py-3 text-sm">
@if($item->type === 'wallpaper')
Length: {{ $item->length }}m
@elseif($item->type === 'mural')
{{ $item->width }}m × {{ $item->height }}m ({{ number_format($item->width * $item->height, 2) }})
@endif
</td>
<td class="px-4 py-3 text-right font-semibold">
R{{ number_format($item->price, 2) }}
</td>
</tr>
@endforeach
</tbody>
<tfoot class="border-t-2 font-bold">
<tr>
<td colspan="4" class="px-4 py-3 text-right">Total:</td>
<td class="px-4 py-3 text-right text-lg">
R{{ number_format($this->record->items->sum('price'), 2) }}
</td>
</tr>
</tfoot>
</table>
</div>
@else
<p class="text-gray-600">No items in this order.</p>
@endif
</x-filament::section>
</div>
</x-filament-panels::page>