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') + +
+ Here, you have quick and easy access to all applications ever received by the system. +
+ +# | +Applicant | +Status | +Date | +Actions | +
---|---|---|---|---|
{{ $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 }} | ++ + | +
+ We couldn't find any applications. Maybe no one has applied yet? + Please try again later. +
+ +