diff --git a/app/Http/Controllers/Admin/AdminOrderController.php b/app/Http/Controllers/Admin/AdminOrderController.php index 15799d4..f10f1d6 100644 --- a/app/Http/Controllers/Admin/AdminOrderController.php +++ b/app/Http/Controllers/Admin/AdminOrderController.php @@ -164,46 +164,30 @@ class AdminOrderController extends Controller return redirect()->back()->with('success', 'Item deleted and totals updated.'); } - /** - * Restore soft-deleted item and recalc totals - */ - public function restoreItem($id) - { - $item = OrderItem::withTrashed()->findOrFail($id); - $order = Order::findOrFail($item->order_id); - - $item->restore(); - - // recalc totals - $this->recalcTotals($order); - - return redirect()->back()->with('success', 'Item restored and totals updated.'); - } // --------------------------- // ORDER CRUD: update / destroy // --------------------------- - public function update(Request $request, $id) + public function updateItem(Request $request, $id) { - $order = Order::findOrFail($id); + $item = OrderItem::findOrFail($id); - $data = $request->validate([ - 'mark_no' => 'required|string', - 'origin' => 'nullable|string', - 'destination' => 'nullable|string', + $item->update([ + 'description' => $request->description, + 'ctn' => $request->ctn, + 'qty' => $request->qty, + 'ttl_qty' => $request->ttl_qty, + 'unit' => $request->unit, + 'price' => $request->price, + 'ttl_amount' => $request->ttl_amount, + 'cbm' => $request->cbm, + 'ttl_cbm' => $request->ttl_cbm, + 'kg' => $request->kg, + 'ttl_kg' => $request->ttl_kg, + 'shop_no' => $request->shop_no, ]); - $order->update([ - 'mark_no' => $data['mark_no'], - 'origin' => $data['origin'] ?? null, - 'destination' => $data['destination'] ?? null, - ]); - - // optionally recalc totals (not necessary unless you change item-level fields here) - $this->recalcTotals($order); - - return redirect()->route('admin.orders.show', $order->id) - ->with('success', 'Order updated successfully.'); + return back()->with('success', 'Item updated successfully!'); } /** @@ -340,6 +324,10 @@ class AdminOrderController extends Controller return null; } + + // ------------------------------------------------------------------------- + // Popup function + // ------------------------------------------------------------------------- public function popup($id) { @@ -354,8 +342,27 @@ class AdminOrderController extends Controller return view('admin.popup', compact('order', 'user')); } + // ------------------------------------------------------------------------- + // Restore Item + // ------------------------------------------------------------------------- + public function restoreItem($id) + { + $item = OrderItem::onlyTrashed()->findOrFail($id); + $item->restore(); + if (request()->ajax()) { + return response()->json([ + 'status' => 'ok', + 'message' => 'Item restored.' + ]); + } + + return back()->belongsTo(Order::class)->with('success', 'Item restored successfully.'); + } + // ------------------------------------------------------------------------- + // Reset temp + // ------------------------------------------------------------------------- public function resetTemp() @@ -366,6 +373,11 @@ class AdminOrderController extends Controller ->with('success', 'Order reset successfully.'); } + // ------------------------------------------------------------------------- + // ORDER SHOW PAGE + // ------------------------------------------------------------------------- + + public function orderShow() { $orders = Order::with([ @@ -379,48 +391,55 @@ class AdminOrderController extends Controller return view('admin.orders', compact('orders')); } -public function downloadPdf(Request $request) -{ - $query = Order::with(['markList', 'invoice', 'shipments']); - - // Apply filters - if ($request->has('search') && $request->search) { - $search = $request->search; - $query->where(function($q) use ($search) { - $q->where('order_id', 'like', "%{$search}%") - ->orWhereHas('markList', function($q) use ($search) { - $q->where('company_name', 'like', "%{$search}%"); - }) - ->orWhereHas('invoice', function($q) use ($search) { - $q->where('invoice_number', 'like', "%{$search}%"); - }); - }); - } - - if ($request->has('status') && $request->status) { - $query->whereHas('invoice', function($q) use ($request) { - $q->where('status', $request->status); - }); - } - - if ($request->has('shipment') && $request->shipment) { - $query->whereHas('shipments', function($q) use ($request) { - $q->where('status', $request->shipment); - }); - } - - $orders = $query->get(); - - $pdf = PDF::loadView('admin.orders.pdf', compact('orders')); - return $pdf->download('orders-report-' . date('Y-m-d') . '.pdf'); -} + //==================================================== + // Download Pdf + //================================================= + public function downloadPdf(Request $request) + { + $query = Order::with(['markList', 'invoice', 'shipments']); + + // Apply filters + if ($request->has('search') && $request->search) { + $search = $request->search; + $query->where(function($q) use ($search) { + $q->where('order_id', 'like', "%{$search}%") + ->orWhereHas('markList', function($q) use ($search) { + $q->where('company_name', 'like', "%{$search}%"); + }) + ->orWhereHas('invoice', function($q) use ($search) { + $q->where('invoice_number', 'like', "%{$search}%"); + }); + }); + } + + if ($request->has('status') && $request->status) { + $query->whereHas('invoice', function($q) use ($request) { + $q->where('status', $request->status); + }); + } + + if ($request->has('shipment') && $request->shipment) { + $query->whereHas('shipments', function($q) use ($request) { + $q->where('status', $request->shipment); + }); + } + + $orders = $query->get(); + + $pdf = PDF::loadView('admin.orders.pdf', compact('orders')); + return $pdf->download('orders-report-' . date('Y-m-d') . '.pdf'); + } -public function downloadExcel(Request $request) -{ - return Excel::download(new OrdersExport($request), 'orders-report-' . date('Y-m-d') . '.xlsx'); -} + public function downloadExcel(Request $request) + { + return Excel::download(new OrdersExport($request), 'orders-report-' . date('Y-m-d') . '.xlsx'); + } -public function addTempItem(Request $request) + //==================================================== + // add Temp Item + //================================================= + + public function addTempItem(Request $request) { // Validate item fields $item = $request->validate([ @@ -468,81 +487,162 @@ public function addTempItem(Request $request) ->with('success', 'Item added.'); } -public function finishOrder(Request $request) - { - $request->validate([ - 'mark_no' => 'required', - 'origin' => 'required', - 'destination' => 'required', - ]); + + public function finishOrder(Request $request) +{ + $request->validate([ + 'mark_no' => 'required', + 'origin' => 'required', + 'destination' => 'required', + ]); - $items = session('temp_order_items', []); + $items = session('temp_order_items', []); - if (empty($items)) { - return redirect()->to(route('admin.orders.index') . '#createOrderForm') - ->with('error', 'Add at least one item before finishing.'); - } - - // Generate Order ID - $year = date('y'); - $prefix = "KNT-$year-"; - - $lastOrder = Order::latest('id')->first(); - $nextNumber = $lastOrder ? intval(substr($lastOrder->order_id, -8)) + 1 : 1; - - $orderId = $prefix . str_pad($nextNumber, 8, '0', STR_PAD_LEFT); - - // TOTAL SUMS - $total_ctn = array_sum(array_column($items, 'ctn')); - $total_qty = array_sum(array_column($items, 'qty')); - $total_ttl_qty = array_sum(array_column($items, 'ttl_qty')); - $total_amount = array_sum(array_column($items, 'ttl_amount')); - $total_cbm = array_sum(array_column($items, 'cbm')); - $total_ttl_cbm = array_sum(array_column($items, 'ttl_cbm')); - $total_kg = array_sum(array_column($items, 'kg')); - $total_ttl_kg = array_sum(array_column($items, 'ttl_kg')); - - // CREATE ORDER - $order = Order::create([ - 'order_id' => $orderId, - 'mark_no' => $request->mark_no, - 'origin' => $request->origin, - 'destination' => $request->destination, - 'ctn' => $total_ctn, - 'qty' => $total_qty, - 'ttl_qty' => $total_ttl_qty, - 'ttl_amount' => $total_amount, - 'cbm' => $total_cbm, - 'ttl_cbm' => $total_ttl_cbm, - 'kg' => $total_kg, - 'ttl_kg' => $total_ttl_kg, - 'status' => 'pending', - ]); - - // SAVE ALL SUB-ITEMS - foreach ($items as $item) { - OrderItem::create([ - 'order_id' => $order->id, - 'description' => $item['description'], - 'ctn' => $item['ctn'], - 'qty' => $item['qty'], - 'ttl_qty' => $item['ttl_qty'], - 'unit' => $item['unit'], - 'price' => $item['price'], - 'ttl_amount' => $item['ttl_amount'], - 'cbm' => $item['cbm'], - 'ttl_cbm' => $item['ttl_cbm'], - 'kg' => $item['kg'], - 'ttl_kg' => $item['ttl_kg'], - 'shop_no' => $item['shop_no'], - ]); - } - - // CLEAR TEMP DATA - session()->forget(['temp_order_items', 'mark_no', 'origin', 'destination']); - - return redirect()->route('admin.orders.index') - ->with('success', 'Order saved successfully.'); + if (empty($items)) { + return redirect()->to(route('admin.orders.index') . '#createOrderForm') + ->with('error', 'Add at least one item before finishing.'); } + // ======================= + // GENERATE ORDER ID + // ======================= + $year = date('y'); + $prefix = "KNT-$year-"; + + $lastOrder = Order::latest('id')->first(); + $nextNumber = $lastOrder ? intval(substr($lastOrder->order_id, -8)) + 1 : 1; + + $orderId = $prefix . str_pad($nextNumber, 8, '0', STR_PAD_LEFT); + + // ======================= + // TOTAL SUMS + // ======================= + $total_ctn = array_sum(array_column($items, 'ctn')); + $total_qty = array_sum(array_column($items, 'qty')); + $total_ttl_qty = array_sum(array_column($items, 'ttl_qty')); + $total_amount = array_sum(array_column($items, 'ttl_amount')); + $total_cbm = array_sum(array_column($items, 'cbm')); + $total_ttl_cbm = array_sum(array_column($items, 'ttl_cbm')); + $total_kg = array_sum(array_column($items, 'kg')); + $total_ttl_kg = array_sum(array_column($items, 'ttl_kg')); + + // ======================= + // CREATE ORDER + // ======================= + $order = Order::create([ + 'order_id' => $orderId, + 'mark_no' => $request->mark_no, + 'origin' => $request->origin, + 'destination' => $request->destination, + 'ctn' => $total_ctn, + 'qty' => $total_qty, + 'ttl_qty' => $total_ttl_qty, + 'ttl_amount' => $total_amount, + 'cbm' => $total_cbm, + 'ttl_cbm' => $total_ttl_cbm, + 'kg' => $total_kg, + 'ttl_kg' => $total_ttl_kg, + 'status' => 'pending', + ]); + + // SAVE ORDER ITEMS + foreach ($items as $item) { + OrderItem::create([ + 'order_id' => $order->id, + 'description' => $item['description'], + 'ctn' => $item['ctn'], + 'qty' => $item['qty'], + 'ttl_qty' => $item['ttl_qty'], + 'unit' => $item['unit'], + 'price' => $item['price'], + 'ttl_amount' => $item['ttl_amount'], + 'cbm' => $item['cbm'], + 'ttl_cbm' => $item['ttl_cbm'], + 'kg' => $item['kg'], + 'ttl_kg' => $item['ttl_kg'], + 'shop_no' => $item['shop_no'], + ]); + } + + // ======================= + // INVOICE CREATION START + // ======================= + + // 1. Auto-generate invoice number + $lastInvoice = \App\Models\Invoice::latest()->first(); + $nextInvoice = $lastInvoice ? $lastInvoice->id + 1 : 1; + $invoiceNumber = 'INV-' . date('Y') . '-' . str_pad($nextInvoice, 6, '0', STR_PAD_LEFT); + + // 2. Fetch customer (using mark list → customer_id) + $markList = MarkList::where('mark_no', $order->mark_no)->first(); + $customer = null; + + if ($markList && $markList->customer_id) { + $customer = \App\Models\User::where('customer_id', $markList->customer_id)->first(); + } + + // 3. Create Invoice Record + $invoice = \App\Models\Invoice::create([ + 'order_id' => $order->id, + 'customer_id' => $customer->id ?? null, + 'mark_no' => $order->mark_no, + + 'invoice_number' => $invoiceNumber, + 'invoice_date' => now(), + 'due_date' => now()->addDays(10), + + 'payment_method' => null, + 'reference_no' => null, + 'status' => 'pending', + + 'final_amount' => $total_amount, + 'gst_percent' => 0, + 'gst_amount' => 0, + 'final_amount_with_gst' => $total_amount, + + // snapshot customer fields + 'customer_name' => $customer->customer_name ?? null, + 'company_name' => $customer->company_name ?? null, + 'customer_email' => $customer->email ?? null, + 'customer_mobile' => $customer->mobile_no ?? null, + 'customer_address' => $customer->address ?? null, + 'pincode' => $customer->pincode ?? null, + + 'notes' => null, + ]); + + // 4. Clone order items into invoice_items + foreach ($order->items as $item) { + \App\Models\InvoiceItem::create([ + 'invoice_id' => $invoice->id, + 'description' => $item->description, + 'ctn' => $item->ctn, + 'qty' => $item->qty, + 'ttl_qty' => $item->ttl_qty, + 'unit' => $item->unit, + 'price' => $item->price, + 'ttl_amount' => $item->ttl_amount, + 'cbm' => $item->cbm, + 'ttl_cbm' => $item->ttl_cbm, + 'kg' => $item->kg, + 'ttl_kg' => $item->ttl_kg, + 'shop_no' => $item->shop_no, + ]); + } + + // 5. TODO: PDF generation (I will add this later) + $invoice->pdf_path = null; // placeholder for now + $invoice->save(); + + // ======================= + // END INVOICE CREATION + // ======================= + + // CLEAR TEMP DATA + session()->forget(['temp_order_items', 'mark_no', 'origin', 'destination']); + + return redirect()->route('admin.orders.index') + ->with('success', 'Order + Invoice created successfully.'); +} + } diff --git a/app/Http/Controllers/Admin/ShipmentController.php b/app/Http/Controllers/Admin/ShipmentController.php index d281059..a0f9428 100644 --- a/app/Http/Controllers/Admin/ShipmentController.php +++ b/app/Http/Controllers/Admin/ShipmentController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers\Admin; +use Illuminate\Support\Facades\DB; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Shipment; @@ -106,6 +107,9 @@ class ShipmentController extends Controller 'order_qty' => $order->qty, 'order_ttl_qty' => $order->ttl_qty, 'order_ttl_amount' => $order->ttl_amount, + 'order_cbm' => $order->cbm, + 'order_ttl_cbm' => $order->ttl_cbm, + 'order_kg' => $order->kg, 'order_ttl_kg' => $order->ttl_kg, ]); } @@ -113,24 +117,112 @@ class ShipmentController extends Controller return redirect()->back()->with('success', "Shipment $newShipmentId created successfully!"); } - /** - * Show shipment details (for modal popup) - */ + public function edit($id) + { + $shipment = Shipment::with('orders')->findOrFail($id); + + return view('admin.shipments.show', [ + 'shipment' => $shipment, + 'orders' => $shipment->orders, + 'isViewMode' => false // This is the edit mode + ]); + } + public function show($id) { - $shipment = Shipment::findOrFail($id); + $mode = request()->get('mode', 'view'); - // Load full order data from orders table - $orders = Order::whereIn('id', - ShipmentItem::where('shipment_id', $id)->pluck('order_id') - )->get(); + $shipment = Shipment::with(['items.order'])->findOrFail($id); - return response()->json([ + // Get orders from shipment items + $orders = collect(); + foreach ($shipment->items as $item) { + if ($item->order) { + $orders->push($item->order); + } + } + + // Get orders not assigned to any shipment (available orders) + $usedOrderIds = ShipmentItem::pluck('order_id')->toArray(); + $availableOrders = Order::whereNotIn('id', $usedOrderIds)->get(); + + return view('admin.view-shipment', [ 'shipment' => $shipment, - 'orders' => $orders + 'orders' => $orders, + 'mode' => $mode, + 'availableOrders' => $availableOrders ]); } + public function addOrders(Request $request, $id) + { + $request->validate([ + 'order_ids' => 'required|array|min:1' + ]); + + $shipment = Shipment::findOrFail($id); + $orderIds = $request->order_ids; + + DB::beginTransaction(); + + try { + $orders = Order::whereIn('id', $orderIds)->get(); + $addedOrders = []; + + foreach ($orders as $order) { + // Prevent duplicates + if (ShipmentItem::where('shipment_id', $shipment->id)->where('order_id', $order->id)->exists()) { + continue; + } + + ShipmentItem::create([ + 'shipment_id' => $shipment->id, + 'order_id' => $order->id, + 'order_ctn' => $order->ctn, + 'order_qty' => $order->qty, + 'order_ttl_qty' => $order->ttl_qty, + 'order_ttl_amount' => $order->ttl_amount, + 'order_cbm' => $order->cbm, + 'order_ttl_cbm' => $order->ttl_cbm, + 'order_kg' => $order->kg, + 'order_ttl_kg' => $order->ttl_kg, + ]); + + $addedOrders[] = $order; + } + + // Recalculate totals + $this->recalculateShipmentTotals($shipment->id); + + DB::commit(); + + $shipment->refresh(); + $shipment->load('items.order'); + + // Get updated orders list + $updatedOrders = collect(); + foreach ($shipment->items as $item) { + if ($item->order) { + $updatedOrders->push($item->order); + } + } + + return response()->json([ + 'success' => true, + 'message' => 'Orders added to shipment successfully.', + 'shipment' => $shipment, + 'orders' => $addedOrders + ]); + + } catch (\Exception $e) { + DB::rollBack(); + return response()->json([ + 'success' => false, + 'message' => 'Failed to add orders: ' . $e->getMessage() + ], 500); + } + } + /** * Update Shipment status from action button */ @@ -209,4 +301,77 @@ class ShipmentController extends Controller return redirect()->route('admin.shipments') ->with('success', 'Shipment deleted successfully.'); } + + public function removeOrder(Request $request) + { + $request->validate([ + 'shipment_id' => 'required|exists:shipments,id', + 'order_id' => 'required|exists:orders,id' + ]); + + $shipmentId = $request->shipment_id; + $orderId = $request->order_id; + + // Get order data before deletion + $order = Order::findOrFail($orderId); + + // Delete pivot entry + ShipmentItem::where('shipment_id', $shipmentId) + ->where('order_id', $orderId) + ->delete(); + + // Recalculate totals + $shipment = $this->recalculateShipmentTotals($shipmentId); + + if ($request->ajax() || $request->wantsJson()) { + return response()->json([ + 'success' => true, + 'message' => 'Order removed successfully.', + 'order' => $order, + 'shipment' => $shipment + ]); + } + + return back()->with('success', 'Order removed successfully.'); + } + + private function recalculateShipmentTotals($shipmentId) + { + $shipment = Shipment::with('items')->findOrFail($shipmentId); + + // Use the shipment items to calculate totals + $shipment->total_ctn = $shipment->items->sum('order_ctn'); + $shipment->total_qty = $shipment->items->sum('order_qty'); + $shipment->total_ttl_qty = $shipment->items->sum('order_ttl_qty'); + $shipment->total_amount = $shipment->items->sum('order_ttl_amount'); + $shipment->total_cbm = $shipment->items->sum('order_cbm'); + $shipment->total_ttl_cbm = $shipment->items->sum('order_ttl_cbm'); + $shipment->total_kg = $shipment->items->sum('order_kg'); + $shipment->total_ttl_kg = $shipment->items->sum('order_ttl_kg'); + + $shipment->save(); + $shipment->refresh(); // Refresh to get updated data + + return $shipment; + } + + // Helper method to get available orders for a shipment + public function getAvailableOrders($shipmentId) + { + $shipment = Shipment::findOrFail($shipmentId); + + // Get all used order IDs + $usedOrderIds = ShipmentItem::pluck('order_id')->toArray(); + + // Remove orders that are already in this shipment + $shipmentOrderIds = $shipment->items->pluck('order_id')->toArray(); + $availableOrderIds = array_diff($usedOrderIds, $shipmentOrderIds); + + $availableOrders = Order::whereNotIn('id', $availableOrderIds)->get(); + + return response()->json([ + 'success' => true, + 'availableOrders' => $availableOrders + ]); + } } \ No newline at end of file diff --git a/app/Models/ShipmentItem.php b/app/Models/ShipmentItem.php index e004fd1..91c0062 100644 --- a/app/Models/ShipmentItem.php +++ b/app/Models/ShipmentItem.php @@ -11,12 +11,27 @@ class ShipmentItem extends Model protected $fillable = [ 'shipment_id', - 'order_id', - 'order_ctn', - 'order_qty', - 'order_ttl_qty', - 'order_ttl_amount', - 'order_ttl_kg', + 'order_id', + + // OLD fields (keep them if old data exists) + 'order_ctn', + 'order_qty', + 'order_ttl_qty', + 'order_ttl_amount', + 'order_ttl_kg', + + // NEW fields (added for correct shipments) + 'ctn', + 'qty', + 'ttl_qty', + + 'cbm', + 'ttl_cbm', + + 'kg', + 'ttl_kg', + + 'ttl_amount', ]; // --------------------------- @@ -36,11 +51,11 @@ class ShipmentItem extends Model // Helper: return order data with fallback to snapshot public function getDisplayQty() { - return $this->order->qty ?? $this->order_qty; + return $this->qty; } public function getDisplayAmount() { - return $this->order->ttl_amount ?? $this->order_ttl_amount; + return $this->ttl_amount; } } diff --git a/composer.json b/composer.json index ebdc485..1545c24 100644 --- a/composer.json +++ b/composer.json @@ -7,8 +7,10 @@ "license": "MIT", "require": { "php": "^8.2", + "barryvdh/laravel-dompdf": "^3.1", "laravel/framework": "^12.0", "laravel/tinker": "^2.10.1", + "maatwebsite/excel": "^1.1", "mpdf/mpdf": "^8.2", "php-open-source-saver/jwt-auth": "2.8" }, diff --git a/composer.lock b/composer.lock index 09ddabd..e565c15 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,85 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fa680e1e8b3550d710849bbd820e3626", + "content-hash": "6a2ec43d7e96d38cacfc2f9e1ae5cb9e", "packages": [ + { + "name": "barryvdh/laravel-dompdf", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-dompdf.git", + "reference": "8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d", + "reference": "8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d", + "shasum": "" + }, + "require": { + "dompdf/dompdf": "^3.0", + "illuminate/support": "^9|^10|^11|^12", + "php": "^8.1" + }, + "require-dev": { + "larastan/larastan": "^2.7|^3.0", + "orchestra/testbench": "^7|^8|^9|^10", + "phpro/grumphp": "^2.5", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "PDF": "Barryvdh\\DomPDF\\Facade\\Pdf", + "Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf" + }, + "providers": [ + "Barryvdh\\DomPDF\\ServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\DomPDF\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "A DOMPDF Wrapper for Laravel", + "keywords": [ + "dompdf", + "laravel", + "pdf" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-dompdf/issues", + "source": "https://github.com/barryvdh/laravel-dompdf/tree/v3.1.1" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2025-02-13T15:07:54+00:00" + }, { "name": "brick/math", "version": "0.14.0", @@ -377,6 +454,161 @@ ], "time": "2024-02-05T11:56:58+00:00" }, + { + "name": "dompdf/dompdf", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/dompdf/dompdf.git", + "reference": "db712c90c5b9868df3600e64e68da62e78a34623" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/db712c90c5b9868df3600e64e68da62e78a34623", + "reference": "db712c90c5b9868df3600e64e68da62e78a34623", + "shasum": "" + }, + "require": { + "dompdf/php-font-lib": "^1.0.0", + "dompdf/php-svg-lib": "^1.0.0", + "ext-dom": "*", + "ext-mbstring": "*", + "masterminds/html5": "^2.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "ext-gd": "*", + "ext-json": "*", + "ext-zip": "*", + "mockery/mockery": "^1.3", + "phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^4.4 || ^5.4 || ^6.2 || ^7.0" + }, + "suggest": { + "ext-gd": "Needed to process images", + "ext-gmagick": "Improves image processing performance", + "ext-imagick": "Improves image processing performance", + "ext-zlib": "Needed for pdf stream compression" + }, + "type": "library", + "autoload": { + "psr-4": { + "Dompdf\\": "src/" + }, + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "The Dompdf Community", + "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md" + } + ], + "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", + "homepage": "https://github.com/dompdf/dompdf", + "support": { + "issues": "https://github.com/dompdf/dompdf/issues", + "source": "https://github.com/dompdf/dompdf/tree/v3.1.4" + }, + "time": "2025-10-29T12:43:30+00:00" + }, + { + "name": "dompdf/php-font-lib", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/dompdf/php-font-lib.git", + "reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d", + "reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "FontLib\\": "src/FontLib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "The FontLib Community", + "homepage": "https://github.com/dompdf/php-font-lib/blob/master/AUTHORS.md" + } + ], + "description": "A library to read, parse, export and make subsets of different types of font files.", + "homepage": "https://github.com/dompdf/php-font-lib", + "support": { + "issues": "https://github.com/dompdf/php-font-lib/issues", + "source": "https://github.com/dompdf/php-font-lib/tree/1.0.1" + }, + "time": "2024-12-02T14:37:59+00:00" + }, + { + "name": "dompdf/php-svg-lib", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/dompdf/php-svg-lib.git", + "reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/eb045e518185298eb6ff8d80d0d0c6b17aecd9af", + "reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^8.0", + "sabberworm/php-css-parser": "^8.4" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Svg\\": "src/Svg" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "The SvgLib Community", + "homepage": "https://github.com/dompdf/php-svg-lib/blob/master/AUTHORS.md" + } + ], + "description": "A library to read, parse and export to PDF SVG files.", + "homepage": "https://github.com/dompdf/php-svg-lib", + "support": { + "issues": "https://github.com/dompdf/php-svg-lib/issues", + "source": "https://github.com/dompdf/php-svg-lib/tree/1.0.0" + }, + "time": "2024-04-29T13:26:35+00:00" + }, { "name": "dragonmantank/cron-expression", "version": "v3.6.0", @@ -2081,6 +2313,132 @@ ], "time": "2024-12-08T08:18:47+00:00" }, + { + "name": "maatwebsite/excel", + "version": "v1.1.5", + "source": { + "type": "git", + "url": "https://github.com/Maatwebsite/Laravel-Excel.git", + "reference": "0c67aba8387726458d42461eae91a3415593bbc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/0c67aba8387726458d42461eae91a3415593bbc4", + "reference": "0c67aba8387726458d42461eae91a3415593bbc4", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "phpoffice/phpexcel": "~1.8.0" + }, + "require-dev": { + "mockery/mockery": "~0.9", + "orchestra/testbench": "~2.2.0@dev", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Maatwebsite\\Excel\\": "src/" + }, + "classmap": [ + "src/Maatwebsite/Excel", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Maatwebsite.nl", + "email": "patrick@maatwebsite.nl" + } + ], + "description": "An eloquent way of importing and exporting Excel and CSV in Laravel 4 with the power of PHPExcel", + "keywords": [ + "PHPExcel", + "batch", + "csv", + "excel", + "export", + "import", + "laravel" + ], + "support": { + "issues": "https://github.com/Maatwebsite/Laravel-Excel/issues", + "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/master" + }, + "time": "2014-07-10T09:06:07+00:00" + }, + { + "name": "masterminds/html5", + "version": "2.10.0", + "source": { + "type": "git", + "url": "https://github.com/Masterminds/html5-php.git", + "reference": "fcf91eb64359852f00d921887b219479b4f21251" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/fcf91eb64359852f00d921887b219479b4f21251", + "reference": "fcf91eb64359852f00d921887b219479b4f21251", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Masterminds\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Butcher", + "email": "technosophos@gmail.com" + }, + { + "name": "Matt Farina", + "email": "matt@mattfarina.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "An HTML5 parser and serializer.", + "homepage": "http://masterminds.github.io/html5-php", + "keywords": [ + "HTML5", + "dom", + "html", + "parser", + "querypath", + "serializer", + "xml" + ], + "support": { + "issues": "https://github.com/Masterminds/html5-php/issues", + "source": "https://github.com/Masterminds/html5-php/tree/2.10.0" + }, + "time": "2025-07-25T09:04:22+00:00" + }, { "name": "monolog/monolog", "version": "3.9.0", @@ -3034,6 +3392,68 @@ }, "time": "2025-02-10T21:11:16+00:00" }, + { + "name": "phpoffice/phpexcel", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PHPExcel.git", + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/372c7cbb695a6f6f1e62649381aeaa37e7e70b32", + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "ext-xmlwriter": "*", + "php": ">=5.2.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "PHPExcel": "Classes/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker" + }, + { + "name": "Franck Lefevre", + "homepage": "http://blog.rootslabs.net" + }, + { + "name": "Erik Tilt" + } + ], + "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "http://phpexcel.codeplex.com", + "keywords": [ + "OpenXML", + "excel", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PHPExcel/issues", + "source": "https://github.com/PHPOffice/PHPExcel/tree/master" + }, + "abandoned": "phpoffice/phpspreadsheet", + "time": "2015-05-01T07:00:55+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.4", @@ -3798,6 +4218,72 @@ }, "time": "2025-09-04T20:59:21+00:00" }, + { + "name": "sabberworm/php-css-parser", + "version": "v8.9.0", + "source": { + "type": "git", + "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git", + "reference": "d8e916507b88e389e26d4ab03c904a082aa66bb9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/d8e916507b88e389e26d4ab03c904a082aa66bb9", + "reference": "d8e916507b88e389e26d4ab03c904a082aa66bb9", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": "^5.6.20 || ^7.0.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.41", + "rawr/cross-data-providers": "^2.0.0" + }, + "suggest": { + "ext-mbstring": "for parsing UTF-8 CSS" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sabberworm\\CSS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Schweikert" + }, + { + "name": "Oliver Klee", + "email": "github@oliverklee.de" + }, + { + "name": "Jake Hotson", + "email": "jake.github@qzdesign.co.uk" + } + ], + "description": "Parser for CSS Files written in PHP", + "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "support": { + "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues", + "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.9.0" + }, + "time": "2025-07-11T13:20:48+00:00" + }, { "name": "setasign/fpdi", "version": "v2.6.4", diff --git a/database/migrations/2025_12_02_125520_update_shipment_items_table.php b/database/migrations/2025_12_02_125520_update_shipment_items_table.php new file mode 100644 index 0000000..d0ffb4a --- /dev/null +++ b/database/migrations/2025_12_02_125520_update_shipment_items_table.php @@ -0,0 +1,70 @@ +integer('ctn')->default(0); + } + + if (!Schema::hasColumn('shipment_items', 'qty')) { + $table->integer('qty')->default(0); + } + + if (!Schema::hasColumn('shipment_items', 'ttl_qty')) { + $table->integer('ttl_qty')->default(0); + } + + if (!Schema::hasColumn('shipment_items', 'cbm')) { + $table->double('cbm')->default(0); + } + + if (!Schema::hasColumn('shipment_items', 'ttl_cbm')) { + $table->double('ttl_cbm')->default(0); + } + + if (!Schema::hasColumn('shipment_items', 'kg')) { + $table->double('kg')->default(0); + } + + if (!Schema::hasColumn('shipment_items', 'ttl_kg')) { + $table->double('ttl_kg')->default(0); + } + + if (!Schema::hasColumn('shipment_items', 'ttl_amount')) { + $table->double('ttl_amount')->default(0); + } + + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('shipment_items', function (Blueprint $table) { + // safely remove columns (optional) + $columns = [ + 'ctn', 'qty', 'ttl_qty', 'cbm', + 'ttl_cbm', 'kg', 'ttl_kg', 'ttl_amount' + ]; + + foreach ($columns as $col) { + if (Schema::hasColumn('shipment_items', $col)) { + $table->dropColumn($col); + } + } + }); + } +}; diff --git a/public/invoices/invoice-INV-2025-000017.pdf b/public/invoices/invoice-INV-2025-000017.pdf index 1c25516..ea85217 100644 Binary files a/public/invoices/invoice-INV-2025-000017.pdf and b/public/invoices/invoice-INV-2025-000017.pdf differ diff --git a/public/invoices/invoice-INV-2025-000028.pdf b/public/invoices/invoice-INV-2025-000028.pdf new file mode 100644 index 0000000..2778e4d Binary files /dev/null and b/public/invoices/invoice-INV-2025-000028.pdf differ diff --git a/public/invoices/invoice-INV-2025-000029.pdf b/public/invoices/invoice-INV-2025-000029.pdf new file mode 100644 index 0000000..f5a8e87 Binary files /dev/null and b/public/invoices/invoice-INV-2025-000029.pdf differ diff --git a/public/invoices/invoice-INV-2025-000030.pdf b/public/invoices/invoice-INV-2025-000030.pdf new file mode 100644 index 0000000..fa4b527 Binary files /dev/null and b/public/invoices/invoice-INV-2025-000030.pdf differ diff --git a/public/invoices/invoice-INV-2025-000032.pdf b/public/invoices/invoice-INV-2025-000032.pdf new file mode 100644 index 0000000..7ffbb92 Binary files /dev/null and b/public/invoices/invoice-INV-2025-000032.pdf differ diff --git a/resources/views/admin/orders_show.blade.php b/resources/views/admin/orders_show.blade.php index 2810649..e7780e6 100644 --- a/resources/views/admin/orders_show.blade.php +++ b/resources/views/admin/orders_show.blade.php @@ -15,27 +15,30 @@

Order Details

Detailed view of this shipment order - - - - {{-- ACTION BUTTONS --}} -
{{-- ADD ITEM --}} - {{-- EDIT ORDER --}} - @if($order->status === 'pending') + +
+ + + - {{-- DELETE ORDER --}} + - +
@@ -56,7 +59,7 @@ + + + {{-- AUTO-FILL SCRIPT --}} @@ -404,13 +603,15 @@ function fillFormFromDeleted(item) { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; color: white; - padding: 12px 24px; + padding: 6px 14px; border-radius: 10px; font-weight: 600; + font-size: 0.85rem; transition: all 0.3s ease; box-shadow: 0 4px 15px 0 rgba(102, 126, 234, 0.3); position: relative; overflow: hidden; + margin-right: -800px; } .btn-add-item:hover { diff --git a/resources/views/admin/shipments.blade.php b/resources/views/admin/shipments.blade.php index 4092ae7..e9371eb 100644 --- a/resources/views/admin/shipments.blade.php +++ b/resources/views/admin/shipments.blade.php @@ -70,7 +70,7 @@ --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } - /* Search Bar Styles */ + /* UPDATED: Search Bar Styles - White Background */ .search-shipment-bar { display: flex; align-items: center; @@ -121,6 +121,7 @@ color: #6b7280; } + /* UPDATED: Search Button - White with Blue Icon by default, Gradient on hover */ .search-button { background: white; color: #4361ee; @@ -141,12 +142,11 @@ } .search-input-group { - border: 1px solid #d1d5db !important; - border-radius: 8px !important; - padding: 4px !important; - background: #ffffff !important; - } - + border: 1px solid #d1d5db !important; + border-radius: 8px !important; + padding: 4px !important; + background: #ffffff !important; +} .search-button:hover { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; @@ -220,7 +220,27 @@ width: 100%; } } - + /* VIEW BUTTON STYLING */ + .btn-view { + background: linear-gradient(135deg, #4cc9f0, #4361ee) !important; + border: none !important; + border-radius: 10px !important; + padding: 8px 14px !important; + color: white !important; + box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35) !important; + transition: all 0.3s ease !important; + } + + .btn-view:hover { + transform: translateY(-2px) scale(1.05) !important; + background: linear-gradient(135deg, #3a56d4, #4cc9f0) !important; + box-shadow: 0 8px 20px rgba(67, 97, 238, 0.5) !important; + } + + .btn-view i { + font-size: 16px !important; + } + /* Card Styles */ .card { border: none; @@ -319,8 +339,8 @@ .table tbody tr:last-child td { border-bottom: none; } - - /* Status Badge Styles */ + + /* UPDATED: Status Badge Styles - ALL SAME SIZE WITH ICONS */ .badge { padding: 7px 17px !important; border-radius: 20px !important; @@ -346,34 +366,55 @@ justify-content: center; } - /* Pending Status */ + /* Pending Status - SAME SIZE WITH CLOCK ICON */ .badge-pending { background: linear-gradient(135deg, #fef3c7, #fde68a) !important; color: #d97706 !important; border-color: #f59e0b !important; } - /* In Transit Status */ + /* In Transit Status - SAME SIZE WITH TRUCK ICON */ .badge-in_transit { background: linear-gradient(135deg, #dbeafe, #93c5fd) !important; color: #1e40af !important; border-color: #3b82f6 !important; } - /* Dispatched Status */ + /* Dispatched Status - SAME SIZE WITH BOX ICON */ .badge-dispatched { background: linear-gradient(135deg, #e9d5ff, #c4b5fd) !important; color: #6b21a8 !important; border-color: #8b5cf6 !important; } - /* Delivered Status */ + /* Delivered Status - SAME SIZE WITH CHECK ICON */ .badge-delivered { background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important; color: #065f46 !important; border-color: #10b981 !important; } + /* Default badge styles - SAME SIZE */ + .badge.bg-info { + background: linear-gradient(135deg, #4cc9f0, #4361ee) !important; + color: white !important; + } + + .badge.bg-success { + background: linear-gradient(135deg, #4ade80, #22c55e) !important; + color: white !important; + } + + .badge.bg-warning { + background: linear-gradient(135deg, #fbbf24, #f59e0b) !important; + color: white !important; + } + + .badge.bg-danger { + background: linear-gradient(135deg, #f87171, #ef4444) !important; + color: white !important; + } + /* Light badges for quantity, kg, cbm */ .badge.bg-light { background: #f8f9fa !important; @@ -386,7 +427,7 @@ width: auto; } - /* Action Button Styles */ + /* NEW: Action Button Styles */ .action-container { position: relative; display: inline-block; @@ -516,7 +557,7 @@ background: #10b981; } - /* View Button Styles */ + /* NEW: View Button Styles - Icon Only */ .btn-view { background: #4361ee; color: white; @@ -655,6 +696,39 @@ color: #a0aec0; } + /* Date Input Styling */ + input[type="date"] { + position: relative; + } + + input[type="date"]::-webkit-calendar-picker-indicator { + background: transparent; + bottom: 0; + color: transparent; + cursor: pointer; + height: auto; + left: 0; + position: absolute; + right: 0; + top: 0; + width: auto; + } + + input[type="date"] { + position: relative; + padding-right: 40px; + } + + input[type="date"]:after { + content: "📅"; + position: absolute; + right: 12px; + top: 50%; + transform: translateY(-50%); + pointer-events: none; + font-size: 16px; + } + /* Button Styles */ .btn-cancel { background: #f7fafc; @@ -765,7 +839,42 @@ border-bottom-right-radius: 10px; } - /* Shipment Details Modal */ + /* Checkbox Styling */ + input[type="checkbox"] { + width: 20px; + height: 20px; + border-radius: 6px; + border: 2px solid #cbd5e0; + cursor: pointer; + position: relative; + transition: all 0.2s ease; + background: #f7fafc; + } + + input[type="checkbox"]:checked { + background: var(--primary); + border-color: var(--primary); + } + + /* Link Styling */ + a.text-primary { + color: var(--primary) !important; + text-decoration: none; + font-weight: 600; + transition: all 0.3s ease; + position: relative; + color: #4361ee !important; + font-family: 'Inter', sans-serif; + font-size: 14px; + cursor: pointer; + } + + a.text-primary:hover { + color: var(--primary-dark) !important; + text-decoration: underline; + } + + /* Shipment Details Modal - UPDATED TO MATCH SECOND CODE */ .shipment-details-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; @@ -865,32 +974,7 @@ border-bottom-right-radius: 10px; } - /* Delete Button for Orders */ - .btn-delete-order { - background: linear-gradient(135deg, #f87171, #ef4444); - color: white; - border: none; - border-radius: 6px; - padding: 6px 12px; - cursor: pointer; - transition: all 0.3s ease; - font-size: 12px; - font-weight: 600; - font-family: 'Inter', sans-serif; - display: flex; - align-items: center; - gap: 4px; - min-width: 80px; - justify-content: center; - } - - .btn-delete-order:hover { - background: linear-gradient(135deg, #ef4444, #dc2626); - transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); - } - - /* Shipment Totals Section */ + /* Shipment Totals Section - UPDATED */ .shipment-totals { margin-top: 25px; padding: 25px; @@ -1021,7 +1105,20 @@ padding-right: 40px !important; } - /* Pagination Styles */ + /* Shipment row styling for filtering */ + .shipment-row { + transition: all 0.3s ease; + } + + .shipment-row.hidden { + display: none !important; + } + + .shipment-row.visible { + display: table-row; + } + + /* ---------- Pagination Styles (Same as Account Dashboard) ---------- */ .pagination-container { display: flex; justify-content: space-between; @@ -1117,6 +1214,7 @@ font-family: 'Inter', sans-serif; } + /* Image-based pagination buttons */ .pagination-img-btn { background: #fff; border: 1px solid #e3eaf6; @@ -1170,43 +1268,47 @@ } } - /* Delete Confirmation Modal */ - .delete-confirmation-modal .modal-header { - background: linear-gradient(135deg, #ef4444, #dc2626); + /* Edit Form Styles */ + .edit-shipment-form { + background: #f8fafc; + padding: 25px; + border-radius: 12px; + margin-bottom: 20px; + border-left: 4px solid #4361ee; } - .delete-confirmation-modal .btn-confirm-delete { - background: linear-gradient(135deg, #ef4444, #dc2626); + .btn-save { + background: linear-gradient(135deg, #48bb78, #38a169); color: white; - border: none; + font-weight: 600; border-radius: 8px; padding: 10px 20px; - font-weight: 600; + border: none; transition: all 0.3s ease; } - .delete-confirmation-modal .btn-confirm-delete:hover { - background: linear-gradient(135deg, #dc2626, #b91c1c); + .btn-save:hover { transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); + box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3); } - .delete-confirmation-modal .btn-cancel-delete { + .btn-cancel-edit { background: #f7fafc; color: #718096; border: 1px solid #cbd5e0; border-radius: 8px; - padding: 10px 20px; font-weight: 600; + padding: 10px 20px; transition: all 0.3s ease; } - .delete-confirmation-modal .btn-cancel-delete:hover { + .btn-cancel-edit:hover { background: #edf2f7; color: #4a5568; } +
{{-- SUCCESS / ERROR MESSAGES --}} @@ -1226,27 +1328,12 @@
@endif - + + +
-
-
- - -
-
- + 🔍 +
+
- + + +