Merged in feature/add-password-eyes (pull request #39)

Feature/add password eyes
This commit is contained in:
Muhd hafifie
2025-10-04 14:52:34 +00:00
12 changed files with 415 additions and 25 deletions
+32 -2
View File
@@ -42,6 +42,8 @@ class HomeController extends Controller
$customer_pkb = $responses[0]->json();
$customer_koop = $responses[1]->json();
$customerLelong = $this->getCustomerInfoLelong($authUser['icno']);
// ['gadai' => $customer_gadai, 'lelong' => $customer_lelong] = $customerInfo;
$customer_gadai = array_merge(
$customer_pkb['gadai'] ?? [],
@@ -66,7 +68,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'));
}
/**
@@ -92,6 +94,7 @@ class HomeController extends Controller
$customer_koop = $responses[1]->json();
$customerLelong = $this->getCustomerInfoLelong($authUser['icno']);
// ['gadai' => $customer_gadai, 'lelong' => $customer_lelong] = $customerInfo;
$customer_gadai = array_merge(
@@ -117,6 +120,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];
}
}
+25 -1
View File
@@ -24,8 +24,20 @@
@endif
</div>
<div class="col-xs-6 col-xl-6">
<div class="form-group {{ $errors->has('password') ? ' has-danger' : '' }}">
<div class="form-group {{ $errors->has('password') ? ' has-danger' : '' }}" style="position: relative;">
<input type="password" placeholder="Katalaluan" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" id="login-password" name="password" required aria-required="true">
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('login-password', 'eyeIcon-login-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-login-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
@if ($errors->has('password'))
<span class="invalid-feedback" style="display: block;margin-top:-10px !important;" role="alert">
@@ -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');
}
}
</script>
@endsection
+28 -2
View File
@@ -45,11 +45,23 @@
@endif
</div>
<div class="form-group{{ $errors->has('password') ? ' has-danger' : '' }}">
<div class="input-group input-group-alternative">
<div class="input-group input-group-alternative" style="position: relative;">
<div class="input-group-prepend">
<span class="input-group-text"><i class="ni ni-lock-circle-open"></i></span>
</div>
<input class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="{{ __('Password') }}" type="password" value="secret" required>
<input class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" id="password" name="password" placeholder="{{ __('Password') }}" type="password" value="secret" required>
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('password', 'eyeIcon-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
@if ($errors->has('password'))
<span class="invalid-feedback" style="display: block;" role="alert">
@@ -86,4 +98,18 @@
</div>
</div>
</div>
<script>
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');
}
}
</script>
@endsection
@@ -16,8 +16,20 @@
<div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label>
<div class="col-md-6">
<div class="col-md-6" style="position: relative;">
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('password', 'eyeIcon-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
@error('password')
<span class="invalid-feedback" role="alert">
@@ -46,4 +58,18 @@
</div>
</div>
</div>
<script>
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');
}
}
</script>
@endsection
+39 -4
View File
@@ -19,8 +19,20 @@
</span>
@endif
<div class="input-group input-group-outline {{ $errors->has('password') ? ' has-danger' : '' }}">
<div class="input-group input-group-outline {{ $errors->has('password') ? ' has-danger' : '' }}" style="position: relative;">
<input id="password" onKeyUp="checkPasswordStrength();" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="{{ __('Password') }}" type="password" required>
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('password', 'eyeIcon-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
@if ($errors->has('password'))
<span class="invalid-feedback" role="alert">
@@ -31,11 +43,22 @@
<small>{{ __('password strength') }}: <span class="text-muted font-weight-700" id="password-strength-status">none</span></small>
</div>
<div class="input-group input-group-outline my-3">
<div class="input-group input-group-outline my-3" style="position: relative;">
<div class="input-group input-group-alternative">
<input class="form-control" placeholder="{{ __('Confirm Password') }}" type="password" name="password_confirmation" required>
<input class="form-control" id="password_confirmation" placeholder="{{ __('Confirm Password') }}" type="password" name="password_confirmation" required>
</div>
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('password_confirmation', 'eyeIcon-password_confirmation')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-password_confirmation" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
<div class="text-center">
@@ -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');
}
}
</script>
@endsection
+39 -3
View File
@@ -45,11 +45,23 @@
<div class="row">
<div class="col-6 form-group{{ $errors->has('password') ? ' has-danger' : '' }}">
<div class="input-group ">
<div class="input-group" style="position: relative;">
<div class="input-group-prepend">
<span class="input-group-text"><i class="ni ni-lock-circle-open"></i></span>
</div>
<input id="password" onKeyUp="checkPasswordStrength();" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" placeholder="{{ __('Password') }}" type="password" name="password" required>
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('password', 'eyeIcon-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
@if ($errors->has('password'))
<span class="invalid-feedback" style="display: block;" role="alert">
@@ -58,11 +70,23 @@
@endif
</div>
<div class="col-6 form-group">
<div class="input-group ">
<div class="input-group" style="position: relative;">
<div class="input-group-prepend">
<span class="input-group-text"><i class="ni ni-lock-circle-open"></i></span>
</div>
<input name="password_confirmation" class="form-control" placeholder="{{ __('Confirm Password') }}" type="password" required>
<input name="password_confirmation" id="password_confirmation" class="form-control" placeholder="{{ __('Confirm Password') }}" type="password" required>
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('password_confirmation', 'eyeIcon-password_confirmation')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-password_confirmation" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
</div>
</div>
@@ -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');
}
}
</script>
<!-- END : LOGIN PAGE 5-2 -->
<!--[if lt IE 9]>
+39 -3
View File
@@ -31,8 +31,20 @@
@endif
<!-- password -->
<div class="input-group input-group-outline {{ $errors->has('password') ? ' has-danger' : '' }}">
<div class="input-group input-group-outline {{ $errors->has('password') ? ' has-danger' : '' }}" style="position: relative;">
<input id="password" onKeyUp="checkPasswordStrength();" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" placeholder="{{ __('Kata Laluan') }}" type="password" name="password" required>
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('password', 'eyeIcon-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
@if ($errors->has('password'))
<span class="invalid-feedback" style="display: block;" role="alert">
@@ -44,8 +56,20 @@
</div>
<!-- confirmation password -->
<div class="input-group input-group-outline mb-3">
<input name="password_confirmation" class="form-control" placeholder="{{ __('Sahkan Kata Laluan') }}" type="password" required>
<div class="input-group input-group-outline mb-3" style="position: relative;">
<input name="password_confirmation" id="password_confirmation" class="form-control" placeholder="{{ __('Sahkan Kata Laluan') }}" type="password" required>
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('password_confirmation', 'eyeIcon-password_confirmation')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-password_confirmation" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
<div>
@@ -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');
}
}
</script>
@endsection
@@ -0,0 +1,29 @@
@props([
'title' => '',
'subtitle' => '',
'icon' => '',
'iconState' => 'info',
'cardBackgroundState' => 'white',
'link' => '#',
])
<div class="col-xl-3 col-lg-6" >
<div class="card card-stats mb-4 mb-xl-0 {{ 'bg-'.$cardBackgroundState}}">
<div class="card-body">
<div class="row">
<div class="col">
<h6 class="card-title text-uppercase mb-0 {{ $cardBackgroundState == 'white' ? 'text-muted' : 'text-white' }}">{{ $title }}</h6>
<span class="h5 font-weight-bold mb-0 {{ $cardBackgroundState == 'white' ? 'text-black' : 'text-white' }}">{{ $subtitle }}</span>
</div>
<div class="col-auto text-center">
<a href="{{ $link }}">
<div class="icon icon-shape bg-{{ $iconState }} rounded-circle shadow text-center">
<i class="{{ $icon }}"></i>
</div>
</a>
<br>
</div>
</div>
</div>
</div>
</div>
+15
View File
@@ -101,6 +101,21 @@
@endif
<br>
<div class="d-flex justify-content-center mb-4">
<x-dashboard-card-small
title="Baki Lelong"
:subtitle="number_format($customerLelong['bakilelong'] ?? 0, 2)"
icon="fas fa-chart-bar"
iconState="danger"
/>
<x-dashboard-card-small
title="Rugi Lelong"
:subtitle="number_format($customerLelong['rugilelong'] ?? 0, 2)"
icon="fas fa-chart-bar"
iconState="warning"
/>
</div>
@if (request()->get('filter') == 'pembiayaan-akan-dilelong')
<x-dashboard-notification>
<x-dashboard-notification.item content="1. Sekiranya Lelongan Anda Dalam Tempoh Kontrak Lanjutan (Mencapai 12 Bulan), Urusan Penebusan Hanya Dibenarkan Di Kaunter Cawangan Selewatnya-lewatnya 3 Hari Sebelum Tarikh Lelong." />
@@ -30,8 +30,41 @@
</span>
@endif
<div class="input-group input-group-outline mb-3">
<input placeholder="Kata Laluan" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" type="password" name="password" id="login-password">
<div class="input-group input-group-outline mb-3 position-relative">
<input
placeholder="Kata Laluan"
class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}"
type="password"
name="password"
id="login-password"
autocomplete="current-password"
style="padding-right: 2.5rem;"
>
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility()"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon" xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="#6c757d" viewBox="0 0 16 16" style="transition: fill 0.2s; pointer-events: none;">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"/>
<path id="eyeIconInner" d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"/>
</svg>
</span>
<script>
function togglePasswordVisibility() {
const passwordInput = document.getElementById('login-password');
const eyeIcon = document.getElementById('eyeIcon');
if (passwordInput.type === 'password') {
passwordInput.type = 'text';
eyeIcon.setAttribute('fill', '#12B652');
} else {
passwordInput.type = 'password';
eyeIcon.setAttribute('fill', '#6c757d');
}
}
</script>
</div>
@if ($errors->has('password'))
<span class="invalid-feedback" style="display: block;margin-top:-10px !important;" role="alert">
+53 -3
View File
@@ -117,9 +117,21 @@
</div>
<div class="col-12">
<div class="form-group{{ $errors->has('old_password') ? ' has-danger' : '' }} input-group input-group-static mb-4">
<div class="form-group{{ $errors->has('old_password') ? ' has-danger' : '' }} input-group input-group-static mb-4" style="position: relative;">
<label class="form-control-label" for="input-current-password">{{ __('Kata Laluan Semasa') }}</label>
<input type="password" name="old_password" id="input-current-password" class="form-control form-control-alternative{{ $errors->has('old_password') ? ' is-invalid' : '' }}" placeholder="Kata laluan Semasa" value="" required>
<span
class="input-group-text border-0 position-absolute end-0 top-50 translate-middle-y d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: calc(100% - 26px); display: flex; align-items: center; box-shadow: none;"
onclick="togglePasswordVisibility('input-current-password', 'eyeIcon-current-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-current-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
@if ($errors->has('old_password'))
<span class="invalid-feedback" role="alert">
@@ -130,9 +142,21 @@
</div>
<div class="col-12">
<div class="form-group{{ $errors->has('password') ? ' has-danger' : '' }} input-group input-group-static mb-4">
<div class="form-group{{ $errors->has('password') ? ' has-danger' : '' }} input-group input-group-static mb-4" style="position: relative;">
<label class="form-control-label" for="input-password">{{ __('Kata Laluan Baharu') }}</label>
<input type="password" name="password" id="input-password" class="form-control form-control-alternative{{ $errors->has('password') ? ' is-invalid' : '' }}" placeholder="Masukkan kata laluan baharu" value="" required>
<span
class="input-group-text border-0 position-absolute end-0 top-50 translate-middle-y d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: calc(100% - 26px); display: flex; align-items: center; box-shadow: none;"
onclick="togglePasswordVisibility('input-password', 'eyeIcon-new-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-new-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
@if ($errors->has('password'))
<span class="invalid-feedback" role="alert">
@@ -140,9 +164,21 @@
</span>
@endif
</div>
<div class="form-group input-group input-group-static mb-4">
<div class="form-group input-group input-group-static mb-4" style="position: relative;">
<label class="form-control-label" for="input-password-confirmation">{{ __('Sahkan Kata Laluan Baharu') }}</label>
<input type="password" name="password_confirmation" id="input-password-confirmation" class="form-control form-control-alternative" placeholder="Mengesahkan kata laluan baharu" value="" required>
<span
class="input-group-text border-0 position-absolute end-0 top-50 translate-middle-y d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: calc(100% - 26px); display: flex; align-items: center; box-shadow: none;"
onclick="togglePasswordVisibility('input-password-confirmation', 'eyeIcon-confirm-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-confirm-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
</div>
@@ -171,4 +207,18 @@
</div>
</div>
<script>
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');
}
}
</script>
@endsection
+53 -3
View File
@@ -98,9 +98,21 @@
@endif
<div class="pl-lg-4">
<div class="form-group{{ $errors->has('old_password') ? ' has-danger' : '' }}">
<div class="form-group{{ $errors->has('old_password') ? ' has-danger' : '' }}" style="position: relative;">
<label class="form-control-label" for="input-current-password">{{ __('Current Password') }}</label>
<input type="password" name="old_password" id="input-current-password" class="form-control form-control-alternative{{ $errors->has('old_password') ? ' is-invalid' : '' }}" placeholder="{{ __('Current Password') }}" value="" required>
<span
class="input-group-text border-0 position-absolute end-0 top-50 translate-middle-y d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: calc(100% - 26px); display: flex; align-items: center; box-shadow: none;"
onclick="togglePasswordVisibility('input-current-password', 'eyeIcon-current-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-current-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
@if ($errors->has('old_password'))
<span class="invalid-feedback" role="alert">
@@ -108,9 +120,21 @@
</span>
@endif
</div>
<div class="form-group{{ $errors->has('password') ? ' has-danger' : '' }}">
<div class="form-group{{ $errors->has('password') ? ' has-danger' : '' }}" style="position: relative;">
<label class="form-control-label" for="input-password">{{ __('New Password') }}</label>
<input type="password" name="password" id="input-password" class="form-control form-control-alternative{{ $errors->has('password') ? ' is-invalid' : '' }}" placeholder="{{ __('New Password') }}" value="" required>
<span
class="input-group-text border-0 position-absolute end-0 top-50 translate-middle-y d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: calc(100% - 26px); display: flex; align-items: center; box-shadow: none;"
onclick="togglePasswordVisibility('input-password', 'eyeIcon-new-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-new-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
@if ($errors->has('password'))
<span class="invalid-feedback" role="alert">
@@ -118,9 +142,21 @@
</span>
@endif
</div>
<div class="form-group">
<div class="form-group" style="position: relative;">
<label class="form-control-label" for="input-password-confirmation">{{ __('Confirm New Password') }}</label>
<input type="password" name="password_confirmation" id="input-password-confirmation" class="form-control form-control-alternative" placeholder="{{ __('Confirm New Password') }}" value="" required>
<span
class="input-group-text border-0 position-absolute end-0 top-50 translate-middle-y d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: calc(100% - 26px); display: flex; align-items: center; box-shadow: none;"
onclick="togglePasswordVisibility('input-password-confirmation', 'eyeIcon-confirm-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-confirm-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
<div class="text-center">
@@ -137,4 +173,18 @@
{{-- @include('layouts.footers.auth') --}}
</div>
<script>
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');
}
}
</script>
@endsection