Files
Kent-logistics-Laravel/resources/views/admin/mark_list.blade.php
Utkarsh Khedkar 195f1bff16 my updates
2025-11-11 14:51:35 +05:30

258 lines
6.9 KiB
PHP

@extends('admin.layouts.app')
@section('page-title', 'Mark List')
@section('content')
<div class="card shadow-sm rounded-4 border-0 animate-card">
<div class="card-body">
<h4 class="mb-3 fw-bold text-dark">Mark List Management</h4>
<style>
/* ✨ Attractive Interactive Design without color change */
.animate-card {
animation: fadeInUp 0.8s ease;
}
@keyframes fadeInUp {
0% {
transform: translateY(20px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
.thead-orange th {
background-color: #fde4b3 !important;
font-weight: 600;
text-align: left;
padding: 10px 14px !important;
border-bottom: 2px solid #f3d38b;
color: #222;
vertical-align: middle;
transition: all 0.3s ease-in-out;
}
.thead-orange th:hover {
background-color: #ffe6a8 !important;
transform: translateY(-2px);
}
.card {
border-radius: 1rem;
overflow: hidden;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1) !important;
transition: all 0.3s ease;
}
.card:hover {
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
transform: scale(1.01);
}
.table {
background: #fff;
border-radius: 1rem;
overflow: hidden;
font-size: 0.95rem;
}
.table-hover tbody tr {
transition: all 0.25s ease;
}
.table-hover tbody tr:hover {
background-color: #fff9e6 !important;
cursor: pointer;
transform: scale(1.005);
}
.table-bordered td, .table-bordered th {
border: 1px solid #eaeaea !important;
}
.table tbody td {
padding: 12px 18px !important;
color: #414a58;
vertical-align: middle;
transition: all 0.2s ease;
}
.badge {
padding: 7px 16px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 600;
user-select: none;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.bg-success {
background-color: #28a745 !important;
color: #fff !important;
box-shadow: 0 0 10px #6ee86e77;
animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
0% { box-shadow: 0 0 8px #6ee86e77; }
50% { box-shadow: 0 0 14px #5dd75d88; }
100% { box-shadow: 0 0 8px #6ee86e77; }
}
.bg-danger {
background-color: #dc3545 !important;
color: #fff !important;
box-shadow: 0 0 10px #f97f7f77;
animation: pulseRed 2s infinite;
}
@keyframes pulseRed {
0% { box-shadow: 0 0 8px #f97f7f77; }
50% { box-shadow: 0 0 14px #ff868677; }
100% { box-shadow: 0 0 8px #f97f7f77; }
}
.btn-action {
background-color: #ffd283;
border: none;
color: #1b1c21;
padding: 7px 20px;
font-size: 0.95rem;
border-radius: 8px;
font-weight: 700;
transition: all 0.25s ease;
margin: 3px;
cursor: pointer;
box-shadow: 0 2px 6px rgba(141, 106, 0, 0.1);
display: inline-block;
}
.btn-action:hover {
background-color: #ffc85a;
transform: translateY(-2px);
box-shadow: 0 4px 10px rgba(141, 106, 0, 0.25);
}
.text-muted {
color: #888 !important;
font-style: italic;
}
.search-container {
position: relative;
max-width: 380px;
margin-bottom: 28px;
}
.search-container input {
width: 100%;
padding: 10px 14px 10px 40px;
border-radius: 99px;
border: 1.8px solid #d8d2bb;
font-size: 1rem;
box-shadow: 0 2px 7px #d2cabf96 inset;
transition: all 0.25s ease;
}
.search-container input:focus {
border-color: #7d6a05;
outline: none;
box-shadow: 0 0 11px #b4a024dd inset;
transform: scale(1.02);
}
.search-icon {
position: absolute;
left: 14px;
top: 50%;
transform: translateY(-50%);
font-size: 21px;
color: #a09c82;
pointer-events: none;
}
/* subtle fade for search input */
@keyframes fadeGlow {
from { box-shadow: 0 0 0px #b4a02455 inset; }
to { box-shadow: 0 0 10px #b4a024aa inset; }
}
</style>
@if(session('success'))
<div class="alert alert-success rounded-3 shadow-sm">{{ session('success') }}</div>
@endif
<div class="search-container">
<input type="text" id="globalSearch" placeholder="Search in all fields..." />
<span class="search-icon">🔍</span>
</div>
<div class="table-responsive">
<table class="table table-bordered table-hover align-middle" id="markListTable">
<thead class="thead-orange">
<tr>
<th>#</th>
<th>Mark No/Item No</th>
<th>Origin</th>
<th>Destination</th>
<th>Customer Name</th>
<th>Customer Id</th>
<th>Customer No</th>
<th>Date</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach($markList as $mark)
<tr>
<td>{{ $mark->id }}</td>
<td>{{ $mark->mark_no }}</td>
<td>{{ $mark->origin }}</td>
<td>{{ $mark->destination }}</td>
<td>{{ $mark->customer_name }}</td>
<td>{{ $mark->customer_id }}</td>
<td>{{ $mark->mobile_no }}</td>
<td>{{ \Carbon\Carbon::parse($mark->date)->format('d-m-Y') }}</td>
<td>
@if($mark->status == 'active')
<span class="badge bg-success">Active</span>
@else
<span class="badge bg-danger">In-Active</span>
@endif
</td>
<td>
@if($mark->status == 'active')
<a href="{{ route('admin.marklist.toggle', $mark->id) }}" class="btn-action">Deactivate</a>
@else
<a href="{{ route('admin.marklist.toggle', $mark->id) }}" class="btn-action">Activate</a>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@if($markList->isEmpty())
<div class="py-4 text-center text-muted fst-italic">No mark numbers found.</div>
@endif
</div>
<script>
document.getElementById('globalSearch').addEventListener('input', function () {
const filter = this.value.toLowerCase();
const rows = document.querySelectorAll('#markListTable tbody tr');
rows.forEach(row => {
const text = row.textContent.toLowerCase();
row.style.display = text.includes(filter) ? '' : 'none';
});
});
</script>
</div>
</div>
@endsection