indexmonevIII.blade.php 13 KB
Newer Older
Muhammad Iskandar Java committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
@extends('layouts.master')

@section('title')
    Dashboard
@endsection

@section('header')
<div class="page-title">
    <h3>Dashboard</h3>
</div>
@endsection

@section('contents')
    <!-- start page title -->
    <div class="page-title-box">
        <div class="row align-items-center">
            <div class="col-md-8">
                <h6 class="page-title">{!! $title !!}</h6>
                <ol class="breadcrumb m-0">
                    <li class="breadcrumb-item">Mahasiswa</li>
                    <li class="breadcrumb-item">{!! $title !!}</li>
                </ol>
            </div>
            <div class="col-md-4">

            </div>
        </div>

    </div>
    <!-- end page title -->

    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <form action="{{ route('dosen.monev-index', ['id' => $idmonev]) }}">
                        <div class="row">
                            <div class="col-md-8"></div>
                            <div class="col-md-4 text-right">
                                <div class="row">
                                    <label class="col-sm-3 col-form-label"></label>
                                    <label class="col-sm-3 col-form-label">Tahun : </label>
                                    <div class="col-sm-6">
                                        <select class="form-select" name="year" onchange="this.form.submit()">
                                        @foreach($periode as $per)
                                            <option value="{{ $per->nama }}" {{ $year == $per->nama ? 'selected' : '' }}>{{ $per->nama }}</option>
                                        @endforeach
                                    </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                    <br>
                    @if(($jadwal->tanggal_mulai <= Carbon\Carbon::now()) && ($jadwal->tanggal_selesai >= Carbon\Carbon::now()))
                    <table id="datatable" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                        <thead>
                        <tr>
                            <th>No</th>
                            <th>Kode Kelompok</th>
                            <th>Identitas Ketua</th>
62
                            <th>Kategori PMW</th>
Muhammad Iskandar Java committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
                            <th>Judul Proposal</th>
                            <th>Catatan Harian (Logbook)</th>
                            <th>Laporan Kemajuan</th>
                            <th>Laporan Akhir</th>
                            <th>Aksi</th>
                        </tr>
                        </thead>
                        <tbody>
                            @foreach ($proposal as $item)
                            @php $token = Str::random(30); @endphp
                            <tr id="row-{{ $token }}">
                                <td>{{ $loop->iteration }}</td>
                                <td>{{ $item->rProposal->rKelompok->kode }}</td>
                                <td>{{ $item->rProposal->rKelompok->rBiodata->name }} <br> {{ $item->rProposal->rKelompok->rBiodata->noidentitas }} <br> {{ $item->rProposal->rKelompok->rBiodata->fakultas }} <br> {{ $item->rProposal->rKelompok->rBiodata->prodi }}</td>
                                <td>{{ $item->rProposal->rJenis->nama }}</td>
                                <td>{{ $item->rProposal->judul }}</td>
                                <td>
                                    @if(is_null($item->logbook_file))
                                        <span class="badge bg-danger">Belum Upload</span>
                                    @else
Muhammad Iskandar Java committed
83
                                        <a href="https://statik.unesa.ac.id/simpmw/monev/III/logbook/{{ $item->logbook_file }}" target="_blank" title="Logbook" class="btn btn-info btn-sm waves-effect waves-light"> <i class="fas fa-search"></i> Lihat</a>
Muhammad Iskandar Java committed
84 85 86 87 88 89
                                    @endif
                                </td>
                                <td>
                                    @if(is_null($item->kemajuan_file))
                                        <span class="badge bg-danger">Belum Upload</span>
                                    @else
Muhammad Iskandar Java committed
90
                                        <a href="https://statik.unesa.ac.id/simpmw/monev/III/kemajuan/{{ $item->kemajuan_file }}" target="_blank" title="Laporan Kemajuan" class="btn btn-info btn-sm waves-effect waves-light"> <i class="fas fa-search"></i> Lihat</a>
Muhammad Iskandar Java committed
91 92 93 94 95 96
                                    @endif
                                </td>
                                <td>
                                    @if(is_null($item->akhir_file))
                                        <span class="badge bg-danger">Belum Upload</span>
                                        @else
Muhammad Iskandar Java committed
97
                                        <a href="https://statik.unesa.ac.id/simpmw/monev/III/akhir/{{ $item->akhir_file }}" target="_blank" title="Laporan Akhir" class="btn btn-info btn-sm waves-effect waves-light"> <i class="fas fa-search"></i> Lihat</a>
Muhammad Iskandar Java committed
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
                                        @endif
                                </td>
                                <td>
                                    <button data-bs-toggle="modal" data-bs-target="{{ '#lihat'.$item->proposal_id }}" class="btn btn-success btn-sm">Lihat Hasil Penilaian</button>

                                    <div id="{{ 'lihat'.$item->proposal_id }}" class="modal fade" tabindex="-1" role="dialog"
                                        aria-labelledby="lihatLabel" aria-hidden="true">
                                        <div class="modal-dialog modal-xl">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <h5 class="modal-title" id="lihatLabel">{{ $title }}</h5>
                                                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                                                </div>
                                                <div class="modal-body">
                                                    <p>
                                                        <div class="table-responsive">
                                                            <table class="table mb-0">
                                                                <tr>
                                                                    <th>Judul Proposal</th>
                                                                    <td colspan="2">{{ $item->rProposal->judul }}</td>
                                                                </tr>
                                                                <tr>
120
                                                                    <th>Kategori PMW</th>
Muhammad Iskandar Java committed
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
                                                                    <td colspan="2">{{ $item->rProposal->rJenis->nama }}</td>
                                                                </tr>
                                                                <tr>
                                                                    <th>Status</th>
                                                                    <td colspan="2">
                                                                        @if(is_null($item->rProposal->status))
                                                                            <span class="badge bg-danger">Lolos Seleksi Internal</span>
                                                                        @else
                                                                            <span class="badge bg-success">Tidak Lolos Seleksi Internal</span>
                                                                        @endif
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <th>Nilai</th>
                                                                    <td>
                                                                        <h4 class="card-title mb-4">Reviewer 1 - {{ $item->rNilaiMonev->rReviewerBio1 ? $item->rNilaiMonev->rReviewerBio1->nama : '' }}</h4>
                                                                        <h5 class="text-muted mt-3">Nilai - {{ $item->rNilaiMonev->nilai_1 }}</h5>
                                                                    </td>
                                                                    <td>
                                                                        <h4 class="card-title mb-4">Reviewer 2 - {{ $item->rNilaiMonev->rReviewerBio2 ? $item->rNilaiMonev->rReviewerBio2->nama : '' }}</h4>
                                                                        <h5 class="text-primary mt-3">Nilai - {{ $item->rNilaiMonev->nilai_2 }}</h5>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <th>Komentar</th>
                                                                    <td colspan="2">
                                                                        <h4 class="card-title mb-4">Reviewer 1 - {{ $item->rNilaiMonev->rReviewerBio1 ? $item->rNilaiMonev->rReviewerBio1->nama : '' }}</h4>
                                                                        <p class="text-muted mb-3 pb-4">" {{ $item->rNilaiMonev->reviewer_komentar_1 }}"</p>

                                                                        <h4 class="card-title mb-4">Reviewer 2 - {{ $item->rNilaiMonev->rReviewerBio2 ? $item->rNilaiMonev->rReviewerBio2->nama : '' }}</h4>
                                                                        <p class="text-muted mb-3 pb-4">" {{ $item->rNilaiMonev->reviewer_komentar_2 }}"</p>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                </td>
                            </tr>
                            @endforeach
                        </tbody>
                    </table>
                    @else
                    <div class="alert alert-success alert-dismissible fade show" role="alert">
                        <strong>Informasi!</strong> Monev Internal III dilaksanakan pada : <strong>Tanggal {{ Carbon\Carbon::parse($jadwal->tanggal_mulai)->isoFormat('D MMMM Y'); }}</strong> sampai dengan <strong>Tanggal {{ Carbon\Carbon::parse($jadwal->tanggal_selesai)->isoFormat('D MMMM Y'); }}.</strong>
                    </div>
                    @endif

                </div>
            </div>
        </div> <!-- end col -->
    </div> <!-- end row -->

@endsection

@section('js')
<script>

    function hapus(id, rowId){
        Swal.fire({
            title: 'Apakah anda yakin untuk menghapus Kelompok?',
            text: "Semua anggota kelompok juga akan terhapus",
            icon: 'warning',
            showCancelButton: true,
            confirmButtonText: 'OK',
        }).then((result) => {
            if (result.isConfirmed) {
                var token = '{{ csrf_token() }}';
                var request = $.ajax({
                    url: '{{ route('mahasiswa.proposal.hapus') }}',
                    type: 'POST',
                    dataType: 'html',
                    data: {id:id, _token:token},
                    success: function(data){
                        Swal.fire({
                            title: 'Data Berhasil Di Hapus',
                            icon: 'success',
                            showConfirmButton: false,
                            timer: 1500
                        });

                        $('#'+rowId).remove();
                    },
                    error: function(xhr, status, error){
                        Swal.fire({
                            position: 'top-end',
                            icon: 'error',
                            title: xhr.responseText,
                            showConfirmButton: false,
                            timer: 3500
                        });
                    }
                });
            }
        })
    }
</script>
@endsection