New Initial Commit

This commit is contained in:
twotalesanimation
2025-12-09 12:04:54 +02:00
commit 6de01c13c5
350 changed files with 42032 additions and 0 deletions
@@ -0,0 +1,119 @@
<x-filament::page>
<div class="space-y-6">
<!-- Order Header -->
<div class="bg-white rounded-lg shadow p-6">
<h1 class="text-3xl font-bold mb-4">Order #{{ $record->order_number }}</h1>
<div class="grid grid-cols-2 gap-4 md:grid-cols-4">
<div>
<p class="text-gray-600 text-sm">Status</p>
<p class="text-lg font-semibold">{{ ucfirst($record->status) }}</p>
</div>
<div>
<p class="text-gray-600 text-sm">Payment Status</p>
<p class="text-lg font-semibold">{{ ucfirst($record->payment_status) }}</p>
</div>
<div>
<p class="text-gray-600 text-sm">Total</p>
<p class="text-lg font-semibold">R{{ number_format($record->total, 2) }}</p>
</div>
<div>
<p class="text-gray-600 text-sm">Order Date</p>
<p class="text-lg font-semibold">{{ $record->created_at->format('M d, Y') }}</p>
</div>
</div>
</div>
<!-- Order Items -->
<div class="bg-white rounded-lg shadow p-6">
<h2 class="text-2xl font-bold mb-4">Order Items</h2>
@if($record->items->count() > 0)
<div class="overflow-x-auto">
<table class="w-full text-sm text-left text-gray-600">
<thead class="text-xs text-gray-700 uppercase bg-gray-100">
<tr>
<th class="px-4 py-3">Product</th>
<th class="px-4 py-3">Print Stock</th>
<th class="px-4 py-3">Type</th>
<th class="px-4 py-3">Specifications</th>
<th class="px-4 py-3 text-right">Price</th>
</tr>
</thead>
<tbody>
@foreach($record->items as $item)
<tr class="border-b hover:bg-gray-50">
<td class="px-4 py-3 font-medium text-gray-900">
{{ $item->product->name }}
</td>
<td class="px-4 py-3">
{{ $item->printStock->name ?? 'N/A' }}
</td>
<td class="px-4 py-3">
<span class="bg-blue-100 text-blue-800 px-2 py-1 rounded text-xs">
{{ ucfirst($item->type) }}
</span>
</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 text-gray-900">
R{{ number_format($item->price, 2) }}
</td>
</tr>
@endforeach
</tbody>
<tfoot class="border-t-2 border-gray-300">
<tr>
<td colspan="4" class="px-4 py-3 text-right font-bold">Total:</td>
<td class="px-4 py-3 text-right font-bold text-lg text-gray-900">
R{{ number_format($record->items->sum('price'), 2) }}
</td>
</tr>
</tfoot>
</table>
</div>
@else
<p class="text-gray-600">No items in this order.</p>
@endif
</div>
<!-- Customer Information -->
<div class="bg-white rounded-lg shadow p-6">
<h2 class="text-2xl font-bold mb-4">Customer Information</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<p class="text-gray-600 text-sm mb-1">Name</p>
<p class="text-lg font-semibold">{{ $record->customer_name }}</p>
</div>
<div>
<p class="text-gray-600 text-sm mb-1">Email</p>
<p class="text-lg">{{ $record->customer_email }}</p>
</div>
<div>
<p class="text-gray-600 text-sm mb-1">Phone</p>
<p class="text-lg">{{ $record->customer_phone ?? 'N/A' }}</p>
</div>
<div>
<p class="text-gray-600 text-sm mb-1">Payment Method</p>
<p class="text-lg">{{ $record->payment_method ?? 'N/A' }}</p>
</div>
<div class="md:col-span-2">
<p class="text-gray-600 text-sm mb-1">Shipping Address</p>
<p class="text-lg whitespace-pre-wrap">{{ $record->shipping_address }}</p>
</div>
@if($record->notes)
<div class="md:col-span-2">
<p class="text-gray-600 text-sm mb-1">Notes</p>
<p class="text-lg whitespace-pre-wrap">{{ $record->notes }}</p>
</div>
@endif
</div>
</div>
</div>
</x-filament::page>
@@ -0,0 +1,66 @@
<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>
@@ -0,0 +1,123 @@
@extends('filament::layouts.app')
@section('content')
<div class="fi-main">
<div class="fi-main-ctn fi-page-ctn space-y-6">
<!-- Order Header -->
<div class="bg-white rounded-lg shadow p-6">
<h1 class="text-3xl font-bold mb-4">Order #{{ $record->order_number }}</h1>
<div class="grid grid-cols-2 gap-4 md:grid-cols-4">
<div>
<p class="text-gray-600 text-sm">Status</p>
<p class="text-lg font-semibold">{{ ucfirst($record->status) }}</p>
</div>
<div>
<p class="text-gray-600 text-sm">Payment Status</p>
<p class="text-lg font-semibold">{{ ucfirst($record->payment_status) }}</p>
</div>
<div>
<p class="text-gray-600 text-sm">Total</p>
<p class="text-lg font-semibold">R{{ number_format($record->total, 2) }}</p>
</div>
<div>
<p class="text-gray-600 text-sm">Order Date</p>
<p class="text-lg font-semibold">{{ $record->created_at->format('M d, Y') }}</p>
</div>
</div>
</div>
<!-- Order Items -->
<div class="bg-white rounded-lg shadow p-6">
<h2 class="text-2xl font-bold mb-4">Order Items</h2>
@if($record->items && $record->items->count() > 0)
<div class="overflow-x-auto">
<table class="w-full text-sm text-left text-gray-600">
<thead class="text-xs text-gray-700 uppercase bg-gray-100">
<tr>
<th class="px-4 py-3">Product</th>
<th class="px-4 py-3">Print Stock</th>
<th class="px-4 py-3">Type</th>
<th class="px-4 py-3">Specifications</th>
<th class="px-4 py-3 text-right">Price</th>
</tr>
</thead>
<tbody>
@foreach($record->items as $item)
<tr class="border-b hover:bg-gray-50">
<td class="px-4 py-3 font-medium text-gray-900">
{{ $item->product->name ?? 'N/A' }}
</td>
<td class="px-4 py-3">
{{ $item->printStock->name ?? 'N/A' }}
</td>
<td class="px-4 py-3">
<span class="bg-blue-100 text-blue-800 px-2 py-1 rounded text-xs">
{{ ucfirst($item->type) }}
</span>
</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 text-gray-900">
R{{ number_format($item->price, 2) }}
</td>
</tr>
@endforeach
</tbody>
<tfoot class="border-t-2 border-gray-300">
<tr>
<td colspan="4" class="px-4 py-3 text-right font-bold">Total:</td>
<td class="px-4 py-3 text-right font-bold text-lg text-gray-900">
R{{ number_format($record->items->sum('price'), 2) }}
</td>
</tr>
</tfoot>
</table>
</div>
@else
<p class="text-gray-600">No items in this order.</p>
@endif
</div>
<!-- Customer Information -->
<div class="bg-white rounded-lg shadow p-6">
<h2 class="text-2xl font-bold mb-4">Customer Information</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<p class="text-gray-600 text-sm mb-1">Name</p>
<p class="text-lg font-semibold">{{ $record->customer_name }}</p>
</div>
<div>
<p class="text-gray-600 text-sm mb-1">Email</p>
<p class="text-lg">{{ $record->customer_email }}</p>
</div>
<div>
<p class="text-gray-600 text-sm mb-1">Phone</p>
<p class="text-lg">{{ $record->customer_phone ?? 'N/A' }}</p>
</div>
<div>
<p class="text-gray-600 text-sm mb-1">Payment Method</p>
<p class="text-lg">{{ $record->payment_method ?? 'N/A' }}</p>
</div>
<div class="md:col-span-2">
<p class="text-gray-600 text-sm mb-1">Shipping Address</p>
<p class="text-lg whitespace-pre-wrap">{{ $record->shipping_address }}</p>
</div>
@if($record->notes)
<div class="md:col-span-2">
<p class="text-gray-600 text-sm mb-1">Notes</p>
<p class="text-lg whitespace-pre-wrap">{{ $record->notes }}</p>
</div>
@endif
</div>
</div>
</div>
</div>
@endsection