forked from miguel456/rbrecruiter
Apply fixes from StyleCI
This commit is contained in:
@@ -1,5 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright © 2020 Miguel Nogueira
|
||||
*
|
||||
* This file is part of Raspberry Staff Manager.
|
||||
*
|
||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
|
@@ -1,5 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright © 2020 Miguel Nogueira
|
||||
*
|
||||
* This file is part of Raspberry Staff Manager.
|
||||
*
|
||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
/*
|
||||
|
@@ -1,5 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright © 2020 Miguel Nogueira
|
||||
*
|
||||
* This file is part of Raspberry Staff Manager.
|
||||
*
|
||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
|
@@ -1,5 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright © 2020 Miguel Nogueira
|
||||
*
|
||||
* This file is part of Raspberry Staff Manager.
|
||||
*
|
||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use App\Http\Controllers\ApplicationController;
|
||||
use App\Http\Controllers\AppointmentController;
|
||||
use App\Http\Controllers\Auth\TwofaController;
|
||||
@@ -16,7 +35,6 @@ use App\Http\Controllers\UserController;
|
||||
use App\Http\Controllers\VacancyController;
|
||||
use App\Http\Controllers\VoteController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
|
||||
/*
|
||||
@@ -29,15 +47,12 @@ use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath' ]], function (){
|
||||
|
||||
Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function (){
|
||||
|
||||
Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath']], function () {
|
||||
Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function () {
|
||||
Auth::routes(['verify' => true]);
|
||||
|
||||
Route::post('/twofa/authenticate', [TwofaController::class, 'verify2FA'])
|
||||
->name('verify2FA');
|
||||
|
||||
});
|
||||
|
||||
Route::get('/', [HomeController::class, 'index'])
|
||||
@@ -49,9 +64,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::get('/accounts/danger-zone/{ID}/{action}/{token}', [UserController::class, 'processDeleteConfirmation'])
|
||||
->name('processDeleteConfirmation');
|
||||
|
||||
|
||||
Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function(){
|
||||
|
||||
Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function () {
|
||||
Route::get('/dashboard', [DashboardController::class, 'index'])
|
||||
->name('dashboard')
|
||||
->middleware('eligibility');
|
||||
@@ -59,11 +72,8 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::get('users/directory', [ProfileController::class, 'index'])
|
||||
->name('directory');
|
||||
|
||||
|
||||
|
||||
Route::resource('teams', TeamController::class);
|
||||
|
||||
|
||||
Route::post('teams/{team}/invites/send', [TeamController::class, 'invite'])
|
||||
->name('sendInvite');
|
||||
|
||||
@@ -73,14 +83,10 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::patch('teams/{team}/vacancies/update', [TeamController::class, 'assignVacancies'])
|
||||
->name('assignVacancies');
|
||||
|
||||
|
||||
Route::get('teams/invites/{action}/{token}', [TeamController::class, 'processInviteAction'])
|
||||
->name('processInvite');
|
||||
|
||||
|
||||
|
||||
Route::group(['prefix' => '/applications'], function (){
|
||||
|
||||
Route::group(['prefix' => '/applications'], function () {
|
||||
Route::get('/my-applications', [ApplicationController::class, 'showUserApps'])
|
||||
->name('showUserApps')
|
||||
->middleware('eligibility');
|
||||
@@ -94,63 +100,48 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::delete('/comments/{comment}/delete', [CommentController::class, 'delete'])
|
||||
->name('deleteApplicationComment');
|
||||
|
||||
|
||||
Route::patch('/notes/save/{application}', [AppointmentController::class, 'saveNotes'])
|
||||
->name('saveNotes');
|
||||
|
||||
|
||||
Route::patch('/update/{application}/{newStatus}', [ApplicationController::class, 'updateApplicationStatus'])
|
||||
->name('updateApplicationStatus');
|
||||
|
||||
Route::delete('{application}/delete', [ApplicationController::class, 'delete'])
|
||||
->name('deleteApplication');
|
||||
|
||||
|
||||
Route::get('/staff/all', [ApplicationController::class, 'showAllApps'])
|
||||
->name('allApplications');
|
||||
|
||||
|
||||
Route::get('/staff/outstanding', [ApplicationController::class, 'showAllPendingApps'])
|
||||
->name('staffPendingApps');
|
||||
|
||||
|
||||
Route::get('/staff/peer-review', [ApplicationController::class, 'showPeerReview'])
|
||||
->name('peerReview');
|
||||
|
||||
|
||||
Route::get('/staff/pending-interview', [ApplicationController::class, 'showPendingInterview'])
|
||||
->name('pendingInterview');
|
||||
|
||||
|
||||
|
||||
Route::post('{application}/staff/vote', [VoteController::class, 'vote'])
|
||||
->name('voteApplication');
|
||||
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'appointments'], function (){
|
||||
|
||||
Route::group(['prefix' => 'appointments'], function () {
|
||||
Route::post('schedule/appointments/{application}', [AppointmentController::class, 'saveAppointment'])
|
||||
->name('scheduleAppointment');
|
||||
|
||||
Route::patch('update/appointments/{application}/{status}', [AppointmentController::class, 'updateAppointment'])
|
||||
->name('updateAppointment');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function (){
|
||||
|
||||
Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function () {
|
||||
Route::get('positions/{vacancySlug}', [ApplicationController::class, 'renderApplicationForm'])
|
||||
->name('renderApplicationForm');
|
||||
|
||||
Route::post('positions/{vacancySlug}/submit', [ApplicationController::class, 'saveApplicationAnswers'])
|
||||
->name('saveApplicationForm');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => '/profile'], function (){
|
||||
|
||||
Route::group(['prefix' => '/profile'], function () {
|
||||
Route::get('/settings', [ProfileController::class, 'showProfile'])
|
||||
->name('showProfileSettings');
|
||||
|
||||
@@ -160,11 +151,9 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::get('user/{user}', [ProfileController::class, 'showSingleProfile'])
|
||||
->name('showSingleProfile');
|
||||
|
||||
|
||||
Route::get('/settings/account', [UserController::class, 'showAccount'])
|
||||
->name('showAccountSettings');
|
||||
|
||||
|
||||
Route::patch('/settings/account/change-password', [UserController::class, 'changePassword'])
|
||||
->name('changePassword');
|
||||
|
||||
@@ -182,12 +171,9 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
|
||||
Route::patch('/settings/account/dg/delete', [UserController::class, 'userDelete'])
|
||||
->name('userDelete');
|
||||
|
||||
});
|
||||
|
||||
|
||||
Route::group(['prefix' => '/hr'], function (){
|
||||
|
||||
Route::group(['prefix' => '/hr'], function () {
|
||||
Route::get('staff-members', [UserController::class, 'showStaffMembers'])
|
||||
->name('staffMemberList');
|
||||
|
||||
@@ -199,11 +185,9 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
|
||||
Route::patch('staff-members/terminate/{user}', [UserController::class, 'terminate'])
|
||||
->name('terminateStaffMember');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'admin'], function (){
|
||||
|
||||
Route::group(['prefix' => 'admin'], function () {
|
||||
Route::get('settings', [OptionsController::class, 'index'])
|
||||
->name('showSettings');
|
||||
|
||||
@@ -216,34 +200,27 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::delete('players/unban/{user}', [BanController::class, 'delete'])
|
||||
->name('unbanUser');
|
||||
|
||||
|
||||
|
||||
Route::delete('players/delete/{user}', [UserController::class, 'delete'])
|
||||
->name('deleteUser');
|
||||
|
||||
Route::patch('players/update/{user}', [UserController::class, 'update'])
|
||||
->name('updateUser');
|
||||
|
||||
|
||||
|
||||
Route::get('positions', [VacancyController::class, 'index'])
|
||||
->name('showPositions');
|
||||
|
||||
Route::post('positions/save', [VacancyController::class, 'store'])
|
||||
->name('savePosition');
|
||||
|
||||
|
||||
Route::get('positions/edit/{vacancy}', [VacancyController::class, 'edit'])
|
||||
->name('editPosition');
|
||||
|
||||
Route::patch('positions/update/{vacancy}', [VacancyController::class, 'update'])
|
||||
->name('updatePosition');
|
||||
|
||||
|
||||
Route::patch('positions/availability/{status}/{vacancy}', [VacancyController::class, 'updatePositionAvailability'])
|
||||
->name('updatePositionAvailability');
|
||||
|
||||
|
||||
Route::get('forms/builder', [FormController::class, 'showFormBuilder'])
|
||||
->name('showFormBuilder');
|
||||
|
||||
@@ -265,17 +242,12 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::patch('forms/update/{form}', [FormController::class, 'update'])
|
||||
->name('updateForm');
|
||||
|
||||
|
||||
Route::get('devtools', [DevToolsController::class, 'index'])
|
||||
->name('devTools');
|
||||
|
||||
// we could use route model binding
|
||||
Route::post('devtools/vote-evaluation/force', [DevToolsController::class, 'forceVoteCount'])
|
||||
->name('devToolsForceVoteCount');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user