@extends('layouts.master')

@section('page-css')
<link rel="stylesheet" media="screen, print" href="{{asset('assets/css/datagrid/datatables/datatables.bundle.css')}}">
@endsection
@section('content')

<div class="d-flex justify-content-between">
    <div class="subheader">
        <h1 class="subheader-title">Dashboard</h1>
    </div>
    <div class="d-flex align-items-center gap-2">
        <div>
            <b>Filter :</b>
        </div>
        <div>
            <select class="form-control" name="" id="">
                @for ($i = date('Y')-3;   date('Y') >= $i; $i++)
                    <option {{ $i == date('Y') ? 'selected' : '' }} value="{{$i}}">{{$i}}</option>
                @endfor
            </select>
        </div>
    </div>
</div>


<div class="row mb-2">
    <div class="col-sm-6 col-xl-3">
        <div class="card bg-primary-light border-left-primary">
            <div class="card-body">
                <div class="d-flex flex-row  justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n text-primary">Usulan Adiwiyata Kota</span> <br><br>
                        <h3 class="f20 fw-700 text-primary">{{@$total_usulan_kab}} <span class="f12 fw-300">Sekolah</span> </h3>
                    </div>
                    <div>
                        <div class="p-2 bg-white rounded-circle">
                            <i class="fal fa-trophy f16 text-primary"></i>
                        </div> 
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card bg-success-light border-left-success">
            <div class="card-body">
                <div class="d-flex flex-row  justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n text-success">Usulan Adiwiyata Provinsi</span> <br><br>
                        <h3 class="f20 fw-700 text-success">{{@$total_usulan_prov}} <span class="f12 fw-300">Sekolah</span> </h3>
                    </div>
                    <div>
                        <div class="p-2 bg-white rounded-circle">
                            <i class="fal fa-trophy f16 text-success"></i>
                        </div> 
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card bg-warning-light border-left-warning">
            <div class="card-body">
                <div class="d-flex flex-row  justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n text-warning">Usulan Adiwiyata Nasional</span> <br><br>
                        <h3 class="f20 fw-700 text-warning">{{@$total_usulan_nasional}} <span class="f12 fw-300">Sekolah</span> </h3>
                    </div>
                    <div>
                        <div class="p-2 bg-white rounded-circle">
                            <i class="fal fa-trophy f16 text-warning"></i>
                        </div> 
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card bg-info-light border-left-info">
            <div class="card-body">
                <div class="d-flex flex-row  justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n text-info">Usulan Adiwiyata Mandiri</span> <br><br>
                        <h3 class="f20 fw-700 text-info">{{@$total_usulan_mandiri}} <span class="f12 fw-300">Sekolah</span> </h3>
                    </div>
                    <div>
                        <div class="p-2 bg-white rounded-circle">
                            <i class="fal fa-trophy f16 text-info"></i>
                        </div> 
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="row mb-2">
    <div class="col-sm-6 col-xl-3">
        <div class="card bg-primary text-white">
            <div class="card-body">
                <div class="d-flex flex-row justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n">Sekolah Adiwiyata Kota</span> <br><br>
                        <h3 class="f20 fw-700">{{@$total_sekolah_kab}} <span class="f12 fw-300">Sekolah</span> </h3>
                    </div>
                    <div>
                        <div class="p-2 bg-white rounded-circle">
                            <i class="fal fa-trophy f16 text-primary"></i>
                        </div> 
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card bg-success text-white">
            <div class="card-body">
                <div class="d-flex flex-row justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n">Sekolah Adiwiyata Provinsi</span> <br><br>
                        <h3 class="f20 fw-700">{{@$total_sekolah_prov}} <span class="f12 fw-300">Sekolah</span> </h3>
                    </div>
                    <div>
                        <div class="p-2 bg-white rounded-circle">
                            <i class="fal fa-trophy f16 text-success"></i>
                        </div> 
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-sm-6 col-xl-3">
        <div class="card bg-warning text-white">
            <div class="card-body">
                <div class="d-flex flex-row justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n">Sekolah Adiwiyata Nasional</span> <br><br>
                        <h3 class="f20 fw-700">{{@$total_sekolah_nasional}} <span class="f12 fw-300">Sekolah</span> </h3>
                    </div>
                    <div>
                        <div class="p-2 bg-white rounded-circle">
                            <i class="fal fa-trophy f16 text-warning"></i>
                        </div> 
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card bg-info text-white">
            <div class="card-body">
                <div class="d-flex flex-row justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n">Sekolah Adiwiyata Mandiri</span> <br><br>
                        <h3 class="f20 fw-700">{{@$total_sekolah_mandiri}} <span class="f12 fw-300">Sekolah</span> </h3>
                    </div>
                    <div>
                        <div class="p-2 bg-white rounded-circle">
                            <i class="fal fa-trophy f16 text-info"></i>
                        </div> 
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<hr>
<div class="row mb-2">
    <div class="col-12">
        <h5 class="fw-500">Statistik Sampah Terkelola</h5>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row  justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n fw-500">Total Sampah Organik</span> <br><br>
                        <h3 class="f20 fw-700 ">{{number_format(@$summary->organik)}} <span class="f12 fw-300">Kg</span> </h3>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row  justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n fw-500">Total Sampah Anorganik</span> <br><br>
                        <h3 class="f20 fw-700 ">{{number_format(@$summary->anorganik)}} <span class="f12 fw-300">Kg</span> </h3>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row  justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n fw-500">Total Sampah B3</span> <br><br>
                        <h3 class="f20 fw-700 ">{{number_format(@$summary->b3)}} <span class="f12 fw-300">Kg</span> </h3>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row  justify-content-between align-items-center">
                    <div>
                        <span class="m-0 l-h-n fw-500">Total Sampah Minyak Jelantah</span> <br><br>
                        <h3 class="f20 fw-700 ">{{number_format(@$summary->minyak)}} <span class="f12 fw-300">Kg</span> </h3>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="row mt-4">
    <div class="col-lg-6">
        <div id="panel-4" class="card">
            <div class="card-header d-flex justify-content-between">
                <h5 class="fw-500 text-primary">Verifikasi Kuesioner Leveling</h5>
                <a href="{{ url('kuesioner') }}"><u>Lihat Semua&nbsp;<i class="fal fa-arrow-right"></i></u></a>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table w-100" 
                        data-search="false"
                        data-toggle="table"
                        data-pagination="true"
                        data-toolbar="#toolbar"
                        data-show-refresh="false"
                        data-url="{{route($route.'.gridAdministrasi')}}"
                        data-ajax-options='{"xhrFields": {"withCredentials": true}}'
                        data-sort-name="ids"
                        data-sort-order="desc"
                        data-page-size="10"
                        data-id-field="id"
                        id="grid-data">
                            <thead class="table-secondary">
                            <tr>
                                <th data-field="action">#</th>
                                <th data-field="no">No</th>
                                {{-- <th data-field="status_level">Status Level</th> --}}
                                {{-- <th data-field="npsn">NPSN</th> --}}
                                <th data-field="nama">Nama Sekolah</th>
                                <th data-field="wilayah">Wilayah</th>
                                <th data-field="kecamatan">Kecamatan</th>
                                <!-- <th data-field="penghargaan">Penghargaan Terakhir</th> -->
                                <th data-field="status">Status</th>
                            </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-6">
        <div id="panel-4" class="card">
            <div class="card-header bg-primary-light">
                <h5 class="fw-500 text-primary">Usulan Adiwiyata</h5>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    {{-- <div id="toolbar">
                        <div class="d-flex align-items-center gap-2">
                            <div>
                                <b>Filter :</b>
                            </div>
                            <div>
                                <select class="form-control" name="" id="">
                                    @for ($i = date('Y')-3;   date('Y') >= $i; $i++)
                                        <option {{ $i == date('Y') ? 'selected' : '' }} value="{{$i}}">{{$i}}</option>
                                    @endfor
                                </select>
                            </div>
                        </div>
                    </div> --}}
                    <table class="table w-100" 
                        data-search="false"
                        data-toggle="table"
                        data-pagination="true"
                        data-toolbar="#toolbar"
                        data-show-refresh="false"
                        data-url="{{route($route.'.gridUsulan')}}"
                        data-ajax-options='{"xhrFields": {"withCredentials": true}}'
                        data-sort-name="ids"
                        data-sort-order="desc"
                        data-page-size="10"
                        data-id-field="id"
                        id="grid-data">
                            <thead class="bg-primary-light text-primary">
                            <tr>
                                <th data-field="no">No</th>
                                <th data-field="dataSekolah">Data Sekolah</th>
                                <th data-field="status">Status</th>
                                {{-- <th data-field="nama_sekolah">Nama Sekolah</th> --}}
                                {{-- <th data-field="kab">Kab/Kota</th> --}}
                                {{-- <th data-field="kecamatan">Kecamatan</th> --}}
                                {{-- <th data-field="tahun">Tahun</th> --}}
                                {{-- <th data-field="usulan_sebelumnya">Usulan Sebelumnya</th> --}}
                                {{-- <th data-field="pengajuan_usulan">Pengajuan Usulan</th> --}}
                            </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@section('page-js')
@endsection