Action::make('Send Offer')
->requiresConfirmation()
->icon('heroicon-o-envelope')
->action(function (TransportOrder $record, Component $livewire) {
$livewire->validate();
$record->update([
'status' => 'ACCEPTED_INTERNAL',
]);
Mail::to($record->user->email)->send(new TransportOfferSend($record));
$this->refreshFormData([
'status',
]);
Notification::make()
->title('Offer send')
->body('Offer send to the customer')
->success()
->send();
})
->color('success')
Action::make('Send Offer')
->requiresConfirmation()
->icon('heroicon-o-envelope')
->action(function (TransportOrder $record, Component $livewire) {
$livewire->validate();
$record->update([
'status' => 'ACCEPTED_INTERNAL',
]);
Mail::to($record->user->email)->send(new TransportOfferSend($record));
$this->refreshFormData([
'status',
]);
Notification::make()
->title('Offer send')
->body('Offer send to the customer')
->success()
->send();
})
->color('success')