diff --git a/resources/views/admin/orders_show.blade.php b/resources/views/admin/orders_show.blade.php index e9c1d8e..2810649 100644 --- a/resources/views/admin/orders_show.blade.php +++ b/resources/views/admin/orders_show.blade.php @@ -5,28 +5,96 @@ @section('content')
- {{-- Header --}} + {{-- HEADER --}}
+ + {{-- TOP BAR --}}
-

Order Details

+

Order Details

Detailed view of this shipment order
+ {{-- ACTION BUTTONS --}} +
+ + {{-- ADD ITEM --}} + + + {{-- EDIT ORDER --}} + @if($order->status === 'pending') + + @else + + @endif + + {{-- DELETE ORDER --}} + @if($order->status === 'pending') +
+ @csrf + @method('DELETE') + +
+ @endif + +
+
- {{-- Customer Info --}} + {{-- EDIT ORDER FORM --}} + + + {{-- CUSTOMER INFO --}}
-
{{ strtoupper(substr($user->customer_name ?? 'U', 0, 1)) }}
+
{{ $user->customer_name ?? 'Unknown Customer' }}

{{ $user->company_name ?? 'N/A' }}

@@ -34,13 +102,14 @@

{{ $user->mobile_no ?? '' }}

+

{{ $user->address ?? '' }}

{{ $user->pincode ?? '' }}
- {{-- Order Summary --}} + {{-- ORDER SUMMARY --}}
@@ -65,7 +134,7 @@
- {{-- Origin - Destination --}} + {{-- ORIGIN / DESTINATION --}}

Origin

@@ -77,7 +146,7 @@
- {{-- Order Items Table --}} + {{-- ITEMS TABLE --}}
@@ -88,15 +157,17 @@ - - + + + + @foreach($order->items as $index => $item) @@ -113,38 +184,531 @@ + + @endforeach
QTY TTL/QTY UnitPrice (₹)TTL Amount (₹)PriceTotal Amount CBM TTL CBM KG TTL KG Shop NoActions
{{ $item->kg }} {{ $item->ttl_kg }} {{ $item->shop_no }} +
+ @csrf + @method('DELETE') + +
+
- {{-- Totals --}} + {{-- TOTALS --}}
{{ $order->ctn }}
- Total CTN + Total CTN
{{ $order->qty }}
- Total QTY + Total QTY
{{ $order->ttl_kg }}
- Total TTL KG + Total KG
₹{{ number_format($order->ttl_amount, 2) }}
- Total Amount + Total Amount
-
-@endsection +{{-- ADD ITEM MODAL --}} + + +{{-- AUTO-FILL SCRIPT --}} + + + + +@endsection \ No newline at end of file diff --git a/resources/views/admin/profile_update_requests.blade.php b/resources/views/admin/profile_update_requests.blade.php new file mode 100644 index 0000000..4797665 --- /dev/null +++ b/resources/views/admin/profile_update_requests.blade.php @@ -0,0 +1,111 @@ +@extends('admin.layouts.app') + +@section('page-title', 'Profile Update Requests') + +@section('content') +
+ + @php + $perPage = 5; + $currentPage = request()->get('page', 1); + $currentPage = max(1, (int)$currentPage); + $total = $requests->count(); + $totalPages = ceil($total / $perPage); + $currentItems = $requests->slice(($currentPage - 1) * $perPage, $perPage); + @endphp + + + +

Profile Update Requests ({{ $total }})

+ +
+
+ +
+ + + + + + + + + + + + + + @foreach($currentItems as $index => $req) + @php + $user = $req->user; + // FIX: Convert string to array + $newData = is_array($req->data) ? $req->data : json_decode($req->data, true); + @endphp + + + + + + + + + + + + + + + + @endforeach + +
#UserRequested ChangesStatusRequested AtActions
{{ ($currentPage - 1) * $perPage + $index + 1 }} + {{ $user->customer_name }}
+ {{ $user->email }}
+ ID: {{ $user->customer_id }} +
+ @foreach($newData as $key => $newValue) + @php + $oldValue = $user->$key ?? '—'; + $changed = $oldValue != $newValue; + @endphp + +
+ {{ ucfirst(str_replace('_',' ', $key)) }}:
+ Old: {{ $oldValue }}
+ New: {{ $newValue ?? '—' }} +
+ @endforeach +
+ @if($req->status == 'pending') + Pending + @elseif($req->status == 'approved') + Approved + @else + Rejected + @endif + {{ $req->created_at->format('d M Y, h:i A') }} + @if($req->status == 'pending') + + Approve + + + + Reject + + @else + Completed + @endif +
+
+ +
+
+
+@endsection diff --git a/resources/views/admin/reports.blade.php b/resources/views/admin/reports.blade.php index b2f37a3..d0d088a 100644 --- a/resources/views/admin/reports.blade.php +++ b/resources/views/admin/reports.blade.php @@ -6,20 +6,28 @@