Action::make('participate')
->iconButton()
->icon(hero('user-plus'))
->color('success')
->label(__('realty.meeting.in-person'))
->tooltip(__('realty.meeting.in-person'))
->action(function (RealtyMeetingCurrentOwner $record) use ($meeting) {
$meeting->addParticipant(Owner::find($record->owner_id), Contact::find($record->contact_id));
$this->dispatch('refreshComponent');
self::notifySuccess();
}),
Action::make('participateProxy')
->disabled(fn () => $meeting->participantsInPerson->isEmpty())
->iconButton()
->label(__('realty.meeting.is-proxy'))
->tooltip(__('realty.meeting.is-proxy'))
->color('secondary')
->icon(hero('document-plus'))
->modalWidth('md')
->modalHeading(__('realty.meeting.is-proxy'))
->form($this->participationFormSchema())
->action(function (?RealtyMeetingCurrentOwner $record, ?array $data) {
$this->addParticipant($record, $data);
self::notifySuccess();
})
->after(fn () => $this->dispatch('refreshComponent') ),
Action::make('participate')
->iconButton()
->icon(hero('user-plus'))
->color('success')
->label(__('realty.meeting.in-person'))
->tooltip(__('realty.meeting.in-person'))
->action(function (RealtyMeetingCurrentOwner $record) use ($meeting) {
$meeting->addParticipant(Owner::find($record->owner_id), Contact::find($record->contact_id));
$this->dispatch('refreshComponent');
self::notifySuccess();
}),
Action::make('participateProxy')
->disabled(fn () => $meeting->participantsInPerson->isEmpty())
->iconButton()
->label(__('realty.meeting.is-proxy'))
->tooltip(__('realty.meeting.is-proxy'))
->color('secondary')
->icon(hero('document-plus'))
->modalWidth('md')
->modalHeading(__('realty.meeting.is-proxy'))
->form($this->participationFormSchema())
->action(function (?RealtyMeetingCurrentOwner $record, ?array $data) {
$this->addParticipant($record, $data);
self::notifySuccess();
})
->after(fn () => $this->dispatch('refreshComponent') ),