@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">2023</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 2023
                            </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>1. PAM Tanah Abang</p>
                                                <p>2. PLN Tanah Abang</p>
                                                <p>3. Kantor Satpel Gambir</p>
                                                <p>4. Rawasari Cempaka Putih</p>
                                                <p>5. Asrama Semper</p>
                                                <p>6. Kober Cilincing</p>
                                                <p>7. RBU</p>
                                                <p>8. Waduk Cincin</p>
                                                <p>9. Asrama Bambu Larangan</p>
                                                <p>10. Rusun V Daan Mogot</p>
                                                <p>11. Mercu Buana</p>
                                                <p>12. Waduk Brigif</p>
                                                <p>13. Kramat Pela</p>
                                                <p>14. Jl. Kemang Utara IX</p>
                                                <p>15. Menteng Atas</p>
                                                <p>16. Jl. Siaga</p>
                                                <p>17. Rawa Terate Cakung</p>
                                                <p>18. Pasar Induk Kramat Jati</p>
                                                <p>19. Kantor Satpel Matraman</p>
                                            </td>
                                            <td>
                                                <p>1. PAM Tanah Abang kapasitas 50 Ton/hari</p>
                                                <p>2. PLN Tanah Abang kapasitas 50 Ton/hari</p>
                                                <p>3. Kantor Satpel Gambir kapasitas 50 Ton/hari</p>
                                                <p>4. Rawasari Cempaka Putih kapasitas 25 Ton/hari</p>
                                                <p>5. Asrama Semper kapasitas 50 Ton/hari</p>
                                                <p>6. Kober Cilincing kapasitas 60 Ton/hari</p>
                                                <p>7. RBU kapasitas 25 Ton/hari</p>
                                                <p>8. Waduk Cincin kapasitas 50 Ton/hari</p>
                                                <p>9. Asrama Bambu Larangan kapasitas 25 Ton/hari</p>
                                                <p>10. Rusun V Daan Mogot kapasitas 100 Ton/hari</p>
                                                <p>11. Mercu Buana kapasitas 25 Ton/hari</p>
                                                <p>12. Waduk Brigif kapasitas 50 Ton/hari</p>
                                                <p>13. Kramat Pela kapasitas 50 Ton/hari</p>
                                                <p>14. Jl. Kemang Utara IX kapasitas 50 Ton/hari</p>
                                                <p>15. Menteng Atas kapasitas 100 Ton/hari</p>
                                                <p>16. Jl. Siaga kapasitas 50 Ton/hari</p>
                                                <p>17. Rawa Terate Cakung kapasitas 50 Ton/hari</p>
                                                <p>18. Pasar Induk Kramat Jati kapasitas 200 Ton/hari</p>
                                                <p>19. Kantor Satpel Matraman kapasitas 50 Ton/hari</p>
                                            </td>
                                            <td>
                                                <p>Anggaran Aktivitas:</p>
                                                <p>1.836.290.055</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>Kantor Rawasari Cempaka Putih (TPS 3R) </td>
                                            <td>Kapasitas Rawasari Cempaka Putih : 25 Ton/hari</td>
                                            <td>
                                                <p>TPS Cempaka Putih Rp. 14. 438.494.547,-</p>
                                                <p>Anggaran Aktivitas 14.795.180.427</p>
                                            </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>
                                                <p>TPS 3R RBU (sudah dg mesin), Koja (TPS 3R)</p>
                                                <p>TPS Moa, Penjaringan (TPS 3R)</p>
                                            </td>
                                            <td>
                                                <P>Kapasitas TPS RBU : 25 Ton/hari</P>
                                                <P>Kapasitas TPS Moa : 25 Ton/hari</P>
                                            </td>
                                            <td>
                                                <p>TPS RBU Koja : Rp. 10.750.554.818,-</p>
                                                <p>TPS Moa Penjaringan : Rp. 10.945.855.015,-</p>
                                                <p>Anggaran Aktivitas 22.505.719.833 </p>
                                            </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>Meruya Selatan (Samping Univ Mercu Buana) (TPS 3R)</td>
                                            <td>Kapasitas : 25 Ton/hari</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>Jl. Siaga, Pasar Minggu (TPS 3R)</td>
                                            <td>Kapasitas Jl. Siaga : 50 Ton/hari</td>
                                            <td>
                                                <p>Rp. 21.934.630.833,-</p>
                                                <p>Anggaran Aktivitas </p>
                                                <p>23.277.733.122</p>
                                            </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>RW 01 Pulogebang BKT (TPS 3R)</p>
                                                <p>Asrama Ciracas (TPS 3R)</p>
                                            </td>
                                            <td>Kapasitas 25 Ton/hari</td>
                                            <td>
                                                <P>Pulogebang, BKT : Rp. 13.923.133.876,-</P>
                                                <P>Asrama Ciracas : Rp. 12.410.502.637,- </P>
                                                <P>Anggaran Aktivitas </P>
                                                <P>26.205.365.497</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>Perencanaan Pulau Panggang (TPS 3R)</P>
                                                <P>Perencanaan Pulau Kelapa (TPS 3R)</P>
                                                <P>Perencanaan Pulau Harapan (TPS 3R)</P>
                                            </td>
                                            <td>Kapasitas 2,4 ton/hari</td>
                                            <td>
                                                <p>Pulau Harapan : Rp. 2.537.804.431,-</p>
                                                <p>Pulau Panggang : Rp. 4.832.471.585 </p>
                                                <p>Anggaran Aktivitas </p>
                                                <p>2.608.439.322 </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
