Initial commit - Car Rental Management System
This commit is contained in:
commit
f72173377a
100 files changed
+15201
No files matched your search
@@ -0,0 +1,67 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Customers')
|
||||
|
||||
@section('content')
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<div>
|
||||
<h2 class="text-xl font-bold text-gray-800">Customers</h2>
|
||||
<p class="text-gray-500 text-sm">Manage your customers</p>
|
||||
</div>
|
||||
<a href="{{ route('customers.create') }}" class="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center gap-2 text-sm font-medium">
|
||||
<i class="fas fa-plus"></i> Add Customer
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
|
||||
<table class="w-full">
|
||||
<thead class="bg-gray-50 border-b border-gray-200">
|
||||
<tr>
|
||||
<th class="px-5 py-3 text-left text-xs font-semibold text-gray-600 uppercase">Name</th>
|
||||
<th class="px-5 py-3 text-left text-xs font-semibold text-gray-600 uppercase">Email</th>
|
||||
<th class="px-5 py-3 text-left text-xs font-semibold text-gray-600 uppercase">Phone</th>
|
||||
<th class="px-5 py-3 text-left text-xs font-semibold text-gray-600 uppercase">License</th>
|
||||
<th class="px-5 py-3 text-left text-xs font-semibold text-gray-600 uppercase">Status</th>
|
||||
<th class="px-5 py-3 text-left text-xs font-semibold text-gray-600 uppercase">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@forelse($customers as $customer)
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="px-5 py-4">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded-full bg-gray-200 flex items-center justify-center text-gray-600 font-semibold text-sm">
|
||||
{{ substr($customer->name, 0, 1) }}
|
||||
</div>
|
||||
<p class="font-medium text-gray-800">{{ $customer->name }}</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-4 text-gray-600 text-sm">{{ $customer->email }}</td>
|
||||
<td class="px-5 py-4 text-gray-600 text-sm">{{ $customer->phone }}</td>
|
||||
<td class="px-5 py-4 text-gray-600 text-sm">{{ $customer->license_number }}</td>
|
||||
<td class="px-5 py-4">
|
||||
<span class="px-2.5 py-1 rounded-full text-xs font-medium
|
||||
{{ $customer->status == 'active' ? 'bg-green-100 text-green-700' :
|
||||
($customer->status == 'inactive' ? 'bg-gray-100 text-gray-600' : 'bg-red-100 text-red-700') }}">
|
||||
{{ ucfirst($customer->status) }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-5 py-4">
|
||||
<a href="{{ route('customers.show', $customer) }}" class="text-blue-600 hover:text-blue-800 mr-3 text-sm"><i class="fas fa-eye"></i></a>
|
||||
<a href="{{ route('customers.edit', $customer) }}" class="text-gray-600 hover:text-gray-800 mr-3 text-sm"><i class="fas fa-edit"></i></a>
|
||||
<form action="{{ route('customers.destroy', $customer) }}" method="POST" class="inline">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="text-red-600 hover:text-red-800 text-sm" onclick="return confirm('Are you sure?')"><i class="fas fa-trash"></i></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="px-5 py-8 text-center text-gray-500">No customers yet</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in new issue
Block a user