Anons79 Mini Shell

Directory : /home/aplikasiposinfo/www/isranhadikaltim.id/resources/views/rekap/
Upload File :
Current File : /home/aplikasiposinfo/www/isranhadikaltim.id/resources/views/rekap/table.blade.php

@extends('layouts.app')

@section('content')
    <!-- Default box -->
    <div class="box">
        <div class="box-header with-border">
            <h3 class="box-title">Data {{ $title }}</h3>
            @if ($title != 'Rekap Jumlah Inputan Pengguna' && $title != 'Rekap Jumlah Surat Dukungan')
                <h4>Total Data : {{ $data_total }}</h4>
            @endif
            <div class="box-tools pull-right">
                <button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
                    <i class="fa fa-minus"></i></button>

            </div>
        </div>
                <!-- /.box-body -->
        @if ($title != 'Rekap Jumlah Inputan Pengguna' && $title != 'Rekap Jumlah Surat Dukungan')
            <div class="box-footer">
                {!! $datas->appends(request()->except('page'))->links() !!}
            </div>
        @endif
        <!-- /.box-footer-->
        <div class="box-body" style="overflow-x: scroll;">
            @include($formCari)

            @if ($title == 'Rekap Jumlah Surat Dukungan')
                <table id="example2" class="table-responsive no-padding table table-bordered table-hover">
                    <thead>
                        <tr>
                            <th>NO</th>
                            <th>HARI</th>
                            <th>TANGGAL</th>
                            <th>JUMLAH SURAT DUKUNGAN KELUAR</th>
                            <th>JUMLAH SURAT DUKUNGAN MASUK</th>
                        </tr>
                    </thead>
                    <tbody>
                        @php
                            $total_keluar = 0;
                            $total_masuk = 0;

                            $hari = ['NULL', 'senin', 'selasa', 'rabu', 'kamis', "jum'at", 'sabtu', 'minggu'];
                        @endphp
                        @foreach ($datas as $a)
                            <tr>
                                <td>
                                    {{ $no++ }}
                                </td>
                                <td>{{ strtoupper($hari[date('N', strtotime($a->tanggal))]) }}</td>
                                <td>{{ date('d/m/Y', strtotime($a->tanggal)) }}</td>
                                <td>{{ $a->surduk_keluar }}</td>
                                <td>{{ $a->surduk_masuk }}</td>
                                {{-- <td>{{ $a->total }}</td> --}}
                                @php
                                    $total_keluar += $a->surduk_keluar;
                                    $total_masuk += $a->surduk_masuk;
                                @endphp
                            </tr>
                        @endforeach
                        <tr>
                            <th colspan="3" style="text-align: center;">JUMLAH</th>
                            <th>{{ $total_keluar }}</th>
                            <th>{{ $total_masuk }}</th>
                        </tr>
                    </tbody>
                    <tbody>

                    </tbody>
                </table>
            @elseif ($title != 'Rekap Jumlah Inputan Pengguna')
                <table id="example2" class="table-responsive no-padding table table-bordered table-hover">
                    <thead>
                        <tr>
                            <th>No</th>
                            <th>Nama</th>
                            <th>NIK <br> (16 Digit)</th>
                            <th>Jenis Kelamin (P/L) </th>
                            <th>Alamat</th>
                            <th>RT (Jika Ada)</th>
                            <th>RW (Jika Ada)</th>
                            {{-- <th></th> --}}
                            <th>Tempat Lahir</th>
                            <th>Tanggal Lahir <br> (dd-mm-yyyy)</th>
                            <th>Kode Pekerjaan</th>
                            <th>Belum / Sudah / Pernah Kawin <br> (B/S/P*)</th>
                            {{-- <th>TTD/Cap Jempol</th> --}}
                            <th>Kode Kelurahan Alamat KTP</th>
                            <th>No. Telp</th>
                            <th>Email</th>
                            <th>Nama <br> Penghubung</th>
                            <th>No.Telp</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach ($datas as $data)
                            <tr>
                                <td>
                                    {{ $no++ }}
                                </td>
                                <td>
                                    {{ $data->nama_lengkap }}
                                </td>
                                <td>
                                    {{ $data->nik }}
                                </td>
                                <td>
                                    {{ substr($data->jenis_kelamin, 0, 1) }}
                                </td>
                                <td>
                                    {{ $data->alamat }}
                                </td>
                                @php
                                    $rt = explode('/', $data->rt);
                                    if (count($rt) == 1) {
                                        $rt[] = 0;
                                    }
                                @endphp
                                <td>
                                    {{ $rt[0] }}
                                </td>
                                <td>

                                    {{ $data->rw == 0 ? $rt[1] : $data->rw }}
                                </td>
                                <td>
                                    {{ $data->tempat_lahir }}
                                </td>
                                <td>
                                    {{ date('d-m-Y', strtotime($data->tanggal_lahir)) }}
                                </td>
                                <td>
                                    @php
                                        $pekerjaan = explode('/', $data->pekerjaan);
                                        echo $pekerjaan[0];
                                    @endphp
                                    {{-- {{ $data->pekerjaan }} --}}
                                </td>
                                <td>
                                    {{ substr($data->kawin, 0, 1) }}
                                </td>
                                {{-- <td>
                                    {{ $data->keterangan }}
                                </td> --}}
                                <td>
                                    {{ $data->kelurahan_id }}
                                </td>
                                <td>
                                    {{ $data->no_telepon }}
                                </td>
                                <td>
                                    {{ $data->email != null ? $data->email : '-' }}
                                </td>
                                <td>
                                    {{ $data->nama_penghubung }}
                                </td>
                                <td>
                                    {{ $data->no_telp_penghubung }}
                                </td>
                            </tr>
                        @endforeach
                    </tbody>
                </table>
            @else
                <table id="example2" class="table-responsive no-padding table table-bordered table-hover">
                    <thead>
                        <tr>
                            <th>No</th>
                            <th>Nama Pengguna</th>
                            <th>Role Pengguna</th>
                            <th>Total Data Warga</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach ($datas as $a)
                            <tr>
                                <td>{{ $no++ }}</td>
                                <td>{{ $a->name }}</td>
                                <td>
                                    @if ($a->role == 0)
                                        User Operator
                                    @elseif ($a->role == 1)
                                        User Super Admin
                                    @elseif ($a->role == 2)
                                        User Admin
                                    @endif
                                </td>
                                <td>{{ $a->total }} data</td>
                            </tr>
                        @endforeach
                    </tbody>
                </table>
            @endif
        </div>

    </div>
    <!-- /.box -->
    <script>
        @section('jquery')
            $(document).ready(function() {
                $('.select2').select2();
            });
        @endsection
        // $(function() {
        //     alert("SATE");
        //     // $('.select2').select2();
        // });
    </script>
@endsection

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]