diff --git a/app/Http/Controllers/Admin/ShipmentController.php b/app/Http/Controllers/Admin/ShipmentController.php index d281059..0eab511 100644 --- a/app/Http/Controllers/Admin/ShipmentController.php +++ b/app/Http/Controllers/Admin/ShipmentController.php @@ -209,4 +209,20 @@ class ShipmentController extends Controller return redirect()->route('admin.shipments') ->with('success', 'Shipment deleted successfully.'); } + + public function dummy($id) + { + // Load shipment + $shipment = Shipment::with('orders')->findOrFail($id); + + // Dummy data (you can modify anytime) + $dummyData = [ + 'title' => 'Dummy Shipment Preview', + 'generated_on' => now()->format('d M Y h:i A'), + 'note' => 'This is dummy shipment information for testing page layout.' + ]; + + return view('admin.view_shipment', compact('shipment', 'dummyData')); + } + } \ No newline at end of file diff --git a/database/migrations/2025_12_08_044216_create_support_tickets_table.php b/database/migrations/2025_12_08_044216_create_support_tickets_table.php new file mode 100644 index 0000000..cb44083 --- /dev/null +++ b/database/migrations/2025_12_08_044216_create_support_tickets_table.php @@ -0,0 +1,32 @@ +id(); + $table->unsignedBigInteger('user_id'); // user who owns the chat + $table->string('status')->default('open'); // open / closed + $table->timestamps(); + + // foreign key constraint (optional but recommended) + $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('support_tickets'); + } +}; diff --git a/database/migrations/2025_12_08_044254_create_chat_messages_table.php b/database/migrations/2025_12_08_044254_create_chat_messages_table.php new file mode 100644 index 0000000..d37ded5 --- /dev/null +++ b/database/migrations/2025_12_08_044254_create_chat_messages_table.php @@ -0,0 +1,36 @@ +id(); + $table->unsignedBigInteger('ticket_id'); // support ticket ID + $table->unsignedBigInteger('sender_id'); // user or admin/staff + $table->text('message')->nullable(); // message content + $table->string('file_path')->nullable(); // image/pdf/video + $table->string('file_type')->default('text'); // text/image/pdf/video + $table->timestamps(); + + // foreign keys + $table->foreign('ticket_id')->references('id')->on('support_tickets')->onDelete('cascade'); + $table->foreign('sender_id')->references('id')->on('users')->onDelete('cascade'); // admin also stored in users table? If admin separate, change later. + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('chat_messages'); + } +}; diff --git a/resources/views/admin/shipments.blade.php b/resources/views/admin/shipments.blade.php index 24a2193..4fa2ad0 100644 --- a/resources/views/admin/shipments.blade.php +++ b/resources/views/admin/shipments.blade.php @@ -258,6 +258,14 @@ line-height: 1.2 !important; } + /* Loading Status - PROPER */ + .badge-loading { + background: linear-gradient(135deg, #e3f2fd, #90caf9) !important; + color: #1565c0 !important; + border-color: #2196f3 !important; + width: 110px; + } + /* Pending Status - SAME SIZE */ .badge-pending { background: linear-gradient(135deg, #fef3c7, #fde68a) !important; @@ -320,16 +328,9 @@ padding: 6px 12px !important; } - /* NEW: Action Button Styles */ - .action-container { - display: flex; - align-items: center; - justify-content: center; - gap: 8px; - } - - .btn-view-details { - background: linear-gradient(135deg, #10b981, #059669); + /* Eye Button Style - PROPER */ + .btn-eye { + background: linear-gradient(135deg, #4cc9f0, #4361ee); color: white; border: none; border-radius: 8px; @@ -341,14 +342,19 @@ justify-content: center; width: 36px; height: 36px; - text-decoration: none; + margin: 0 auto; + } + + .btn-eye:hover { + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(76, 201, 240, 0.3); + background: linear-gradient(135deg, #38bdf8, #3a56d4); } - .btn-view-details:hover { - transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); - background: linear-gradient(135deg, #059669, #047857); - color: white; + /* Action Button Styles */ + .action-container { + position: relative; + display: inline-block; } .btn-edit-status { @@ -393,6 +399,16 @@ display: flex; } + /* Loading Status Option - PROPER */ + .status-option.loading { + background: rgba(33, 150, 243, 0.1); + color: #2196f3; + } + + .status-option.loading:hover { + background: rgba(33, 150, 243, 0.2); + } + .status-option { padding: 10px 12px; border: none; @@ -455,6 +471,11 @@ border-radius: 50%; display: inline-block; } + + /* Loading Status Indicator - PROPER */ + .status-indicator.loading { + background: #2196f3; + } .status-indicator.pending { background: #f8961e; @@ -1108,15 +1129,13 @@ @endif - - -