|
|
@ -3,6 +3,17 @@ |
|
|
|
<!-- Informasi Akun --> |
|
|
|
<!-- Informasi Akun --> |
|
|
|
<div class="card mb-2"> |
|
|
|
<div class="card mb-2"> |
|
|
|
<div class="card-body"> |
|
|
|
<div class="card-body"> |
|
|
|
|
|
|
|
@if (Session::has('success')) |
|
|
|
|
|
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert"> |
|
|
|
|
|
|
|
<strong>{{ Session::get('success') }}</strong> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
@endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@if (Session::has('error')) |
|
|
|
|
|
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert"> |
|
|
|
|
|
|
|
<strong>{{ Session::get('error') }}</strong> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
@endif |
|
|
|
<header> |
|
|
|
<header> |
|
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100"> |
|
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100"> |
|
|
|
Informasi Akun |
|
|
|
Informasi Akun |
|
|
@ -20,7 +31,7 @@ |
|
|
|
@csrf |
|
|
|
@csrf |
|
|
|
@method('patch') |
|
|
|
@method('patch') |
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-4"> |
|
|
|
<div class="mb-1"> |
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-2"> |
|
|
|
<div class="col-2"> |
|
|
|
<label for="fullname" class="block text-gray-700 text-sm font-bold mt-2 ml-3">Full |
|
|
|
<label for="fullname" class="block text-gray-700 text-sm font-bold mt-2 ml-3">Full |
|
|
@ -28,7 +39,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-10"> |
|
|
|
<div class="col-10"> |
|
|
|
<input id="fullname" name="fullname" type="text" |
|
|
|
<input id="fullname" name="fullname" type="text" |
|
|
|
class="p-2 w-full border border-gray-300 rounded-md focus:outline-none focus:border-indigo-500" |
|
|
|
class="p-1 w-full border border-gray-300 rounded-md focus:outline-none focus:border-indigo-500" |
|
|
|
value="{{ old('fullname', $user->fullname) }}" required autofocus |
|
|
|
value="{{ old('fullname', $user->fullname) }}" required autofocus |
|
|
|
autocomplete="fullname"> |
|
|
|
autocomplete="fullname"> |
|
|
|
@if ($errors->has('fullname')) |
|
|
|
@if ($errors->has('fullname')) |
|
|
@ -44,7 +55,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-10"> |
|
|
|
<div class="col-10"> |
|
|
|
<input id="email" name="email" type="email" |
|
|
|
<input id="email" name="email" type="email" |
|
|
|
class="mt-1 p-2 w-full border border-gray-300 rounded-md focus:outline-none focus:border-indigo-500" |
|
|
|
class="p-1 w-full border border-gray-300 rounded-md focus:outline-none focus:border-indigo-500" |
|
|
|
value="{{ old('email', $user->email) }}" required autocomplete="email"> |
|
|
|
value="{{ old('email', $user->email) }}" required autocomplete="email"> |
|
|
|
@if ($errors->has('email')) |
|
|
|
@if ($errors->has('email')) |
|
|
|
<p class="text-red-500 text-sm mt-1">{{ $errors->first('email') }}</p> |
|
|
|
<p class="text-red-500 text-sm mt-1">{{ $errors->first('email') }}</p> |
|
|
@ -68,19 +79,10 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex items-center space-x-4 mt-2"> |
|
|
|
|
|
|
|
<button type="submit" |
|
|
|
<button type="submit" |
|
|
|
class="btn btn-sm btn-primary hover:bg-blue-700 text-white font-semibold py-2 px-4 rounded"> |
|
|
|
class="btn btn-sm btn-primary hover:bg-blue-700 text-white font-semibold py-2 px-4 rounded"> |
|
|
|
Simpan |
|
|
|
Simpan |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
|
|
@if (session('status') === 'profile-updated') |
|
|
|
|
|
|
|
<p x-data="{ show: true }" x-show="show" x-transition x-init="setTimeout(() => show = false, 2000)" |
|
|
|
|
|
|
|
class="text-gray-600"> |
|
|
|
|
|
|
|
Tersimpan. |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
@endif |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</form> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -89,6 +91,17 @@ |
|
|
|
<!-- Ganti Password--> |
|
|
|
<!-- Ganti Password--> |
|
|
|
<div class="card mb-2"> |
|
|
|
<div class="card mb-2"> |
|
|
|
<div class="card-body"> |
|
|
|
<div class="card-body"> |
|
|
|
|
|
|
|
@if (Session::has('success-password')) |
|
|
|
|
|
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert"> |
|
|
|
|
|
|
|
<strong>{{ Session::get('success-password') }}</strong> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
@endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@if (Session::has('error-password')) |
|
|
|
|
|
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert"> |
|
|
|
|
|
|
|
<strong>{{ Session::get('error-password') }}</strong> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
@endif |
|
|
|
<header> |
|
|
|
<header> |
|
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100"> |
|
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100"> |
|
|
|
Ubah Password |
|
|
|
Ubah Password |
|
|
@ -100,46 +113,64 @@ |
|
|
|
<form method="post" action="{{ route('password.update') }}" class="mt-6 space-y-6"> |
|
|
|
<form method="post" action="{{ route('password.update') }}" class="mt-6 space-y-6"> |
|
|
|
@csrf |
|
|
|
@csrf |
|
|
|
@method('put') |
|
|
|
@method('put') |
|
|
|
|
|
|
|
<div class="mb-2"> |
|
|
|
<div> |
|
|
|
<div class="row"> |
|
|
|
<label for="current_password" class="block font-semibold text-gray-800"> |
|
|
|
<div class="col-2"> |
|
|
|
kata sandi saat ini |
|
|
|
<label for="current_password" class="block text-gray-700 text-sm font-bold mt-2 ml-3">kata sandi |
|
|
|
</label> |
|
|
|
saat ini</label> |
|
|
|
<input id="current_password" name="current_password" type="password" class="mt-1 block w-full" |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-10"> |
|
|
|
|
|
|
|
<input id="current_password" name="current_password" type="password" |
|
|
|
|
|
|
|
class="p-1 w-full border border-gray-300 rounded-md focus:outline-none focus:border-indigo-500" |
|
|
|
autocomplete="current-password"> |
|
|
|
autocomplete="current-password"> |
|
|
|
@if ($errors->has('updatePassword.current_password')) |
|
|
|
@if ($errors->has('updatePassword.current_password')) |
|
|
|
<p class="text-red-500">{{ $errors->first('updatePassword.current_password') }}</p> |
|
|
|
<p class="text-red-500">{{ $errors->first('updatePassword.current_password') }}</p> |
|
|
|
@endif |
|
|
|
@endif |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
</div> |
|
|
|
<label for="password" class="block font-semibold text-gray-800"> |
|
|
|
</div> |
|
|
|
kata sandi baru |
|
|
|
<div class="mb-2"> |
|
|
|
</label> |
|
|
|
<div class="row"> |
|
|
|
<input id="password" name="password" type="password" class="mt-1 block w-full" |
|
|
|
<div class="col-2"> |
|
|
|
|
|
|
|
<label for="password" class="block text-gray-700 text-sm font-bold mt-2 ml-3">kata sandi |
|
|
|
|
|
|
|
baru</label> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-10"> |
|
|
|
|
|
|
|
<input id="password" name="password" type="password" |
|
|
|
|
|
|
|
class="p-1 w-full border border-gray-300 rounded-md focus:outline-none focus:border-indigo-500" |
|
|
|
autocomplete="new-password"> |
|
|
|
autocomplete="new-password"> |
|
|
|
@if ($errors->has('updatePassword.password')) |
|
|
|
@if ($errors->has('updatePassword.password')) |
|
|
|
<p class="text-red-500">{{ $errors->first('updatePassword.password') }}</p> |
|
|
|
<p class="text-red-500">{{ $errors->first('updatePassword.password') }}</p> |
|
|
|
@endif |
|
|
|
@endif |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
</div> |
|
|
|
<label for="password_confirmation" class="block font-semibold text-gray-800"> |
|
|
|
</div> |
|
|
|
konfirmasi sandi |
|
|
|
<div class="mb-2"> |
|
|
|
</label> |
|
|
|
<div class="row"> |
|
|
|
<input id="password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" |
|
|
|
<div class="col-2"> |
|
|
|
|
|
|
|
<label for="password_confirmation" |
|
|
|
|
|
|
|
class="block text-gray-700 text-sm font-bold mt-2 ml-3">konfirmasi sandi</label> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-10"> |
|
|
|
|
|
|
|
<input id="password_confirmation" name="password_confirmation" type="password" |
|
|
|
|
|
|
|
class="p-1 w-full border border-gray-300 rounded-md focus:outline-none focus:border-indigo-500" |
|
|
|
autocomplete="new-password"> |
|
|
|
autocomplete="new-password"> |
|
|
|
@if ($errors->has('updatePassword.password_confirmation')) |
|
|
|
@if ($errors->has('updatePassword.password_confirmation')) |
|
|
|
<p class="text-red-500">{{ $errors->first('updatePassword.password_confirmation') }}</p> |
|
|
|
<p class="text-red-500">{{ $errors->first('updatePassword.password_confirmation') }}</p> |
|
|
|
@endif |
|
|
|
@endif |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex items-center space-x-4"> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="flex items-center space-x-4 mt-2"> |
|
|
|
<button type="submit" |
|
|
|
<button type="submit" |
|
|
|
class="btn btn-sm btn-primary hover:bg-blue-800 text-white font-semibold py-2 px-4 rounded"> |
|
|
|
class="btn btn-sm btn-primary hover:bg-blue-700 text-white font-semibold py-2 px-4 rounded"> |
|
|
|
Save |
|
|
|
Simpan |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
|
|
@if (session('status') === 'password-updated') |
|
|
|
@if (session('status') === 'password-updated') |
|
|
|
<p x-data="{ show: true }" x-show="show" x-transition x-init="setTimeout(() => show = false, 2000)" |
|
|
|
<p x-data="{ show: true }" x-show="show" x-transition x-init="setTimeout(() => show = false, 2000)" |
|
|
|
class="text-sm text-gray-600"> |
|
|
|
class="text-gray-600"> |
|
|
|
Saved. |
|
|
|
Tersimpan. |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
@endif |
|
|
|
@endif |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -147,83 +178,14 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
{{-- <div class="card mb-2"> |
|
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> |
|
|
|
<div class="card-body"> |
|
|
|
<script> |
|
|
|
<form method="POST" action="{{ route('profile.destroy') }}" class="mt-6 space-y-6"> |
|
|
|
$(document).ready(function() { |
|
|
|
@csrf |
|
|
|
setTimeout(function() { |
|
|
|
@method('DELETE') |
|
|
|
$(".alert.alert-danger, .alert.alert-success").fadeOut(500, function() { |
|
|
|
|
|
|
|
$(this).remove(); |
|
|
|
<div> |
|
|
|
}); |
|
|
|
<x-danger-button type="submit">Delete Account</x-danger-button> |
|
|
|
}, 3000); // 5 detik |
|
|
|
</div> |
|
|
|
}); |
|
|
|
</form> --}} |
|
|
|
</script> |
|
|
|
{{-- <header> |
|
|
|
|
|
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100"> |
|
|
|
|
|
|
|
Delete Account |
|
|
|
|
|
|
|
</h2> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400"> |
|
|
|
|
|
|
|
Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting |
|
|
|
|
|
|
|
your account, please download any data or information that you wish to retain. |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
</header> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button x-data="" x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')" |
|
|
|
|
|
|
|
class="bg-red-500 hover:bg-red-700 text-white font-semibold py-2 px-4 rounded"> |
|
|
|
|
|
|
|
Delete Account |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div x-data="{ show: false }"> |
|
|
|
|
|
|
|
<div x-on:confirm-user-deletion.window="show = true"></div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div x-show="show" x-transition:enter="transition ease-out duration-300" |
|
|
|
|
|
|
|
x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" |
|
|
|
|
|
|
|
x-transition:leave="transition ease-in duration-200" x-transition:leave-start="opacity-100" |
|
|
|
|
|
|
|
x-transition:leave-end="opacity-0" |
|
|
|
|
|
|
|
class="fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50"> |
|
|
|
|
|
|
|
<form method="post" action="{{ route('profile.destroy') }}" class="bg-white p-6 rounded-lg shadow-xl"> |
|
|
|
|
|
|
|
@csrf |
|
|
|
|
|
|
|
@method('delete') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100"> |
|
|
|
|
|
|
|
Are you sure you want to delete your account? |
|
|
|
|
|
|
|
</h2> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400"> |
|
|
|
|
|
|
|
Once your account is deleted, all of its resources and data will be permanently deleted. Please |
|
|
|
|
|
|
|
enter your password to confirm you would like to permanently delete your account. |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mt-6"> |
|
|
|
|
|
|
|
<label for="password" class="block font-semibold text-gray-800 sr-only"> |
|
|
|
|
|
|
|
Password |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<input id="password" name="password" type="password" class="mt-1 block w-3/4" |
|
|
|
|
|
|
|
placeholder="Password"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="text-red-500 mt-2"> |
|
|
|
|
|
|
|
@if ($errors->has('userDeletion.password')) |
|
|
|
|
|
|
|
{{ $errors->first('userDeletion.password') }} |
|
|
|
|
|
|
|
@endif |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mt-6 flex justify-end"> |
|
|
|
|
|
|
|
<button type="button" x-on:click="show = false" |
|
|
|
|
|
|
|
class="bg-gray-300 hover:bg-gray-400 text-gray-800 font-semibold py-2 px-4 rounded"> |
|
|
|
|
|
|
|
Cancel |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button type="submit" |
|
|
|
|
|
|
|
class="bg-red-500 hover:bg-red-700 text-white font-semibold py-2 px-4 rounded ml-3"> |
|
|
|
|
|
|
|
Delete Account |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</form> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> --}} |
|
|
|
|
|
|
|
{{-- @include('profile.partials.delete-user-form') --}} |
|
|
|
|
|
|
|
{{-- </div> |
|
|
|
|
|
|
|
</div> --}} |
|
|
|
|
|
|
|
@endsection |
|
|
|
@endsection |
|
|
|