You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 Final fix delete storage link to fix news_images and logs 🆙
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Community\Staff;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\StaffApplicationFormRequest;
|
||||
use App\Models\Community\Staff\WebsiteOpenPosition;
|
||||
use App\Services\Community\StaffApplicationService;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class StaffApplicationsController extends Controller
|
||||
{
|
||||
public function __construct(private readonly StaffApplicationService $staffApplicationService) {}
|
||||
|
||||
public function index()
|
||||
{
|
||||
return view('community.staff-applications', [
|
||||
'positions' => $this->staffApplicationService->fetchOpenPositions(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function show(WebsiteOpenPosition $position)
|
||||
{
|
||||
return view('community.staff-applications-apply', [
|
||||
'position' => $position->load('permission'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function store(WebsiteOpenPosition $position, StaffApplicationFormRequest $request): RedirectResponse
|
||||
{
|
||||
if ($this->staffApplicationService->hasUserAppliedForPosition($request->user(), $position->permission->id)) {
|
||||
return back()->withErrors([
|
||||
'message' => __('You have already applied for this position.'),
|
||||
]);
|
||||
}
|
||||
|
||||
if (! $this->staffApplicationService->isPositionOpenForApplication($position)) {
|
||||
return back()->withErrors([
|
||||
'message' => __('You cannot apply for this position.'),
|
||||
]);
|
||||
}
|
||||
|
||||
$this->staffApplicationService->storeApplication($request->user(), $position->permission->id, $request->input('content'));
|
||||
|
||||
return to_route('staff-applications.index')->with('success', __('Your application has been submitted!'));
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Community\Staff;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Community\StaffService;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class StaffController extends Controller
|
||||
{
|
||||
public function __construct(private readonly StaffService $staffService) {}
|
||||
|
||||
public function __invoke(): View
|
||||
{
|
||||
$employees = $this->staffService->fetchStaffPositions();
|
||||
|
||||
return view('community.staff', [
|
||||
'employees' => $employees,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Community\Staff;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Community\TeamService;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class WebsiteTeamsController extends Controller
|
||||
{
|
||||
public function __construct(private readonly TeamService $teamService) {}
|
||||
|
||||
public function __invoke(): View
|
||||
{
|
||||
$employees = $this->teamService->fetchTeams();
|
||||
|
||||
return view('community.teams', [
|
||||
'employees' => $employees,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user