Tables\Actions\EditAction::make()
->modalWidth(MaxWidth::ScreenExtraLarge)
->closeModalByClickingAway(false)
->closeModalByEscaping(false)
->mutateFormDataUsing(function (array $data) {
return PrepareDataToSaveContractInformation::handle($data, $this->record->id);
})->after(function ($record) {
AuditMoviment::create(
[
'user_id' => auth()->user()->id,
'register_id' => $record->id,
'origin' => OriginEnum::STUDENT_CONTRACT_INFO,
'action' => ActionEnum::UPDATED,
]
);
(new \App\Actions\Student\Contracts\CreateContractStudent())->execute($record);
}),
Tables\Actions\EditAction::make()
->modalWidth(MaxWidth::ScreenExtraLarge)
->closeModalByClickingAway(false)
->closeModalByEscaping(false)
->mutateFormDataUsing(function (array $data) {
return PrepareDataToSaveContractInformation::handle($data, $this->record->id);
})->after(function ($record) {
AuditMoviment::create(
[
'user_id' => auth()->user()->id,
'register_id' => $record->id,
'origin' => OriginEnum::STUDENT_CONTRACT_INFO,
'action' => ActionEnum::UPDATED,
]
);
(new \App\Actions\Student\Contracts\CreateContractStudent())->execute($record);
}),