diff --git a/app/Http/Controllers/DataKinerjaController.php b/app/Http/Controllers/DataKinerjaController.php index 3808a82446c7b4c9abfd77b79d3a5e28607beb72..3579271cb7cbdbe4a113241831155f8667775b6a 100644 --- a/app/Http/Controllers/DataKinerjaController.php +++ b/app/Http/Controllers/DataKinerjaController.php @@ -4,8 +4,11 @@ namespace App\Http\Controllers; use App\Kinerja; use App\Pegawai; +use Carbon\Carbon; +use Excel; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Validator; class DataKinerjaController extends APIBaseController @@ -45,7 +48,7 @@ class DataKinerjaController extends APIBaseController $input = $request->all(); $validator = $this->validateDataKinerja($input); - if($validator->fails()) { + if ($validator->fails()) { return $this->sendError('Gagal menambahkan data kinerja.', $validator->errors()); } @@ -53,7 +56,7 @@ class DataKinerjaController extends APIBaseController $pegawai = Pegawai::where('nip', '=', $nip)->first(); if (is_null($pegawai)) { - return $this->sendError('Pegawai dengan NIP: '.$nip.' tidak ditemukan.'); + return $this->sendError('Pegawai dengan NIP: ' . $nip . ' tidak ditemukan.'); } $data = new Kinerja; @@ -110,7 +113,7 @@ class DataKinerjaController extends APIBaseController $data = Kinerja::find($id); if (is_null($data)) { - return $this->sendError('Data Kinerja dengan id = '.$id.' tidak ditemukan.'); + return $this->sendError('Data Kinerja dengan id = ' . $id . ' tidak ditemukan.'); } $data = $this->updateDataKinerja($data, $input); @@ -130,7 +133,8 @@ class DataKinerjaController extends APIBaseController // } - private function validateDataKinerja($input) { + private function validateDataKinerja($input) + { return Validator::make($input, [ 'tahun' => 'required', 'semester' => 'required', @@ -138,7 +142,8 @@ class DataKinerjaController extends APIBaseController ]); } - private function updateDataKinerja($oldData, $newDataInput) { + private function updateDataKinerja($oldData, $newDataInput) + { $newData = $oldData; $newData->tahun = $newDataInput['tahun']; @@ -148,4 +153,42 @@ class DataKinerjaController extends APIBaseController return $newData; } + + public function export() + { + $kinerja_rows = DB::table('denormalized_pegawai') + ->join('kinerja', 'denormalized_pegawai.id_user', '=', 'kinerja.id_pegawai') + ->select([ + 'denormalized_pegawai.nip', + 'denormalized_pegawai.nama', + 'denormalized_pegawai.unit_kerja', + 'denormalized_pegawai.posisi', + 'denormalized_pegawai.pendidikan_terakhir', + 'denormalized_pegawai.tanggal_lahir', + 'kinerja.tahun', + DB::raw('kinerja.semester + 1'), + 'kinerja.nilai', + 'kinerja.catatan', + ])->get(); + + $kinerja_array = []; + + foreach ($kinerja_rows as $kinerja_row) { + $kinerja_array[] = get_object_vars($kinerja_row); + } + + $timestamp = Carbon::now()->toDateTimeString(); + $filename = 'kinerja_' . $timestamp; + + $storagePath = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix(); + $path = $storagePath . 'templates/kinerja_template_export.xlsx'; + + Excel::load($path, function ($excel) use ($kinerja_array, $timestamp) { + $excel->setTitle('Data Kinerja ' . $timestamp); + + $excel->sheet('sheet1', function ($sheet) use ($kinerja_array) { + $sheet->fromArray($kinerja_array, null, 'A2', false, false); + }); + })->setFilename('kinerja_' . $timestamp)->download('xlsx'); + } } diff --git a/app/Http/Controllers/DataKompetensiController.php b/app/Http/Controllers/DataKompetensiController.php index d8ecc0ef90e02750a4667bb829e9056d43a8b710..41b5d823d04d4bb5c48c2c49c082bcda9c84c2f6 100644 --- a/app/Http/Controllers/DataKompetensiController.php +++ b/app/Http/Controllers/DataKompetensiController.php @@ -2,17 +2,20 @@ namespace App\Http\Controllers; -use Illuminate\Support\Facades\Auth; -use App\User; -use App\Pegawai; -use App\PMO; use App\Admin; -use Illuminate\Http\Request; +use App\DenormalizedPegawai; use App\Http\Controllers\APIBaseController; use App\Kompetensi; -use Illuminate\Support\Facades\Log; -use Validator; +use App\Pegawai; +use App\PMO; +use App\User; +use Carbon\Carbon; +use Excel; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Storage; +use Validator; class DataKompetensiController extends APIBaseController { @@ -23,7 +26,9 @@ class DataKompetensiController extends APIBaseController */ public function index() { - if(!$this->authenticate(4)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(4)) { + return $this->sendError('You are not authenticated.'); + } $data = DB::table('kompetensi') ->join('denormalized_pegawai', 'kompetensi.id_pegawai', '=', 'denormalized_pegawai.id_user') @@ -40,7 +45,9 @@ class DataKompetensiController extends APIBaseController public function create() { // - if(!$this->authenticate(2)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(2)) { + return $this->sendError('You are not authenticated.'); + } } /** @@ -51,7 +58,9 @@ class DataKompetensiController extends APIBaseController */ public function store(Request $request) { - if(!$this->authenticate(2)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(2)) { + return $this->sendError('You are not authenticated.'); + } $validator = $this->validateDataKompetensi($request); if ($validator->fails()) { @@ -62,12 +71,11 @@ class DataKompetensiController extends APIBaseController $pegawai = Pegawai::where('nip', '=', $nip)->first(); if (is_null($pegawai)) { - return $this->sendError('Pegawai dengan NIP: '.$nip.' tidak ditemukan.', 404); + return $this->sendError('Pegawai dengan NIP: ' . $nip . ' tidak ditemukan.', 404); } $data = new Kompetensi; $data = $this->updateDataKompetensi($data, $request->all()); - $data = $this->computeDataAverage($data); $data->pegawai()->associate($pegawai); $data->save(); @@ -82,7 +90,9 @@ class DataKompetensiController extends APIBaseController */ public function show($id) { - if(!$this->authenticate(4)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(4)) { + return $this->sendError('You are not authenticated.'); + } $data = Kompetensi::find($id); @@ -102,7 +112,9 @@ class DataKompetensiController extends APIBaseController public function edit($id) { // - if(!$this->authenticate(2)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(2)) { + return $this->sendError('You are not authenticated.'); + } } /** @@ -114,22 +126,23 @@ class DataKompetensiController extends APIBaseController */ public function update(Request $request, $id) { - if(!$this->authenticate(2)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(2)) { + return $this->sendError('You are not authenticated.'); + } $input = $request->all(); $validator = $this->validateDataKompetensi($request); - if($validator->fails()){ + if ($validator->fails()) { return $this->sendError('Gagal menyimpan data kompetensi.', 400); } $data = Kompetensi::find($id); if (is_null($data)) { - return $this->sendError('Data Kompetensi dengan id = '.$id.' tidak ditemukan.', 404); + return $this->sendError('Data Kompetensi dengan id = ' . $id . ' tidak ditemukan.', 404); } $data = $this->updateDataKompetensi($data, $input); - $data = $this->computeDataAverage($data); $data->save(); return $this->sendResponse($data, 'Data kompetensi berhasil disimpan.'); @@ -143,11 +156,13 @@ class DataKompetensiController extends APIBaseController */ public function destroy($id) { - // - if(!$this->authenticate(2)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(2)) { + return $this->sendError('You are not authenticated.'); + } } - private function validateDataKompetensi(Request $request) { + private function validateDataKompetensi(Request $request) + { $input = $request->all(); return Validator::make($input, [ 'tanggal' => 'required', @@ -178,7 +193,8 @@ class DataKompetensiController extends APIBaseController ]); } - private function updateDataKompetensi($oldData, $newDataInput) { + private function updateDataKompetensi($oldData, $newDataInput) + { $newData = $oldData; $newData->tanggal = $newDataInput['tanggal']; @@ -211,7 +227,7 @@ class DataKompetensiController extends APIBaseController return $newData; } - public function computeDataAverage(Kompetensi $input) { +public function computeDataAverage(Kompetensi $input) { $data = collect($input->toArray()); $aspects = collect([ @@ -276,19 +292,91 @@ class DataKompetensiController extends APIBaseController } } - private function authenticate($role){ + public function export() + { + $kompetensi_rows = DB::table('denormalized_pegawai') + ->join('kompetensi', 'denormalized_pegawai.id_user', '=', 'kompetensi.id_pegawai') + ->select([ + 'denormalized_pegawai.nip', + 'denormalized_pegawai.nama', + 'denormalized_pegawai.unit_kerja', + 'denormalized_pegawai.posisi', + 'denormalized_pegawai.pendidikan_terakhir', + 'denormalized_pegawai.tanggal_lahir', + 'tujuan', + 'tanggal', + 'kognitif_efisiensi_kecerdasan', + 'kognitif_daya_nalar', + 'kognitif_daya_asosiasi', + 'kognitif_daya_analitis', + 'kognitif_daya_antisipasi', + 'kognitif_kemandirian_berpikir', + 'kognitif_fleksibilitas', + 'kognitif_daya_tangkap', + 'kognitif', + 'interaksional_penempatan_diri', + 'interaksional_percaya_diri', + 'interaksional_daya_kooperatif', + 'interaksional_penyesuaian_perasaan', + 'interaksional', + 'emosional_stabilitas_emosi', + 'emosional_toleransi_stres', + 'emosional_pengendalian_diri', + 'emosional_kemantapan_konsentrasi', + 'emosional', + 'sikap_kerja_hasrat_berprestasi', + 'sikap_kerja_daya_tahan', + 'sikap_kerja_keteraturan_kerja', + 'sikap_kerja_pengerahan_energi_kerja', + 'sikap_kerja', + 'manajerial_efektivitas_perencanaan', + 'manajerial_pengorganisasian_pelaksanaan', + 'manajerial_intensitas_pengarahan', + 'manajerial_kekuatan_pengawasan', + 'manajerial', + 'profil_potensi_keberhasilan', + 'profil_potensi_pengembangan_diri', + 'profil_loyalitas_terhadap_tugas', + 'profil_efektivitas_manajerial', + 'profil', + 'indeks', + ])->get(); + + $kompetensi_array = []; + + foreach ($kompetensi_rows as $kompetensi_row) { + $kompetensi_array[] = get_object_vars($kompetensi_row); + } + + $timestamp = Carbon::now()->toDateTimeString(); + $filename = 'kompetensi_' . $timestamp; + + $storagePath = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix(); + $path = $storagePath . 'templates/kompetensi_template_export.xlsx'; + + Excel::load($path, function ($excel) use ($kompetensi_array, $timestamp) { + $excel->setTitle('Data Kompetensi ' . $timestamp); + + $excel->sheet('sheet1', function ($sheet) use ($kompetensi_array) { + $sheet->fromArray($kompetensi_array, null, 'A3', false, false); + }); + })->setFilename('kompetensi_' . $timestamp)->download('xlsx'); + } + + private function authenticate($role) + { if (Auth::check()) { $session_id = Auth::user()->id; - }else{ + } else { return false; } - $auth = NULL; + $auth = null; switch ($role) { case 1: $auth = Pegawai::find($session_id); break; - + case 2: $auth = PMO::find($session_id); break; diff --git a/app/Http/Controllers/Pegawai/PegawaiAPIController.php b/app/Http/Controllers/Pegawai/PegawaiAPIController.php index 0cae12725ef80d6fe7a9f310cf512ad699365b0b..b50cc7ba7a848d06f750c1a43067dabb43cb32af 100644 --- a/app/Http/Controllers/Pegawai/PegawaiAPIController.php +++ b/app/Http/Controllers/Pegawai/PegawaiAPIController.php @@ -1,22 +1,25 @@ <?php - namespace App\Http\Controllers\Pegawai; - -use Illuminate\Http\Request; +use App\Admin; +use App\DataKepegawaian; +use App\DenormalizedPegawai; use App\Http\Controllers\APIBaseController as APIBaseController; -use Illuminate\Support\Facades\Auth; -use App\User; use App\Pegawai; use App\PMO; -use App\Admin; -use App\RiwayatPendidikan; use App\RiwayatPekerjaan; -use App\DataKepegawaian; +use App\RiwayatPendidikan; use App\Sertifikat; -use Validator; +use App\User; +use Carbon\Carbon; +use Excel; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Facades\Storage; +use Validator; class PegawaiAPIController extends APIBaseController @@ -29,10 +32,12 @@ class PegawaiAPIController extends APIBaseController public function index() { - if(!$this->authenticate(5)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(5)) { + return $this->sendError('You are not authenticated.'); + } + + $user = Pegawai::with(['user', 'riwayatPendidikans', 'riwayatPekerjaans', 'dataKepegawaians'])->get(); - $user = Pegawai::with(['user','riwayatPendidikans','riwayatPekerjaans','dataKepegawaians'])->get(); - return $this->sendResponse($user, 'Profiles retrieved successfully.'); } @@ -46,7 +51,9 @@ class PegawaiAPIController extends APIBaseController public function store(Request $request) { - if(!$this->authenticate(2)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(2)) { + return $this->sendError('You are not authenticated.'); + } $input = $request->all(); @@ -59,13 +66,13 @@ class PegawaiAPIController extends APIBaseController 'id_pengubah' => 'required', ]); - if($validator->fails()){ + if ($validator->fails()) { return $this->sendError('Validation Error.', $validator->errors()); } $find = User::where('email', $input['email'])->count(); - if($find != 0){ + if ($find != 0) { return $this->sendError('Email Already Exist'); } @@ -98,7 +105,9 @@ class PegawaiAPIController extends APIBaseController */ public function show($id) { - if(!$this->authenticate(5)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(5)) { + return $this->sendError('You are not authenticated.'); + } $pegawai = Pegawai::find($id); @@ -114,7 +123,7 @@ class PegawaiAPIController extends APIBaseController $data = [ 'user' => $user->toArray(), - 'pegawai' => $pegawai->toArray(), + 'pegawai' => $pegawai->toArray(), 'pendidikan' => $pendidikan->get()->toArray(), 'pekerjaan' => $pekerjaan->get()->toArray(), 'kepegawaian' => $kepegawaian->get()->toArray(), @@ -134,7 +143,9 @@ class PegawaiAPIController extends APIBaseController public function update(Request $request, $id) { - if(!$this->authenticate(4)){return $this->sendError('You are not authenticated.');} + if (!$this->authenticate(4)) { + return $this->sendError('You are not authenticated.'); + } $input = $request->all(); @@ -148,7 +159,7 @@ class PegawaiAPIController extends APIBaseController 'tanggal_lahir' => 'required', ]); - if($validator->fails()){ + if ($validator->fails()) { return $this->sendError('Validation Error.', $validator->errors()); } @@ -162,7 +173,7 @@ class PegawaiAPIController extends APIBaseController $user = User::find($id); - if($find->count() != 0 && $find->first()->email != $user->email){ + if ($find->count() != 0 && $find->first()->email != $user->email) { return $this->sendError('Email Already Exist'); } @@ -176,11 +187,11 @@ class PegawaiAPIController extends APIBaseController $pendidikan = RiwayatPendidikan::where('id_pegawai', $id); - if($pendidikan->count() > 0){ + if ($pendidikan->count() > 0) { $pendidikan->delete(); } - for($i = 1; $i <= $input['pendidikan_counter']; $i++){ + for ($i = 1; $i <= $input['pendidikan_counter']; $i++) { $postRiwayatPendidikan = RiwayatPendidikan::create([ 'id_pegawai' => $id, 'nama_institusi' => $input['pendidikan_nama_institusi_' . $i], @@ -193,11 +204,11 @@ class PegawaiAPIController extends APIBaseController $pekerjaan = RiwayatPekerjaan::where('id_pegawai', $id); - if ($pekerjaan->count() > 0){ + if ($pekerjaan->count() > 0) { $pekerjaan->delete(); } - for($i = 1; $i <= $input['pekerjaan_counter']; $i++){ + for ($i = 1; $i <= $input['pekerjaan_counter']; $i++) { $postRiwayatPekerjaan = RiwayatPekerjaan::create([ 'id_pegawai' => $id, 'nama_institusi' => $input['pekerjaan_nama_institusi_' . $i], @@ -209,11 +220,11 @@ class PegawaiAPIController extends APIBaseController $kepegawaian = DataKepegawaian::where('id_pegawai', $id); - if ($kepegawaian->count() > 0){ + if ($kepegawaian->count() > 0) { $kepegawaian->delete(); } - for($i = 1; $i <= $input['kepegawaian_counter']; $i++){ + for ($i = 1; $i <= $input['kepegawaian_counter']; $i++) { $postDataKepegawaian = DataKepegawaian::create([ 'id_pegawai' => $id, 'kompetensi' => $input['kepegawaian_kompetensi_' . $i], @@ -226,12 +237,12 @@ class PegawaiAPIController extends APIBaseController $sertifikat = Sertifikat::where('id_pegawai', $id); - if ($sertifikat->count() > 0){ + if ($sertifikat->count() > 0) { $sertifikat->delete(); } for ($i = 1; $i <= $input['sertifikat_counter']; $i++) { - $photoTimeAsName = time().'.'.$input['sertifikat_user_photo_' . $i]->getClientOriginalExtension(); + $photoTimeAsName = time() . '.' . $input['sertifikat_user_photo_' . $i]->getClientOriginalExtension(); $input['sertifikat_user_photo_' . $i]->move(public_path('avatars'), $photoTimeAsName); $postSertifikat = Sertifikat::create([ @@ -259,7 +270,6 @@ class PegawaiAPIController extends APIBaseController return $this->sendResponse($data, 'Profile updated successfully.'); } - /** * Remove the specified resource from storage. * @@ -269,8 +279,9 @@ class PegawaiAPIController extends APIBaseController public function destroy($id) { - if(!$this->authenticate(3)){return $this->sendError('You are not authenticated.');} - + if (!$this->authenticate(3)) { + return $this->sendError('You are not authenticated.'); + } $user = User::find($id); @@ -280,19 +291,19 @@ class PegawaiAPIController extends APIBaseController $pendidikan = RiwayatPendidikan::where('id_pegawai', $id); - if ($pendidikan->count() > 0){ + if ($pendidikan->count() > 0) { $pendidikan->delete(); } $pekerjaan = RiwayatPekerjaan::where('id_pegawai', $id); - if($pekerjaan->count() > 0){ + if ($pekerjaan->count() > 0) { $pekerjaan->delete(); } $kepegawaian = DataKepegawaian::where('id_pegawai', $id); - if ($kepegawaian->count() > 0){ + if ($kepegawaian->count() > 0) { $kepegawaian->delete(); } @@ -304,19 +315,54 @@ class PegawaiAPIController extends APIBaseController return $this->sendResponse($id, 'Tag deleted successfully.'); } - private function authenticate($role){ + public function export() + { + $pegawai_rows = DB::table('denormalized_pegawai')->select([ + 'denormalized_pegawai.nip', + 'denormalized_pegawai.nama', + 'denormalized_pegawai.unit_kerja', + 'denormalized_pegawai.posisi', + 'denormalized_pegawai.tahun_masuk_kerja', + 'denormalized_pegawai.pendidikan_terakhir', + 'denormalized_pegawai.no_telp', + 'denormalized_pegawai.tanggal_lahir' + ])->get(); + + $pegawai_array = []; + + foreach ($pegawai_rows as $pegawai_row) { + $pegawai_array[] = get_object_vars($pegawai_row); + } + + $timestamp = Carbon::now()->toDateTimeString(); + $filename = 'pegawai_' . $timestamp; + + $storagePath = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix(); + $path = $storagePath . 'templates/pegawai_template_export.xlsx'; + + Excel::load($path, function ($excel) use ($pegawai_array, $timestamp) { + $excel->setTitle('Data Pegawai ' . $timestamp); + + $excel->sheet('sheet1', function ($sheet) use ($pegawai_array) { + $sheet->fromArray($pegawai_array, null, 'A2', false, false); + }); + })->setFilename('pegawai_' . $timestamp)->download('xlsx'); + } + + private function authenticate($role) + { if (Auth::check()) { $session_id = Auth::user()->id; - }else{ + } else { return false; } - $auth = NULL; + $auth = null; switch ($role) { case 1: $auth = Pegawai::find($session_id); break; - + case 2: $auth = PMO::find($session_id); break; diff --git a/composer.json b/composer.json index 653df945053169e65f94fb2f3b4ca817f0ace7ed..2ef367377f8488baa825d0de44c94c1548d866a3 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,8 @@ "php": "^7.1.3", "fideloper/proxy": "^4.0", "laravel/framework": "5.6.*", - "laravel/tinker": "^1.0" + "laravel/tinker": "^1.0", + "maatwebsite/excel": "~2.1.0" }, "require-dev": { "filp/whoops": "^2.0", diff --git a/composer.lock b/composer.lock index 0745d1f377a4cca8ea9bdfa495d007c1be148349..2a2d649465a00efe3112f4b932153e86ed78d6ac 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "9febe236a930e04553f1c6bb56f531b4", + "content-hash": "d05dd91c2a57d9a2d78f89e796cad761", "packages": [ { "name": "dnoegel/php-xdg-base-dir", @@ -453,6 +453,64 @@ ], "time": "2015-04-20T18:58:01+00:00" }, + { + "name": "jeremeamia/SuperClosure", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/jeremeamia/super_closure.git", + "reference": "5707d5821b30b9a07acfb4d76949784aaa0e9ce9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/5707d5821b30b9a07acfb4d76949784aaa0e9ce9", + "reference": "5707d5821b30b9a07acfb4d76949784aaa0e9ce9", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.2|^2.0|^3.0|^4.0", + "php": ">=5.4", + "symfony/polyfill-php56": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "SuperClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia", + "role": "Developer" + } + ], + "description": "Serialize Closure objects, including their context and binding", + "homepage": "https://github.com/jeremeamia/super_closure", + "keywords": [ + "closure", + "function", + "lambda", + "parser", + "serializable", + "serialize", + "tokenizer" + ], + "time": "2018-03-21T22:21:57+00:00" + }, { "name": "laravel/framework", "version": "v5.6.17", @@ -739,6 +797,84 @@ ], "time": "2018-04-06T09:58:14+00:00" }, + { + "name": "maatwebsite/excel", + "version": "2.1.27", + "source": { + "type": "git", + "url": "https://github.com/Maatwebsite/Laravel-Excel.git", + "reference": "ea758fe5a9d33e0d88b40f099d1df652a0c99d38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/ea758fe5a9d33e0d88b40f099d1df652a0c99d38", + "reference": "ea758fe5a9d33e0d88b40f099d1df652a0c99d38", + "shasum": "" + }, + "require": { + "illuminate/cache": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", + "illuminate/config": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", + "illuminate/filesystem": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", + "illuminate/support": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", + "jeremeamia/superclosure": "^2.3", + "nesbot/carbon": "~1.0", + "php": ">=5.5", + "phpoffice/phpexcel": "^1.8.1", + "tijsverkoyen/css-to-inline-styles": "~2.0" + }, + "require-dev": { + "mockery/mockery": "~1.0", + "orchestra/testbench": "3.1.*|3.2.*|3.3.*|3.4.*|3.5.*|3.6.*", + "phpseclib/phpseclib": "~1.0", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "illuminate/http": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", + "illuminate/queue": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", + "illuminate/routing": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", + "illuminate/view": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Maatwebsite\\Excel\\ExcelServiceProvider" + ], + "aliases": { + "Excel": "Maatwebsite\\Excel\\Facades\\Excel" + } + } + }, + "autoload": { + "classmap": [ + "src/Maatwebsite/Excel" + ], + "psr-0": { + "Maatwebsite\\Excel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maatwebsite.nl", + "email": "patrick@maatwebsite.nl" + } + ], + "description": "An eloquent way of importing and exporting Excel and CSV in Laravel 4 with the power of PHPExcel", + "keywords": [ + "PHPExcel", + "batch", + "csv", + "excel", + "export", + "import", + "laravel" + ], + "time": "2018-03-09T13:14:19+00:00" + }, { "name": "monolog/monolog", "version": "1.23.0", @@ -969,6 +1105,64 @@ ], "time": "2018-04-04T21:24:14+00:00" }, + { + "name": "phpoffice/phpexcel", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PHPExcel.git", + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/372c7cbb695a6f6f1e62649381aeaa37e7e70b32", + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "ext-xmlwriter": "*", + "php": ">=5.2.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "PHPExcel": "Classes/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker" + }, + { + "name": "Franck Lefevre", + "homepage": "http://blog.rootslabs.net" + }, + { + "name": "Erik Tilt" + } + ], + "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "http://phpexcel.codeplex.com", + "keywords": [ + "OpenXML", + "excel", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "abandoned": "phpoffice/phpspreadsheet", + "time": "2015-05-01T07:00:55+00:00" + }, { "name": "psr/container", "version": "1.0.0", @@ -1807,6 +2001,62 @@ ], "time": "2018-01-30T19:27:44+00:00" }, + { + "name": "symfony/polyfill-php56", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "ebc999ce5f14204c5150b9bd15f8f04e621409d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/ebc999ce5f14204c5150b9bd15f8f04e621409d8", + "reference": "ebc999ce5f14204c5150b9bd15f8f04e621409d8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-01-30T19:27:44+00:00" + }, { "name": "symfony/polyfill-php72", "version": "v1.7.0", @@ -1862,6 +2112,58 @@ ], "time": "2018-01-31T17:43:24+00:00" }, + { + "name": "symfony/polyfill-util", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "e17c808ec4228026d4f5a8832afa19be85979563" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/e17c808ec4228026d4f5a8832afa19be85979563", + "reference": "e17c808ec4228026d4f5a8832afa19be85979563", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "time": "2018-01-31T18:08:44+00:00" + }, { "name": "symfony/process", "version": "v4.0.8", @@ -3282,23 +3584,23 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.5", + "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { @@ -3341,7 +3643,7 @@ "spy", "stub" ], - "time": "2018-02-19T10:16:54+00:00" + "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3594,16 +3896,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.1.3", + "version": "7.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a7834993ddbf4b0ed2c3b2dc1f3b1d093ef910a9" + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a7834993ddbf4b0ed2c3b2dc1f3b1d093ef910a9", - "reference": "a7834993ddbf4b0ed2c3b2dc1f3b1d093ef910a9", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6d51299e307dc510149e0b7cd1931dd11770e1cb", + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb", "shasum": "" }, "require": { @@ -3622,7 +3924,7 @@ "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.0", "phpunit/phpunit-mock-objects": "^6.1.1", - "sebastian/comparator": "^2.1", + "sebastian/comparator": "^2.1 || ^3.0", "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", @@ -3670,7 +3972,7 @@ "testing", "xunit" ], - "time": "2018-04-13T02:28:50+00:00" + "time": "2018-04-18T13:41:53+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -3775,30 +4077,30 @@ }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": "^7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -3835,7 +4137,7 @@ "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "time": "2018-04-18T13:33:00+00:00" }, { "name": "sebastian/diff", diff --git a/config/app.php b/config/app.php index bdd902a0c3b908339b98b84dd95b733adc13f84b..4727292035becc619216e908479442a9b017d54a 100644 --- a/config/app.php +++ b/config/app.php @@ -162,7 +162,7 @@ return [ App\Providers\RouteServiceProvider::class, Krlove\EloquentModelGenerator\Provider\GeneratorServiceProvider::class, - + Maatwebsite\Excel\ExcelServiceProvider::class, ], /* @@ -213,6 +213,7 @@ return [ 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, + 'Excel' => Maatwebsite\Excel\Facades\Excel::class, ], ]; diff --git a/config/database.php b/config/database.php index cab5d068f75650dcba53e7c38dd19aa1348ef596..e939b89c0587d0b86b240a612e0c1e5cdb386065 100644 --- a/config/database.php +++ b/config/database.php @@ -50,7 +50,7 @@ return [ 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', - 'strict' => true, + 'strict' => false, 'engine' => null, ], diff --git a/database/seeds/AsesmenSeeder.php b/database/seeds/AsesmenSeeder.php index a81162bfd3379d262293109001e91ce608a0a4c9..c837c88620579a5e30c2066e541bd7ea03c1ebb8 100644 --- a/database/seeds/AsesmenSeeder.php +++ b/database/seeds/AsesmenSeeder.php @@ -11,7 +11,7 @@ class AsesmenSeeder extends Seeder */ public function run() { - factory(App\Kinerja::class, 50)->create(); - factory(App\Kompetensi::class, 50)->create(); + factory(App\Kinerja::class, 500)->create(); + factory(App\Kompetensi::class, 500)->create(); } } diff --git a/package-lock.json b/package-lock.json index 613105362c9a85026fa7c01f0c417f15f4ff2dfb..7de6f6d5dffba59f0fc549deec3cf14e90a101b8 100755 --- a/package-lock.json +++ b/package-lock.json @@ -12954,9 +12954,9 @@ "dev": true }, "vue-good-table": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/vue-good-table/-/vue-good-table-2.4.0.tgz", - "integrity": "sha512-dzawkW9RNirU/ruxHRBstdy+gd/oCcMuBlQUokMmlUh8ahGgPWAH+tU9hRVoKEov1YdKD8bnqrDc2/5TL8DOKw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/vue-good-table/-/vue-good-table-2.4.1.tgz", + "integrity": "sha512-Dhi74VcvW+DPwAhyvRGlPtIUAvk2QSxXzCmhdt6xjUCV9BnxLdeCqWcXWi7VnaQ8gNCEmpRrpJkC0hXLH83xTQ==", "requires": { "date-fns": "2.0.0-alpha.7", "diacriticless": "1.0.1", diff --git a/package.json b/package.json index be7871775aab7075e951a3b75ef8133c8ef57956..5baca0a7d67fd5c62e0ec89326598ead2381e233 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,6 @@ "dependencies": { "open-iconic": "^1.1.1", "pretty-checkbox": "^3.0.3", - "vue-good-table": "^2.4.0" + "vue-good-table": "^2.4.1" } } diff --git a/public/css/app.css b/public/css/app.css index b46ae518a8f85bc1dccdd1aad5936d5e61724466..b0d3ec845e697fc267dad6cf0e0f18e35ff37841 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1,5 +1,5 @@ @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);/*! - * Bootstrap v4.1.0 (https://getbootstrap.com/) + * Bootstrap v4.0.0 (https://getbootstrap.com) * Copyright 2011-2018 The Bootstrap Authors * Copyright 2011-2018 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) @@ -251,7 +251,7 @@ th { label { display: inline-block; - margin-bottom: 0.5rem; + margin-bottom: .5rem; } button { @@ -1972,13 +1972,6 @@ pre code { border-bottom-width: 2px; } -.table-borderless th, -.table-borderless td, -.table-borderless thead th, -.table-borderless tbody + tbody { - border: 0; -} - .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(0, 0, 0, 0.05); } @@ -2242,13 +2235,6 @@ pre code { transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { - .form-control { - -webkit-transition: none; - transition: none; - } -} - .form-control::-ms-expand { background-color: transparent; border: 0; @@ -2333,7 +2319,6 @@ select.form-control:focus::-ms-value { padding-bottom: 0.375rem; margin-bottom: 0; line-height: 1.6; - color: #333; background-color: transparent; border: solid transparent; border-width: 1px 0; @@ -2752,8 +2737,7 @@ select.form-control-lg:not([size]):not([multiple]), display: inline-block; } - .form-inline .input-group, - .form-inline .custom-select { + .form-inline .input-group { width: auto; } @@ -2813,13 +2797,6 @@ select.form-control-lg:not([size]):not([multiple]), transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { - .btn { - -webkit-transition: none; - transition: none; - } -} - .btn:hover, .btn:focus { text-decoration: none; @@ -3515,7 +3492,6 @@ fieldset:disabled a.btn { .btn-link:disabled, .btn-link.disabled { color: #6c757d; - pointer-events: none; } .btn-lg, @@ -3550,23 +3526,29 @@ input[type="button"].btn-block { } .fade { + opacity: 0; -webkit-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } -@media screen and (prefers-reduced-motion: reduce) { - .fade { - -webkit-transition: none; - transition: none; - } +.fade.show { + opacity: 1; } -.fade:not(.show) { - opacity: 0; +.collapse { + display: none; } -.collapse:not(.show) { - display: none; +.collapse.show { + display: block; +} + +tr.collapse.show { + display: table-row; +} + +tbody.collapse.show { + display: table-row-group; } .collapsing { @@ -3577,17 +3559,8 @@ input[type="button"].btn-block { transition: height 0.35s ease; } -@media screen and (prefers-reduced-motion: reduce) { - .collapsing { - -webkit-transition: none; - transition: none; - } -} - .dropup, -.dropright, -.dropdown, -.dropleft { +.dropdown { position: relative; } @@ -3628,14 +3601,7 @@ input[type="button"].btn-block { border-radius: 0.25rem; } -.dropdown-menu-right { - right: 0; - left: auto; -} - .dropup .dropdown-menu { - top: auto; - bottom: 100%; margin-top: 0; margin-bottom: 0.125rem; } @@ -3658,9 +3624,6 @@ input[type="button"].btn-block { } .dropright .dropdown-menu { - top: 0; - right: auto; - left: 100%; margin-top: 0; margin-left: 0.125rem; } @@ -3673,7 +3636,6 @@ input[type="button"].btn-block { vertical-align: 0.255em; content: ""; border-top: 0.3em solid transparent; - border-right: 0; border-bottom: 0.3em solid transparent; border-left: 0.3em solid; } @@ -3687,9 +3649,6 @@ input[type="button"].btn-block { } .dropleft .dropdown-menu { - top: 0; - right: 100%; - left: auto; margin-top: 0; margin-right: 0.125rem; } @@ -3727,14 +3686,6 @@ input[type="button"].btn-block { vertical-align: 0; } -.dropdown-menu[x-placement^="top"], -.dropdown-menu[x-placement^="right"], -.dropdown-menu[x-placement^="bottom"], -.dropdown-menu[x-placement^="left"] { - right: auto; - bottom: auto; -} - .dropdown-divider { height: 0; margin: 0.5rem 0; @@ -3788,12 +3739,6 @@ input[type="button"].btn-block { white-space: nowrap; } -.dropdown-item-text { - display: block; - padding: 0.25rem 1.5rem; - color: #212529; -} - .btn-group, .btn-group-vertical { position: relative; @@ -3872,16 +3817,10 @@ input[type="button"].btn-block { padding-left: 0.5625rem; } -.dropdown-toggle-split::after, -.dropup .dropdown-toggle-split::after, -.dropright .dropdown-toggle-split::after { +.dropdown-toggle-split::after { margin-left: 0; } -.dropleft .dropdown-toggle-split::before { - margin-right: 0; -} - .btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split { padding-right: 0.375rem; @@ -4010,13 +3949,13 @@ input[type="button"].btn-block { } .input-group > .custom-file:not(:last-child) .custom-file-label, -.input-group > .custom-file:not(:last-child) .custom-file-label::after { +.input-group > .custom-file:not(:last-child) .custom-file-label::before { border-top-right-radius: 0; border-bottom-right-radius: 0; } .input-group > .custom-file:not(:first-child) .custom-file-label, -.input-group > .custom-file:not(:first-child) .custom-file-label::after { +.input-group > .custom-file:not(:first-child) .custom-file-label::before { border-top-left-radius: 0; border-bottom-left-radius: 0; } @@ -4294,13 +4233,13 @@ input[type="button"].btn-block { opacity: 0; } -.custom-file-input:focus ~ .custom-file-label { +.custom-file-input:focus ~ .custom-file-control { border-color: #139fff; -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 87, 146, 0.25); box-shadow: 0 0 0 0.2rem rgba(0, 87, 146, 0.25); } -.custom-file-input:focus ~ .custom-file-label::after { +.custom-file-input:focus ~ .custom-file-control::before { border-color: #139fff; } @@ -4340,122 +4279,6 @@ input[type="button"].btn-block { border-radius: 0 0.25rem 0.25rem 0; } -.custom-range { - width: 100%; - padding-left: 0; - background-color: transparent; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -.custom-range:focus { - outline: none; -} - -.custom-range::-moz-focus-outer { - border: 0; -} - -.custom-range::-webkit-slider-thumb { - width: 1rem; - height: 1rem; - margin-top: -0.25rem; - background-color: #005792; - border: 0; - border-radius: 1rem; - -webkit-appearance: none; - appearance: none; -} - -.custom-range::-webkit-slider-thumb:focus { - outline: none; - -webkit-box-shadow: 0 0 0 1px #f5f8fa, 0 0 0 0.2rem rgba(0, 87, 146, 0.25); - box-shadow: 0 0 0 1px #f5f8fa, 0 0 0 0.2rem rgba(0, 87, 146, 0.25); -} - -.custom-range::-webkit-slider-thumb:active { - background-color: #46b4ff; -} - -.custom-range::-webkit-slider-runnable-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: #dee2e6; - border-color: transparent; - border-radius: 1rem; -} - -.custom-range::-moz-range-thumb { - width: 1rem; - height: 1rem; - background-color: #005792; - border: 0; - border-radius: 1rem; - -moz-appearance: none; - appearance: none; -} - -.custom-range::-moz-range-thumb:focus { - outline: none; - box-shadow: 0 0 0 1px #f5f8fa, 0 0 0 0.2rem rgba(0, 87, 146, 0.25); -} - -.custom-range::-moz-range-thumb:active { - background-color: #46b4ff; -} - -.custom-range::-moz-range-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: #dee2e6; - border-color: transparent; - border-radius: 1rem; -} - -.custom-range::-ms-thumb { - width: 1rem; - height: 1rem; - background-color: #005792; - border: 0; - border-radius: 1rem; - appearance: none; -} - -.custom-range::-ms-thumb:focus { - outline: none; - box-shadow: 0 0 0 1px #f5f8fa, 0 0 0 0.2rem rgba(0, 87, 146, 0.25); -} - -.custom-range::-ms-thumb:active { - background-color: #46b4ff; -} - -.custom-range::-ms-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: transparent; - border-color: transparent; - border-width: 0.5rem; -} - -.custom-range::-ms-fill-lower { - background-color: #dee2e6; - border-radius: 1rem; -} - -.custom-range::-ms-fill-upper { - margin-right: 15px; - background-color: #dee2e6; - border-radius: 1rem; -} - .nav { display: -webkit-box; display: -ms-flexbox; @@ -4697,6 +4520,11 @@ input[type="button"].btn-block { position: absolute; } + .navbar-expand-sm .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; + } + .navbar-expand-sm .navbar-nav .nav-link { padding-right: 0.5rem; padding-left: 0.5rem; @@ -4719,6 +4547,11 @@ input[type="button"].btn-block { .navbar-expand-sm .navbar-toggler { display: none; } + + .navbar-expand-sm .dropup .dropdown-menu { + top: auto; + bottom: 100%; + } } @media (max-width: 767.98px) { @@ -4751,6 +4584,11 @@ input[type="button"].btn-block { position: absolute; } + .navbar-expand-md .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; + } + .navbar-expand-md .navbar-nav .nav-link { padding-right: 0.5rem; padding-left: 0.5rem; @@ -4773,6 +4611,11 @@ input[type="button"].btn-block { .navbar-expand-md .navbar-toggler { display: none; } + + .navbar-expand-md .dropup .dropdown-menu { + top: auto; + bottom: 100%; + } } @media (max-width: 991.98px) { @@ -4805,6 +4648,11 @@ input[type="button"].btn-block { position: absolute; } + .navbar-expand-lg .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; + } + .navbar-expand-lg .navbar-nav .nav-link { padding-right: 0.5rem; padding-left: 0.5rem; @@ -4827,6 +4675,11 @@ input[type="button"].btn-block { .navbar-expand-lg .navbar-toggler { display: none; } + + .navbar-expand-lg .dropup .dropdown-menu { + top: auto; + bottom: 100%; + } } @media (max-width: 1199.98px) { @@ -4859,6 +4712,11 @@ input[type="button"].btn-block { position: absolute; } + .navbar-expand-xl .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; + } + .navbar-expand-xl .navbar-nav .nav-link { padding-right: 0.5rem; padding-left: 0.5rem; @@ -4881,6 +4739,11 @@ input[type="button"].btn-block { .navbar-expand-xl .navbar-toggler { display: none; } + + .navbar-expand-xl .dropup .dropdown-menu { + top: auto; + bottom: 100%; + } } .navbar-expand { @@ -4910,6 +4773,11 @@ input[type="button"].btn-block { position: absolute; } +.navbar-expand .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; +} + .navbar-expand .navbar-nav .nav-link { padding-right: 0.5rem; padding-left: 0.5rem; @@ -4933,6 +4801,11 @@ input[type="button"].btn-block { display: none; } +.navbar-expand .dropup .dropdown-menu { + top: auto; + bottom: 100%; +} + .navbar-light .navbar-brand { color: rgba(0, 0, 0, 0.9); } @@ -5301,8 +5174,6 @@ input[type="button"].btn-block { column-count: 3; -webkit-column-gap: 1.25rem; column-gap: 1.25rem; - orphans: 1; - widows: 1; } .card-columns .card { @@ -5311,26 +5182,6 @@ input[type="button"].btn-block { } } -.accordion .card:not(:first-of-type):not(:last-of-type) { - border-bottom: 0; - border-radius: 0; -} - -.accordion .card:not(:first-of-type) .card-header:first-child { - border-radius: 0; -} - -.accordion .card:first-of-type { - border-bottom: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.accordion .card:last-of-type { - border-top-left-radius: 0; - border-top-right-radius: 0; -} - .breadcrumb { display: -webkit-box; display: -ms-flexbox; @@ -5344,13 +5195,10 @@ input[type="button"].btn-block { border-radius: 0.25rem; } -.breadcrumb-item + .breadcrumb-item { - padding-left: 0.5rem; -} - .breadcrumb-item + .breadcrumb-item::before { display: inline-block; padding-right: 0.5rem; + padding-left: 0.5rem; color: #6c757d; content: "/"; } @@ -5388,7 +5236,6 @@ input[type="button"].btn-block { } .page-link:hover { - z-index: 2; color: #002946; text-decoration: none; background-color: #e9ecef; @@ -5790,19 +5637,11 @@ input[type="button"].btn-block { justify-content: center; color: #fff; text-align: center; - white-space: nowrap; background-color: #005792; -webkit-transition: width 0.6s ease; transition: width 0.6s ease; } -@media screen and (prefers-reduced-motion: reduce) { - .progress-bar { - -webkit-transition: none; - transition: none; - } -} - .progress-bar-striped { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-size: 1rem 1rem; @@ -6112,13 +5951,6 @@ button.close { transform: translate(0, -25%); } -@media screen and (prefers-reduced-motion: reduce) { - .modal.fade .modal-dialog { - -webkit-transition: none; - transition: none; - } -} - .modal.show .modal-dialog { -webkit-transform: translate(0, 0); transform: translate(0, 0); @@ -6605,13 +6437,6 @@ button.close { perspective: 1000px; } -@media screen and (prefers-reduced-motion: reduce) { - .carousel-item { - -webkit-transition: none; - transition: none; - } -} - .carousel-item.active, .carousel-item-next, .carousel-item-prev { @@ -6666,45 +6491,6 @@ button.close { } } -.carousel-fade .carousel-item { - opacity: 0; - -webkit-transition-duration: .6s; - transition-duration: .6s; - -webkit-transition-property: opacity; - transition-property: opacity; -} - -.carousel-fade .carousel-item.active, -.carousel-fade .carousel-item-next.carousel-item-left, -.carousel-fade .carousel-item-prev.carousel-item-right { - opacity: 1; -} - -.carousel-fade .active.carousel-item-left, -.carousel-fade .active.carousel-item-right { - opacity: 0; -} - -.carousel-fade .carousel-item-next, -.carousel-fade .carousel-item-prev, -.carousel-fade .carousel-item.active, -.carousel-fade .active.carousel-item-left, -.carousel-fade .active.carousel-item-prev { - -webkit-transform: translateX(0); - transform: translateX(0); -} - -@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) { - .carousel-fade .carousel-item-next, - .carousel-fade .carousel-item-prev, - .carousel-fade .carousel-item.active, - .carousel-fade .active.carousel-item-left, - .carousel-fade .active.carousel-item-prev { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - .carousel-control-prev, .carousel-control-next { position: absolute; @@ -7397,34 +7183,6 @@ button.bg-dark:focus { flex-wrap: wrap-reverse !important; } -.flex-fill { - -webkit-box-flex: 1 !important; - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; -} - -.flex-grow-0 { - -webkit-box-flex: 0 !important; - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; -} - -.flex-grow-1 { - -webkit-box-flex: 1 !important; - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; -} - -.flex-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; -} - -.flex-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; -} - .justify-content-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; @@ -7588,34 +7346,6 @@ button.bg-dark:focus { flex-wrap: wrap-reverse !important; } - .flex-sm-fill { - -webkit-box-flex: 1 !important; - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; - } - - .flex-sm-grow-0 { - -webkit-box-flex: 0 !important; - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; - } - - .flex-sm-grow-1 { - -webkit-box-flex: 1 !important; - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; - } - - .flex-sm-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; - } - - .flex-sm-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; - } - .justify-content-sm-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; @@ -7780,34 +7510,6 @@ button.bg-dark:focus { flex-wrap: wrap-reverse !important; } - .flex-md-fill { - -webkit-box-flex: 1 !important; - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; - } - - .flex-md-grow-0 { - -webkit-box-flex: 0 !important; - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; - } - - .flex-md-grow-1 { - -webkit-box-flex: 1 !important; - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; - } - - .flex-md-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; - } - - .flex-md-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; - } - .justify-content-md-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; @@ -7972,34 +7674,6 @@ button.bg-dark:focus { flex-wrap: wrap-reverse !important; } - .flex-lg-fill { - -webkit-box-flex: 1 !important; - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; - } - - .flex-lg-grow-0 { - -webkit-box-flex: 0 !important; - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; - } - - .flex-lg-grow-1 { - -webkit-box-flex: 1 !important; - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; - } - - .flex-lg-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; - } - - .flex-lg-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; - } - .justify-content-lg-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; @@ -8164,34 +7838,6 @@ button.bg-dark:focus { flex-wrap: wrap-reverse !important; } - .flex-xl-fill { - -webkit-box-flex: 1 !important; - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; - } - - .flex-xl-grow-0 { - -webkit-box-flex: 0 !important; - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; - } - - .flex-xl-grow-1 { - -webkit-box-flex: 1 !important; - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; - } - - .flex-xl-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; - } - - .flex-xl-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; - } - .justify-content-xl-start { -webkit-box-pack: start !important; -ms-flex-pack: start !important; @@ -8434,6 +8080,8 @@ button.bg-dark:focus { overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; + -webkit-clip-path: inset(50%); + clip-path: inset(50%); border: 0; } @@ -8445,26 +8093,8 @@ button.bg-dark:focus { overflow: visible; clip: auto; white-space: normal; -} - -.shadow-sm { - -webkit-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; - box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; -} - -.shadow { - -webkit-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; - box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; -} - -.shadow-lg { - -webkit-box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; - box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; -} - -.shadow-none { - -webkit-box-shadow: none !important; - box-shadow: none !important; + -webkit-clip-path: none; + clip-path: none; } .w-25 { @@ -8483,10 +8113,6 @@ button.bg-dark:focus { width: 100% !important; } -.w-auto { - width: auto !important; -} - .h-25 { height: 25% !important; } @@ -8503,10 +8129,6 @@ button.bg-dark:focus { height: 100% !important; } -.h-auto { - height: auto !important; -} - .mw-100 { max-width: 100% !important; } @@ -10083,10 +9705,6 @@ button.bg-dark:focus { } } -.text-monospace { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; -} - .text-justify { text-align: justify !important; } @@ -10273,22 +9891,10 @@ a.text-dark:focus { color: #000a17 !important; } -.text-body { - color: #333 !important; -} - .text-muted { color: #6c757d !important; } -.text-black-50 { - color: rgba(0, 0, 0, 0.5) !important; -} - -.text-white-50 { - color: rgba(255, 255, 255, 0.5) !important; -} - .text-hide { font: 0/0 a; color: transparent; @@ -10328,7 +9934,7 @@ a.text-dark:focus { pre, blockquote { - border: 1px solid #adb5bd; + border: 1px solid #999; page-break-inside: avoid; } @@ -10384,7 +9990,7 @@ a.text-dark:focus { .table-bordered th, .table-bordered td { - border: 1px solid #dee2e6 !important; + border: 1px solid #ddd !important; } } diff --git a/resources/assets/js/components/PMOMainPage.vue b/resources/assets/js/components/PMOMainPage.vue index d61bcdeeedb9cc1bf0e8ed5cc9ba9ff33f5a808a..bf182e0c43f74c69e9e881faafac162356a26633 100644 --- a/resources/assets/js/components/PMOMainPage.vue +++ b/resources/assets/js/components/PMOMainPage.vue @@ -106,7 +106,7 @@ <div class="form-group container"> <label for="uploadFile">Upload data menggunakan file excel: </label> <input type="file" class="form-control-file" id="uploadFile"> - <small class="text-muted">Harap gunakan file excel dengan format yang telah disediakan di atas.</small> + <small class="text-muted">Harap gunakan file Excel dengan format yang telah disediakan di atas.</small> </div> </form> </div> diff --git a/routes/api.php b/routes/api.php index 8046b3789ac7d13a5e30423a6e3770c168786651..16cff12b0bb7bdc4923a2449ae012fc2dc46e1dc 100644 --- a/routes/api.php +++ b/routes/api.php @@ -19,12 +19,18 @@ Route::middleware('auth:api')->get('/user', function (Request $request) { Route::get('templates/{template}', 'FileDownloadController@downloadTemplate'); +Route::get('pegawai/export', 'Pegawai\PegawaiAPIController@export'); + Route::resource('pegawai', 'Pegawai\PegawaiAPIController'); Route::resource('user', 'User\UserAPIController'); +Route::get('kompetensi/export', 'DataKompetensiController@export'); + Route::resource('kompetensi', 'DataKompetensiController'); +Route::get('kinerja/export', 'DataKinerjaController@export'); + Route::resource('kinerja', 'DataKinerjaController'); Route::resource('pegawai-denormalized', 'DataPegawaiController'); \ No newline at end of file diff --git a/storage/app/templates/kinerja_template.xlsx b/storage/app/templates/kinerja_template.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..2a08db6fc86ab7ea4b6e2f07790aca7805530354 Binary files /dev/null and b/storage/app/templates/kinerja_template.xlsx differ diff --git a/storage/app/templates/kinerja_template_export.xlsx b/storage/app/templates/kinerja_template_export.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..aef520fa6c0f2944456bc921a2998539b503b9d6 Binary files /dev/null and b/storage/app/templates/kinerja_template_export.xlsx differ diff --git a/storage/app/templates/kompetensi_template.xlsx b/storage/app/templates/kompetensi_template.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..9eee927625f8a219ed341866e1fd21bb02fa0f50 Binary files /dev/null and b/storage/app/templates/kompetensi_template.xlsx differ diff --git a/storage/app/templates/kompetensi_template_export.xlsx b/storage/app/templates/kompetensi_template_export.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..79e73dbba17108c798d5f83842744e8305bc1650 Binary files /dev/null and b/storage/app/templates/kompetensi_template_export.xlsx differ diff --git a/storage/app/templates/pegawai_template_export.xlsx b/storage/app/templates/pegawai_template_export.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..14fdfbb8b1e83acdfde47929398ad0b3659ac6fe Binary files /dev/null and b/storage/app/templates/pegawai_template_export.xlsx differ