Viewing file: token_no.blade.php (6.97 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.master')
@section('title') Service Rating @endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1') Service @endslot
@slot('title')Rating List @endslot
@endcomponent
<div class="row justify-content-center align-items-center">
<div class="card">
<div class="card-body">
<div class="row gy-4 gx-0">
<!-- new token start -->
<div class="col-lg-4">
<div>
<h5 class="fs-14 mb-3">New token</h5>
</div>
@if ($errors->any())
<div class="alert alert-danger">
@foreach ($errors->all() as $error)
<span class="each-error">{{ $error }} </span><br/>
@endforeach
</div>
@endif
@if(session()->has('message'))
<div class="alert alert-success">
{{ session()->get('message') }}
</div>
@endif
<div class="card-body">
<form id="tokenForm" method="POST" action="{{ route('agent.token_no.submit') }}">
@csrf
<div class="mb-4 text-center">
<label for="token_number" class="form-label fw-bold">Token Number</label>
<input type="text" class="form-control text-center" id="token_number" name="token_number" required>
</div>
<div class="d-flex justify-content-end">
<button type="submit" class="btn btn-primary">
Submit
</button>
</div>
</form>
</div>
</div>
<!-- New token end -->
<!-- Divider start -->
<div class="d-none d-lg-block col-lg-1 text-center align-self-stretch">
<div style="width:2px; height:100%; background:#e0e0e0; margin:0 auto;"></div>
</div>
<!-- Divider end -->
<!-- Reviews list start -->
<div class="col-lg-7">
<div class="ps-lg-4">
<div class="d-flex flex-wrap align-items-start gap-3">
<h5 class="fs-14">Reviews List: </h5>
</div>
<div class="me-lg-n3 pe-lg-4" data-simplebar="init">
<div class="simplebar-wrapper" style="margin: 0px -24px 0px 0px;">
<div class="simplebar-height-auto-observer-wrapper">
<div class="simplebar-height-auto-observer"></div>
</div>
<div class="simplebar-mask">
<div class="simplebar-offset" style="right: 0px; bottom: 0px;">
<div class="simplebar-content-wrapper" tabindex="0" role="region" aria-label="scrollable content" style="height: auto; overflow: hidden scroll;">
<div class="simplebar-content" style="padding: 0px 24px 0px 0px;">
<table id="alternative-pagination" class="table nowrap dt-responsive align-middle table-hover table-bordered" style="width:100%">
<thead>
<tr>
<th>SR</th>
<th>Token No.</th>
<th>Rating</th>
<th>Date</th>
</tr>
</thead>
<tbody>
@php
$i=1;
@endphp
@if(isset($tokens))
@foreach($tokens as $rating)
<tr>
<td>{{$i++}}</td>
<td>{{ $rating->trans_id }}</td>
<td>{{ $rating->rating }}</td>
<td>{{ $rating->updated_at->setTimezone('Asia/Dhaka')->format('Y-m-d H:i:s') }}</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="simplebar-placeholder" style="width: auto; height: 484px;"></div>
</div>
<div class="simplebar-track simplebar-horizontal">
<div class="simplebar-scrollbar" style="width: 0px; display: none;"></div>
</div>
<div class="simplebar-track simplebar-vertical" style="visibility: visible;">
<div class="simplebar-scrollbar" style="height: 104px; transform: translate3d(0px, 0px, 0px); display: block;"></div>
</div>
</div>
</div>
</div>
<!-- end col -->
</div>
</div>
</div>
</div>
@endsection
@section('script')
<!-- SweetAlert2 CDN -->
<script>
document.getElementById('tokenForm').addEventListener('submit', function(e) {
e.preventDefault();
Swal.fire({
title: 'Are you sure?',
text: "Are you sure you want to submit this token number?",
icon: 'question',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, submit it!'
}).then((result) => {
if (result.isConfirmed) {
e.target.submit();
}
});
});
</script>
@endsection
|