From 7b7623e6ba99469ce8ed007d8115547fee7e27d5 Mon Sep 17 00:00:00 2001 From: punkestu Date: Sun, 24 Nov 2024 08:11:20 +0700 Subject: [PATCH] patch separate pengajuan --- .../Rotasi/PengajuanController.php | 2 +- .../components/modal-component.blade.php | 1 - .../views/rotasi/pengajuan/input.blade.php | 31 ++++++++++++++----- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Rotasi/PengajuanController.php b/app/Http/Controllers/Rotasi/PengajuanController.php index 0657c76..495106e 100644 --- a/app/Http/Controllers/Rotasi/PengajuanController.php +++ b/app/Http/Controllers/Rotasi/PengajuanController.php @@ -40,7 +40,7 @@ public function input(Request $request) 'masa_kerja' => 'required', 'jabatan' => 'required', ]); - if ($request->has('tidak_pindah')) { + if ($request->has('tidak_pindah') && $request->tidak_pindah == 'ya') { $personel = Personel::where('nik', $request->nik)->first(); $personel->update([ 'tidak_pindah' => true, diff --git a/resources/views/components/modal-component.blade.php b/resources/views/components/modal-component.blade.php index 8aa74b0..aea8546 100644 --- a/resources/views/components/modal-component.blade.php +++ b/resources/views/components/modal-component.blade.php @@ -2,7 +2,6 @@ @include('components.modal', ['message' => session('success')]) @endif @if ($errors->any()) - {{$errors->first()}} @include('components.modal', [ 'message' => str_contains($errors->first(), 'required') ? 'Mohon isi semua kolom' diff --git a/resources/views/rotasi/pengajuan/input.blade.php b/resources/views/rotasi/pengajuan/input.blade.php index a5dc5fe..6c62cfe 100644 --- a/resources/views/rotasi/pengajuan/input.blade.php +++ b/resources/views/rotasi/pengajuan/input.blade.php @@ -59,15 +59,32 @@ class="col-span-1 bg-[#003285] opacity-80 hover:opacity-100 duration-200 text-w class="w-full px-2 py-1 mt-1 border-2 border-slate-400 rounded-md" placeholder="Ketik Disini ..." value="{{ old('jabatan') }}" /> +
+