@extends('indexlayout')

@section('title', 'TPS')
@push('style')
@endpush
@section('content')
    <div class="row">
        <main id="js-page-content" role="main" class="page-content">
            <ol class="breadcrumb page-breadcrumb">
                <li class="breadcrumb-item"><a href="javascript:void(0);">Sarana & Prasarana</a></li>
                <li class="breadcrumb-item active">2022</li>
                <li class="position-absolute pos-top pos-right d-none d-sm-block"><span class="js-get-date"></span></li>
            </ol>

            <div class="row">
                <div class="col-xl-12">
                    <div id="panel-1" class="panel">
                        <div class="panel-hdr">
                            <h2>
                                TPS 3R 2022
                            </h2>
                        </div>
                        <div class="panel-container show">

                            <div class="panel-content">
                                <div class="col-xl-3">
                                    <div id="js_default_list ">
                                        <div class="input-group mb-g">
                                            <input type="text" class="form-control form-control-lg shadow-inset-2"
                                                onkeyup="searchTable()" id="searchInput" placeholder="Filter list">
                                            <div class="input-group-append">
                                                <div class="input-group-text">
                                                    <i class="fal fa-search fs-xl"></i>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xl-12" style="padding-block-end: 10px">
                                    <div class="demo">
                                        <a href="{{ route('sadmin.tps.tps2') }}"><button
                                                type="button"class="btn btn-primary">2022</button></a>
                                        <a href="{{ route('sadmin.tps.tps3') }}"><button
                                                type="button"class="btn btn-secondary">2023</button></a>
                                        <a href="{{ route('sadmin.tps.tps4') }}"><button
                                                type="button"class="btn btn-success">2024</button></a>
                                        <a href="{{ route('sadmin.tps.tps') }}"><button
                                                type="button"class="btn btn-info">2025</button></a>
                                    </div>
                                </div>

                                {{-- <input type="text" id="searchInput" onkeyup="searchTable()"
                                    placeholder="Cari berdasarkan Tujuan, Sasaran, atau Indikator Kinerja Utama..."> --}}
                                <!-- datatable start -->
                                <table id="ikuTable" class="table table-bordered table-hover table-striped w-100 ">
                                    <thead style="text-align:center">
                                        <tr>
                                            <th rowspan="2">No</th>
                                            <th rowspan="2">Wilayah</th>
                                            <th colspan="3">Rencana 2025</th>
                                            <th rowspan="2" style="text-align: center">Action</th>
                                        </tr>
                                        <tr>
                                            <td>Lokasi</td>
                                            <td>Kapasitas (TPD)</td>
                                            <td>Anggaran (Rp)</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>1</td>
                                            <td>Dinas (Perencanaan TPS3R)</td>
                                            <td>
                                                <p><a href="{{ route('sadmin.tps.lokasitps.lokasiketapang') }}"
                                                        style="color: #000000">1. TPS
                                                        Ketapang</a></p>
                                                <p>2. TPS Pesanggrahan</p>
                                                <p>3. TPS H.Naman</p>
                                                <p>4. TPS Pondok Kopi</p>
                                                <p>5. TPS Mayjen Sutoyo PLN</p>
                                                <p>6.TPS Perkampungan Industri Kecil II</p>
                                                <p>7. TPS 3R Penggilingan</p>
                                                <p>8. TPS 3R Tegal Alur RW 04</p>
                                                <p>9. TPS 3R Kramat Pela</p>
                                                <p>10. TPS Kebon Kelapa</p>
                                                <p>11. Dipo Matraman</p>
                                                <p>12. TPS 3R KBI</p>
                                                <p>13. TPS Siaga</p>
                                                <p>14. TPS 3R Rawa Badak Utara</p>
                                                <p>15. TPS 3R Waduk Cincin</p>
                                            </td>
                                            <td>Kapasitas 25 Ton/hari</td>
                                            <td>
                                                <p>Anggaran PASK </p>
                                                <p>20.002.515.642</P>
                                            </td>
                                            <td><a href="{{ route('sadmin.tps.lokasitps.lokasi2') }}"
                                                    class="btn btn-primary">Detail</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>2</td>
                                            <td>Sudin LH Jakarta Pusat</td>
                                            <td>TPS 3R Ketapang</td>
                                            <td>Kapasitas 25 Ton/hari</td>
                                            <td>1,472,939,451</td>
                                            <td><a href="{{ route('sadmin.tps.lokasitps.lokasi2') }}"
                                                    class="btn btn-primary">Detail</a></td>
                                        </tr>
                                        <tr>
                                            <td>3</td>
                                            <td>Sudin LH Jakarta Utara</td>
                                            <td>-</td>
                                            <td>-</td>
                                            <td>-</td>
                                            <td><a href="{{ route('sadmin.tps.lokasitps.lokasi2') }}"
                                                    class="btn btn-primary">Detail</a></td>
                                        </tr>
                                        <tr>
                                            <td>4</td>
                                            <td>Sudin LH Jakarta Barat</td>
                                            <td>_</td>
                                            <td>-</td>
                                            <td>-</td>
                                            <td><a href="{{ route('sadmin.tps.lokasitps.lokasi2') }}"
                                                    class="btn btn-primary">Detail</a></td>
                                        </tr>
                                        <tr>
                                            <td>5</td>
                                            <td>Sudin LH Jakarta Selatan</td>
                                            <td>TPS 3R Pesanggrahan (konstruksi 75%)</td>
                                            <td>Kapasitas 25 Ton/hari</td>
                                            <td>4,097,240,000</td>
                                            <td><a href="{{ route('sadmin.tps.lokasitps.lokasi2') }}"
                                                    class="btn btn-primary">Detail</a></td>
                                        </tr>
                                        <tr>
                                            <td>6</td>
                                            <td>Sudin LH Jakarta Timur</td>
                                            <td>
                                                <p>Perkampungan industri 2 (PIK 2), Cakung (TPS 3R)</p>
                                                <p>TPS 3R Pondok Kopi </p>
                                                <p>TPS 3R Jl. Mayjend. Sutoyo (PLN) </p>
                                                <p>TPS 3R Jl. H. Naman, Pondok Kelapa</p>
                                            </td>
                                            <td>Kapasitas 25 Ton/hari</td>
                                            <td>
                                                <p>TPS Pondok Kopi Rp. 1.473.401.880</p>
                                                <p>TPS PIK 2 Rp. 1.455.650.702</p>
                                                <p>TPS Mayjend Sutoyo (PLN) 1.473.706.617 </p>
                                                <p>TPS H Naman 1.473.263.907</p>
                                            </td>
                                            <td><a href="{{ route('sadmin.tps.lokasitps.lokasi2') }}"
                                                    class="btn btn-primary">Detail</a></td>
                                        </tr>
                                        <tr>
                                            <td>7</td>
                                            <td>Sudin LH Kepulauan Seribu</td>
                                            <td>
                                                <p>Pulau Tidung (TPS 3R)</p>
                                                <p>Pulau Sebira (TPS 3R)</p>
                                            </td>
                                            <td>Kapasitas 25 Ton/hari</td>
                                            <td>
                                                <p>Anggaran PASK 12.731.454.759</p>
                                            </td>
                                            <td><a href="{{ route('sadmin.tps.lokasitps.lokasi2') }}"
                                                    class="btn btn-primary">Detail</a></td>
                                        </tr>
                                    </tbody>
                                </table>
                                <!-- datatable end -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </main>

    @endsection

    @push('script')
        <script src="{{ asset('layout/dist/js/datagrid/datatables/datatables.bundle.js') }}"></script>
        {{-- <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script> --}}
        <script src="{{ asset('layout/dist/js/tabel.js') }}"></script>
        <script src="{{ asset('layout/dist/js/linechart.js') }}"></script>
        <script src="{{ asset('layout/dist/js/iku.js') }}"></script>
        <script>
            function searchTable() {
                var input, filter, table, tr, td, i, txtValue;
                input = document.getElementById("searchInput");
                filter = input.value.toLowerCase();
                table = document.getElementById("ikuTable");
                tr = table.getElementsByTagName("tr");

                for (i = 1; i < tr.length; i++) {
                    tr[i].style.display = "none"; // Hide all rows initially
                    td = tr[i].getElementsByTagName("td");

                    for (var j = 0; j < td.length; j++) {
                        if (td[j]) {
                            txtValue = td[j].textContent || td[j].innerText;
                            if (txtValue.toLowerCase().indexOf(filter) > -1) {
                                tr[i].style.display = ""; // Show row if match is found
                                break;
                            }
                        }
                    }
                }
            }
        </script>
    @endpush
