You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

125 lines
7.0 KiB

@extends('admin.layouts.app')
@section('content')
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Appointments</h3>
<div class="card-tools">
<a class="btn btn-green" href="{{url('admin/appointments/create')}}" role="button">Create</a>
</div>
</div>
<!-- /.card-header -->
<div class="card-body">
@include('success.success')
@include('errors.error')
<form id="search" class="search-form">
<div class="row">
<div class="col-md-4">
<div class="input-group input-group-sm mb-3 table-search w-100">
<input type="date" name="date" class="form-control ds-input" placeholder="Date" aria-label="Small" aria-describedby="inputGroup-sizing-sm" onchange="filterList()">
</div>
</div>
<div class="col-md-4">
<div class="input-group input-group-sm mb-3 table-search w-100">
<select name="status" class="form-control ds-input" onchange="filterList()">
<option value="" disabled selected>Search By Status</option>
@foreach(config('custom.status') as $in => $val)
<option value="{{$in}}">{{$val}}</option>
@endforeach
</select>
</div>
</div>
</div>
</form>
<table class="table table-bordered">
<thead>
<tr>
<th style="width: 10px">S.N.</th>
<th style="width: 10px">Service Type</th>
<th class="text-center">Date</th>
<th class="text-center">Start Time</th>
<th class="text-center">End Time</th>
<th class="text-center">Booking Status</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@foreach($appointments as $setting)
<tr>
<th scope="row">{{$loop->iteration}}</th>
<td class="text-center">{{config('custom.service_type')[$setting->service_type]}}</td>
<td class="text-center">{{$setting->date}}</td>
<td class="text-center">{{$setting->start_time}}</td>
<td class="text-center">{{$setting->end_time}}</td>
@if($setting->is_booked)
<td class="text-center"><span class="badge booked text-bg-secondary">Booked</span></td>
@else
<td class="text-center"><span class="badge notbooked text-bg-secondary">Available</span></td>
@endif
<td class="d-flex justify-content-center action-icons">
@if($setting->appointment_booking_detail()->count() > 0)
<a href="{{url('admin/appointments/'.$setting->id.'/view')}}" class="btn btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="view">
<i class="fa-solid fa-eye"></i>
</a>
@endif
<a href="{{url('admin/appointments/'.$setting->id.'/edit')}}" class="btn btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="edit">
<i class="fas fa-pencil-alt"></i>
</a>
<a href="{{url('admin/appointments/'.$setting->id.'/delete')}}" class="btn btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="delete" onclick="return confirm('Are you sure want to delete?')">
<i class="fas fa-trash"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="pagination-default" style="margin-top: 30px;">
{!! $appointments->links() !!}
</div>
</div>
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<script>
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
</script>
<script>
const exampleEl = document.getElementById('example')
const tooltip = new bootstrap.Tooltip(exampleEl, options)
</script>
@endsection