refactor: code style changes
Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
@@ -36,13 +36,12 @@ use Illuminate\Http\Request;
|
||||
|
||||
class AppointmentController extends Controller
|
||||
{
|
||||
|
||||
private $appointmentService;
|
||||
|
||||
private $meetingNoteService;
|
||||
|
||||
|
||||
public function __construct(AppointmentService $appointmentService, MeetingNoteService $meetingNoteService) {
|
||||
|
||||
public function __construct(AppointmentService $appointmentService, MeetingNoteService $meetingNoteService)
|
||||
{
|
||||
$this->appointmentService = $appointmentService;
|
||||
$this->meetingNoteService = $meetingNoteService;
|
||||
}
|
||||
@@ -56,7 +55,7 @@ class AppointmentController extends Controller
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('success',__('Appointment successfully scheduled @ :appointmentTime', ['appointmentTime', $appointmentDate->toDateTimeString()]));
|
||||
->with('success', __('Appointment successfully scheduled @ :appointmentTime', ['appointmentTime', $appointmentDate->toDateTimeString()]));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,10 +70,8 @@ class AppointmentController extends Controller
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('success', __("Interview finished! Staff members can now vote on it."));
|
||||
|
||||
}
|
||||
catch (InvalidAppointmentStatusException $ex) {
|
||||
->with('success', __('Interview finished! Staff members can now vote on it.'));
|
||||
} catch (InvalidAppointmentStatusException $ex) {
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', $ex->getMessage());
|
||||
@@ -86,35 +83,26 @@ class AppointmentController extends Controller
|
||||
$this->authorize('update', $application->appointment);
|
||||
|
||||
try {
|
||||
|
||||
$this->appointmentService->deleteAppointment($application, $request->reason);
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('success', __('Appointment cancelled.'));
|
||||
|
||||
}
|
||||
catch (\Exception $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', $ex->getMessage());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function saveNotes(SaveNotesRequest $request, Application $application)
|
||||
{
|
||||
try {
|
||||
|
||||
$this->meetingNoteService->addToApplication($application, $request->noteText);
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('success', __('Saved notes.'));
|
||||
|
||||
} catch (InvalidAppointmentException $ex) {
|
||||
return redirect()
|
||||
->back()
|
||||
|
Reference in New Issue
Block a user