This commit is contained in:
raditya09 2023-11-06 10:38:43 +07:00
commit 3f4e4990c6
11 changed files with 453 additions and 742 deletions

View File

@ -4,11 +4,23 @@
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\Hasil;
use App\Models\User;
use Illuminate\Support\Facades\DB;
class DashboardController extends Controller class DashboardController extends Controller
{ {
// public function index()
public function index(){ {
return view('backend.dashboard'); $kmCounts = Hasil::select('km_class', DB::raw('count(*) as total'))
} ->groupBy('km_class')
->orderByRaw("FIELD(km_class, 'High', 'Medium', 'Low')")
->get();
$rmCounts = Hasil::select('rm_class', DB::raw('count(*) as total'))
->groupBy('rm_class')
->orderByRaw("FIELD(rm_class, 'High', 'Medium', 'Low')")
->get();
return view('backend.dashboard', compact('kmCounts', 'rmCounts'));
}
} }

View File

@ -2,12 +2,66 @@
namespace App\Http\Controllers\Backend; namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class ProfileController extends Controller class ProfileController extends Controller
{ {
public function index(){ public function index()
{
return view('backend.users-profile'); return view('backend.users-profile');
} }
public function update(Request $request)
{
// Validate the request data (you can add more validation rules)
$validatedData = $request->validate([
'nama_lengkap' => 'required',
'nim' => 'required',
'semester' => 'required',
'angkatan' => 'required',
'profile_image' => 'image|mimes:jpeg,png,jpg,gif|max:2048',
]);
if ($request->hasFile('profile_image')) {
$image = $request->file('profile_image');
$imagePath = $image->store('images', 'public');
}
$user = User::findOrFail(auth()->user()->id);
$user->nama_lengkap = $request->input('nama_lengkap');
$user->nim = $request->input('nim');
$user->semester = $request->input('semester');
$user->angkatan = $request->input('angkatan');
$user->foto = $imagePath;
$user->update();
return redirect('/dashboard')->with('success', 'Profile updated successfully1');
}
public function changePassword(Request $request)
{
$request->validate([
'current_password' => 'required',
'new_password' => 'required|string|min:8|confirmed',
], [
'new_password.min' => 'Password tidak boleh kurang dari 8 karakter',
]);
$user = Auth::user();
// Verify the current password using the fully qualified namespace
if (!\Illuminate\Support\Facades\Hash::check($request->input('current_password'), $user->password)) {
return redirect()->back()->with('error', 'Current password is incorrect');
}
// Update the password
$user->password = \Illuminate\Support\Facades\Hash::make($request->input('new_password'));
$user->save();
return redirect()->back()->with('success', 'Password changed successfully');
}
} }

View File

@ -11980,18 +11980,3 @@ @media print {
display: none !important; display: none !important;
} }
} }
.hero-image {
background-image: url("../admin_backend/assets/img/bg_login.png");
background-color: #2c07d0;
/* height: 100%; */
background-position: right center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
.hero-bg{
background-color: #2c07d0;
}

View File

@ -949,7 +949,7 @@ eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/
\*****************************/ \*****************************/
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
eval("__webpack_require__(/*! ./bootstrap */ \"./resources/js/bootstrap.js\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvYXBwLmpzIiwibWFwcGluZ3MiOiJBQUFBQSxtQkFBTyxDQUFDLGdEQUFhLENBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvYXBwLmpzP2NlZDYiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9ib290c3RyYXAnKTtcbiJdLCJuYW1lcyI6WyJyZXF1aXJlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./resources/js/app.js\n"); eval("__webpack_require__(/*! ./bootstrap */ \"./resources/js/bootstrap.js\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvYXBwLmpzIiwibWFwcGluZ3MiOiJBQUFBQSxtQkFBTyxDQUFDLGdEQUFhLENBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvYXBwLmpzP2NlZDYiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9ib290c3RyYXAnKTtcclxuIl0sIm5hbWVzIjpbInJlcXVpcmUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./resources/js/app.js\n");
/***/ }), /***/ }),
@ -959,7 +959,7 @@ eval("__webpack_require__(/*! ./bootstrap */ \"./resources/js/bootstrap.js\");//
\***********************************/ \***********************************/
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
eval("window._ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\ntry {\n __webpack_require__(/*! bootstrap */ \"./node_modules/bootstrap/dist/js/bootstrap.esm.js\");\n} catch (e) {}\n\n/**\n * We'll load the axios HTTP library which allows us to easily issue requests\n * to our Laravel back-end. This library automatically handles sending the\n * CSRF token as a header based on the value of the \"XSRF\" token cookie.\n */\n\nwindow.axios = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\nwindow.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\n\n/**\n * Echo exposes an expressive API for subscribing to channels and listening\n * for events that are broadcast by Laravel. Echo and event broadcasting\n * allows your team to easily build robust real-time web applications.\n */\n\n// import Echo from 'laravel-echo';\n\n// window.Pusher = require('pusher-js');\n\n// window.Echo = new Echo({\n// broadcaster: 'pusher',\n// key: process.env.MIX_PUSHER_APP_KEY,\n// cluster: process.env.MIX_PUSHER_APP_CLUSTER,\n// forceTLS: true\n// });//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvYm9vdHN0cmFwLmpzIiwibWFwcGluZ3MiOiJBQUFBQSxNQUFNLENBQUNDLENBQUMsR0FBR0MsbUJBQU8sQ0FBQywrQ0FBUSxDQUFDO0FBRTVCLElBQUk7RUFDQUEsbUJBQU8sQ0FBQyxvRUFBVyxDQUFDO0FBQ3hCLENBQUMsQ0FBQyxPQUFPQyxDQUFDLEVBQUUsQ0FBQzs7QUFFYjtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBSCxNQUFNLENBQUNJLEtBQUssR0FBR0YsbUJBQU8sQ0FBQyw0Q0FBTyxDQUFDO0FBRS9CRixNQUFNLENBQUNJLEtBQUssQ0FBQ0MsUUFBUSxDQUFDQyxPQUFPLENBQUNDLE1BQU0sQ0FBQyxrQkFBa0IsQ0FBQyxHQUFHLGdCQUFnQjs7QUFFM0U7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvYm9vdHN0cmFwLmpzPzZkZTciXSwic291cmNlc0NvbnRlbnQiOlsid2luZG93Ll8gPSByZXF1aXJlKCdsb2Rhc2gnKTtcblxudHJ5IHtcbiAgICByZXF1aXJlKCdib290c3RyYXAnKTtcbn0gY2F0Y2ggKGUpIHt9XG5cbi8qKlxuICogV2UnbGwgbG9hZCB0aGUgYXhpb3MgSFRUUCBsaWJyYXJ5IHdoaWNoIGFsbG93cyB1cyB0byBlYXNpbHkgaXNzdWUgcmVxdWVzdHNcbiAqIHRvIG91ciBMYXJhdmVsIGJhY2stZW5kLiBUaGlzIGxpYnJhcnkgYXV0b21hdGljYWxseSBoYW5kbGVzIHNlbmRpbmcgdGhlXG4gKiBDU1JGIHRva2VuIGFzIGEgaGVhZGVyIGJhc2VkIG9uIHRoZSB2YWx1ZSBvZiB0aGUgXCJYU1JGXCIgdG9rZW4gY29va2llLlxuICovXG5cbndpbmRvdy5heGlvcyA9IHJlcXVpcmUoJ2F4aW9zJyk7XG5cbndpbmRvdy5heGlvcy5kZWZhdWx0cy5oZWFkZXJzLmNvbW1vblsnWC1SZXF1ZXN0ZWQtV2l0aCddID0gJ1hNTEh0dHBSZXF1ZXN0JztcblxuLyoqXG4gKiBFY2hvIGV4cG9zZXMgYW4gZXhwcmVzc2l2ZSBBUEkgZm9yIHN1YnNjcmliaW5nIHRvIGNoYW5uZWxzIGFuZCBsaXN0ZW5pbmdcbiAqIGZvciBldmVudHMgdGhhdCBhcmUgYnJvYWRjYXN0IGJ5IExhcmF2ZWwuIEVjaG8gYW5kIGV2ZW50IGJyb2FkY2FzdGluZ1xuICogYWxsb3dzIHlvdXIgdGVhbSB0byBlYXNpbHkgYnVpbGQgcm9idXN0IHJlYWwtdGltZSB3ZWIgYXBwbGljYXRpb25zLlxuICovXG5cbi8vIGltcG9ydCBFY2hvIGZyb20gJ2xhcmF2ZWwtZWNobyc7XG5cbi8vIHdpbmRvdy5QdXNoZXIgPSByZXF1aXJlKCdwdXNoZXItanMnKTtcblxuLy8gd2luZG93LkVjaG8gPSBuZXcgRWNobyh7XG4vLyAgICAgYnJvYWRjYXN0ZXI6ICdwdXNoZXInLFxuLy8gICAgIGtleTogcHJvY2Vzcy5lbnYuTUlYX1BVU0hFUl9BUFBfS0VZLFxuLy8gICAgIGNsdXN0ZXI6IHByb2Nlc3MuZW52Lk1JWF9QVVNIRVJfQVBQX0NMVVNURVIsXG4vLyAgICAgZm9yY2VUTFM6IHRydWVcbi8vIH0pO1xuIl0sIm5hbWVzIjpbIndpbmRvdyIsIl8iLCJyZXF1aXJlIiwiZSIsImF4aW9zIiwiZGVmYXVsdHMiLCJoZWFkZXJzIiwiY29tbW9uIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./resources/js/bootstrap.js\n"); eval("window._ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\ntry {\n __webpack_require__(/*! bootstrap */ \"./node_modules/bootstrap/dist/js/bootstrap.esm.js\");\n} catch (e) {}\n\n/**\r\n * We'll load the axios HTTP library which allows us to easily issue requests\r\n * to our Laravel back-end. This library automatically handles sending the\r\n * CSRF token as a header based on the value of the \"XSRF\" token cookie.\r\n */\n\nwindow.axios = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\nwindow.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\n\n/**\r\n * Echo exposes an expressive API for subscribing to channels and listening\r\n * for events that are broadcast by Laravel. Echo and event broadcasting\r\n * allows your team to easily build robust real-time web applications.\r\n */\n\n// import Echo from 'laravel-echo';\n\n// window.Pusher = require('pusher-js');\n\n// window.Echo = new Echo({\n// broadcaster: 'pusher',\n// key: process.env.MIX_PUSHER_APP_KEY,\n// cluster: process.env.MIX_PUSHER_APP_CLUSTER,\n// forceTLS: true\n// });//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvYm9vdHN0cmFwLmpzIiwibWFwcGluZ3MiOiJBQUFBQSxNQUFNLENBQUNDLENBQUMsR0FBR0MsbUJBQU8sQ0FBQywrQ0FBUSxDQUFDO0FBRTVCLElBQUk7RUFDQUEsbUJBQU8sQ0FBQyxvRUFBVyxDQUFDO0FBQ3hCLENBQUMsQ0FBQyxPQUFPQyxDQUFDLEVBQUUsQ0FBQzs7QUFFYjtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBSCxNQUFNLENBQUNJLEtBQUssR0FBR0YsbUJBQU8sQ0FBQyw0Q0FBTyxDQUFDO0FBRS9CRixNQUFNLENBQUNJLEtBQUssQ0FBQ0MsUUFBUSxDQUFDQyxPQUFPLENBQUNDLE1BQU0sQ0FBQyxrQkFBa0IsQ0FBQyxHQUFHLGdCQUFnQjs7QUFFM0U7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvYm9vdHN0cmFwLmpzPzZkZTciXSwic291cmNlc0NvbnRlbnQiOlsid2luZG93Ll8gPSByZXF1aXJlKCdsb2Rhc2gnKTtcclxuXHJcbnRyeSB7XHJcbiAgICByZXF1aXJlKCdib290c3RyYXAnKTtcclxufSBjYXRjaCAoZSkge31cclxuXHJcbi8qKlxyXG4gKiBXZSdsbCBsb2FkIHRoZSBheGlvcyBIVFRQIGxpYnJhcnkgd2hpY2ggYWxsb3dzIHVzIHRvIGVhc2lseSBpc3N1ZSByZXF1ZXN0c1xyXG4gKiB0byBvdXIgTGFyYXZlbCBiYWNrLWVuZC4gVGhpcyBsaWJyYXJ5IGF1dG9tYXRpY2FsbHkgaGFuZGxlcyBzZW5kaW5nIHRoZVxyXG4gKiBDU1JGIHRva2VuIGFzIGEgaGVhZGVyIGJhc2VkIG9uIHRoZSB2YWx1ZSBvZiB0aGUgXCJYU1JGXCIgdG9rZW4gY29va2llLlxyXG4gKi9cclxuXHJcbndpbmRvdy5heGlvcyA9IHJlcXVpcmUoJ2F4aW9zJyk7XHJcblxyXG53aW5kb3cuYXhpb3MuZGVmYXVsdHMuaGVhZGVycy5jb21tb25bJ1gtUmVxdWVzdGVkLVdpdGgnXSA9ICdYTUxIdHRwUmVxdWVzdCc7XHJcblxyXG4vKipcclxuICogRWNobyBleHBvc2VzIGFuIGV4cHJlc3NpdmUgQVBJIGZvciBzdWJzY3JpYmluZyB0byBjaGFubmVscyBhbmQgbGlzdGVuaW5nXHJcbiAqIGZvciBldmVudHMgdGhhdCBhcmUgYnJvYWRjYXN0IGJ5IExhcmF2ZWwuIEVjaG8gYW5kIGV2ZW50IGJyb2FkY2FzdGluZ1xyXG4gKiBhbGxvd3MgeW91ciB0ZWFtIHRvIGVhc2lseSBidWlsZCByb2J1c3QgcmVhbC10aW1lIHdlYiBhcHBsaWNhdGlvbnMuXHJcbiAqL1xyXG5cclxuLy8gaW1wb3J0IEVjaG8gZnJvbSAnbGFyYXZlbC1lY2hvJztcclxuXHJcbi8vIHdpbmRvdy5QdXNoZXIgPSByZXF1aXJlKCdwdXNoZXItanMnKTtcclxuXHJcbi8vIHdpbmRvdy5FY2hvID0gbmV3IEVjaG8oe1xyXG4vLyAgICAgYnJvYWRjYXN0ZXI6ICdwdXNoZXInLFxyXG4vLyAgICAga2V5OiBwcm9jZXNzLmVudi5NSVhfUFVTSEVSX0FQUF9LRVksXHJcbi8vICAgICBjbHVzdGVyOiBwcm9jZXNzLmVudi5NSVhfUFVTSEVSX0FQUF9DTFVTVEVSLFxyXG4vLyAgICAgZm9yY2VUTFM6IHRydWVcclxuLy8gfSk7XHJcbiJdLCJuYW1lcyI6WyJ3aW5kb3ciLCJfIiwicmVxdWlyZSIsImUiLCJheGlvcyIsImRlZmF1bHRzIiwiaGVhZGVycyIsImNvbW1vbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./resources/js/bootstrap.js\n");
/***/ }), /***/ }),

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,11 +1,186 @@
@extends('admin_backend/layouts.template') @extends('admin_backend/layouts.template')
@section('content') @section('content')
<main class="main" id="main"> <main id="main" class="main">
<div>ini profile admin</div>
</main>
@endsection
@section('script') <div class="pagetitle">
<h1>Profile</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/dashboard">Home</a></li>
<li class="breadcrumb-item active">Profile</li>
</ol>
</nav>
</div><!-- End Page Title -->
<section class="section profile">
<div class="row">
<div class="col-xl-4">
<div class="card">
<div class="card-body profile-card pt-4 d-flex flex-column align-items-center">
<img src="{{ asset('backend/assets/img/profile-img.jpg')}}" alt="Profile" class="rounded-circle">
<h2>Raditya Arief Pratama</h2>
<h3>Teknik Informatika</h3>
</div>
</div>
</div>
<div class="col-xl-8">
<div class="card">
<div class="card-body pt-3">
<!-- Bordered Tabs -->
<ul class="nav nav-tabs nav-tabs-bordered">
<li class="nav-item">
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#profile-overview">Overview</button>
</li>
<li class="nav-item">
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#profile-edit">Edit Profile</button>
</li>
<li class="nav-item">
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#profile-change-password">Change Password</button>
</li>
</ul>
<div class="tab-content pt-2">
<div class="tab-pane fade show active profile-overview" id="profile-overview">
<h5 class="card-title">Profile Details</h5>
<div class="row">
<div class="col-lg-3 col-md-4 label ">{{ __('Nama Lengkap') }}</div>
<div class="col-lg-9 col-md-8">Raditya Arief Pratama</div>
</div>
<div class="row">
<div class="col-lg-3 col-md-4 label">{{ __('NIM') }}</div>
<div class="col-lg-9 col-md-8">E4212423</div>
</div>
<div class="row">
<div class="col-lg-3 col-md-4 label">{{ __('Semester') }}</div>
<div class="col-lg-9 col-md-8">5</div>
</div>
<div class="row">
<div class="col-lg-3 col-md-4 label">{{ __('Angkatan') }}</div>
<div class="col-lg-9 col-md-8">2021</div>
</div>
<div class="row">
<div class="col-lg-3 col-md-4 label">{{ __('E-Mail') }}</div>
<div class="col-lg-9 col-md-8">radityaariefp@polije.ac.id</div>
</div>
</div>
<div class="tab-pane fade profile-edit pt-3" id="profile-edit">
<!-- Profile Edit Form -->
<form>
<div class="row mb-3">
<label for="profileImage" class="col-md-4 col-lg-3 col-form-label">Profile Image</label>
<div class="col-md-8 col-lg-9">
<img src="{{ asset('backend/assets/img/profile-img.jpg')}}" alt="Profile">
<div class="pt-2">
<a href="#" class="btn btn-primary btn-sm" title="Upload new profile image"><i class="bi bi-upload"></i></a>
<a href="#" class="btn btn-danger btn-sm" title="Remove my profile image"><i class="bi bi-trash"></i></a>
</div>
</div>
</div>
<div class="row mb-3">
<label for="nama_lengkap" class="col-md-4 col-lg-3 col-form-label">{{ __('Nama Lengkap') }}</label>
<div class="col-md-8 col-lg-9">
<input name="nama_lengkap" type="text" class="form-control" id="nama_lengkap" value="Raditya Arief Pratama">
</div>
</div>
<div class="row mb-3">
<label for="nim" class="col-md-4 col-lg-3 col-form-label">{{ __('NIM') }}</label>
<div class="col-md-8 col-lg-9">
<input name="nim" type="text" class="form-control" id="nim" value="E4212423">
</div>
</div>
<div class="row mb-3">
<label for="semester" class="col-md-4 col-lg-3 col-form-label">{{ __('Semester') }}</label>
<div class="col-md-8 col-lg-9">
<input name="semester" type="text" class="form-control" id="semester" value="5">
</div>
</div>
<div class="row mb-3">
<label for="angkatan" class="col-md-4 col-lg-3 col-form-label">{{ __('Angkatan') }}</label>
<div class="col-md-8 col-lg-9">
<input name="angkatan" type="text" class="form-control" id="angkatan" value="2021">
</div>
</div>
<div class="row mb-3">
<label for="email" class="col-md-4 col-lg-3 col-form-label">{{ __('E-Mail') }}</label>
<div class="col-md-8 col-lg-9">
<input name="email" type="text" class="form-control" id="email" value="radityaariefp@polije.ac.id">
</div>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary">Save Changes</button>
</div>
</form><!-- End Profile Edit Form -->
</div>
<div class="tab-pane fade pt-3" id="profile-change-password">
<!-- Change Password Form -->
<form>
<div class="row mb-3">
<label for="currentPassword" class="col-md-4 col-lg-3 col-form-label">Current Password</label>
<div class="col-md-8 col-lg-9">
<input name="password" type="password" class="form-control" id="currentPassword">
</div>
</div>
<div class="row mb-3">
<label for="newPassword" class="col-md-4 col-lg-3 col-form-label">New Password</label>
<div class="col-md-8 col-lg-9">
<input name="newpassword" type="password" class="form-control" id="newPassword">
</div>
</div>
<div class="row mb-3">
<label for="renewPassword" class="col-md-4 col-lg-3 col-form-label">Re-enter New Password</label>
<div class="col-md-8 col-lg-9">
<input name="renewpassword" type="password" class="form-control" id="renewPassword">
</div>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary">Change Password</button>
</div>
</form><!-- End Change Password Form -->
</div>
</div><!-- End Bordered Tabs -->
</div>
</div>
</div>
</div>
</section>
</main><!-- End #main -->
@endsection
@section('script')
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$("#sidebar-profile").removeClass("collapsed"); $("#sidebar-profile").removeClass("collapsed");

View File

@ -3,657 +3,124 @@
@section('content') @section('content')
<main id="main" class="main"> <main id="main" class="main">
<div class="pagetitle"> <div class="pagetitle">
<h1>Dashboard</h1> <h1>Dashboard</h1>
<nav> <nav>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li> <li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active">Dashboard</li> <li class="breadcrumb-item active">Dashboard</li>
</ol> </ol>
</nav> </nav>
</div><!-- End Page Title --> </div><!-- End Page Title -->
<section class="section dashboard"> <section class="section dashboard">
<div class="row"> <div class="row">
<!-- Left side columns -->
<div class="col-lg-8">
<div class="row">
<!-- Sales Card -->
<div class="col-xxl-4 col-md-6">
<div class="card info-card sales-card">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Filter</h6>
</li>
<li><a class="dropdown-item" href="#">Today</a></li>
<li><a class="dropdown-item" href="#">This Month</a></li>
<li><a class="dropdown-item" href="#">This Year</a></li>
</ul>
</div>
<div class="card-body">
<h5 class="card-title">Sales <span>| Today</span></h5>
<div class="d-flex align-items-center">
<div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
<i class="bi bi-cart"></i>
</div>
<div class="ps-3">
<h6>145</h6>
<span class="text-success small pt-1 fw-bold">12%</span> <span class="text-muted small pt-2 ps-1">increase</span>
<!-- Komponen 1: Hasil Nilai Kuesioner KM -->
<div class="col-xxl-4 col-md-6">
<div class="card info-card">
<div class="card-body">
<h5 class="card-title">Nilai KM</h5>
<span class="pull-right">80</span>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 80%;" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<script>
// Script JavaScript dapat tetap sama
document.addEventListener("DOMContentLoaded", () => {
let kmCounts = @json($kmCounts);
let kmTotal = kmCounts.reduce(function(total, item) {
return total + item.total;
}, 0);
let percentage = (kmTotal / (kmCounts.length * 100)) * 100;
document.querySelector(".progress-bar").style.width = percentage + "%";
document.querySelector(".progress-bar").setAttribute("aria-valuenow", percentage);
});
</script>
</div> </div>
</div> </div>
</div> </div><!-- End Hasil Nilai Kuesioner KM -->
</div> <!-- Komponen 2: Hasil Nilai Kuesioner RM -->
</div><!-- End Sales Card --> <div class="col-xxl-4 col-md-6">
<div class="card info-card">
<!-- Revenue Card --> <div class="card-body">
<div class="col-xxl-4 col-md-6"> <h5 class="card-title">Nilai RM</h5>
<div class="card info-card revenue-card"> <span class="pull-right">80</span>
<div class="progress">
<div class="filter"> <div class="progress-bar" role="progressbar" style="width: 80%;" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100"></div>
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a> </div>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow"> <script>
<li class="dropdown-header text-start"> // Script JavaScript dapat tetap sama
<h6>Filter</h6> document.addEventListener("DOMContentLoaded", () => {
</li> let kmCounts = @json($kmCounts);
let kmTotal = kmCounts.reduce(function(total, item) {
<li><a class="dropdown-item" href="#">Today</a></li> return total + item.total;
<li><a class="dropdown-item" href="#">This Month</a></li> }, 0);
<li><a class="dropdown-item" href="#">This Year</a></li> let percentage = (kmTotal / (kmCounts.length * 100)) * 100;
</ul> document.querySelector(".progress-bar").style.width = percentage + "%";
</div> document.querySelector(".progress-bar").setAttribute("aria-valuenow", percentage);
});
<div class="card-body"> </script>
<h5 class="card-title">Revenue <span>| This Month</span></h5> </div>
<div class="d-flex align-items-center">
<div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
<i class="bi bi-currency-dollar"></i>
</div> </div>
<div class="ps-3"> </div><!-- End Hasil Nilai Kuesioner RM -->
<h6>$3,264</h6>
<span class="text-success small pt-1 fw-bold">8%</span> <span class="text-muted small pt-2 ps-1">increase</span>
<!-- Komponen 3: Rangkuman -->
<div class="col-xxl-4 col-md-6">
<div class="card info-card">
<div class="card-body">
<h5 class="card-title">Rangkuman</h5>
<!-- Tambahkan rangkuman seperti "Low / Medium / High" -->
<ul>
{{-- @foreach ($rangkuman as $item)
<li>{{ $item->keterangan }}</li>
@endforeach --}}
</ul>
</div>
</div> </div>
</div> </div><!-- End Rangkuman -->
</div>
</div> <!-- Komponen 4: Histori Pengisian Kuesioner -->
</div><!-- End Revenue Card --> <div class="col-12">
<div class="card">
<!-- Customers Card --> <div class="card-body">
<div class="col-xxl-4 col-xl-12"> <h5 class="card-title">Histori Pengisian Kuesioner</h5>
<!-- Tambahkan tabel atau daftar histori pengisian kuesioner di sini -->
<div class="card info-card customers-card"> <ul>
{{-- @foreach ($historiPengisian as $item)
<div class="filter"> <li>{{ $item->tanggal }} - {{ $item->keterangan }}</li>
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a> @endforeach --}}
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow"> </ul>
<li class="dropdown-header text-start"> </div>
<h6>Filter</h6>
</li>
<li><a class="dropdown-item" href="#">Today</a></li>
<li><a class="dropdown-item" href="#">This Month</a></li>
<li><a class="dropdown-item" href="#">This Year</a></li>
</ul>
</div>
<div class="card-body">
<h5 class="card-title">Customers <span>| This Year</span></h5>
<div class="d-flex align-items-center">
<div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
<i class="bi bi-people"></i>
</div> </div>
<div class="ps-3"> </div><!-- End Histori Pengisian Kuesioner -->
<h6>1244</h6>
<span class="text-danger small pt-1 fw-bold">12%</span> <span class="text-muted small pt-2 ps-1">decrease</span>
<!-- Komponen 5: Penjelasan KM -->
<div class="col-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">Penjelasan KM</h5>
<!-- Tambahkan penjelasan tentang KM di sini -->
<p>Knowledge of Metacognitif (KM) adalah ..........</p>
</div>
</div> </div>
</div> </div><!-- End Penjelasan KM -->
</div> <!-- Komponen 6: Penjelasan RM -->
</div> <div class="col-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">Penjelasan RM</h5>
<!-- Tambahkan penjelasan tentang RM di sini -->
<p> Regulation of Metacognitif (RM) adalah............</p>
</div>
</div>
</div><!-- End Penjelasan RM -->
</div><!-- End Customers Card -->
<!-- Reports -->
<div class="col-12">
<div class="card">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Filter</h6>
</li>
<li><a class="dropdown-item" href="#">Today</a></li>
<li><a class="dropdown-item" href="#">This Month</a></li>
<li><a class="dropdown-item" href="#">This Year</a></li>
</ul>
</div>
<div class="card-body">
<h5 class="card-title">Reports <span>/Today</span></h5>
<!-- Line Chart -->
<div id="reportsChart"></div>
<script>
document.addEventListener("DOMContentLoaded", () => {
new ApexCharts(document.querySelector("#reportsChart"), {
series: [{
name: 'Sales',
data: [31, 40, 28, 51, 42, 82, 56],
}, {
name: 'Revenue',
data: [11, 32, 45, 32, 34, 52, 41]
}, {
name: 'Customers',
data: [15, 11, 32, 18, 9, 24, 11]
}],
chart: {
height: 350,
type: 'area',
toolbar: {
show: false
},
},
markers: {
size: 4
},
colors: ['#4154f1', '#2eca6a', '#ff771d'],
fill: {
type: "gradient",
gradient: {
shadeIntensity: 1,
opacityFrom: 0.3,
opacityTo: 0.4,
stops: [0, 90, 100]
}
},
dataLabels: {
enabled: false
},
stroke: {
curve: 'smooth',
width: 2
},
xaxis: {
type: 'datetime',
categories: ["2018-09-19T00:00:00.000Z", "2018-09-19T01:30:00.000Z", "2018-09-19T02:30:00.000Z", "2018-09-19T03:30:00.000Z", "2018-09-19T04:30:00.000Z", "2018-09-19T05:30:00.000Z", "2018-09-19T06:30:00.000Z"]
},
tooltip: {
x: {
format: 'dd/MM/yy HH:mm'
},
}
}).render();
});
</script>
<!-- End Line Chart -->
</div>
</div> </div>
</div><!-- End Reports --> </section>
<!-- Recent Sales -->
<div class="col-12">
<div class="card recent-sales overflow-auto">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Filter</h6>
</li>
<li><a class="dropdown-item" href="#">Today</a></li>
<li><a class="dropdown-item" href="#">This Month</a></li>
<li><a class="dropdown-item" href="#">This Year</a></li>
</ul>
</div>
<div class="card-body">
<h5 class="card-title">Recent Sales <span>| Today</span></h5>
<table class="table table-borderless datatable">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Customer</th>
<th scope="col">Product</th>
<th scope="col">Price</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row"><a href="#">#2457</a></th>
<td>Brandon Jacob</td>
<td><a href="#" class="text-primary">At praesentium minu</a></td>
<td>$64</td>
<td><span class="badge bg-success">Approved</span></td>
</tr>
<tr>
<th scope="row"><a href="#">#2147</a></th>
<td>Bridie Kessler</td>
<td><a href="#" class="text-primary">Blanditiis dolor omnis similique</a></td>
<td>$47</td>
<td><span class="badge bg-warning">Pending</span></td>
</tr>
<tr>
<th scope="row"><a href="#">#2049</a></th>
<td>Ashleigh Langosh</td>
<td><a href="#" class="text-primary">At recusandae consectetur</a></td>
<td>$147</td>
<td><span class="badge bg-success">Approved</span></td>
</tr>
<tr>
<th scope="row"><a href="#">#2644</a></th>
<td>Angus Grady</td>
<td><a href="#" class="text-primar">Ut voluptatem id earum et</a></td>
<td>$67</td>
<td><span class="badge bg-danger">Rejected</span></td>
</tr>
<tr>
<th scope="row"><a href="#">#2644</a></th>
<td>Raheem Lehner</td>
<td><a href="#" class="text-primary">Sunt similique distinctio</a></td>
<td>$165</td>
<td><span class="badge bg-success">Approved</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div><!-- End Recent Sales -->
<!-- Top Selling -->
<div class="col-12">
<div class="card top-selling overflow-auto">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Filter</h6>
</li>
<li><a class="dropdown-item" href="#">Today</a></li>
<li><a class="dropdown-item" href="#">This Month</a></li>
<li><a class="dropdown-item" href="#">This Year</a></li>
</ul>
</div>
<div class="card-body pb-0">
<h5 class="card-title">Top Selling <span>| Today</span></h5>
<table class="table table-borderless">
<thead>
<tr>
<th scope="col">Preview</th>
<th scope="col">Product</th>
<th scope="col">Price</th>
<th scope="col">Sold</th>
<th scope="col">Revenue</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row"><a href="#"><img src="{{ asset('backend/assets/img/product-1.jpg')}}" alt=""></a></th>
<td><a href="#" class="text-primary fw-bold">Ut inventore ipsa voluptas nulla</a></td>
<td>$64</td>
<td class="fw-bold">124</td>
<td>$5,828</td>
</tr>
<tr>
<th scope="row"><a href="#"><img src="{{ asset('backend/assets/img/product-2.jpg')}}" alt=""></a></th>
<td><a href="#" class="text-primary fw-bold">Exercitationem similique doloremque</a></td>
<td>$46</td>
<td class="fw-bold">98</td>
<td>$4,508</td>
</tr>
<tr>
<th scope="row"><a href="#"><img src="{{ asset('backend/assets/img/product-3.jpg')}}" alt=""></a></th>
<td><a href="#" class="text-primary fw-bold">Doloribus nisi exercitationem</a></td>
<td>$59</td>
<td class="fw-bold">74</td>
<td>$4,366</td>
</tr>
<tr>
<th scope="row"><a href="#"><img src="{{ asset('backend/assets/img/product-4.jpg')}}" alt=""></a></th>
<td><a href="#" class="text-primary fw-bold">Officiis quaerat sint rerum error</a></td>
<td>$32</td>
<td class="fw-bold">63</td>
<td>$2,016</td>
</tr>
<tr>
<th scope="row"><a href="#"><img src="{{ asset('backend/assets/img/product-5.jpg')}}" alt=""></a></th>
<td><a href="#" class="text-primary fw-bold">Sit unde debitis delectus repellendus</a></td>
<td>$79</td>
<td class="fw-bold">41</td>
<td>$3,239</td>
</tr>
</tbody>
</table>
</div>
</div>
</div><!-- End Top Selling -->
</div>
</div><!-- End Left side columns -->
<!-- Right side columns -->
<div class="col-lg-4">
<!-- Recent Activity -->
<div class="card">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Filter</h6>
</li>
<li><a class="dropdown-item" href="#">Today</a></li>
<li><a class="dropdown-item" href="#">This Month</a></li>
<li><a class="dropdown-item" href="#">This Year</a></li>
</ul>
</div>
<div class="card-body">
<h5 class="card-title">Recent Activity <span>| Today</span></h5>
<div class="activity">
<div class="activity-item d-flex">
<div class="activite-label">32 min</div>
<i class='bi bi-circle-fill activity-badge text-success align-self-start'></i>
<div class="activity-content">
Quia quae rerum <a href="#" class="fw-bold text-dark">explicabo officiis</a> beatae
</div>
</div><!-- End activity item-->
<div class="activity-item d-flex">
<div class="activite-label">56 min</div>
<i class='bi bi-circle-fill activity-badge text-danger align-self-start'></i>
<div class="activity-content">
Voluptatem blanditiis blanditiis eveniet
</div>
</div><!-- End activity item-->
<div class="activity-item d-flex">
<div class="activite-label">2 hrs</div>
<i class='bi bi-circle-fill activity-badge text-primary align-self-start'></i>
<div class="activity-content">
Voluptates corrupti molestias voluptatem
</div>
</div><!-- End activity item-->
<div class="activity-item d-flex">
<div class="activite-label">1 day</div>
<i class='bi bi-circle-fill activity-badge text-info align-self-start'></i>
<div class="activity-content">
Tempore autem saepe <a href="#" class="fw-bold text-dark">occaecati voluptatem</a> tempore
</div>
</div><!-- End activity item-->
<div class="activity-item d-flex">
<div class="activite-label">2 days</div>
<i class='bi bi-circle-fill activity-badge text-warning align-self-start'></i>
<div class="activity-content">
Est sit eum reiciendis exercitationem
</div>
</div><!-- End activity item-->
<div class="activity-item d-flex">
<div class="activite-label">4 weeks</div>
<i class='bi bi-circle-fill activity-badge text-muted align-self-start'></i>
<div class="activity-content">
Dicta dolorem harum nulla eius. Ut quidem quidem sit quas
</div>
</div><!-- End activity item-->
</div>
</div>
</div><!-- End Recent Activity -->
<!-- Budget Report -->
<div class="card">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Filter</h6>
</li>
<li><a class="dropdown-item" href="#">Today</a></li>
<li><a class="dropdown-item" href="#">This Month</a></li>
<li><a class="dropdown-item" href="#">This Year</a></li>
</ul>
</div>
<div class="card-body pb-0">
<h5 class="card-title">Budget Report <span>| This Month</span></h5>
<div id="budgetChart" style="min-height: 400px;" class="echart"></div>
<script>
document.addEventListener("DOMContentLoaded", () => {
var budgetChart = echarts.init(document.querySelector("#budgetChart")).setOption({
legend: {
data: ['Allocated Budget', 'Actual Spending']
},
radar: {
// shape: 'circle',
indicator: [{
name: 'Sales',
max: 6500
},
{
name: 'Administration',
max: 16000
},
{
name: 'Information Technology',
max: 30000
},
{
name: 'Customer Support',
max: 38000
},
{
name: 'Development',
max: 52000
},
{
name: 'Marketing',
max: 25000
}
]
},
series: [{
name: 'Budget vs spending',
type: 'radar',
data: [{
value: [4200, 3000, 20000, 35000, 50000, 18000],
name: 'Allocated Budget'
},
{
value: [5000, 14000, 28000, 26000, 42000, 21000],
name: 'Actual Spending'
}
]
}]
});
});
</script>
</div>
</div><!-- End Budget Report -->
<!-- Website Traffic -->
<div class="card">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Filter</h6>
</li>
<li><a class="dropdown-item" href="#">Today</a></li>
<li><a class="dropdown-item" href="#">This Month</a></li>
<li><a class="dropdown-item" href="#">This Year</a></li>
</ul>
</div>
<div class="card-body pb-0">
<h5 class="card-title">Website Traffic <span>| Today</span></h5>
<div id="trafficChart" style="min-height: 400px;" class="echart"></div>
<script>
document.addEventListener("DOMContentLoaded", () => {
echarts.init(document.querySelector("#trafficChart")).setOption({
tooltip: {
trigger: 'item'
},
legend: {
top: '5%',
left: 'center'
},
series: [{
name: 'Access From',
type: 'pie',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '18',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [{
value: 1048,
name: 'Search Engine'
},
{
value: 735,
name: 'Direct'
},
{
value: 580,
name: 'Email'
},
{
value: 484,
name: 'Union Ads'
},
{
value: 300,
name: 'Video Ads'
}
]
}]
});
});
</script>
</div>
</div><!-- End Website Traffic -->
<!-- News & Updates Traffic -->
<div class="card">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Filter</h6>
</li>
<li><a class="dropdown-item" href="#">Today</a></li>
<li><a class="dropdown-item" href="#">This Month</a></li>
<li><a class="dropdown-item" href="#">This Year</a></li>
</ul>
</div>
<div class="card-body pb-0">
<h5 class="card-title">News &amp; Updates <span>| Today</span></h5>
<div class="news">
<div class="post-item clearfix">
<img src="{{ asset('backend/assets/img/news-1.jpg')}}" alt="">
<h4><a href="#">Nihil blanditiis at in nihil autem</a></h4>
<p>Sit recusandae non aspernatur laboriosam. Quia enim eligendi sed ut harum...</p>
</div>
<div class="post-item clearfix">
<img src="{{ asset('backend/assets/img/news-2.jpg')}}" alt="">
<h4><a href="#">Quidem autem et impedit</a></h4>
<p>Illo nemo neque maiores vitae officiis cum eum turos elan dries werona nande...</p>
</div>
<div class="post-item clearfix">
<img src="{{ asset('backend/assets/img/news-3.jpg')}}" alt="">
<h4><a href="#">Id quia et et ut maxime similique occaecati ut</a></h4>
<p>Fugiat voluptas vero eaque accusantium eos. Consequuntur sed ipsam et totam...</p>
</div>
<div class="post-item clearfix">
<img src="{{ asset('backend/assets/img/news-4.jpg')}}" alt="">
<h4><a href="#">Laborum corporis quo dara net para</a></h4>
<p>Qui enim quia optio. Eligendi aut asperiores enim repellendusvel rerum cuder...</p>
</div>
<div class="post-item clearfix">
<img src="{{ asset('backend/assets/img/news-5.jpg')}}" alt="">
<h4><a href="#">Et dolores corrupti quae illo quod dolor</a></h4>
<p>Odit ut eveniet modi reiciendis. Atque cupiditate libero beatae dignissimos eius...</p>
</div>
</div><!-- End sidebar recent posts-->
</div>
</div><!-- End News & Updates -->
</div><!-- End Right side columns -->
</div>
</section>
</main><!-- End #main --> </main><!-- End #main -->
@endsection @endsection
@section('script')
<script>
$(document).ready(function() {
$("#sidebar-dashboard").removeClass("collapsed");
});
</script>
@endsection

View File

@ -3,7 +3,7 @@
<ul class="sidebar-nav" id="sidebar-nav"> <ul class="sidebar-nav" id="sidebar-nav">
<li> <li>
<a class="card-body profile-card pt-4 d-flex flex-column align-items-center"> <a class="card-body profile-card pt-4 d-flex flex-column align-items-center">
<img src="{{ asset('backend/assets/img/profile-img.jpg')}}" alt="Profile" class="rounded-circle"> <img src="{{ asset('storage/' . Auth::user()->foto)}}" alt="Profile" class="rounded-circle" style="width: 120px; height: 120px;>
</a><!-- End Profile Iamge Icon --> </a><!-- End Profile Iamge Icon -->
<!-- <h6> {{ Auth::user()->name }}</h6> --> <!-- <h6> {{ Auth::user()->name }}</h6> -->

View File

@ -20,7 +20,7 @@
<div class="card"> <div class="card">
<div class="card-body profile-card pt-4 d-flex flex-column align-items-center"> <div class="card-body profile-card pt-4 d-flex flex-column align-items-center">
<img src="{{ asset('backend/assets/img/profile-img.jpg')}}" alt="Profile" class="rounded-circle"> <img src="{{ asset('storage/' . Auth::user()->foto)}}" alt="Profile" class="rounded-circle">
<h2>Raditya Arief Pratama</h2> <h2>Raditya Arief Pratama</h2>
<h3>Teknik Informatika</h3> <h3>Teknik Informatika</h3>
</div> </div>
@ -55,22 +55,38 @@
<div class="row"> <div class="row">
<div class="col-lg-3 col-md-4 label ">{{ __('Nama Lengkap') }}</div> <div class="col-lg-3 col-md-4 label ">{{ __('Nama Lengkap') }}</div>
<div class="col-lg-9 col-md-8">Raditya Arief Pratama</div> <div class="col-lg-9 col-md-8">
@if(Auth::user())
{{ Auth::user()->nama_lengkap }}
@endif
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-3 col-md-4 label">{{ __('NIM') }}</div> <div class="col-lg-3 col-md-4 label">{{ __('NIM') }}</div>
<div class="col-lg-9 col-md-8">E4212423</div> <div class="col-lg-9 col-md-8">
@if(Auth::user())
{{ Auth::user()->nim }}
@endif
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-3 col-md-4 label">{{ __('Semester') }}</div> <div class="col-lg-3 col-md-4 label">{{ __('Semester') }}</div>
<div class="col-lg-9 col-md-8">5</div> <div class="col-lg-9 col-md-8">
@if(Auth::user())
{{ Auth::user()->semester }}
@endif
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-3 col-md-4 label">{{ __('Angkatan') }}</div> <div class="col-lg-3 col-md-4 label">{{ __('Angkatan') }}</div>
<div class="col-lg-9 col-md-8">2021</div> <div class="col-lg-9 col-md-8">
@if(Auth::user())
{{ Auth::user()->angkatan }}
@endif
</div>
</div> </div>
<div class="row"> <div class="row">
@ -80,92 +96,87 @@
</div> </div>
<div class="tab-pane fade profile-edit pt-3" id="profile-edit">
<!-- Profile Edit Form --> <!-- Profile Edit Form -->
<form> <div class="tab-pane fade profile-edit pt-3" id="profile-edit">
<div class="row mb-3"> <form method="POST" action="/profile/update" enctype="multipart/form-data">
<label for="profileImage" class="col-md-4 col-lg-3 col-form-label">Profile Image</label> @csrf
<div class="col-md-8 col-lg-9">
<img src="{{ asset('backend/assets/img/profile-img.jpg')}}" alt="Profile"> <div class="row mb-3">
<div class="pt-2"> <label for="profileImage" class="col-md-4 col-lg-3 col-form-label">Profile Image</label>
<a href="#" class="btn btn-primary btn-sm" title="Upload new profile image"><i class="bi bi-upload"></i></a> <div class="col-md-8 col-lg-9">
<a href="#" class="btn btn-danger btn-sm" title="Remove my profile image"><i class="bi bi-trash"></i></a> <img src="{{ asset('storage/' . Auth::user()->foto)}}" alt="Profile">
</div> <div class="pt-2">
<input type="file" name="profile_image" class="form-control-file">
</div>
</div>
</div> </div>
</div>
<div class="row mb-3">
<div class="row mb-3"> <label for="nama_lengkap" class="col-md-4 col-lg-3 col-form-label">{{ __('Nama Lengkap') }}</label>
<label for="nama_lengkap" class="col-md-4 col-lg-3 col-form-label">{{ __('Nama Lengkap') }}</label> <div class="col-md-8 col-lg-9">
<div class="col-md-8 col-lg-9"> <input name="nama_lengkap" type="text" class="form-control" id="nama_lengkap" value="{{ Auth::user()->nama_lengkap }}">
<input name="nama_lengkap" type="text" class="form-control" id="nama_lengkap" value="Raditya Arief Pratama"> </div>
</div> </div>
</div>
<div class="row mb-3">
<div class="row mb-3"> <label for="nim" class="col-md-4 col-lg-3 col-form-label">{{ __('NIM') }}</label>
<label for="nim" class="col-md-4 col-lg-3 col-form-label">{{ __('NIM') }}</label> <div class="col-md-8 col-lg-9">
<div class="col-md-8 col-lg-9"> <input name="nim" type="text" class="form-control" id="nim" value="{{ Auth::user()->nim }}">
<input name="nim" type="text" class="form-control" id="nim" value="E4212423"> </div>
</div> </div>
</div>
<div class="row mb-3">
<div class="row mb-3"> <label for="semester" class="col-md-4 col-lg-3 col-form-label">{{ __('Semester') }}</label>
<label for="semester" class="col-md-4 col-lg-3 col-form-label">{{ __('Semester') }}</label> <div class="col-md-8 col-lg-9">
<div class="col-md-8 col-lg-9"> <input name="semester" type="text" class="form-control" id="semester" value="{{ Auth::user()->semester }}">
<input name="semester" type="text" class="form-control" id="semester" value="5"> </div>
</div> </div>
</div>
<div class="row mb-3">
<div class="row mb-3"> <label for="angkatan" class="col-md-4 col-lg-3 col-form-label">{{ __('Angkatan') }}</label>
<label for="angkatan" class="col-md-4 col-lg-3 col-form-label">{{ __('Angkatan') }}</label> <div class="col-md-8 col-lg-9">
<div class="col-md-8 col-lg-9"> <input name="angkatan" type="text" class="form-control" id="angkatan" value="{{ Auth::user()->angkatan }}">
<input name="angkatan" type="text" class="form-control" id="angkatan" value="2021"> </div>
</div> </div>
</div>
<div class="text-center">
<div class="row mb-3"> <button type="submit" class="btn btn-primary">Save Changes</button>
<label for="email" class="col-md-4 col-lg-3 col-form-label">{{ __('E-Mail') }}</label>
<div class="col-md-8 col-lg-9">
<input name="email" type="text" class="form-control" id="email" value="radityaariefp@polije.ac.id">
</div> </div>
</div> </form>
</div> <!-- End Profile Edit Form -->
<div class="text-center">
<button type="submit" class="btn btn-primary">Save Changes</button>
</div>
</form><!-- End Profile Edit Form -->
</div>
<div class="tab-pane fade pt-3" id="profile-change-password"> <div class="tab-pane fade pt-3" id="profile-change-password">
<!-- Change Password Form --> <!-- Change Password Form -->
<form> <form method="POST" action="{{ route('profile.changePassword') }}">
@csrf
<div class="row mb-3"> <div class="row mb-3">
<label for="currentPassword" class="col-md-4 col-lg-3 col-form-label">Current Password</label> <label for="current_password" class="col-md-4 col-lg-3 col-form-label">Current Password</label>
<div class="col-md-8 col-lg-9"> <div class="col-md-8 col-lg-9">
<input name="password" type="password" class="form-control" id="currentPassword"> <input name="current_password" type="password" class="form-control" id="current_password">
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<label for="newPassword" class="col-md-4 col-lg-3 col-form-label">New Password</label> <label for="new_password" class="col-md-4 col-lg-3 col-form-label">New Password</label>
<div class="col-md-8 col-lg-9"> <div class="col-md-8 col-lg-9">
<input name="newpassword" type="password" class="form-control" id="newPassword"> <input name="new_password" type="password" class="form-control" id="new_password">
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<label for="renewPassword" class="col-md-4 col-lg-3 col-form-label">Re-enter New Password</label> <label for="new_password_confirmation" class="col-md-4 col-lg-3 col-form-label">Re-enter New Password</label>
<div class="col-md-8 col-lg-9"> <div class="col-md-8 col-lg-9">
<input name="renewpassword" type="password" class="form-control" id="renewPassword"> <input name="new_password_confirmation" type="password" class="form-control" id="new_password_confirmation">
</div> </div>
</div> </div>
<div class="text-center"> <div class="text-center">
<button type="submit" class="btn btn-primary">Change Password</button> <button type="submit" class="btn btn-primary">Change Password</button>
</div> </div>
</form><!-- End Change Password Form --> </form>
<!-- End Change Password Form -->
</div> </div>

View File

@ -39,6 +39,11 @@
Route::get('instruction', 'UiController@instruction')->name('user.questionnaire.instruction'); Route::get('instruction', 'UiController@instruction')->name('user.questionnaire.instruction');
Route::get('check-questionnaire', 'UiController@checkQuestionnaire')->name('user.questionnaire.check'); Route::get('check-questionnaire', 'UiController@checkQuestionnaire')->name('user.questionnaire.check');
Route::get('closed-questionnaire', 'UiController@closedQuestionnaire')->name('user.questionnaire.closed'); Route::get('closed-questionnaire', 'UiController@closedQuestionnaire')->name('user.questionnaire.closed');
Route::post('/profile/update', 'ProfileController@update');
Route::get('/profile/change-password', 'ProfileController@changePasswordForm')->name('profile.changePasswordForm');
Route::post('/profile/change-password', 'ProfileController@changePassword')->name('profile.changePassword');
}); });
}); });
@ -60,6 +65,8 @@
Route::get('/hasil/cetak-pdf', 'AdminResultController@cetak_pdf')->name('userQuestionnaire.cetak'); 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');
// Route::post('listuser', [UserController::class, 'store']); // Route::post('listuser', [UserController::class, 'store']);
}); });