HEX
Server: LiteSpeed
System: Linux s3.sitechai.com 4.18.0-553.51.1.lve.1.el8.x86_64 #1 SMP Wed May 14 14:34:57 UTC 2025 x86_64
User: workzeni (2217)
PHP: 8.1.32
Disabled: mail, show_source, system, shell_exec, passthru, exec, eval, shell
Upload Files
File: /home/workzeni/agency-erp-05.workzenix.com/resources/views/admin/hotel/list.blade.php
@extends('layouts.master')
@section('title', 'Hotel Booking')

@section('content')
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-header d-flex justify-content-between align-items-center">
                        <h3 class="mb-0">Hotel Booking List</h3>
                        <a href="{{ route('hotel.create') }}" class="btn btn-primary btn-sm">
                            Add New Hotel
                        </a>
                    </div>

                    <div class="card-body">
                        <table id="example1" class="table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <th>SL</th>
                                    <th>Agency</th>
                                    <th>Hotel Name</th>
                                    <th>Owner Name</th>
                                    <th>Representative</th>
                                    <th>Tasria</th>
                                    <th>Total Site</th>
                                    <th>Status</th>
                                    <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                @forelse ($hotels as $hotel)
                                    <tr>
                                        <td>{{ $loop->iteration }}</td>
                                        <td>{{ $hotel->agency->name }}</td>
                                        <td>{{ $hotel->hotel_name }}</td>
                                        <td>{{ $hotel->owner_name }}</td>
                                        <td>
                                            {{ $hotel->representative_name }} <br>
                                            {{ $hotel->phone_number }}
                                        </td>
                                        <td>
                                            {{ $hotel->tasria_owner }} <br>
                                            {{ $hotel->tasria_number }}
                                        </td>
                                        <td>{{ $hotel->total_seat }}</td>
                                        <td>
                                            @if ($hotel->status == 0)
                                                <span class="btn btn-warning btn-sm">Pandding</span>
                                            @elseif ($hotel->status == 1)
                                                <span class="btn btn-success btn-sm">Active</span>
                                            @else
                                                <span class="btn btn-danger btn-sm">Blocked</span>
                                            @endif
                                        </td>
                                        <td>
                                            <a href="{{ route('hotel.show', $hotel->id) }}" class="btn btn-primary btn-sm">
                                                View
                                            </a>
                                        </td>
                                    </tr>
                                @empty
                                    <tr>
                                        <td colspan="8" class="text-center">No hotels found.</td>
                                    </tr>
                                @endforelse
                            </tbody>
                            <tfoot>
                                <tr>
                                    <th>SL</th>
                                    <th>Agency</th>
                                    <th>Hotel Name</th>
                                    <th>Owner Name</th>
                                    <th>Representative</th>
                                    <th>Tasria</th>
                                    <th>Total Site</th>
                                    <th>Status</th>
                                    <th>Action</th>
                                </tr>
                            </tfoot>
                        </table>
                    </div> <!-- /.card-body -->
                </div> <!-- /.card -->
            </div> <!-- /.col -->
        </div> <!-- /.row -->
    </div>
@endsection

@section('scripts')
    <script>
        $(function() {
            $("#example1").DataTable({
                "responsive": true,
                "lengthChange": false,
                "autoWidth": false,
                "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
            }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
        });
    </script>
@endsection