61 lines
3.2 KiB
PHP
61 lines
3.2 KiB
PHP
<section>
|
|
<header>
|
|
<h2 class="text-lg font-semibold text-slate-900">Informasi Akun</h2>
|
|
<p class="mt-1 text-sm text-slate-500">Perbarui nama dan email akun yang digunakan untuk masuk ke panel admin.</p>
|
|
</header>
|
|
|
|
<form id="send-verification" method="post" action="{{ route('verification.send') }}">
|
|
@csrf
|
|
</form>
|
|
|
|
<form method="post" action="{{ route('profile.update') }}" class="mt-6 space-y-6">
|
|
@csrf
|
|
@method('patch')
|
|
|
|
<div class="grid grid-cols-1 gap-5 md:grid-cols-2">
|
|
<div class="md:col-span-2">
|
|
<label for="name" class="mb-2 block text-sm font-medium text-slate-700">Nama Lengkap</label>
|
|
<input id="name" name="name" type="text" value="{{ old('name', $user->name) }}" class="h-12 w-full rounded-2xl border border-slate-200 bg-white px-4 text-sm text-slate-700 focus:border-indigo-300 focus:outline-none focus:ring-4 focus:ring-indigo-100" required autofocus autocomplete="name">
|
|
<x-input-error class="mt-2" :messages="$errors->get('name')" />
|
|
</div>
|
|
|
|
<div class="md:col-span-2">
|
|
<label for="email" class="mb-2 block text-sm font-medium text-slate-700">Email</label>
|
|
<input id="email" name="email" type="email" value="{{ old('email', $user->email) }}" class="h-12 w-full rounded-2xl border border-slate-200 bg-white px-4 text-sm text-slate-700 focus:border-indigo-300 focus:outline-none focus:ring-4 focus:ring-indigo-100" required autocomplete="username">
|
|
<x-input-error class="mt-2" :messages="$errors->get('email')" />
|
|
|
|
@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && ! $user->hasVerifiedEmail())
|
|
<div class="mt-3 rounded-2xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700">
|
|
<p>Email Anda belum terverifikasi.</p>
|
|
<button form="send-verification" class="mt-2 font-semibold text-amber-800 underline underline-offset-4 hover:text-amber-900">
|
|
Kirim ulang email verifikasi
|
|
</button>
|
|
|
|
@if (session('status') === 'verification-link-sent')
|
|
<p class="mt-2 text-sm font-medium text-emerald-600">
|
|
Link verifikasi baru sudah dikirim ke email Anda.
|
|
</p>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex flex-wrap items-center gap-3">
|
|
<button type="submit" class="inline-flex items-center justify-center rounded-2xl bg-indigo-600 px-5 py-3 text-sm font-semibold text-white shadow-lg shadow-indigo-200 transition hover:bg-indigo-700">
|
|
Simpan Informasi Akun
|
|
</button>
|
|
|
|
@if (session('status') === 'profile-updated')
|
|
<p
|
|
x-data="{ show: true }"
|
|
x-show="show"
|
|
x-transition
|
|
x-init="setTimeout(() => show = false, 2000)"
|
|
class="text-sm font-medium text-emerald-600"
|
|
>Perubahan berhasil disimpan.</p>
|
|
@endif
|
|
</div>
|
|
</form>
|
|
</section>
|