@extends('layouts.app')
@section('content')
<div class="container-xxl flex-grow-1 container-p-y"><div class="card"><div class="card-header"><h5 class="mb-0">Edit User</h5></div><div class="card-body">
<form method="POST" action="{{ route('admin.users.update',$user) }}" class="row g-3">@csrf @method('PUT')
<div class="col-md-4"><label class="form-label">Role</label><select name="role" class="form-select">@foreach(['admin','user','owner','member'] as $role)<option value="{{ $role }}" @selected($user->role===$role)>{{ ucfirst($role) }}</option>@endforeach</select></div>
<div class="col-md-4"><label class="form-label">Balance</label><input type="number" step="0.01" name="balance" value="{{ $user->balance }}" class="form-control"></div>
<div class="col-md-4"><label class="form-label">Trust Score</label><input type="number" step="0.01" name="trust_score" value="{{ $user->trust_score }}" class="form-control"></div>
<div class="col-md-4"><label class="form-label">Language</label><input name="language" value="{{ $user->language }}" class="form-control"></div>
<div class="col-md-4 form-check mt-4"><input class="form-check-input" type="checkbox" name="is_verified" value="1" @checked($user->is_verified)><label class="form-check-label">Verified</label></div>
<div class="col-12 d-flex gap-2"><button class="btn btn-primary">Update</button></form><form method="POST" action="{{ route('admin.users.destroy',$user) }}">@csrf @method('DELETE')<button class="btn btn-outline-danger">Delete</button></form></div>
</div></div></div>
@endsection
