filament-fullcalendar icon indicating copy to clipboard operation
filament-fullcalendar copied to clipboard

Model labels not working

Open Milorn opened this issue 1 year ago • 1 comments

image Using the label fields $modelLabel and $pluralModelLabel is not working, the title of the modal is being made of the class name, after doing some research it looks like there is a conflict with the InteractsWithRecords trait

Milorn avatar Nov 15 '23 07:11 Milorn

This is my solution right now:

class CalendarWidget extends FullCalendarWidget

protected function headerActions(): array
{
    return [
        CreateAction::make()
            ->modalHeading('Custom Heading')
            ->mountUsing(
                function (Form $form, array $arguments) {
                    $form->fill([
                        'start' => $arguments['start'] ?? null,
                        'end' => $arguments['end'] ?? null
                    ]);
                }
            )
    ];
}

protected function modalActions(): array
{
    return [
        Actions\EditAction::make()
            ->modalHeading('Custom Heading for Edit'),
        Actions\DeleteAction::make()
            ->modalHeading('Custom Heading for Delete'),
    ];
}

danielschweiger avatar Dec 01 '23 18:12 danielschweiger