Files
2025-08-17 16:23:14 +05:45

126 lines
5.0 KiB
PHP

@extends('admin::layouts.master')
@section('title')
Consultation
@endsection
@section('breadcrumb')
@php
$breadcrumbData = [
[
'title' => 'Consultation',
'link' => 'null',
],
[
'title' => 'Dashboard',
'link' => route('dashboard'),
],
[
'title' => 'Consultations',
'link' => null,
],
];
@endphp
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
@endsection
@section('content')
<!-- banners List Table -->
<div class="card">
<div class="row">
<div class="col-md-6">
<h4 class="card-header">List of Consultation</h4>
</div>
</div>
<div class="card-datatable table-responsive">
<table class="table">
<thead class="table-light">
<tr>
<th>S.N</th>
<th>Name With Subject</th>
<th>Age</th>
<th>Procedure</th>
<th>Contact No.</th>
<th>Email</th>
<th>Created At</th>
<th>Actions</th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
@if ($consultationCount > 0)
@foreach ($consultations ?? [] as $consultation)
<tr>
<td>
#{{ $loop->iteration }}
</td>
<td>
<div class="d-flex align-items-center me-3">
<div class="card-title mb-0 px-3">
<h6 class="mb-0"> {{ $consultation->name }}</h6>
<small class="text-muted">{{ Str::limit($consultation->subject, 50) }}</small>
</div>
</div>
</td>
<td>
{{ $consultation->ageGroupOption() }}
</td>
<td>
{{ $consultation->procedureOfInterestOption() }}
</td>
<td>
{{ $consultation->contact_no }}
</td>
<td>
{{ $consultation->email }}
</td>
<td>
{{ $consultation->created_at->toFormattedDateString() }}
</td>
<td>
<div class="d-flex">
<form method="POST"
action="{{ route('cms.consultation.show', ['uuid' => $consultation->uuid]) }}"
class="dropdown-item">
@csrf
<button type="submit" class="border-0 bg-transparent viewBtn"
style="color:inherit"><i class="bx bx-show-alt me-1"></i></button>
</form>
<form method="POST"
action="{{ route('cms.consultation.delete', ['uuid' => $consultation->uuid]) }}"
id="deleteForm_{{ $consultation->uuid }}" class="dropdown-item">
@csrf
@method('DELETE')
<button type="submit" class="border-0 bg-transparent deleteBtn"
style="color:inherit"><i class="bx bx-trash me-1"></i></button>
</form>
</div>
</td>
</tr>
@endforeach
@else
<tr>
<td colspan="7">No record found.</td>
</tr>
@endif
</tbody>
</table>
</div>
<div class="px-3">
{{-- {{ $consultation->links('admin::layouts.partials.pagination') }} --}}
</div>
</div>
@endsection
{{-- style --}}
@push('required-styles')
@include('admin::vendor.dataTables.style')
@endpush
{{-- script --}}
@push('required-scripts')
@include('admin::vendor.dataTables.script')
@endpush