@extends('layouts.master')
@section('content')
    <!-- Page-content -->
    <div class="group-data-[sidebar-size=lg]:ltr:md:ml-vertical-menu group-data-[sidebar-size=lg]:rtl:md:mr-vertical-menu group-data-[sidebar-size=md]:ltr:ml-vertical-menu-md group-data-[sidebar-size=md]:rtl:mr-vertical-menu-md group-data-[sidebar-size=sm]:ltr:ml-vertical-menu-sm group-data-[sidebar-size=sm]:rtl:mr-vertical-menu-sm pt-[calc(theme('spacing.header')_*_1)] pb-[calc(theme('spacing.header')_*_0.8)] px-4 group-data-[navbar=bordered]:pt-[calc(theme('spacing.header')_*_1.3)] group-data-[navbar=hidden]:pt-0 group-data-[layout=horizontal]:mx-auto group-data-[layout=horizontal]:max-w-screen-2xl group-data-[layout=horizontal]:px-0 group-data-[layout=horizontal]:group-data-[sidebar-size=lg]:ltr:md:ml-auto group-data-[layout=horizontal]:group-data-[sidebar-size=lg]:rtl:md:mr-auto group-data-[layout=horizontal]:md:pt-[calc(theme('spacing.header')_*_1.6)] group-data-[layout=horizontal]:px-3 group-data-[layout=horizontal]:group-data-[navbar=hidden]:pt-[calc(theme('spacing.header')_*_0.9)]">
        <div class="container-fluid group-data-[content=boxed]:max-w-boxed mx-auto">
            <div class="flex flex-col gap-2 py-4 md:flex-row md:items-center print:hidden">
                <div class="grow">
                    <h5 class="text-16">Tiket</h5>
                </div>
                <ul class="flex items-center gap-2 text-sm font-normal shrink-0">
                    <li class="relative before:content-['\ea54'] before:font-remix ltr:before:-right-1 rtl:before:-left-1  before:absolute before:text-[18px] before:-top-[3px] ltr:pr-4 rtl:pl-4 before:text-slate-400 dark:text-zink-200">
                        <a href="#!" class="text-slate-400 dark:text-zink-200">Setting</a>
                    </li>
                    <li class="text-slate-700 dark:text-zink-100">
                        Tiket
                    </li>
                </ul>
            </div>

            <div class="card">
                <div class="card-body">
                    <div class="flex items-center">
                        <h6 class="text-15 grow">Tiket</h6>
                        <div class="shrink-0">
                            <button data-modal-target="addSyrtByrModal" type="button" class="text-white btn bg-custom-500 border-custom-500 hover:text-white hover:bg-custom-600 hover:border-custom-600 focus:text-white focus:bg-custom-600 focus:border-custom-600 focus:ring focus:ring-custom-100 active:text-white active:bg-custom-600 active:border-custom-600 active:ring active:ring-custom-100 dark:ring-custom-400/20">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-lucide="plus" class="lucide lucide-plus inline-block size-4">
                                    <path d="M5 12h14"></path>
                                    <path d="M12 5v14"></path>
                                </svg> 
                                <span class="align-middle">Tiket</span>
                            </button>
                        </div>
                    </div>
                    <br>
                    <table id="alternativePagination" class="display" style="width:100%">
                        <thead>
                            <tr>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">No</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Kode</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Nama Tiket</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Promo</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Date Mulai Banyuwangi</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Date selesai Banyuwangi</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Date Mulai Kediri</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Date selesai Kediri</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Date Mulai Madiun</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Date selesai Madiun</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Date Mulai surabaya</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Date selesai surabaya</th>
                                <th class="px-3.5 py-2.5 font-semibold border border-slate-200 dark:border-zink-500">Aksi</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach($tik as $key => $value)
                                @if($value->promo == 0)
                                    @php
                                    $status = 'Tidak Promo';
                                    @endphp
                                @else
                                    @php
                                    $status = 'Promo';
                                    @endphp
                                @endif    
                                
                                <tr>
                                    <td class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ ++$key }}</td>
                                    <td id="id_tiket" class="id_update px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->id_tiket }}</td>
                                    <td id="nama_tiket" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->nama_tiket }}</td>
                                    <td id="promo" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $status }}</td>
                                    <td id="tgl_tiket_mulai" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->tgl_tiket_mulai }}</td>
                                    <td id="tgl_tiket_selesai" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->tgl_tiket_selesai }}</td>
                                    <td id="tgl_tiket_mulai_kediri" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->tgl_tiket_mulai_kediri }}</td>
                                    <td id="tgl_tiket_selesai_kediri" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->tgl_tiket_selesai_kediri }}</td>
                                    <td id="tgl_tiket_mulai_madiun" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->tgl_tiket_mulai_madiun }}</td>
                                    <td id="tgl_tiket_selesai_madiun" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->tgl_tiket_selesai_madiun }}</td>
                                    <td id="tgl_tiket_mulai_surabaya" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->tgl_tiket_mulai_surabaya }}</td>
                                    <td id="tgl_tiket_selesai_surabaya" class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">{{ $value->tgl_tiket_selesai_surabaya }}</td>
                                    <td class="px-3.5 py-2.5 border border-slate-200 dark:border-zink-500">
                                        <div class="flex gap-2">
                                            <a href="#!" data-modal-target="editCoaModal" id="updateRecord" class="flex items-center justify-center transition-all duration-200 ease-linear rounded-md size-8 bg-slate-100 dark:bg-zink-600 dark:text-zink-200 text-slate-500 hover:text-custom-500 dark:hover:text-custom-500 hover:bg-custom-100 dark:hover:bg-custom-500/20"><i data-lucide="pencil" class="size-4"></i></a>
                                            <a href="#!" data-modal-target="deleteModal" id="deleteRecord" class="flex items-center justify-center transition-all duration-200 ease-linear rounded-md size-8 bg-slate-100 dark:bg-zink-600 dark:text-zink-200 text-slate-500 hover:text-red-500 dark:hover:text-red-500 hover:bg-red-100 dark:hover:bg-red-500/20"><i data-lucide="trash-2" class="size-4"></i></a>
                                        </div>
                                    </td>
                                </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!-- End Page-content -->

    <!-- add TIKET-->
    <div id="addSyrtByrModal" modal-center="" class="fixed flex flex-col hidden transition-all duration-300 ease-in-out left-2/4 z-drawer -translate-x-2/4 -translate-y-2/4 show ">
        <div class="w-screen md:w-[30rem] bg-white shadow rounded-md dark:bg-zink-600">
            <div class="flex items-center justify-between p-4 border-b dark:border-zink-500">
                <h5 class="text-16">Tambah Tiket</h5>
                <button data-modal-close="addSyrtByrModal" class="transition-all duration-200 ease-linear text-slate-400 hover:text-red-500"><i data-lucide="x" class="w-5 h-5"></i></button>
            </div>
            <div class="max-h-[calc(theme('height.screen')_-_180px)] p-4 overflow-y-auto">
                <form action="{{route('tiketSave')}}" method="POST">
                    @csrf
                    <div class="grid grid-cols-1 gap-4 xl:grid-cols-12">
                        <div class="xl:col-span-12">
                            <label for="nama_tiketInput" class="inline-block mb-2 text-base font-medium">Nama Tiket</label>
                            <input type="text" name="nama_tiket" id="nama_tiket" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('nama_tiket') is-invalid @enderror" placeholder="Input nama tiket">
                            @error('nama_tiket')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <div class="xl:col-span-12">
                            <div>
                                <label for="promo" class="inline-block mb-2 text-base font-medium">Promo</label>
                                <select name="promo" id="promo" class="leave_type form-input border-slate-200 focus:outline-none focus:border-custom-500" data-choices="" data-choices-search-false="">
                                    <option value="">(Kosong)</option>
                                    <option value="0">Non promo</option>
                                    <option value="1">promo</option>
                               
                                </select>
                                          
                            </div>
                        </div>
                        <!-- banyuwangi -->
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_mulaiInput" class="inline-block mb-2 text-base font-medium">Tgl Mulai</label>
                            <input type="date" name="tgl_tiket_mulai" id="tgl_tiket_mulai" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_mulai') is-invalid @enderror" placeholder="account code">
                            @error('tgl_tiket_mulai')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_selesai" class="inline-block mb-2 text-base font-medium">Tgl Selesai</label>
                            <input type="date" name="tgl_tiket_selesai" id="tgl_tiket_selesai" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_selesai') is-invalid @enderror" placeholder="tgl selesai">
                            @error('tgl_tiket_selesai')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <!-- Kediri -->
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_mulaiKediriInput" class="inline-block mb-2 text-base font-medium">Tgl Mulai Kediri</label>
                            <input type="date" name="tgl_tiket_mulai_kediri" id="tgl_tiket_mulai_kediri" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_mulai_kediri') is-invalid @enderror" placeholder="account code">
                            @error('tgl_tiket_mulai_kediri')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_selesai_kediri" class="inline-block mb-2 text-base font-medium">Tgl Selesai Kediri</label>
                            <input type="date" name="tgl_tiket_selesai_kediri" id="tgl_tiket_selesai_kediri" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_selesai_kediri') is-invalid @enderror" placeholder="tgl selesai">
                            @error('tgl_tiket_selesai_kediri')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <!-- madiun -->
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_mulai_madiunInput" class="inline-block mb-2 text-base font-medium">Tgl Mulai_madiun</label>
                            <input type="date" name="tgl_tiket_mulai_madiun" id="tgl_tiket_mulai_madiun" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_mulai_madiun') is-invalid @enderror" placeholder="account code">
                            @error('tgl_tiket_mulai_madiun')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_selesai_madiun" class="inline-block mb-2 text-base font-medium">Tgl Selesai</label>
                            <input type="date" name="tgl_tiket_selesai_madiun" id="tgl_tiket_selesai_madiun" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_selesai_madiun') is-invalid @enderror" placeholder="tgl selesai">
                            @error('tgl_tiket_selesai_madiun')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <!-- surabaya -->
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_mulai_surabayaInput" class="inline-block mb-2 text-base font-medium">Tgl Mulai_surabaya</label>
                            <input type="date" name="tgl_tiket_mulai_surabaya" id="tgl_tiket_mulai_surabaya" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_mulai_surabaya') is-invalid @enderror" placeholder="account code">
                            @error('tgl_tiket_mulai_surabaya')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_selesai_surabaya" class="inline-block mb-2 text-base font-medium">Tgl Selesai_surabaya</label>
                            <input type="date" name="tgl_tiket_selesai_surabaya" id="tgl_tiket_selesai_surabaya" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_selesai_surabaya') is-invalid @enderror" placeholder="tgl selesai">
                            @error('tgl_tiket_selesai_surabaya')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        
                       
                    </div>
                    <div class="flex justify-end gap-2 mt-4">
                        <button type="reset" data-modal-close="addSyrtByrModal" class="text-red-500 bg-white btn hover:text-red-500 hover:bg-red-100 focus:text-red-500 focus:bg-red-100 active:text-red-500 active:bg-red-100 dark:bg-zink-600 dark:hover:bg-red-500/10 dark:focus:bg-red-500/10 dark:active:bg-red-500/10">Cancel</button>
                        <button type="submit" class="text-white btn bg-custom-500 border-custom-500 hover:text-white hover:bg-custom-600 hover:border-custom-600 focus:text-white focus:bg-custom-600 focus:border-custom-600 focus:ring focus:ring-custom-100 active:text-white active:bg-custom-600 active:border-custom-600 active:ring active:ring-custom-100 dark:ring-custom-400/20">Tambah</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!--end add TIKET-->

    <!-- edit TIKET-->
    <div id="editCoaModal" modal-center="" class="fixed flex flex-col hidden transition-all duration-300 ease-in-out left-2/4 z-drawer -translate-x-2/4 -translate-y-2/4 show ">
        <div class="w-screen md:w-[30rem] bg-white shadow rounded-md dark:bg-zink-600">
            <div class="flex items-center justify-between p-4 border-b dark:border-zink-500">
                <h5 class="text-16">Edit Tiket</h5>
                <button data-modal-close="editCoaModal" class="transition-all duration-200 ease-linear text-slate-400 hover:text-red-500"><i data-lucide="x" class="w-5 h-5"></i></button>
            </div>
            <div class="max-h-[calc(theme('height.screen')_-_180px)] p-4 overflow-y-auto">
                <form action="{{route('tiketUpdate')}}" method="POST">
                    @csrf
                    <input type="hidden" name="id_tiket" id="e_id_update" value=""/>
                    <div class="grid grid-cols-1 gap-4 xl:grid-cols-12">
                        <div class="xl:col-span-12">
                            <label for="nama_tiket" class="inline-block mb-2 text-base font-medium">Nama Tiket</label>
                            <input type="text" name="nama_tiket" id="e_nama_tiket" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('nama_tiket') is-invalid @enderror" placeholder="Nama Tiket" value="{{ old('nama_tiket') }}">
                            @error('nama_tiket')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                         
                        <div class="xl:col-span-12">
                            <div>
                                <label for="promo" class="inline-block mb-2 text-base font-medium">Promo</label>
                                <select name="promo" id="promo" class="leave_type form-input border-slate-200 focus:outline-none focus:border-custom-500" data-choices="" data-choices-search-false="">
                                    <option value="">(Kosong)</option>
                                    <option value="0">Non promo</option>
                                    <option value="1">promo</option>
                               
                                </select>
                                          
                            </div>
                        </div>

                        <!-- Banyuwangi -->
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_mulai" class="inline-block mb-2 text-base font-medium">Date Mulai</label>
                            <input type="date" name="tgl_tiket_mulai" id="e_tgl_tiket_mulai" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_mulai') is-invalid @enderror" placeholder="date mulai" value="{{ old('tgl_tiket_mulai') }}">
                            @error('tgl_tiket_mulai')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>

                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_selesai" class="inline-block mb-2 text-base font-medium">Date Selesai</label>
                            <input type="date" name="tgl_tiket_selesai" id="e_tgl_tiket_selesai" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_selesai') is-invalid @enderror" placeholder="date" value="{{ old('tgl_tiket_selesai') }}">
                            @error('tgl_tiket_selesai')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <!-- Kediri -->
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_mulai_kediri" class="inline-block mb-2 text-base font-medium">Date Mulai Kediri</label>
                            <input type="date" name="tgl_tiket_mulai_kediri" id="e_tgl_tiket_mulai_kediri" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_mulai_kediri') is-invalid @enderror" placeholder="date mulai" value="{{ old('tgl_tiket_mulai_kediri') }}">
                            @error('tgl_tiket_mulai_kediri')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>

                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_selesai_kediri" class="inline-block mb-2 text-base font-medium">Date Selesai Kediri</label>
                            <input type="date" name="tgl_tiket_selesai_kediri" id="e_tgl_tiket_selesai_kediri" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_selesai_kediri') is-invalid @enderror" placeholder="date" value="{{ old('tgl_tiket_selesai_kediri') }}">
                            @error('tgl_tiket_selesai_kediri')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <!-- Madiun -->
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_mulai_madiun" class="inline-block mb-2 text-base font-medium">Date Mulai Madiun</label>
                            <input type="date" name="tgl_tiket_mulai_madiun" id="e_tgl_tiket_mulai_madiun" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_mulai_madiun') is-invalid @enderror" placeholder="date mulai" value="{{ old('tgl_tiket_mulai_madiun') }}">
                            @error('tgl_tiket_mulai_madiun')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>

                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_selesai_madiun" class="inline-block mb-2 text-base font-medium">Date Selesai Madiun</label>
                            <input type="date" name="tgl_tiket_selesai_madiun" id="e_tgl_tiket_selesai_madiun" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_selesai_madiun') is-invalid @enderror" placeholder="date" value="{{ old('tgl_tiket_selesai_madiun') }}">
                            @error('tgl_tiket_selesai_madiun')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                        <!-- Surabaya -->
                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_mulai_surabaya" class="inline-block mb-2 text-base font-medium">Date Mulai Surabaya</label>
                            <input type="date" name="tgl_tiket_mulai_surabaya" id="e_tgl_tiket_mulai_surabaya" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_mulai_surabaya') is-invalid @enderror" placeholder="date mulai" value="{{ old('tgl_tiket_mulai_surabaya') }}">
                            @error('tgl_tiket_mulai_surabaya')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>

                        <div class="xl:col-span-12">
                            <label for="tgl_tiket_selesai_surabaya" class="inline-block mb-2 text-base font-medium">Date Selesai Surabaya</label>
                            <input type="date" name="tgl_tiket_selesai_surabaya" id="e_tgl_tiket_selesai_surabaya" class="form-input border-slate-200 dark:border-zink-500 focus:outline-none focus:border-custom-500 disabled:bg-slate-100 dark:disabled:bg-zink-600 disabled:border-slate-300 dark:disabled:border-zink-500 dark:disabled:text-zink-200 disabled:text-slate-500 dark:text-zink-100 dark:bg-zink-700 dark:focus:border-custom-800 placeholder:text-slate-400 dark:placeholder:text-zink-200 @error('tgl_tiket_selesai_surabaya') is-invalid @enderror" placeholder="date" value="{{ old('tgl_tiket_selesai_surabaya') }}">
                            @error('tgl_tiket_selesai_surabaya')
                                <span class="invalid-feedback" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>

                       
                      
                    </div>
                    <div class="flex justify-end gap-2 mt-4">
                        <button type="reset" data-modal-close="editSyrtByrModal" class="text-red-500 bg-white btn hover:text-red-500 hover:bg-red-100 focus:text-red-500 focus:bg-red-100 active:text-red-500 active:bg-red-100 dark:bg-zink-600 dark:hover:bg-red-500/10 dark:focus:bg-red-500/10 dark:active:bg-red-500/10">Cancel</button>
                        <button type="submit" class="text-white btn bg-custom-500 border-custom-500 hover:text-white hover:bg-custom-600 hover:border-custom-600 focus:text-white focus:bg-custom-600 focus:border-custom-600 focus:ring focus:ring-custom-100 active:text-white active:bg-custom-600 active:border-custom-600 active:ring active:ring-custom-100 dark:ring-custom-400/20">Update</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!--end edit TIKET-->
    
    <!--delete modal-->
    <div id="deleteModal" modal-center="" class="fixed flex flex-col hidden transition-all duration-300 ease-in-out left-2/4 z-drawer -translate-x-2/4 -translate-y-2/4 show">
        <div class="w-screen md:w-[25rem] bg-white shadow rounded-md dark:bg-zink-600">
            <div class="max-h-[calc(theme('height.screen')_-_180px)] overflow-y-auto px-6 py-8">
                <div class="float-right">
                    <button data-modal-close="deleteModal" class="transition-all duration-200 ease-linear text-slate-500 hover:text-red-500">
                        <i data-lucide="x" class="w-5 h-5"></i>
                    </button>
                </div>
                <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAC8VBMVEUAAAD/6u7/cZD/3uL/5+r/T4T9O4T/4ub9RIX/ooz/7/D/noz+PoT/3uP9TYf/XoX/m4z/oY39Tob/oYz/oo39O4T9TYb/po3/n4z/4Ob/3+X/nIz+fon/4eb/nI39Xoj9fIn/8fP9SoX9coj/noz/XYb/6e38R4b/XIf/cIn/ZYj/Rof/6+//cIr/oYz/a4P/7/L+X4f+bYn+QoX/pIz/7vH/noz/8PH/7O7/4ub/oIz/moz/oY3/O4X/cYn/RYX+aIj/5+r9QYX+XYf+cYn+Z4j+i5j9PoT/po3/8vT/ucD/09f+hYr/8vT8R4X8UYb/3uH+ZIn+W4f+cIn/7O/+hIr+VYf+b4j+ZYj+VYb/6Ov9RYX9UIb9bYn9O4T/oIz9Y4f9WIb/gov/bIj/dYr/gYr/pY3/7e//dYr9PoX/pY3/8vL/PID/7/L+hor+hor/8fP/8fP/o43/o43/7O//n4v/n47/nI7/8PL/6+7/6ez/5+v9QIX/7fD9SoX9SIX9RYX9Q4X+YIf/6u7/7/H+g4r+gYr+gIr+for+fYr+cYn9O4T+e4n+a4j+ZYj+VYb9T4b9PYT+eIn9TYb/8vT+dYn+c4n+don+cIj+Zoj+bYj+aIj+XYf+Yof+W4f/xs/+Wof9U4b+V4b/0Nf/ur3+hor+hYr/1Nv/oY39TIb+eon/1t3/3eL/3+T/0dn/y9P/m4z+aoj9Uob+WYf9UYb/ydL/yNH/2+H/ztb/xM7/197/2uD/0tr/zNT/2d//zdX/noz/w83/4eb/oIz/2N//o43/pI3/nYz/uMX/qr7/u8f/pY3/vcn/p7v/wcv/tMP/ssL/r8H/rb//usf/wMv/tcP+kKL+h5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/y7QUO1NbbwBWjTVSQOT/SRjEGtaz5kZbT6y+KjFjDppYXKQZKTOA/OqvaGNN0CLhjqZx2SKZKSx5uctpq3NOxbvtGirk5+YTJOM2HlEtdcXHlBXJ13BGMmw7iAFbp/SwhugxRSLQlfQIiGLsMfh+srCAyosHMwtIik9TwDvvQDCpYekbHkGVHMujhY2C1sLh0UVc1tIyo4LQI3ry1p4A7Qos6hhbjdJ2YtFjbcutr+IRc1fxKKBub0kpQ+LfjlufVOLycKf78KkFk33wPmFuT6SkriETNrFYn7GEE2nWHSahpjJF4v2ZFcsQVIG3DxMmHsC3xfm5vDgyZz7PDBAUlIPIiFFUoaPRcIwSVkbzYAYSbGiGWCRmEXHI2ARyemJYkAPydkcxYDNJCd5IgJWkZw9UQzYQ3L6ohjQR3ISJyMgQXIGohgwQHKGoxgwTHKs9UdDs345hWBV+AGrKAyp8AMOUyiSYd9PUjjWbroYik1rKSSr42Hejx+m0KxefEbM4tUUAUf2x2XPx/cfoWiIJZKLA46IL04mYvQf/AaSGokYCo6ekAAAAABJRU5ErkJggg==" alt="" class="block h-12 mx-auto">
                <form action="{{route('tiketDel')}}" method="POST">
                    @csrf
                    <input type="hidden" name="id_delete" id="e_id_delete" value="">
                    <div class="mt-5 text-center">
                        <h5 class="mb-1">Apa kamu yakin?</h5>
                        <p class="text-slate-500 dark:text-zink-200">Menghapus data ini !!!</p>
                        <div class="flex justify-center gap-2 mt-6">
                            <button type="reset" data-modal-close="deleteModal" class="bg-white text-slate-500 btn hover:text-slate-500 hover:bg-slate-100 focus:text-slate-500 focus:bg-slate-100 active:text-slate-500 active:bg-slate-100 dark:bg-zink-600 dark:hover:bg-slate-500/10 dark:focus:bg-slate-500/10 dark:active:bg-slate-500/10">Batal</button>
                            <button type="submit" class="text-white bg-red-500 border-red-500 btn hover:text-white hover:bg-red-600 hover:border-red-600 focus:text-white focus:bg-red-600 focus:border-red-600 focus:ring focus:ring-red-100 active:text-white active:bg-red-600 active:border-red-600 active:ring active:ring-red-100 dark:ring-custom-400/20">Hapus</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!--end delete modal-->

@section('script')
    {{-- update js --}}
    <script>
        $(document).on('click','#updateRecord',function()
        {
            var _this = $(this).parents('tr');
            $('#e_id_update').val(_this.find('#id_tiket').text());
            $('#e_nama_tiket').val(_this.find('#nama_tiket').text());
            $('#e_tgl_tiket_mulai').val(_this.find('#tgl_tiket_mulai').text());
            $('#e_tgl_tiket_selesai').val(_this.find('#tgl_tiket_selesai').text());
            $('#e_tgl_tiket_mulai_kediri').val(_this.find('#tgl_tiket_mulai_kediri').text());
            $('#e_tgl_tiket_selesai_kediri').val(_this.find('#tgl_tiket_selesai_kediri').text());
            $('#e_tgl_tiket_mulai_madiun').val(_this.find('#tgl_tiket_mulai_madiun').text());
            $('#e_tgl_tiket_selesai_madiun').val(_this.find('#tgl_tiket_selesai_madiun').text());
            $('#e_tgl_tiket_mulai_surabaya').val(_this.find('#tgl_tiket_mulai_surabaya').text());
            $('#e_tgl_tiket_selesai_surabaya').val(_this.find('#tgl_tiket_selesai_surabaya').text());
           
          
        });
    </script>
    {{-- delete js --}}
    <script>
        $(document).on('click','#deleteRecord',function()
        {
            var _this = $(this).parents('tr');
            $('#e_id_delete').val(_this.find('#id_tiket').text());
        });
    </script>
@endsection
@endsection
