You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 More fixes 🆙
This commit is contained in:
@@ -11,7 +11,7 @@ use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class StaffApplicationsController extends Controller
|
||||
{
|
||||
public function __construct(private readonly StaffApplicationService $staffApplicationService): void {}
|
||||
public function __construct(private readonly StaffApplicationService $staffApplicationService) {}
|
||||
|
||||
public function index(): View
|
||||
{
|
||||
@@ -29,7 +29,16 @@ class StaffApplicationsController extends Controller
|
||||
|
||||
public function store(WebsiteOpenPosition $position, StaffApplicationFormRequest $request): RedirectResponse
|
||||
{
|
||||
if ($this->staffApplicationService->hasUserAppliedForPosition($request->user(), $position->permission->id)) {
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->user();
|
||||
|
||||
if ($position->permission === null) {
|
||||
return back()->withErrors([
|
||||
'message' => __('Invalid position configuration.'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($this->staffApplicationService->hasUserAppliedForPosition($user, $position->permission->id)) {
|
||||
return back()->withErrors([
|
||||
'message' => __('You have already applied for this position.'),
|
||||
]);
|
||||
@@ -41,7 +50,7 @@ class StaffApplicationsController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
$this->staffApplicationService->storeApplication($request->user(), $position->permission->id, $request->input('content'));
|
||||
$this->staffApplicationService->storeApplication($user, $position->permission->id, $request->string('content')->toString());
|
||||
|
||||
return to_route('staff-applications.index')->with('success', __('Your application has been submitted!'));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ use Illuminate\View\View;
|
||||
|
||||
class StaffController extends Controller
|
||||
{
|
||||
public function __construct(private readonly StaffService $staffService): void {}
|
||||
public function __construct(private readonly StaffService $staffService) {}
|
||||
|
||||
public function __invoke(): View
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ use Illuminate\View\View;
|
||||
|
||||
class WebsiteTeamsController extends Controller
|
||||
{
|
||||
public function __construct(private readonly TeamService $teamService): void {}
|
||||
public function __construct(private readonly TeamService $teamService) {}
|
||||
|
||||
public function __invoke(): View
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user