diff --git a/app/Console/Commands/Install.php b/app/Console/Commands/Install.php index 119ba6b..32901a5 100644 --- a/app/Console/Commands/Install.php +++ b/app/Console/Commands/Install.php @@ -119,13 +119,14 @@ class Install extends Command $this->info('>> Saved configuration settings!'); $this->info('>> Preparing database...'); + $this->callSilent('config:cache'); $this->call('migrate'); $this->call('db:seed'); touch($basePath . '/INSTALLED'); $this->call('up'); - $this->info('>> All done! Visit ' . $baseURL . ' to start using your brand new installation of Raspberry Teams!'); + $this->info('>> All done! Visit ' . $basePath . ' to start using your brand new installation of Raspberry Teams!'); } else diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php index acb4020..15d08c0 100644 --- a/app/Http/Controllers/ApplicationController.php +++ b/app/Http/Controllers/ApplicationController.php @@ -45,10 +45,9 @@ class ApplicationController extends Controller } - - public function showUserApp(Request $request, $applicationID) { + // TODO: Inject it instead (do this where there is no injection, not just here) $application = Application::find($applicationID); $this->authorize('view', $application); @@ -77,6 +76,12 @@ class ApplicationController extends Controller + public function showAllApps() + { + return view('dashboard.appmanagement.all') + ->with('applications', Application::paginate(6)); + } + public function showAllPendingApps() { @@ -87,9 +92,6 @@ class ApplicationController extends Controller } - - - public function showPendingInterview() { $this->authorize('viewAny', Application::class); diff --git a/config/adminlte.php b/config/adminlte.php index decfdab..4129740 100644 --- a/config/adminlte.php +++ b/config/adminlte.php @@ -251,6 +251,12 @@ return [ 'header' => 'Application Management', 'can' => ['applications.view.all', 'applications.vote'] ], + [ + 'text' => 'All applications', + 'url' => 'applications/staff/all', + 'icon' => 'fas fa-list-ol', + 'can' => 'applications.view.all' + ], [ 'text' => 'Outstanding Applications', 'url' => '/applications/staff/outstanding', @@ -521,6 +527,7 @@ return [ 'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.css' ] ] - ] + ], + ], ]; diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 diff --git a/public/img/applications_all.svg b/public/img/applications_all.svg new file mode 100644 index 0000000..7f9e019 --- /dev/null +++ b/public/img/applications_all.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/placeholders.svg b/public/img/placeholders.svg new file mode 100644 index 0000000..9691c16 --- /dev/null +++ b/public/img/placeholders.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/views/dashboard/appmanagement/all.blade.php b/resources/views/dashboard/appmanagement/all.blade.php new file mode 100644 index 0000000..cc2196f --- /dev/null +++ b/resources/views/dashboard/appmanagement/all.blade.php @@ -0,0 +1,217 @@ +@extends('adminlte::page') + +@section('title', 'Raspberry Network | Profile') + +@section('content_header') + +

Application Management / All Applications

+ +@stop + +@section('js') + + + +@stop + +@section('content') + + + +
+ +
+ + +
+ +
+ + +
+ + Applications illustration + +
+ +
+ +

You're looking at all applications ever received

+

+ Here, you have quick and easy access to all applications ever received by the system. +

+ +
+ +
+ +
+ +
+ +
+ + + +
+ +
+ +
+ + +
+ +
+ +
+

All applications

+
+ +
+ + + +
+ +
+ +
+ +
+ + +
+ +
+ + Placeholder illustration + +
+ + +
+ + @if (!$applications->isEmpty()) + + + + + + + + + + + + + + + + + + @foreach($applications as $application) + + + + + + + + + + @endforeach + + + +
#ApplicantStatusDateActions
{{ $application->id }}{{ $application->user->name }} + @switch($application->applicationStatus) + + @case('STAGE_SUBMITTED') + + Outstanding (Submitted) + @break + + @case('STAGE_PEERAPPROVAL') + + Peer Approval + @break + + @case('STAGE_INTERVIEW') + + Interview + + @break + + @case('STAGE_INTERVIEW_SCHEDULED') + + Interview Scheduled + + @break + + @case('APPROVED') + + Approved + + @break + + @case('DENIED') + + Denied + + @break; + + @default + Unknown + + + @endswitch + {{ $application->created_at }} + +
+ + @else + +
+ +

There are no applications here

+

+ We couldn't find any applications. Maybe no one has applied yet? + Please try again later. +

+ +
+ + @endif + +
+ +
+ + +
+ + +
+ + @if (!$applications->isEmpty() && isset($applications->links)) + + + + @endif + +
+ +
+ +@stop diff --git a/routes/web.php b/routes/web.php index 4494cea..90d962a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -40,7 +40,6 @@ Route::group(['middleware' => ['auth', 'forcelogout']], function(){ ->name('showUserApps') ->middleware('eligibility'); - Route::get('/view/{id}', 'ApplicationController@showUserApp') ->name('showUserApp'); @@ -58,16 +57,24 @@ Route::group(['middleware' => ['auth', 'forcelogout']], function(){ Route::patch('/update/{id}/{newStatus}', 'ApplicationController@updateApplicationStatus') ->name('updateApplicationStatus'); + + 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('{id}/staff/vote', 'VoteController@vote') ->name('voteApplication');