Files
aroginhealthcare/Modules/Appointment/resources/views/index.blade.php
2025-08-17 16:23:14 +05:45

120 lines
4.8 KiB
PHP

@extends('admin::layouts.master')
@section('title')
Appointment
@endsection
@section('breadcrumb')
@php
$breadcrumbData = [
[
'title' => 'Appointment',
'link' => 'null',
],
[
'title' => 'Dashboard',
'link' => route('dashboard'),
],
[
'title' => 'Appointments',
'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 Appointment</h4>
</div>
</div>
<div class="card-datatable table-responsive">
<table class="table">
<thead class="table-light">
<tr>
<th>S.N</th>
<th>Full Name With Subject</th>
<th>Doctor</th>
<th>Contact No.</th>
<th>Email</th>
<th>Created At</th>
<th>Actions</th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
@if ($appointmentCount > 0)
@foreach ($appointments ?? [] as $appointment)
<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"> {{ $appointment->full_name }}</h6>
<small class="text-muted">{{ Str::limit($appointment->subject, 80) }}</small>
</div>
</div>
</td>
<td>
{{ optional($appointment->doctorDetail)->name }}
</td>
<td>
{{ $appointment->contact_no }}
</td>
<td>
{{ $appointment->email }}
</td>
<td>
{{ $appointment->created_at->toFormattedDateString() }}
</td>
<td>
<div class="d-flex">
<form method="POST"
action="{{ route('cms.appointment.show', ['uuid' => $appointment->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.appointment.delete', ['uuid' => $appointment->uuid]) }}"
id="deleteForm_{{ $appointment->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">
{{-- {{ $appointment->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