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\Support\Facades\Route;
|
||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
|
||||
@@ -13,26 +32,21 @@ 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', 'Auth\TwofaController@verify2FA')
|
||||
->name('verify2FA');
|
||||
|
||||
});
|
||||
|
||||
Route::get('/','HomeController@index')
|
||||
Route::get('/', 'HomeController@index')
|
||||
->middleware('eligibility');
|
||||
|
||||
Route::post('/form/contact', 'ContactController@create')
|
||||
->name('sendSubmission');
|
||||
|
||||
|
||||
Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function(){
|
||||
|
||||
Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function () {
|
||||
Route::get('/dashboard', 'DashboardController@index')
|
||||
->name('dashboard')
|
||||
->middleware('eligibility');
|
||||
@@ -40,8 +54,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::get('users/directory', 'ProfileController@index')
|
||||
->name('directory');
|
||||
|
||||
Route::group(['prefix' => '/applications'], function (){
|
||||
|
||||
Route::group(['prefix' => '/applications'], function () {
|
||||
Route::get('/my-applications', 'ApplicationController@showUserApps')
|
||||
->name('showUserApps')
|
||||
->middleware('eligibility');
|
||||
@@ -55,63 +68,48 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::delete('/comments/{comment}/delete', 'CommentController@delete')
|
||||
->name('deleteApplicationComment');
|
||||
|
||||
|
||||
Route::patch('/notes/save/{application}', 'AppointmentController@saveNotes')
|
||||
->name('saveNotes');
|
||||
|
||||
|
||||
Route::patch('/update/{application}/{newStatus}', 'ApplicationController@updateApplicationStatus')
|
||||
->name('updateApplicationStatus');
|
||||
|
||||
Route::delete('{application}/delete', 'ApplicationController@delete')
|
||||
->name('deleteApplication');
|
||||
|
||||
|
||||
Route::get('/staff/all', 'ApplicationController@showAllApps')
|
||||
->name('allApplications');
|
||||
|
||||
|
||||
Route::get('/staff/outstanding', 'ApplicationController@showAllPendingApps')
|
||||
->name('staffPendingApps');
|
||||
|
||||
|
||||
Route::get('/staff/peer-review', 'ApplicationController@showPeerReview')
|
||||
->name('peerReview');
|
||||
|
||||
|
||||
Route::get('/staff/pending-interview', 'ApplicationController@showPendingInterview')
|
||||
->name('pendingInterview');
|
||||
|
||||
|
||||
|
||||
Route::post('{application}/staff/vote', 'VoteController@vote')
|
||||
->name('voteApplication');
|
||||
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'appointments'], function (){
|
||||
|
||||
Route::group(['prefix' => 'appointments'], function () {
|
||||
Route::post('schedule/appointments/{application}', 'AppointmentController@saveAppointment')
|
||||
->name('scheduleAppointment');
|
||||
|
||||
Route::patch('update/appointments/{application}/{status}', 'AppointmentController@updateAppointment')
|
||||
->name('updateAppointment');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function (){
|
||||
|
||||
Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function () {
|
||||
Route::get('positions/{vacancySlug}', 'ApplicationController@renderApplicationForm')
|
||||
->name('renderApplicationForm');
|
||||
|
||||
Route::post('positions/{vacancySlug}/submit', 'ApplicationController@saveApplicationAnswers')
|
||||
->name('saveApplicationForm');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => '/profile'], function (){
|
||||
|
||||
Route::group(['prefix' => '/profile'], function () {
|
||||
Route::get('/settings', 'ProfileController@showProfile')
|
||||
->name('showProfileSettings');
|
||||
|
||||
@@ -121,11 +119,9 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::get('user/{user}', 'ProfileController@showSingleProfile')
|
||||
->name('showSingleProfile');
|
||||
|
||||
|
||||
Route::get('/settings/account', 'UserController@showAccount')
|
||||
->name('showAccountSettings');
|
||||
|
||||
|
||||
Route::patch('/settings/account/change-password', 'UserController@changePassword')
|
||||
->name('changePassword');
|
||||
|
||||
@@ -140,12 +136,9 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
|
||||
Route::patch('/settings/account/twofa/disable', 'UserController@remove2FASecret')
|
||||
->name('disable2FA');
|
||||
|
||||
});
|
||||
|
||||
|
||||
Route::group(['prefix' => '/hr'], function (){
|
||||
|
||||
Route::group(['prefix' => '/hr'], function () {
|
||||
Route::get('staff-members', 'UserController@showStaffMembers')
|
||||
->name('staffMemberList');
|
||||
|
||||
@@ -157,11 +150,9 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
|
||||
Route::patch('staff-members/terminate/{user}', 'UserController@terminate')
|
||||
->name('terminateStaffMember');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'admin'], function (){
|
||||
|
||||
Route::group(['prefix' => 'admin'], function () {
|
||||
Route::get('settings', 'OptionsController@index')
|
||||
->name('showSettings');
|
||||
|
||||
@@ -174,34 +165,27 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::delete('players/unban/{user}', 'BanController@delete')
|
||||
->name('unbanUser');
|
||||
|
||||
|
||||
|
||||
Route::delete('players/delete/{user}', 'UserController@delete')
|
||||
->name('deleteUser');
|
||||
|
||||
Route::patch('players/update/{user}', 'UserController@update')
|
||||
->name('updateUser');
|
||||
|
||||
|
||||
|
||||
Route::get('positions', 'VacancyController@index')
|
||||
->name('showPositions');
|
||||
|
||||
Route::post('positions/save', 'VacancyController@store')
|
||||
->name('savePosition');
|
||||
|
||||
|
||||
Route::get('positions/edit/{vacancy}', 'VacancyController@edit')
|
||||
->name('editPosition');
|
||||
|
||||
Route::patch('positions/update/{vacancy}', 'VacancyController@update')
|
||||
->name('updatePosition');
|
||||
|
||||
|
||||
Route::patch('positions/availability/{status}/{vacancy}', 'VacancyController@updatePositionAvailability')
|
||||
->name('updatePositionAvailability');
|
||||
|
||||
|
||||
Route::get('forms/builder', 'FormController@showFormBuilder')
|
||||
->name('showFormBuilder');
|
||||
|
||||
@@ -223,17 +207,12 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l
|
||||
Route::patch('forms/update/{form}', 'FormController@update')
|
||||
->name('updateForm');
|
||||
|
||||
|
||||
Route::get('devtools', 'DevToolsController@index')
|
||||
->name('devTools');
|
||||
|
||||
// we could use route model binding
|
||||
Route::post('devtools/vote-evaluation/force', 'DevToolsController@forceVoteCount')
|
||||
->name('devToolsForceVoteCount');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user