@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 Referral</h5></div><div class="card-body">
<form method="POST" action="{{ route('admin.referrals.update',$referral) }}" class="row g-3">@csrf @method('PUT')
<div class="col-md-6"><label class="form-label">Status</label><select name="status" class="form-select">@foreach(['pending','completed','cancelled'] as $status)<option value="{{ $status }}" @selected($referral->status===$status)>{{ ucfirst($status) }}</option>@endforeach</select></div>
<div class="col-md-6"><label class="form-label">Reward Amount</label><input type="number" step="0.01" name="reward_amount" value="{{ $referral->reward_amount }}" class="form-control"></div>
<div class="col-12 d-flex gap-2"><button class="btn btn-primary">Update</button></form><form method="POST" action="{{ route('admin.referrals.destroy',$referral) }}">@csrf @method('DELETE')<button class="btn btn-outline-danger">Delete</button></form></div>
</div></div></div>
@endsection
