@extends('layouts.app')
@section('page_title','My Profile')
@section('page_subtitle','Update your personal details, bank details and password.')
@section('content')
<div class="card"><form method="POST" action="{{ route('user.profile.update') }}">@csrf @method('PUT')<div class="grid grid-3"><div class="stat"><span class="muted">Role</span><strong>{{ strtoupper($user->role) }}</strong></div><div class="stat"><span class="muted">Department</span><strong>{{ $user->department?->name ?? '-' }}</strong></div><div class="stat"><span class="muted">Designation</span><strong>{{ $user->designation?->name ?? '-' }}</strong></div></div><div class="form-row"><div class="field"><label>Name</label><input class="input" name="name" value="{{ $user->name }}" required></div><div class="field"><label>Email</label><input class="input" value="{{ $user->email }}" disabled></div><div class="field"><label>Phone</label><input class="input" name="phone" value="{{ $user->phone }}"></div><div class="field"><label>Gender</label><input class="input" name="gender" value="{{ $user->gender }}"></div><div class="field"><label>Date of Birth</label><input class="input" type="date" name="date_of_birth" value="{{ optional($user->date_of_birth)->format('Y-m-d') }}"></div><div class="field"><label>Emergency Contact</label><input class="input" name="emergency_contact" value="{{ $user->emergency_contact }}"></div><div class="field"><label>Bank Name</label><input class="input" name="bank_name" value="{{ $user->bank_name }}"></div><div class="field"><label>Bank Account</label><input class="input" name="bank_account" value="{{ $user->bank_account }}"></div><div class="field"><label>New Password</label><input class="input" type="password" name="password"></div><div class="field"><label>Confirm New Password</label><input class="input" type="password" name="password_confirmation"></div></div><div class="field"><label>Address</label><input class="input" name="address" value="{{ $user->address }}"></div><button class="btn">Update Profile</button></form></div>
@endsection
