Web FT UNTAN (Laravel 8) versi lama + dump database ftuntan_web_profil
Kode dari ftuntan_main dengan dependensi diperbarui untuk PHP 8.3 (perbaikan insiden 27 Okt 2026). Dump database di database/sql/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,550 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Kerjasama & Mitra Kolaborasi - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo url('portal_template/assets/js/jquery.dataTables.min.js'); ?>"></script>
|
||||
<script src="<?php echo url('portal_template/assets/js/dataTables.bootstrap4.min.js'); ?>"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<style>
|
||||
td{
|
||||
color:#595959;
|
||||
}
|
||||
|
||||
canvas{
|
||||
max-height:300px;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
.buttons-excel{
|
||||
height:30px;
|
||||
width:90px;
|
||||
margin-bottom:2rem;
|
||||
}
|
||||
|
||||
.buttons-excel span{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.buttons-excel:after {
|
||||
content: 'Ekspor Excel';
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Kerjasama & Mitra Kolaborasi</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
|
||||
<?php
|
||||
$rawData = file_get_contents("https://sikerja.untan.ac.id/API/public/getKerjasamaByFakultas.php?status=all&idPengelola=19");
|
||||
$listKerma = json_decode($rawData, true);
|
||||
?>
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-12">
|
||||
<div id="page-main">
|
||||
<section class="blog-listing" id="blog-listing">
|
||||
<header>
|
||||
<h1>Kerjasama & Mitra Kolaborasi</h1>
|
||||
</header>
|
||||
|
||||
<div class="panel-heading panel-heading-nav">
|
||||
<ul class="nav nav-tabs" style="z-index: 0">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#1" aria-controls="1" role="tab" data-toggle="tab">Data Kerjasama</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#2" aria-controls="2" role="tab" data-toggle="tab">Survey Kepuasan</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane fade in active" id="1">
|
||||
<h3>Statistik Kerjasama</h3>
|
||||
<select id="statistikKermaDropdown" onchange="refreshStatsKerma()">
|
||||
<option value="1">1 Tahun Terakhir</option>
|
||||
<option value="3">3 Tahun Terakhir</option>
|
||||
<option value="5">5 Tahun Terakhir</option>
|
||||
</select>
|
||||
<div id="parentDivStatsKerma"></div>
|
||||
|
||||
<h3>Data Kerjasama Fakultas Teknik UNTAN</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_kerma" class="table table-hover tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No.</th>
|
||||
<th>Nama Mitra</th>
|
||||
<th>Nomor Kerjasama</th>
|
||||
<th>Kriteria Mitra</th>
|
||||
<th>Deskripsi</th>
|
||||
<th>Bidang</th>
|
||||
<th>Jenis Kerjasama</th>
|
||||
<th>Tanggal Mulai</th>
|
||||
<th>Tanggal Selesai</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Nama Mitra</th>
|
||||
<th></th>
|
||||
<th>Kriteria Mitra</th>
|
||||
<th></th>
|
||||
<th>Bidang</th>
|
||||
<th>Jenis Kerjasama</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$no = 1;
|
||||
foreach($listKerma as $keyKerma => $valKerma){
|
||||
echo '<tr>
|
||||
<td>'.$no.'</td>
|
||||
<td>'.$valKerma['mitra'].'</td>
|
||||
<td>'.$valKerma['nomorUntan'].'</td>
|
||||
<td>'.$valKerma['kriteria'].'</td>
|
||||
<td>'.$valKerma['deskripsi'].'</td>
|
||||
<td>'.$valKerma['bidang'].'</td>
|
||||
<td>'.$valKerma['jenis'].'</td>
|
||||
<td>'.$valKerma['tglMulai'].'</td>
|
||||
<td>'.$valKerma['tglSelesai'].'</td>
|
||||
<td>'.$valKerma['status'].'</td>
|
||||
</tr>';
|
||||
$no++;
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="2">
|
||||
<h3>Kepuasan Mitra Kerjasama</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div id="parentChartHasilSurvey"></div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<table class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Keterangan</th>
|
||||
<th>Persentase (%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>Sangat Puas</td><td>63.6 %</td></tr>
|
||||
<tr><td>Puas</td><td>36.4 %</td></tr>
|
||||
<tr><td>Kurang Puas</td><td>0 %</td></tr>
|
||||
<tr><td>Tidak Puas</td><td>0 %</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4>Sumber Data : <a href="https://sikerja.untan.ac.id/" target="_blank">SIKERJA UNTAN</a></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section><!-- /.blog-listing -->
|
||||
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $kerjasamaMitraKolaborasis->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-6">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
<div class="col-md-6">
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div>
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
|
||||
<script>
|
||||
let chartColors={mou:"rgb(0, 176, 80)",pksMoa:"rgb(0, 176, 240)",iA:"rgb(255, 192, 0)",};
|
||||
let listColorChart=["rgb(72,191,142)","rgb(0,121,97)","rgb(125,194,221)","rgb(55,68,117)","rgb(232,162,222)","rgb(132,56,186)","rgb(68,124,254)","rgb(226,109,248)","rgb(127,33,87)","rgb(240,52,143)",];
|
||||
|
||||
$(document).ready(function() {
|
||||
let indexNoFilter = [0, 2, 4, 7, 8];
|
||||
$('#tabel_kerma').DataTable({
|
||||
dom: 'Blfrtip',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
},
|
||||
|
||||
],
|
||||
initComplete: function () {
|
||||
this.api()
|
||||
.columns()
|
||||
.every(function () {
|
||||
var column = this;
|
||||
const idx = this.index();
|
||||
if(indexNoFilter.includes(idx)){
|
||||
return ;
|
||||
}
|
||||
|
||||
var select = $('<select style="width:100px"><option value=""></option></select>')
|
||||
.appendTo($(column.footer()).empty())
|
||||
.on('change', function () {
|
||||
var val = $.fn.dataTable.util.escapeRegex($(this).val());
|
||||
|
||||
column.search(val ? '^' + val + '$' : '', true, false).draw();
|
||||
});
|
||||
|
||||
column
|
||||
.data()
|
||||
.unique()
|
||||
.sort()
|
||||
.each(function (d, j) {
|
||||
select.append('<option value="' + d + '">' + d + '</option>');
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
refreshStatsKerma();
|
||||
});
|
||||
|
||||
function refreshStatsKerma() {
|
||||
const banyakTahun = $('#statistikKermaDropdown').val();
|
||||
$('#parentDivStatsKerma').html(`Mengambil Data . . .`);
|
||||
|
||||
let request = $.ajax({
|
||||
url: `/stats_kerma/${banyakTahun}`,
|
||||
type: "GET",
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
cache: false,
|
||||
});
|
||||
|
||||
request.done(function (msg) {
|
||||
|
||||
$('#parentDivStatsKerma').html(`
|
||||
<div class="row">
|
||||
<canvas id="chartKriteria" style="display: block"></canvas>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 maxChart"><canvas id="chartDalamNegeri"></canvas></div>
|
||||
<div class="col-md-6 maxChart"><canvas id="chartLuarNegeri"></canvas></div>
|
||||
</div>
|
||||
`);
|
||||
|
||||
const data = msg.data;
|
||||
let chartLabels = [];
|
||||
let mouDalamNegeri = [];
|
||||
let pksMoaDalamNegeri = [];
|
||||
let iADalamNegeri = [];
|
||||
let mouLuarNegeri = [];
|
||||
let pksMoaLuarNegeri = [];
|
||||
let iALuarNegeri = [];
|
||||
let mouPT = [];
|
||||
let pksMoaPT = [];
|
||||
let iAPT = [];
|
||||
let mouNonPT = [];
|
||||
let pksMoaNonPT = [];
|
||||
let iANonPT = [];
|
||||
let labelKriteria = [];
|
||||
let datasetKriteria = [];
|
||||
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const tahun = data[i].tahun;
|
||||
const wilayah = data[i].wilayah;
|
||||
const pt = data[i].perguruanTinggi;
|
||||
const kriteria = data[i].kriteria;
|
||||
mouDalamNegeri.push(wilayah.dalamNegeri.mou);
|
||||
pksMoaDalamNegeri.push(wilayah.dalamNegeri.pksMoa);
|
||||
iADalamNegeri.push(wilayah.dalamNegeri.iA);
|
||||
mouLuarNegeri.push(wilayah.luarNegeri.mou);
|
||||
pksMoaLuarNegeri.push(wilayah.luarNegeri.pksMoa);
|
||||
iALuarNegeri.push(wilayah.luarNegeri.iA);
|
||||
mouPT.push(pt.PT.mou);
|
||||
pksMoaPT.push(pt.PT.pksMoa);
|
||||
iAPT.push(pt.PT.iA);
|
||||
mouNonPT.push(pt.NonPT.mou);
|
||||
pksMoaNonPT.push(pt.NonPT.pksMoa);
|
||||
iANonPT.push(pt.NonPT.iA);
|
||||
let valueKriteria = [];
|
||||
for (let j = 0; j < kriteria.length; j++) {
|
||||
let dKriteria = kriteria[j];
|
||||
if (i == 0) {
|
||||
labelKriteria.push(formatLabel(dKriteria.nama, 30));
|
||||
}
|
||||
valueKriteria.push(dKriteria.banyak);
|
||||
}
|
||||
datasetKriteria.push({
|
||||
label: tahun,
|
||||
backgroundColor: listColorChart[i],
|
||||
data: valueKriteria,
|
||||
axis: "y",
|
||||
});
|
||||
chartLabels.push(tahun);
|
||||
}
|
||||
|
||||
let chartDalamNegeriData = {
|
||||
labels: chartLabels,
|
||||
datasets: [
|
||||
{
|
||||
label: "MoU",
|
||||
backgroundColor: chartColors.mou,
|
||||
data: mouDalamNegeri,
|
||||
},
|
||||
{
|
||||
label: "PKS/MoA",
|
||||
backgroundColor: chartColors.pksMoa,
|
||||
data: pksMoaDalamNegeri,
|
||||
},
|
||||
{ label: "IA", backgroundColor: chartColors.iA, data: iADalamNegeri },
|
||||
],
|
||||
};
|
||||
|
||||
let chartLuarNegeriData = {
|
||||
labels: chartLabels,
|
||||
datasets: [
|
||||
{ label: "MoU", backgroundColor: chartColors.mou, data: mouLuarNegeri },
|
||||
{
|
||||
label: "PKS/MoA",
|
||||
backgroundColor: chartColors.pksMoa,
|
||||
data: pksMoaLuarNegeri,
|
||||
},
|
||||
{ label: "IA", backgroundColor: chartColors.iA, data: iALuarNegeri },
|
||||
],
|
||||
};
|
||||
|
||||
let chartKriteriaData = {
|
||||
labels: labelKriteria,
|
||||
datasets: datasetKriteria,
|
||||
};
|
||||
|
||||
let ctxDalamNegeri = document
|
||||
.getElementById("chartDalamNegeri")
|
||||
.getContext("2d");
|
||||
new Chart(ctxDalamNegeri, {
|
||||
type: "bar",
|
||||
data: chartDalamNegeriData,
|
||||
options: {
|
||||
plugins: {
|
||||
title: { display: true, text: "Data Kerjasama Dalam Negeri" },
|
||||
tooltip: { mode: "index", intersect: false },
|
||||
legend: { position: "bottom" },
|
||||
maintainAspectRatio: true,
|
||||
responsive: true,
|
||||
scales: {
|
||||
xAxes: [{ stacked: true }],
|
||||
yAxes: [{ stacked: true, ticks: { suggestedMin: 0 } }],
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
let ctxLuarNegeri = document
|
||||
.getElementById("chartLuarNegeri")
|
||||
.getContext("2d");
|
||||
new Chart(ctxLuarNegeri, {
|
||||
type: "bar",
|
||||
data: chartLuarNegeriData,
|
||||
options: {
|
||||
plugins: {
|
||||
title: { display: true, text: "Data Kerjasama Luar Negeri" },
|
||||
tooltip: { mode: "index", intersect: false },
|
||||
legend: { position: "bottom" },
|
||||
maintainAspectRatio: false,
|
||||
responsive: true,
|
||||
scales: {
|
||||
xAxes: [{ stacked: true }],
|
||||
yAxes: [{ stacked: true, ticks: { suggestedMin: 0 } }],
|
||||
},
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
let ctxKriteria = document.getElementById("chartKriteria").getContext("2d");
|
||||
new Chart(ctxKriteria, {
|
||||
type: "bar",
|
||||
data: chartKriteriaData,
|
||||
options: {
|
||||
plugins:{
|
||||
indexAxis: "y",
|
||||
title: {
|
||||
display: true,
|
||||
text: "Data Kerja Sama Berdasarkan Kriteria Mitra",
|
||||
},
|
||||
tooltip: { mode: "index", intersect: false },
|
||||
legend: { position: "bottom" },
|
||||
maintainAspectRatio: false,
|
||||
responsive: true,
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
request.fail(function (jqXHR, textStatus) {
|
||||
$('#parentDivStatsKerma').html(`Gagal Mengambil Data . . .`);
|
||||
});
|
||||
}
|
||||
|
||||
function formatLabel(str, maxwidth) {
|
||||
var sections = [];
|
||||
var words = str.split(" ");
|
||||
var temp = "";
|
||||
words.forEach(function (item, index) {
|
||||
if (temp.length > 0) {
|
||||
var concat = temp + " " + item;
|
||||
if (concat.length > maxwidth) {
|
||||
sections.push(temp);
|
||||
temp = "";
|
||||
} else {
|
||||
if (index == words.length - 1) {
|
||||
sections.push(concat);
|
||||
return;
|
||||
} else {
|
||||
temp = concat;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (index == words.length - 1) {
|
||||
sections.push(item);
|
||||
return;
|
||||
}
|
||||
if (item.length < maxwidth) {
|
||||
temp = item;
|
||||
} else {
|
||||
sections.push(item);
|
||||
}
|
||||
});
|
||||
return sections;
|
||||
}
|
||||
|
||||
let chartData = {
|
||||
labels: ['Sangat Puas', 'Puas', 'Kurang Puas', 'Tidak Puas'],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Hasil Survey Kepuasan Mitra Kerjasama',
|
||||
data: [63.6, 36.4, 0, 0],
|
||||
backgroundColor: [listColorChart[0], listColorChart[1], listColorChart[2], listColorChart[3]],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('#parentChartHasilSurvey').html(`<canvas id="chartHasilSurvey"></canvas>`);
|
||||
|
||||
let ctxChartHasilSurvey = document
|
||||
.getElementById("chartHasilSurvey")
|
||||
.getContext("2d");
|
||||
|
||||
new Chart(ctxChartHasilSurvey, {
|
||||
type: "pie",
|
||||
data: chartData,
|
||||
options: {
|
||||
title: {
|
||||
display: true,
|
||||
text: "Hasil Survey Kerjasama Mitra",
|
||||
},
|
||||
tooltips: {
|
||||
callbacks: {
|
||||
label: function(tooltipItem, data) {
|
||||
var dataset = data.datasets[tooltipItem.datasetIndex];
|
||||
var meta = dataset._meta[Object.keys(dataset._meta)[0]];
|
||||
var total = meta.total;
|
||||
var currentValue = dataset.data[tooltipItem.index];
|
||||
var percentage = parseFloat((currentValue/total*100).toFixed(1));
|
||||
return currentValue + ' (' + percentage + '%)';
|
||||
},
|
||||
title: function(tooltipItem, data) {
|
||||
return data.labels[tooltipItem[0].index];
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
position: "bottom",
|
||||
},
|
||||
maintainAspectRatio: false,
|
||||
responsive: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user