forked from miguel456/rbrecruiter
Add "All Applications" page
This commit is contained in:
parent
bbe3001157
commit
035c9399a6
|
@ -119,13 +119,14 @@ class Install extends Command
|
||||||
$this->info('>> Saved configuration settings!');
|
$this->info('>> Saved configuration settings!');
|
||||||
$this->info('>> Preparing database...');
|
$this->info('>> Preparing database...');
|
||||||
|
|
||||||
|
$this->callSilent('config:cache');
|
||||||
$this->call('migrate');
|
$this->call('migrate');
|
||||||
$this->call('db:seed');
|
$this->call('db:seed');
|
||||||
|
|
||||||
touch($basePath . '/INSTALLED');
|
touch($basePath . '/INSTALLED');
|
||||||
|
|
||||||
$this->call('up');
|
$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
|
else
|
||||||
|
|
|
@ -45,10 +45,9 @@ class ApplicationController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function showUserApp(Request $request, $applicationID)
|
public function showUserApp(Request $request, $applicationID)
|
||||||
{
|
{
|
||||||
|
// TODO: Inject it instead (do this where there is no injection, not just here)
|
||||||
$application = Application::find($applicationID);
|
$application = Application::find($applicationID);
|
||||||
|
|
||||||
$this->authorize('view', $application);
|
$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()
|
public function showAllPendingApps()
|
||||||
{
|
{
|
||||||
|
@ -87,9 +92,6 @@ class ApplicationController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function showPendingInterview()
|
public function showPendingInterview()
|
||||||
{
|
{
|
||||||
$this->authorize('viewAny', Application::class);
|
$this->authorize('viewAny', Application::class);
|
||||||
|
|
|
@ -251,6 +251,12 @@ return [
|
||||||
'header' => 'Application Management',
|
'header' => 'Application Management',
|
||||||
'can' => ['applications.view.all', 'applications.vote']
|
'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',
|
'text' => 'Outstanding Applications',
|
||||||
'url' => '/applications/staff/outstanding',
|
'url' => '/applications/staff/outstanding',
|
||||||
|
@ -521,6 +527,7 @@ return [
|
||||||
'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.css'
|
'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.css'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 8.1 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 7.1 KiB |
|
@ -0,0 +1,217 @@
|
||||||
|
@extends('adminlte::page')
|
||||||
|
|
||||||
|
@section('title', 'Raspberry Network | Profile')
|
||||||
|
|
||||||
|
@section('content_header')
|
||||||
|
|
||||||
|
<h4>Application Management / All Applications</h4>
|
||||||
|
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('js')
|
||||||
|
|
||||||
|
<script type="text/javascript" src="/js/app.js"></script>
|
||||||
|
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="callout callout-info">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-3">
|
||||||
|
|
||||||
|
<img src="/img/applications_all.svg" alt="Applications illustration" class="img-responsive" width="200px"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
|
<h3><i class="fas fa-info-circle"></i> You're looking at all applications ever received</h3>
|
||||||
|
<p>
|
||||||
|
Here, you have quick and easy access to all applications ever received by the system.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row mt-5">
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<!-- MAIN CONTENT - APPS AND PICS -->
|
||||||
|
|
||||||
|
<div class="card-header">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-3">
|
||||||
|
<h3>All applications</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
|
<div class="navbtn right" style="whitespace: nowrap">
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='{{ route('staffPendingApps') }}'"><i class="far fa-folder-open"></i> Outstanding Applications</button>
|
||||||
|
<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='{{ route('pendingInterview') }}'"><i class="fas fa-microphone-alt"></i> Interview Queue</button>
|
||||||
|
<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='{{ route('peerReview') }}'"><i class="fas fa-search"></i> Peer Review</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-3 center">
|
||||||
|
|
||||||
|
<img src="/img/placeholders.svg" alt="Placeholder illustration" class="img-responsive" width="200px"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
|
@if (!$applications->isEmpty())
|
||||||
|
|
||||||
|
<table class="table table-borderless" style="whitespace: nowrap">
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>Applicant</th>
|
||||||
|
<th>Status</th>
|
||||||
|
<th>Date</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
@foreach($applications as $application)
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>{{ $application->id }}</td>
|
||||||
|
<td><a href="{{ route('showSingleProfile', ['user' => $application->user->id]) }}">{{ $application->user->name }}</a></td>
|
||||||
|
<td>
|
||||||
|
@switch($application->applicationStatus)
|
||||||
|
|
||||||
|
@case('STAGE_SUBMITTED')
|
||||||
|
|
||||||
|
<span class="badge badge-primary"><i class="far fa-clock"></i> Outstanding (Submitted)</span>
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case('STAGE_PEERAPPROVAL')
|
||||||
|
|
||||||
|
<span class="badge badge-warning"><i class="fas fa-vote-yea"></i> Peer Approval</span>
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case('STAGE_INTERVIEW')
|
||||||
|
|
||||||
|
<span class="badge badge-warning"><i class="fas fa-microphone-alt"></i> Interview</span>
|
||||||
|
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case('STAGE_INTERVIEW_SCHEDULED')
|
||||||
|
|
||||||
|
<span class="badge badge-warning"><i class="far fa-clock"></i>Interview Scheduled</span>
|
||||||
|
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case('APPROVED')
|
||||||
|
|
||||||
|
<span class="badge badge-success"><i class="fas fa-check"></i> Approved</span>
|
||||||
|
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case('DENIED')
|
||||||
|
|
||||||
|
<span class="badge badge-danger"><i class="fas fa-times"></i> Denied</span>
|
||||||
|
|
||||||
|
@break;
|
||||||
|
|
||||||
|
@default
|
||||||
|
<span class="badge badge-secondary"><i class="fas fa-question-circle"></i> Unknown</span>
|
||||||
|
|
||||||
|
|
||||||
|
@endswitch
|
||||||
|
</td>
|
||||||
|
<td>{{ $application->created_at }}</td>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="btn btn-success btn-sm" onclick="window.location.href='{{ route('showUserApp', ['id' => $application->id]) }}'"><i class="fas fa-eye"></i> View</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
@else
|
||||||
|
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
|
||||||
|
<h3><i class="fas fa-question-circle"></i> There are no applications here</h3>
|
||||||
|
<p>
|
||||||
|
We couldn't find any applications. Maybe no one has applied yet?
|
||||||
|
Please try again later.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- end main content card -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if (!$applications->isEmpty() && isset($applications->links))
|
||||||
|
|
||||||
|
<div class="card-footer">
|
||||||
|
|
||||||
|
{{ $applications->links }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@stop
|
|
@ -40,7 +40,6 @@ Route::group(['middleware' => ['auth', 'forcelogout']], function(){
|
||||||
->name('showUserApps')
|
->name('showUserApps')
|
||||||
->middleware('eligibility');
|
->middleware('eligibility');
|
||||||
|
|
||||||
|
|
||||||
Route::get('/view/{id}', 'ApplicationController@showUserApp')
|
Route::get('/view/{id}', 'ApplicationController@showUserApp')
|
||||||
->name('showUserApp');
|
->name('showUserApp');
|
||||||
|
|
||||||
|
@ -58,16 +57,24 @@ Route::group(['middleware' => ['auth', 'forcelogout']], function(){
|
||||||
Route::patch('/update/{id}/{newStatus}', 'ApplicationController@updateApplicationStatus')
|
Route::patch('/update/{id}/{newStatus}', 'ApplicationController@updateApplicationStatus')
|
||||||
->name('updateApplicationStatus');
|
->name('updateApplicationStatus');
|
||||||
|
|
||||||
|
|
||||||
|
Route::get('/staff/all', 'ApplicationController@showAllApps')
|
||||||
|
->name('allApplications');
|
||||||
|
|
||||||
|
|
||||||
Route::get('/staff/outstanding', 'ApplicationController@showAllPendingApps')
|
Route::get('/staff/outstanding', 'ApplicationController@showAllPendingApps')
|
||||||
->name('staffPendingApps');
|
->name('staffPendingApps');
|
||||||
|
|
||||||
|
|
||||||
Route::get('/staff/peer-review', 'ApplicationController@showPeerReview')
|
Route::get('/staff/peer-review', 'ApplicationController@showPeerReview')
|
||||||
->name('peerReview');
|
->name('peerReview');
|
||||||
|
|
||||||
|
|
||||||
Route::get('/staff/pending-interview', 'ApplicationController@showPendingInterview')
|
Route::get('/staff/pending-interview', 'ApplicationController@showPendingInterview')
|
||||||
->name('pendingInterview');
|
->name('pendingInterview');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Route::post('{id}/staff/vote', 'VoteController@vote')
|
Route::post('{id}/staff/vote', 'VoteController@vote')
|
||||||
->name('voteApplication');
|
->name('voteApplication');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue