224 lines
15 KiB
PHP
224 lines
15 KiB
PHP
@extends('layouts.indexfirst')
|
|
|
|
@section('content')
|
|
|
|
<title>Profil | Portal Pelanggan</title>
|
|
|
|
<div class="col-xl-12">
|
|
<div class="card d-flex blur justify-content-center shadow-lg my-sm-0 my-sm-6 mt-5 mb-5">
|
|
<div class="card-header p-0 position-relative mt-n4 mx-3 z-index-2 bg-transparent">
|
|
<div class="bg-dark shadow-primary border-radius-lg p-3">
|
|
<h3 class="text-white text-primary mb-0">Profil</h3>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
|
|
<section>
|
|
<div class="container">
|
|
<div class="row justify-space-between py-2">
|
|
<div class="col-lg-6 mx-auto">
|
|
<div class="nav-wrapper position-relative end-0">
|
|
<ul class="nav nav-pills nav-fill p-1" role="tablist">
|
|
<li class="nav-item">
|
|
<a class="nav-link mb-0 px-0 py-1 d-flex align-items-center justify-content-center active" data-bs-toggle="tab" href="#maklumatperibadi" role="tab" aria-controls="preview" aria-selected="true">
|
|
<i class="material-icons text-sm me-2">person</i> Maklumat Peribadi
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link mb-0 px-0 py-1 d-flex align-items-center justify-content-center" data-bs-toggle="tab" href="#katalaluan" role="tab" aria-controls="code" aria-selected="false">
|
|
<i class="material-icons text-sm me-2">dashboard</i> Kata Laluan
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-content tab-space">
|
|
<div class="tab-pane active" id="maklumatperibadi">
|
|
<form id="contact-form" method="#" autocomplete="off">
|
|
<div class="card-body p-0 my-3 mt-5">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="input-group input-group-static mb-4">
|
|
<label>Nama</label>
|
|
<input type="email" class="form-control" placeholder="{{ old('name', auth()->user()->name) }}" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 ps-md-2">
|
|
<div class="input-group input-group-static mb-4">
|
|
<label>Email</label>
|
|
<input type="email" class="form-control" placeholder="{{ old('email', auth()->user()->email) }}" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="input-group input-group-static mb-4">
|
|
<label>IC</label>
|
|
<input type="email" class="form-control" placeholder="{{ old('icno', auth()->user()->icno) }}" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 ps-md-2">
|
|
<div class="input-group input-group-static mb-4">
|
|
<label>No Telefon</label>
|
|
<input type="email" class="form-control" placeholder="{{ old('notel', auth()->user()->notel) }}" readonly>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group mb-0 mt-md-0 mt-4">
|
|
<div class="input-group input-group-static mb-4">
|
|
<label>Alamat</label>
|
|
<input type="email" class="form-control" placeholder="{{ old('alamat', auth()->user()->alamat) }}" readonly>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- <div class="row">
|
|
<div class="col-md-4">
|
|
<div class="input-group input-group-static mb-4">
|
|
<label>Poskod</label>
|
|
<input type="email" class="form-control" value="{{ old('notel', auth()->user()->notel) }}" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 ps-md-2">
|
|
<div class="input-group input-group-static mb-4">
|
|
<label>Daerah</label>
|
|
<input type="email" class="form-control" value="{{ old('notel', auth()->user()->notel) }}" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 ps-md-2">
|
|
<div class="input-group input-group-static mb-4">
|
|
<label>Negeri</label>
|
|
<input type="email" class="form-control" value="{{ old('notel', auth()->user()->notel) }}" readonly>
|
|
</div>
|
|
</div>
|
|
</div> --}}
|
|
</div>
|
|
</form>
|
|
<div class="row justify-space-between py-2">
|
|
<p class="text-xs">Maklumat ini telah disahkan oleh pelanggan semasa membuat gadaian dicawangan. Sila hubungi cawangan jika terdapat perubahan.</p>
|
|
</div>
|
|
</div>
|
|
<div class="tab-pane" id="katalaluan">
|
|
<form method="post" action="{{ route('profile.password') }}" autocomplete="off">
|
|
@csrf
|
|
@method('put')
|
|
|
|
<div class="card-body p-0 my-3 mt-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-lg-8 col-md-12">
|
|
<div class="col-12">
|
|
@if (session('password_status'))
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
{{ session('password_status') }}
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
<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">
|
|
<strong>{{ $errors->first('old_password') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="col-12">
|
|
|
|
<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">
|
|
<strong>{{ $errors->first('password') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
<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>
|
|
|
|
<div class="text-center">
|
|
<button type="submit" class="btn btn-primary mt-4">{{ __('Simpan Kata Laluan') }}</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</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 |