->schema([
Actions::make([
Action::make('Send epost')
->disabled(fn(string $operation) :bool => $operation === 'create')
->form([
TextInput::make('type')
->required()
->placeholder(fn ($record) => $record->body)
->maxLength(255),
Forms\Components\Textarea::make('content'),
Forms\Components\TextInput::make('customer_id')
->default(fn ($record) => $record->customer_id ?? null),
Forms\Components\TextInput::make('note_id')
->default(fn ($record) => $record->id ?? null),
])
->action(function (array $data, string $model): Conversation {
Notification::make()
->success()
->title('Epost sendt')
->send();
return Conversation::create($data);
}),
Action::make('Send sms')
->color('gray')
->action(function () {
// do something
}),
Action::make('Nytt notat')
->color('gray')
->action(function () {
// do something
})
]),"
->schema([
Actions::make([
Action::make('Send epost')
->disabled(fn(string $operation) :bool => $operation === 'create')
->form([
TextInput::make('type')
->required()
->placeholder(fn ($record) => $record->body)
->maxLength(255),
Forms\Components\Textarea::make('content'),
Forms\Components\TextInput::make('customer_id')
->default(fn ($record) => $record->customer_id ?? null),
Forms\Components\TextInput::make('note_id')
->default(fn ($record) => $record->id ?? null),
])
->action(function (array $data, string $model): Conversation {
Notification::make()
->success()
->title('Epost sendt')
->send();
return Conversation::create($data);
}),
Action::make('Send sms')
->color('gray')
->action(function () {
// do something
}),
Action::make('Nytt notat')
->color('gray')
->action(function () {
// do something
})
]),"