status update
This commit is contained in:
@@ -36,43 +36,43 @@ class AdminOrderController extends Controller
|
||||
return view('admin.orders_create', compact('markList'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$data = $request->validate([
|
||||
'mark_no' => 'required|string',
|
||||
'origin' => 'nullable|string',
|
||||
'destination' => 'nullable|string',
|
||||
'ctn' => 'nullable|numeric',
|
||||
'qty' => 'nullable|numeric',
|
||||
'ttl_qty' => 'nullable|numeric',
|
||||
'ttl_amount' => 'nullable|numeric',
|
||||
'cbm' => 'nullable|numeric',
|
||||
'ttl_cbm' => 'nullable|numeric',
|
||||
'kg' => 'nullable|numeric',
|
||||
'ttl_kg' => 'nullable|numeric',
|
||||
]);
|
||||
// public function store(Request $request)
|
||||
// {
|
||||
// $data = $request->validate([
|
||||
// 'mark_no' => 'required|string',
|
||||
// 'origin' => 'nullable|string',
|
||||
// 'destination' => 'nullable|string',
|
||||
// 'ctn' => 'nullable|numeric',
|
||||
// 'qty' => 'nullable|numeric',
|
||||
// 'ttl_qty' => 'nullable|numeric',
|
||||
// 'ttl_amount' => 'nullable|numeric',
|
||||
// 'cbm' => 'nullable|numeric',
|
||||
// 'ttl_cbm' => 'nullable|numeric',
|
||||
// 'kg' => 'nullable|numeric',
|
||||
// 'ttl_kg' => 'nullable|numeric',
|
||||
// ]);
|
||||
|
||||
$order = Order::create([
|
||||
'order_id' => $this->generateOrderId(),
|
||||
'mark_no' => $data['mark_no'],
|
||||
'origin' => $data['origin'] ?? null,
|
||||
'destination'=> $data['destination'] ?? null,
|
||||
'ctn' => $data['ctn'] ?? 0,
|
||||
'qty' => $data['qty'] ?? 0,
|
||||
'ttl_qty' => $data['ttl_qty'] ?? 0,
|
||||
'ttl_amount' => $data['ttl_amount'] ?? 0,
|
||||
'cbm' => $data['cbm'] ?? 0,
|
||||
'ttl_cbm' => $data['ttl_cbm'] ?? 0,
|
||||
'kg' => $data['kg'] ?? 0,
|
||||
'ttl_kg' => $data['ttl_kg'] ?? 0,
|
||||
'status' => 'pending',
|
||||
]);
|
||||
// $order = Order::create([
|
||||
// 'order_id' => $this->generateOrderId(),
|
||||
// 'mark_no' => $data['mark_no'],
|
||||
// 'origin' => $data['origin'] ?? null,
|
||||
// 'destination'=> $data['destination'] ?? null,
|
||||
// 'ctn' => $data['ctn'] ?? 0,
|
||||
// 'qty' => $data['qty'] ?? 0,
|
||||
// 'ttl_qty' => $data['ttl_qty'] ?? 0,
|
||||
// 'ttl_amount' => $data['ttl_amount'] ?? 0,
|
||||
// 'cbm' => $data['cbm'] ?? 0,
|
||||
// 'ttl_cbm' => $data['ttl_cbm'] ?? 0,
|
||||
// 'kg' => $data['kg'] ?? 0,
|
||||
// 'ttl_kg' => $data['ttl_kg'] ?? 0,
|
||||
// 'status' => 'pending',
|
||||
// ]);
|
||||
|
||||
$this->createInvoice($order);
|
||||
// $this->createInvoice($order);
|
||||
|
||||
return redirect()->route('admin.orders.show', $order->id)
|
||||
->with('success', 'Order created successfully.');
|
||||
}
|
||||
// return redirect()->route('admin.orders.show', $order->id)
|
||||
// ->with('success', 'Order created successfully.');
|
||||
// }
|
||||
|
||||
/* ---------------------------
|
||||
* SHOW / POPUP
|
||||
@@ -580,7 +580,7 @@ class AdminOrderController extends Controller
|
||||
'ttl_cbm' => $total_ttl_cbm,
|
||||
'kg' => $total_kg,
|
||||
'ttl_kg' => $total_ttl_kg,
|
||||
'status' => 'pending',
|
||||
'status' => 'order_placed',
|
||||
]);
|
||||
|
||||
// 6) order items
|
||||
|
||||
@@ -20,7 +20,11 @@ class ShipmentController extends Controller
|
||||
$usedOrderIds = ShipmentItem::pluck('order_id')->toArray();
|
||||
|
||||
// 2) Load available orders (not used in any shipment)
|
||||
$availableOrders = Order::whereNotIn('id', $usedOrderIds)->get();
|
||||
$availableOrders = Order::whereNotIn('id', $usedOrderIds)
|
||||
->where('status', '!=', 'order_placed')
|
||||
->get();
|
||||
|
||||
|
||||
|
||||
// 3) Load all shipments for listing
|
||||
$shipments = Shipment::latest()->get();
|
||||
@@ -65,6 +69,16 @@ class ShipmentController extends Controller
|
||||
// CALCULATE TOTALS
|
||||
// -----------------------------
|
||||
$orders = Order::whereIn('id', $request->order_ids)->get();
|
||||
foreach ($orders as $order) {
|
||||
if ($order->status === 'order_placed') {
|
||||
return back()->with(
|
||||
'error',
|
||||
"Order {$order->order_id} is not ready for shipment"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$total_ctn = $orders->sum('ctn');
|
||||
$total_qty = $orders->sum('qty');
|
||||
@@ -82,7 +96,7 @@ class ShipmentController extends Controller
|
||||
'shipment_id' => $newShipmentId,
|
||||
'origin' => $request->origin,
|
||||
'destination' => $request->destination,
|
||||
'status' => Shipment::STATUS_PENDING,
|
||||
'status' => Shipment::STATUS_SHIPMENT_READY,
|
||||
'shipment_date' => $request->shipment_date,
|
||||
|
||||
'total_ctn' => $total_ctn,
|
||||
@@ -141,23 +155,29 @@ class ShipmentController extends Controller
|
||||
'status' => 'required|string'
|
||||
]);
|
||||
|
||||
// 1) Update shipment status
|
||||
$shipment = Shipment::findOrFail($request->shipment_id);
|
||||
$shipment->status = $request->status;
|
||||
$shipment->save();
|
||||
|
||||
// 2) Update ALL related orders' status
|
||||
// ✅ Sync shipment status to orders ONLY after shipment exists
|
||||
foreach ($shipment->orders as $order) {
|
||||
$order->status = $shipment->status; // status is string: pending, in_transit, dispatched, delivered
|
||||
|
||||
// Prevent rollback or overwrite
|
||||
if ($order->status === 'delivered') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$order->status = $shipment->status;
|
||||
$order->save();
|
||||
}
|
||||
|
||||
return redirect()->back()->with(
|
||||
'success',
|
||||
"Shipment status updated to {$shipment->statusLabel()} and related orders updated."
|
||||
"Shipment status updated to {$shipment->statusLabel()}."
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update shipment details
|
||||
*/
|
||||
@@ -266,11 +286,23 @@ public function addOrders(Request $request, Shipment $shipment)
|
||||
'order_ids' => 'required|array|min:1',
|
||||
]);
|
||||
|
||||
// फक्त न वापरलेले orders घ्या
|
||||
$orders = Order::whereIn('id', $request->order_ids)->get();
|
||||
|
||||
foreach ($orders as $order) {
|
||||
// pivot मध्ये insert
|
||||
|
||||
if ($order->status === 'order_placed') {
|
||||
return back()->with(
|
||||
'error',
|
||||
"Order {$order->order_id} is not ready for shipment"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Prevent duplicates
|
||||
if (ShipmentItem::where('order_id', $order->id)->exists()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ShipmentItem::create([
|
||||
'shipment_id' => $shipment->id,
|
||||
'order_id' => $order->id,
|
||||
@@ -282,23 +314,25 @@ public function addOrders(Request $request, Shipment $shipment)
|
||||
]);
|
||||
}
|
||||
|
||||
// totals
|
||||
// Recalculate totals
|
||||
$orderIds = ShipmentItem::where('shipment_id', $shipment->id)->pluck('order_id');
|
||||
$allOrders = Order::whereIn('id', $orderIds)->get();
|
||||
|
||||
$shipment->total_ctn = $allOrders->sum('ctn');
|
||||
$shipment->total_qty = $allOrders->sum('qty');
|
||||
$shipment->total_ttl_qty = $allOrders->sum('ttl_qty');
|
||||
$shipment->total_cbm = $allOrders->sum('cbm');
|
||||
$shipment->total_ttl_cbm = $allOrders->sum('ttl_cbm');
|
||||
$shipment->total_kg = $allOrders->sum('kg');
|
||||
$shipment->total_ttl_kg = $allOrders->sum('ttl_kg');
|
||||
$shipment->total_amount = $allOrders->sum('ttl_amount');
|
||||
$shipment->save();
|
||||
$shipment->update([
|
||||
'total_ctn' => $allOrders->sum('ctn'),
|
||||
'total_qty' => $allOrders->sum('qty'),
|
||||
'total_ttl_qty' => $allOrders->sum('ttl_qty'),
|
||||
'total_cbm' => $allOrders->sum('cbm'),
|
||||
'total_ttl_cbm' => $allOrders->sum('ttl_cbm'),
|
||||
'total_kg' => $allOrders->sum('kg'),
|
||||
'total_ttl_kg' => $allOrders->sum('ttl_kg'),
|
||||
'total_amount' => $allOrders->sum('ttl_amount'),
|
||||
]);
|
||||
|
||||
return redirect()
|
||||
->route('admin.shipments.dummy', $shipment->id)
|
||||
->with('success', 'Orders added to shipment successfully.');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -289,6 +289,44 @@ public function invoiceDetails($invoice_id)
|
||||
]);
|
||||
}
|
||||
|
||||
public function confirmOrder($order_id)
|
||||
{
|
||||
$user = JWTAuth::parseToken()->authenticate();
|
||||
|
||||
if (! $user) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Unauthorized'
|
||||
], 401);
|
||||
}
|
||||
|
||||
$order = $user->orders()
|
||||
->where('order_id', $order_id)
|
||||
->first();
|
||||
|
||||
if (! $order) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Order not found'
|
||||
], 404);
|
||||
}
|
||||
|
||||
// 🚫 Only allow confirm from order_placed
|
||||
if ($order->status !== 'order_placed') {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Order cannot be confirmed'
|
||||
], 422);
|
||||
}
|
||||
|
||||
$order->status = 'order_confirmed';
|
||||
$order->save();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Order confirmed successfully'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -64,5 +64,25 @@ class Order extends Model
|
||||
}
|
||||
|
||||
|
||||
const STATUS_LABELS = [
|
||||
'order_placed' => 'Order Placed',
|
||||
'order_confirmed' => 'Order Confirmed',
|
||||
'supplier_warehouse' => 'Supplier Warehouse',
|
||||
'consolidate_warehouse'=> 'Consolidate Warehouse',
|
||||
'export_custom' => 'Export Custom',
|
||||
'international_transit'=> 'International Transit',
|
||||
'arrived_india' => 'Arrived at India',
|
||||
'import_custom' => 'Import Custom',
|
||||
'warehouse' => 'Warehouse',
|
||||
'domestic_distribution'=> 'Domestic Distribution',
|
||||
'out_for_delivery' => 'Out for Delivery',
|
||||
'delivered' => 'Delivered',
|
||||
];
|
||||
|
||||
public function getStatusLabelAttribute()
|
||||
{
|
||||
return self::STATUS_LABELS[$this->status]
|
||||
?? ucfirst(str_replace('_', ' ', $this->status));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,25 +45,6 @@ class Shipment extends Model
|
||||
return $this->belongsToMany(Order::class, 'shipment_items', 'shipment_id', 'order_id');
|
||||
}
|
||||
|
||||
// ---------------------------
|
||||
// STATUS CONSTANTS
|
||||
// ---------------------------
|
||||
|
||||
const STATUS_PENDING = 'pending';
|
||||
const STATUS_IN_TRANSIT = 'in_transit';
|
||||
const STATUS_DISPATCHED = 'dispatched';
|
||||
const STATUS_DELIVERED = 'delivered';
|
||||
|
||||
public static function statusOptions()
|
||||
{
|
||||
return [
|
||||
self::STATUS_PENDING => 'Pending',
|
||||
self::STATUS_IN_TRANSIT => 'In Transit',
|
||||
self::STATUS_DISPATCHED => 'Dispatched',
|
||||
self::STATUS_DELIVERED => 'Delivered',
|
||||
];
|
||||
}
|
||||
|
||||
// ---------------------------
|
||||
// HELPERS
|
||||
// ---------------------------
|
||||
@@ -73,8 +54,38 @@ class Shipment extends Model
|
||||
return $this->items()->count();
|
||||
}
|
||||
|
||||
// ---------------------------
|
||||
// STATUS CONSTANTS (LOGISTICS FLOW)
|
||||
// ---------------------------
|
||||
const STATUS_SHIPMENT_READY = 'shipment_ready';
|
||||
const STATUS_EXPORT_CUSTOM = 'export_custom';
|
||||
const STATUS_INTERNATIONAL_TRANSIT= 'international_transit';
|
||||
const STATUS_ARRIVED_INDIA = 'arrived_india';
|
||||
const STATUS_IMPORT_CUSTOM = 'import_custom';
|
||||
const STATUS_WAREHOUSE = 'warehouse';
|
||||
const STATUS_DOMESTIC_DISTRIBUTION= 'domestic_distribution';
|
||||
const STATUS_OUT_FOR_DELIVERY = 'out_for_delivery';
|
||||
const STATUS_DELIVERED = 'delivered';
|
||||
|
||||
public static function statusOptions()
|
||||
{
|
||||
return [
|
||||
self::STATUS_SHIPMENT_READY => 'Shipment Ready',
|
||||
self::STATUS_EXPORT_CUSTOM => 'Export Custom',
|
||||
self::STATUS_INTERNATIONAL_TRANSIT => 'International Transit',
|
||||
self::STATUS_ARRIVED_INDIA => 'Arrived at India',
|
||||
self::STATUS_IMPORT_CUSTOM => 'Import Custom',
|
||||
self::STATUS_WAREHOUSE => 'Warehouse',
|
||||
self::STATUS_DOMESTIC_DISTRIBUTION => 'Domestic Distribution',
|
||||
self::STATUS_OUT_FOR_DELIVERY => 'Out for Delivery',
|
||||
self::STATUS_DELIVERED => 'Delivered',
|
||||
];
|
||||
}
|
||||
|
||||
public function statusLabel()
|
||||
{
|
||||
return self::statusOptions()[$this->status] ?? ucfirst($this->status);
|
||||
return self::statusOptions()[$this->status]
|
||||
?? ucfirst(str_replace('_', ' ', $this->status));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1253,19 +1253,49 @@ body, .container-fluid {
|
||||
<td>{{ $order->kg }}</td>
|
||||
<td>{{ $order->ttl_kg }}</td>
|
||||
<td>
|
||||
<span class="badge badge-{{ $order->status }}">
|
||||
@if($order->status == 'pending')
|
||||
<i class="bi bi-clock-fill status-icon"></i>
|
||||
@elseif($order->status == 'in_transit')
|
||||
<i class="bi bi-truck status-icon"></i>
|
||||
@elseif($order->status == 'dispatched')
|
||||
<i class="bi bi-box-seam status-icon"></i>
|
||||
@elseif($order->status == 'delivered')
|
||||
<i class="bi bi-check-circle-fill status-icon"></i>
|
||||
@endif
|
||||
{{ ucfirst(str_replace('_', ' ', $order->status)) }}
|
||||
@php
|
||||
// Badge color mapping
|
||||
$badgeMap = [
|
||||
'order_placed' => 'secondary',
|
||||
'order_confirmed' => 'info',
|
||||
'supplier_warehouse' => 'warning',
|
||||
'consolidate_warehouse' => 'warning',
|
||||
'export_custom' => 'primary',
|
||||
'international_transit' => 'primary',
|
||||
'arrived_india' => 'info',
|
||||
'import_custom' => 'info',
|
||||
'warehouse' => 'dark',
|
||||
'domestic_distribution' => 'primary',
|
||||
'out_for_delivery' => 'success',
|
||||
'delivered' => 'success',
|
||||
];
|
||||
|
||||
// Icon mapping
|
||||
$iconMap = [
|
||||
'order_placed' => 'bi-clock-fill',
|
||||
'order_confirmed' => 'bi-check-circle',
|
||||
'supplier_warehouse' => 'bi-box-seam',
|
||||
'consolidate_warehouse' => 'bi-boxes',
|
||||
'export_custom' => 'bi-upload',
|
||||
'international_transit' => 'bi-truck',
|
||||
'arrived_india' => 'bi-geo-alt',
|
||||
'import_custom' => 'bi-download',
|
||||
'warehouse' => 'bi-building',
|
||||
'domestic_distribution' => 'bi-diagram-3',
|
||||
'out_for_delivery' => 'bi-truck-flatbed',
|
||||
'delivered' => 'bi-check-circle-fill',
|
||||
];
|
||||
|
||||
$badgeClass = $badgeMap[$order->status] ?? 'secondary';
|
||||
$iconClass = $iconMap[$order->status] ?? 'bi-info-circle';
|
||||
@endphp
|
||||
|
||||
<span class="badge bg-{{ $badgeClass }}">
|
||||
<i class="bi {{ $iconClass }} status-icon"></i>
|
||||
{{ $order->status_label }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>{{ $order->created_at->format('d-m-Y') }}</td>
|
||||
<td>
|
||||
<a href="{{ route('admin.orders.show', $order->id) }}" class="btn btn-sm btn-outline-primary">
|
||||
|
||||
@@ -1093,11 +1093,16 @@
|
||||
<div class="status-filter-container">
|
||||
<select id="statusFilter" class="status-filter-select">
|
||||
<option value="all">All Status</option>
|
||||
<option value="loading">Loading</option>
|
||||
<option value="pending">Pending</option>
|
||||
<option value="in_transit">In Transit</option>
|
||||
<option value="dispatched">Dispatched</option>
|
||||
<option value="shipment_ready">Shipment Ready</option>
|
||||
<option value="export_custom">Export Custom</option>
|
||||
<option value="international_transit">International Transit</option>
|
||||
<option value="arrived_india">Arrived at India</option>
|
||||
<option value="import_custom">Import Custom</option>
|
||||
<option value="warehouse">Warehouse</option>
|
||||
<option value="domestic_distribution">Domestic Distribution</option>
|
||||
<option value="out_for_delivery">Out for Delivery</option>
|
||||
<option value="delivered">Delivered</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<select id="carrierFilter">
|
||||
@@ -1293,26 +1298,42 @@
|
||||
<form action="{{ route('admin.shipments.updateStatus') }}" method="POST" class="status-form">
|
||||
@csrf
|
||||
<input type="hidden" name="shipment_id" value="{{ $ship->id }}">
|
||||
<button type="submit" name="status" value="loading" class="status-option loading">
|
||||
<span class="status-indicator loading"></span>
|
||||
Loading
|
||||
<button type="submit" name="status" value="shipment_ready" class="status-option shipment_ready">
|
||||
Shipment Ready
|
||||
</button>
|
||||
<button type="submit" name="status" value="pending" class="status-option pending">
|
||||
<span class="status-indicator pending"></span>
|
||||
Pending
|
||||
|
||||
<button type="submit" name="status" value="export_custom" class="status-option export_custom">
|
||||
Export Custom
|
||||
</button>
|
||||
<button type="submit" name="status" value="in_transit" class="status-option in_transit">
|
||||
<span class="status-indicator in_transit"></span>
|
||||
In Transit
|
||||
|
||||
<button type="submit" name="status" value="international_transit" class="status-option international_transit">
|
||||
International Transit
|
||||
</button>
|
||||
<button type="submit" name="status" value="dispatched" class="status-option dispatched">
|
||||
<span class="status-indicator dispatched"></span>
|
||||
Dispatched
|
||||
|
||||
<button type="submit" name="status" value="arrived_india" class="status-option arrived_india">
|
||||
Arrived at India
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="import_custom" class="status-option import_custom">
|
||||
Import Custom
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="warehouse" class="status-option warehouse">
|
||||
Warehouse
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="domestic_distribution" class="status-option domestic_distribution">
|
||||
Domestic Distribution
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="out_for_delivery" class="status-option out_for_delivery">
|
||||
Out for Delivery
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="delivered" class="status-option delivered">
|
||||
<span class="status-indicator delivered"></span>
|
||||
Delivered
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1717,29 +1738,58 @@ function renderTable() {
|
||||
|
||||
<td>
|
||||
<div class="action-container">
|
||||
<button type="button" class="btn-edit-status" onclick="toggleStatusDropdown(this, ${shipment.id})" title="Edit Status">
|
||||
<button type="button"
|
||||
class="btn-edit-status"
|
||||
onclick="toggleStatusDropdown(this, ${shipment.id})"
|
||||
title="Edit Status">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</button>
|
||||
|
||||
<div class="status-dropdown" id="statusDropdown-${shipment.id}">
|
||||
<form action="/admin/shipments/update-status" method="POST" class="status-form">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="shipment_id" value="${shipment.id}">
|
||||
<button type="submit" name="status" value="loading" class="status-option loading">
|
||||
<span class="status-indicator loading"></span>
|
||||
Loading
|
||||
|
||||
<button type="submit" name="status" value="shipment_ready" class="status-option shipment_ready">
|
||||
<span class="status-indicator shipment_ready"></span>
|
||||
Shipment Ready
|
||||
</button>
|
||||
<button type="submit" name="status" value="pending" class="status-option pending">
|
||||
<span class="status-indicator pending"></span>
|
||||
Pending
|
||||
|
||||
<button type="submit" name="status" value="export_custom" class="status-option export_custom">
|
||||
<span class="status-indicator export_custom"></span>
|
||||
Export Custom
|
||||
</button>
|
||||
<button type="submit" name="status" value="in_transit" class="status-option in_transit">
|
||||
<span class="status-indicator in_transit"></span>
|
||||
In Transit
|
||||
|
||||
<button type="submit" name="status" value="international_transit" class="status-option international_transit">
|
||||
<span class="status-indicator international_transit"></span>
|
||||
International Transit
|
||||
</button>
|
||||
<button type="submit" name="status" value="dispatched" class="status-option dispatched">
|
||||
<span class="status-indicator dispatched"></span>
|
||||
Dispatched
|
||||
|
||||
<button type="submit" name="status" value="arrived_india" class="status-option arrived_india">
|
||||
<span class="status-indicator arrived_india"></span>
|
||||
Arrived at India
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="import_custom" class="status-option import_custom">
|
||||
<span class="status-indicator import_custom"></span>
|
||||
Import Custom
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="warehouse" class="status-option warehouse">
|
||||
<span class="status-indicator warehouse"></span>
|
||||
Warehouse
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="domestic_distribution" class="status-option domestic_distribution">
|
||||
<span class="status-indicator domestic_distribution"></span>
|
||||
Domestic Distribution
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="out_for_delivery" class="status-option out_for_delivery">
|
||||
<span class="status-indicator out_for_delivery"></span>
|
||||
Out for Delivery
|
||||
</button>
|
||||
|
||||
<button type="submit" name="status" value="delivered" class="status-option delivered">
|
||||
<span class="status-indicator delivered"></span>
|
||||
Delivered
|
||||
@@ -1748,6 +1798,7 @@ function renderTable() {
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
`;
|
||||
tbody.appendChild(row);
|
||||
});
|
||||
|
||||
@@ -38,6 +38,7 @@ Route::middleware(['auth:api'])->group(function () {
|
||||
Route::get('/user/order/{order_id}/shipment', [UserOrderController::class, 'orderShipment']);
|
||||
Route::get('/user/order/{order_id}/invoice', [UserOrderController::class, 'orderInvoice']);
|
||||
Route::get('/user/order/{order_id}/track', [UserOrderController::class, 'trackOrder']);
|
||||
Route::post('/user/orders/{order_id}/confirm', [UserOrderController::class, 'confirmOrder']);
|
||||
|
||||
|
||||
// Invoice List
|
||||
|
||||
Reference in New Issue
Block a user