parent
93c5ba7720
commit
8252a9b0d3
|
@ -4,15 +4,17 @@
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Hasil;
|
use App\Models\Hasil;
|
||||||
|
use Barryvdh\DomPDF\Facade\Pdf as FacadePdf;
|
||||||
|
use Barryvdh\DomPDF\PDF as DomPDFPDF;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
|
||||||
class AdminResultController extends Controller
|
class AdminResultController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$results = Hasil::with('user')->get();
|
$results = Hasil::with('user')->get();
|
||||||
|
|
||||||
$results = $results->map(function ($result) {
|
$results = $results->map(function ($result) {
|
||||||
$result->formatted_created_at = Carbon::parse($result->created_at)->format('M d, Y');
|
$result->formatted_created_at = Carbon::parse($result->created_at)->format('M d, Y');
|
||||||
return $result;
|
return $result;
|
||||||
|
@ -20,4 +22,14 @@ public function index()
|
||||||
|
|
||||||
return view('admin_backend.admin_result', compact('results'));
|
return view('admin_backend.admin_result', compact('results'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
$result = Hasil::with('user')->findOrFail($id);
|
||||||
|
$result->formatted_created_at = Carbon::parse($result->created_at)->format('M d, Y');
|
||||||
|
return view('admin_backend.admin_pdf_result', compact('result'));
|
||||||
|
}
|
||||||
|
public function cetak_pdf($id)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7848,5 +7848,5 @@
|
||||||
"php": "^7.3|^8.0"
|
"php": "^7.3|^8.0"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.2.0"
|
"plugin-api-version": "2.3.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,6 +161,7 @@
|
||||||
Illuminate\Translation\TranslationServiceProvider::class,
|
Illuminate\Translation\TranslationServiceProvider::class,
|
||||||
Illuminate\Validation\ValidationServiceProvider::class,
|
Illuminate\Validation\ValidationServiceProvider::class,
|
||||||
Illuminate\View\ViewServiceProvider::class,
|
Illuminate\View\ViewServiceProvider::class,
|
||||||
|
// Barryvdh\DomPDF\ServiceProvider::class,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Package Service Providers...
|
* Package Service Providers...
|
||||||
|
@ -229,6 +230,7 @@
|
||||||
'URL' => Illuminate\Support\Facades\URL::class,
|
'URL' => Illuminate\Support\Facades\URL::class,
|
||||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||||
'View' => Illuminate\Support\Facades\View::class,
|
'View' => Illuminate\Support\Facades\View::class,
|
||||||
|
// 'PDF' => Barryvdh\DomPDF\Facade::class,
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,136 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||||
|
|
||||||
|
<title>{{config('app.name')}}</title>
|
||||||
|
<meta content="" name="description">
|
||||||
|
<meta content="" name="keywords">
|
||||||
|
|
||||||
|
<!-- Google Fonts -->
|
||||||
|
<link href="https://fonts.gstatic.com" rel="preconnect">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Vendor CSS Files -->
|
||||||
|
<link href="{{ asset('admin_backend/assets/vendor/bootstrap/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
|
|
||||||
|
<link href="{{ asset('admin_backend/assets/css/style.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="bg-white">
|
||||||
|
|
||||||
|
<div class="container py-5">
|
||||||
|
<div class="row pb-1">
|
||||||
|
<div class="col-4 col-sm-3 col-md-2" style="font-weight: bold;">Nama</div>
|
||||||
|
<div class="col-1" style="font-weight: bold">:</div>
|
||||||
|
<div class="col-7 col-sm-8 col-md-9">{{ $result->user->nama_lengkap }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row pb-1">
|
||||||
|
<div class="col-4 col-sm-3 col-md-2" style="font-weight: bold;">Nim</div>
|
||||||
|
<div class="col-1" style="font-weight: bold">:</div>
|
||||||
|
<div class="col-7 col-sm-8 col-md-9">{{ $result->user->nim }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row pb-1">
|
||||||
|
<div class="col-4 col-sm-3 col-md-2" style="font-weight: bold;">Golongan</div>
|
||||||
|
<div class="col-1" style="font-weight: bold">:</div>
|
||||||
|
<div class="col-7 col-sm-8 col-md-9">{{ $result->user->kelas_user }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row pb-4">
|
||||||
|
<div class="col-4 col-sm-3 col-md-2" style="font-weight: bold;">Jurusan</div>
|
||||||
|
<div class="col-1" style="font-weight: bold">:</div>
|
||||||
|
<div class="col-7 col-sm-8 col-md-9">Teknologi Informasi</div>
|
||||||
|
</div>
|
||||||
|
<h5 style="font-weight: bold">Knowledge of Metacognitif(KM)</h5>
|
||||||
|
<div>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<th colspan="3">Total skor : {{ $result->km_total }}</th>
|
||||||
|
</thead>
|
||||||
|
<thead>
|
||||||
|
<th colspan="3">Kelas skor : {{ $result->km_class }}</th>
|
||||||
|
</thead>
|
||||||
|
<thead>
|
||||||
|
<th>No</th>
|
||||||
|
<th>Kategori</th>
|
||||||
|
<th>Nilai</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>1</td>
|
||||||
|
<td>Declarative Knowledge</td>
|
||||||
|
<td>{{ $result->declarative_knowledge }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2</td>
|
||||||
|
<td>Procedural Knowledge</td>
|
||||||
|
<td>{{ $result->procedural_knowledge }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>3</td>
|
||||||
|
<td>Conditional Knowledge</td>
|
||||||
|
<td>{{ $result->conditional_knowledge }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<h5 style="font-weight: bold" class="pt-5">Regulation of Metacognitif(RM)</h5>
|
||||||
|
<div>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<th colspan="3">Total skor : {{ $result->rm_total }}</th>
|
||||||
|
</thead>
|
||||||
|
<thead>
|
||||||
|
<th colspan="3">Kelas skor : {{ $result->rm_class }}</th>
|
||||||
|
</thead>
|
||||||
|
<thead>
|
||||||
|
<th>No</th>
|
||||||
|
<th>Kategori</th>
|
||||||
|
<th>Nilai</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>1</td>
|
||||||
|
<td>Planning</td>
|
||||||
|
<td>{{ $result->planning }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2</td>
|
||||||
|
<td>Information Management</td>
|
||||||
|
<td>{{ $result->information_management }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>3</td>
|
||||||
|
<td>Monitoring</td>
|
||||||
|
<td>{{ $result->monitoring }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>4</td>
|
||||||
|
<td>Debugging</td>
|
||||||
|
<td>{{ $result->debugging }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>5</td>
|
||||||
|
<td>Evaluation</td>
|
||||||
|
<td>{{ $result->evaluation }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="{{ asset('js/jquery.js')}}"></script>
|
||||||
|
<script src="{{ asset('admin_backend/assets/vendor/bootstrap/js/bootstrap.bundle.min.js')}}"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.print();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -62,7 +62,7 @@
|
||||||
<form action="{{ route('adminSelectPeriod') }}" method="POST" class="edit-periode">
|
<form action="{{ route('adminSelectPeriod') }}" method="POST" class="edit-periode">
|
||||||
@csrf
|
@csrf
|
||||||
<input type="text" class="form-control d-none" name="id_periode" value="{{ $period->id }}">
|
<input type="text" class="form-control d-none" name="id_periode" value="{{ $period->id }}">
|
||||||
<button type="submit" class="btn btn-primary btn-sm"><i class="bi bi-alarm"></i> Pilih</button>
|
<button type="submit" class="btn btn-primary btn-sm"><i class="bi bi-hand-index-fill me-1"></i> Pilih</button>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
<th>NAMA</th>
|
<th>NAMA</th>
|
||||||
<th>ANGKATAN</th>
|
<th>ANGKATAN</th>
|
||||||
<th>TANGGAL</th>
|
<th>TANGGAL</th>
|
||||||
<th>RM</th>
|
|
||||||
<th>KM</th>
|
<th>KM</th>
|
||||||
|
<th>RM</th>
|
||||||
<th>ACTION</th>
|
<th>ACTION</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -21,9 +21,9 @@
|
||||||
<td style="font-weight: bold">{{ $result->user->nama_lengkap }}</td>
|
<td style="font-weight: bold">{{ $result->user->nama_lengkap }}</td>
|
||||||
<td>{{ $result->user->angkatan }}</td>
|
<td>{{ $result->user->angkatan }}</td>
|
||||||
<td>{{ $result->formatted_created_at }}</td>
|
<td>{{ $result->formatted_created_at }}</td>
|
||||||
<td>{{ $result->rm_total }}</td>
|
<td>{{ $result->km_class }}</td>
|
||||||
<td>{{ $result->km_total }}</td>
|
<td>{{ $result->rm_class }}</td>
|
||||||
<td><button class="btn btn-primary btn-sm">Download</button></td>
|
<td><a href="{{ route('adminResult.show', ['admin_result' => $result->id]) }}" class="btn btn-primary btn-sm">Download</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -20,16 +20,16 @@
|
||||||
</li><!-- End Kuesioner Page Nav -->
|
</li><!-- End Kuesioner Page Nav -->
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link collapsed" href="{{ route('adminResult.index')}}">
|
<a class="nav-link collapsed" href="{{ route('adminPeriod.index')}}">
|
||||||
<i class="bi bi-book"></i>
|
<i class="bi bi-calendar4"></i>
|
||||||
<span>Hasil</span>
|
<span>Periode</span>
|
||||||
</a>
|
</a>
|
||||||
</li><!-- End Profile Page Nav -->
|
</li><!-- End Profile Page Nav -->
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link collapsed" href="{{ route('adminPeriod.index')}}">
|
<a class="nav-link collapsed" href="{{ route('adminResult.index')}}">
|
||||||
<i class="bi bi-calendar4"></i>
|
<i class="bi bi-book"></i>
|
||||||
<span>Periode</span>
|
<span>Hasil</span>
|
||||||
</a>
|
</a>
|
||||||
</li><!-- End Profile Page Nav -->
|
</li><!-- End Profile Page Nav -->
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,12 @@
|
||||||
Route::resource('listuser', 'ListUserController')->names('adminListUser');
|
Route::resource('listuser', 'ListUserController')->names('adminListUser');
|
||||||
Route::resource('listadmin', 'ListAdminController')->names('adminListAdmin');
|
Route::resource('listadmin', 'ListAdminController')->names('adminListAdmin');
|
||||||
Route::resource('admin-questionnaire', 'AdminQuestionnaireController')->names('adminQuestionnaire');
|
Route::resource('admin-questionnaire', 'AdminQuestionnaireController')->names('adminQuestionnaire');
|
||||||
Route::resource('admin-result', 'AdminResultController')->names('adminResult');
|
|
||||||
Route::resource('admin-period', 'AdminPeriodController')->names('adminPeriod');
|
Route::resource('admin-period', 'AdminPeriodController')->names('adminPeriod');
|
||||||
|
Route::resource('admin-result', 'AdminResultController')->names('adminResult');
|
||||||
|
|
||||||
|
// Route::get('admin-result', 'AdminResultController@index')->name('adminResult.index');
|
||||||
|
// Route::get('admin-result/cetak', 'AdminResultController@index');
|
||||||
|
Route::get('/hasil/cetak-pdf', 'AdminResultController@cetak_pdf')->name('userQuestionnaire.cetak');
|
||||||
Route::post('/select-period', 'SelectPeriodController@update')->name('adminSelectPeriod');
|
Route::post('/select-period', 'SelectPeriodController@update')->name('adminSelectPeriod');
|
||||||
Route::post('/select-period/active', 'SelectPeriodController@active')->name('adminSelectPeriod.active');
|
Route::post('/select-period/active', 'SelectPeriodController@active')->name('adminSelectPeriod.active');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue