From 4c4dbe18c6b4a6ad86d03bea499e8a1dee8a5d39 Mon Sep 17 00:00:00 2001 From: Hafifie PKB Date: Wed, 27 Aug 2025 12:46:27 +0800 Subject: [PATCH 1/3] added password-eyes to the login page --- .../includes/login/loginportal.blade.php | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/resources/views/includes/login/loginportal.blade.php b/resources/views/includes/login/loginportal.blade.php index d4a6f6c..2b8e483 100644 --- a/resources/views/includes/login/loginportal.blade.php +++ b/resources/views/includes/login/loginportal.blade.php @@ -30,8 +30,41 @@ @endif -
- +
+ + + + + + + +
@if ($errors->has('password')) From 2a8f3a165546d47441fb9dfa1c2e3156beb54f32 Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Sun, 31 Aug 2025 21:56:32 +0800 Subject: [PATCH 2/3] added baki lelong and rugi lelong --- app/Http/Controllers/HomeController.php | 36 +++++++++++++++++-- .../components/dashboard-card-small.blade.php | 29 +++++++++++++++ resources/views/includes/home.blade.php | 15 ++++++++ 3 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 resources/views/components/dashboard-card-small.blade.php diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 838ba17..b4319bb 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -38,6 +38,8 @@ class HomeController extends Controller ->get(config('api.url_koop') . '/portal/customer/info', ['ic' => $authUser['icno']]) ->json(); + $customerLelong = $this->getCustomerInfoLelong($authUser['icno']); + // ['gadai' => $customer_gadai, 'lelong' => $customer_lelong] = $customerInfo; $customer_gadai = array_merge( $customer_pkb['gadai'] ?? [], @@ -48,7 +50,7 @@ class HomeController extends Controller $customer_pkb['lelong'] ?? [], $customer_koop['lelong'] ?? [] ); - + // only get lelong that is harga jualan that is not null or 0 $customer_lelong = array_filter($customer_lelong, fn($x) => $x['hargajualan'] != null && $x['hargajualan'] != 0); @@ -62,7 +64,7 @@ class HomeController extends Controller $bilangan = sizeof($customer_gadai) + sizeOf($customer_lelong); - return view('includes.buffer', compact('bilangan', 'sixMonths', 'total', 'bilanganLelong', 'homeUrl')); + return view('includes.buffer', compact('bilangan', 'sixMonths', 'total', 'bilanganLelong', 'homeUrl','customerLelong')); } /** @@ -83,6 +85,7 @@ class HomeController extends Controller ->get(config('api.url_koop') . '/portal/customer/info', ['ic' => $authUser['icno']]) ->json(); + $customerLelong = $this->getCustomerInfoLelong($authUser['icno']); // ['gadai' => $customer_gadai, 'lelong' => $customer_lelong] = $customerInfo; $customer_gadai = array_merge( @@ -108,6 +111,33 @@ class HomeController extends Controller $bilangan = sizeof($customer_gadai) + sizeOf($customer_lelong); - return view('includes.home', compact('bilangan', 'sixMonths', 'total', 'bilanganLelong', 'pembiayaan')); + return view('includes.home', compact('bilangan', 'sixMonths', 'total', 'bilanganLelong', 'pembiayaan','customerLelong')); + } + + private function getCustomerInfoLelong($icno){ + $customerLelong = Http::withOptions(['verify' => config('app.api_verify')]) + ->get(config('api.url') . '/portal/customer/info/lelong', ['ic' => $icno]) + ->json(); + + $customerLelongKoop = Http::withOptions(['verify' => config('app.api_verify')]) + ->get(config('api.url_koop') . '/portal/customer/info/lelong', ['ic' => $icno]) + ->json(); + + // Extract data with null safety + $bakiLelong = isset($customerLelong['success']) && $customerLelong['success'] + ? ($customerLelong['data']['bakilelong'] ?? 0) : 0; + $rugiLelong = isset($customerLelong['success']) && $customerLelong['success'] + ? ($customerLelong['data']['rugilelong'] ?? 0) : 0; + + $bakiKoop = isset($customerLelongKoop['success']) && $customerLelongKoop['success'] + ? ($customerLelongKoop['data']['bakilelong'] ?? 0) : 0; + $rugiKoop = isset($customerLelongKoop['success']) && $customerLelongKoop['success'] + ? ($customerLelongKoop['data']['rugilelong'] ?? 0) : 0; + + // Calculate totals + $totalBakiLelong = $bakiLelong + $bakiKoop; + $totalRugiLelong = $rugiLelong + $rugiKoop; + + return ['rugilelong' => $totalRugiLelong, 'bakilelong' => $totalBakiLelong]; } } diff --git a/resources/views/components/dashboard-card-small.blade.php b/resources/views/components/dashboard-card-small.blade.php new file mode 100644 index 0000000..39efd5d --- /dev/null +++ b/resources/views/components/dashboard-card-small.blade.php @@ -0,0 +1,29 @@ +@props([ + 'title' => '', + 'subtitle' => '', + 'icon' => '', + 'iconState' => 'info', + 'cardBackgroundState' => 'white', + 'link' => '#', +]) + +
+
+
+
+
+
{{ $title }}
+ {{ $subtitle }} +
+
+ +
+ +
+
+
+
+
+
+
+
diff --git a/resources/views/includes/home.blade.php b/resources/views/includes/home.blade.php index cd77d5e..c6bf5e1 100644 --- a/resources/views/includes/home.blade.php +++ b/resources/views/includes/home.blade.php @@ -90,6 +90,21 @@ @endif
+
+ + +
+ @if (request()->get('filter') == 'pembiayaan-akan-dilelong') From 3cf8efda00f4e10b4032c3144011017544779f24 Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Sat, 4 Oct 2025 21:51:32 +0800 Subject: [PATCH 3/3] added all changes for password box that can see eyes --- resources/views/auth/login.blade.php | 26 ++++++++- resources/views/auth/loginbackup.blade.php | 30 +++++++++- .../views/auth/passwords/confirm.blade.php | 28 +++++++++- .../views/auth/passwords/reset.blade.php | 43 ++++++++++++-- resources/views/auth/register.blade.php | 42 +++++++++++++- resources/views/auth/registerportal.blade.php | 42 +++++++++++++- resources/views/includes/profile.blade.php | 56 ++++++++++++++++++- resources/views/profile/edit.blade.php | 56 ++++++++++++++++++- 8 files changed, 303 insertions(+), 20 deletions(-) diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index d24e5a1..935cb2f 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -24,8 +24,20 @@ @endif
-
+
+ + + + + +
@if ($errors->has('password')) @@ -109,5 +121,17 @@ slides[slideIndex - 1].style.display = "block"; setTimeout(showSlides, 10000); // Change image every 2 seconds } + + function togglePasswordVisibility(inputId, iconId) { + const passwordInput = document.getElementById(inputId); + const eyeIcon = document.getElementById(iconId); + if (passwordInput.type === 'password') { + passwordInput.type = 'text'; + eyeIcon.setAttribute('fill', '#12B652'); + } else { + passwordInput.type = 'password'; + eyeIcon.setAttribute('fill', '#6c757d'); + } + } @endsection \ No newline at end of file diff --git a/resources/views/auth/loginbackup.blade.php b/resources/views/auth/loginbackup.blade.php index f0a0741..d9eaca5 100644 --- a/resources/views/auth/loginbackup.blade.php +++ b/resources/views/auth/loginbackup.blade.php @@ -45,11 +45,23 @@ @endif
-
+
- + + + + + + +
@if ($errors->has('password')) @@ -86,4 +98,18 @@
+ + @endsection diff --git a/resources/views/auth/passwords/confirm.blade.php b/resources/views/auth/passwords/confirm.blade.php index ca78fc1..5bfdb45 100644 --- a/resources/views/auth/passwords/confirm.blade.php +++ b/resources/views/auth/passwords/confirm.blade.php @@ -16,8 +16,20 @@
-
+
+ + + + + + @error('password') @@ -46,4 +58,18 @@
+ + @endsection diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index cbcd2d2..f698af2 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -19,8 +19,20 @@ @endif -
+
+ + + + + +
@if ($errors->has('password')) @@ -31,11 +43,22 @@ {{ __('password strength') }}: none
-
+
- - +
+ + + + + +
@@ -68,6 +91,18 @@ } } } + + function togglePasswordVisibility(inputId, iconId) { + const passwordInput = document.getElementById(inputId); + const eyeIcon = document.getElementById(iconId); + if (passwordInput.type === 'password') { + passwordInput.type = 'text'; + eyeIcon.setAttribute('fill', '#12B652'); + } else { + passwordInput.type = 'password'; + eyeIcon.setAttribute('fill', '#6c757d'); + } + } @endsection \ No newline at end of file diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 46aabf6..eca32ae 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -45,11 +45,23 @@
-
+
+ + + + + +
@if ($errors->has('password')) @@ -58,11 +70,23 @@ @endif
-
+
- + + + + + + +
@@ -212,6 +236,18 @@ setTimeout(showSlides, 10000); // Change image every 2 seconds } + function togglePasswordVisibility(inputId, iconId) { + const passwordInput = document.getElementById(inputId); + const eyeIcon = document.getElementById(iconId); + if (passwordInput.type === 'password') { + passwordInput.type = 'text'; + eyeIcon.setAttribute('fill', '#12B652'); + } else { + passwordInput.type = 'password'; + eyeIcon.setAttribute('fill', '#6c757d'); + } + } + -
+
+ + + + + +
@if ($errors->has('password')) @@ -44,8 +56,20 @@
-
- +
+ + + + + + +
@@ -178,5 +202,17 @@ // slides[slideIndex - 1].style.display = "block"; // setTimeout(showSlides, 10000); // Change image every 2 seconds // } + + function togglePasswordVisibility(inputId, iconId) { + const passwordInput = document.getElementById(inputId); + const eyeIcon = document.getElementById(iconId); + if (passwordInput.type === 'password') { + passwordInput.type = 'text'; + eyeIcon.setAttribute('fill', '#12B652'); + } else { + passwordInput.type = 'password'; + eyeIcon.setAttribute('fill', '#6c757d'); + } + } @endsection \ No newline at end of file diff --git a/resources/views/includes/profile.blade.php b/resources/views/includes/profile.blade.php index a69a4cc..7cc4b68 100644 --- a/resources/views/includes/profile.blade.php +++ b/resources/views/includes/profile.blade.php @@ -117,9 +117,21 @@
-
+
+ + + + + + @if ($errors->has('old_password')) @@ -130,9 +142,21 @@
-
+
+ + + + + + @if ($errors->has('password')) @@ -140,9 +164,21 @@ @endif
-
+
+ + + + + +
@@ -171,4 +207,18 @@
+ + @endsection \ No newline at end of file diff --git a/resources/views/profile/edit.blade.php b/resources/views/profile/edit.blade.php index aa79c5c..5acb3af 100644 --- a/resources/views/profile/edit.blade.php +++ b/resources/views/profile/edit.blade.php @@ -98,9 +98,21 @@ @endif
-
+
+ + + + + + @if ($errors->has('old_password')) @@ -108,9 +120,21 @@ @endif
-
+
+ + + + + + @if ($errors->has('password')) @@ -118,9 +142,21 @@ @endif
-
+
+ + + + + +
@@ -137,4 +173,18 @@ {{-- @include('layouts.footers.auth') --}}
+ + @endsection \ No newline at end of file