namespace App\Nova;
+use App\MailgunEvent;
use App\Nova\Actions\ImportUsers;
use App\Nova\Actions\SendNotification;
use App\Nova\Actions\StartTrial;
Text::make('Email')->required(),
Text::make('Position'),
Text::make('Téléphone', 'phone'),
+
new Panel('Adresse', $this->addressFields()),
new Panel('Réglages', [
Select::make('Type')->options([
BelongsTo::make('Organisation', 'organization', Organization::class)->searchable()->nullable(),
]),
], $this->extraFields(), [
+ Badge::make('Etat dernier mail', fn() => MailgunEvent::STATUSES[$this->lastMailgunEvent->event ?? 'unknown']['label'])
+ ->map(Arr::pluck(MailgunEvent::STATUSES, 'badge', 'label')),
Badge::make('Etat', fn() => AppUser::STATUSES[$this->status]['label'])
->map(Arr::pluck(AppUser::STATUSES, 'badge', 'label')),
]);