Removed useless feature

This commit is contained in:
Miguel Nogueira 2020-11-03 03:00:03 +00:00
parent d53e8135ee
commit 32c01f6e0b
9 changed files with 28 additions and 499 deletions

View File

@ -85,56 +85,6 @@ class ApplicationController extends Controller
->with('applications', Application::paginate(6)); ->with('applications', Application::paginate(6));
} }
public function showAllPendingApps()
{
$this->authorize('viewAny', Application::class);
return view('dashboard.appmanagement.outstandingapps')
->with('applications', Application::where('applicationStatus', 'STAGE_SUBMITTED')->get());
}
public function showPendingInterview()
{
$this->authorize('viewAny', Application::class);
$applications = Application::with('appointment', 'user')->get();
$count = 0;
$pendingInterviews = collect([]);
$upcomingInterviews = collect([]);
foreach ($applications as $application) {
if (! is_null($application->appointment) && $application->appointment->appointmentStatus == 'CONCLUDED') {
$count = +1;
}
switch ($application->applicationStatus) {
case 'STAGE_INTERVIEW':
$upcomingInterviews->push($application);
break;
case 'STAGE_INTERVIEW_SCHEDULED':
$pendingInterviews->push($application);
break;
}
}
return view('dashboard.appmanagement.interview')
->with([
'finishedCount' => $count,
'applications' => $pendingInterviews,
'upcomingApplications' => $upcomingInterviews,
]);
}
public function showPeerReview()
{
$this->authorize('viewAny', Application::class);
return view('dashboard.appmanagement.peerreview')
->with('applications', Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get());
}
public function renderApplicationForm(Request $request, $vacancySlug) public function renderApplicationForm(Request $request, $vacancySlug)
{ {

View File

@ -85,7 +85,7 @@ class TeamFileController extends Controller
{ {
try try
{ {
return Storage::download('uploads/' . $teamFile->fs_location, $teamFile->name); return Storage::download($teamFile->fs_location, $teamFile->name);
} }
catch (FileNotFoundException $ex) catch (FileNotFoundException $ex)
{ {
@ -130,7 +130,7 @@ class TeamFileController extends Controller
try try
{ {
Storage::delete('uploads/' . $teamFile->fs_location); Storage::delete($teamFile->fs_location);
$teamFile->delete(); $teamFile->delete();
$request->session()->flash('success', 'File deleted successfully.'); $request->session()->flash('success', 'File deleted successfully.');

View File

@ -279,22 +279,29 @@ return [
'can' => 'applications.view.all', 'can' => 'applications.view.all',
], ],
[ [
'text' => 'm_outstanding_apps', 'text' => 'Teams',
'url' => '/applications/staff/outstanding', 'icon' => 'fas fa-user-friends',
'icon' => 'far fa-folder-open', 'url' => 'teams',
'can' => 'applications.view.all', 'can' => 'teams.view',
'submenu' => [
[
'text' => 'Dashboard',
'icon' => 'fas fa-chart-line',
'url' => 'teams/dashboard',
'can' => 'teams.view'
], ],
[ [
'text' => 'm_interview_queue', 'text' => 'Files',
'url' => '/applications/staff/pending-interview', 'icon' => 'fas fa-file-alt',
'icon' => 'fas fa-fw fa-microphone-alt', 'url' => 'team/files',
'can' => 'applications.view.all', 'can' => 'teams.view'
], ],
[ [
'text' => 'm_peer_approval', 'text' => 'Calendar',
'url' => '/applications/staff/peer-review', 'icon' => 'far fa-calendar-alt',
'icon' => 'fas fa-fw fa-search', 'url' => 'teams/calendar'
'can' => 'applications.view.all', ]
]
], ],
[ [
'header' => 'h_admin', 'header' => 'h_admin',
@ -318,12 +325,6 @@ return [
'url' => '/hr/players', 'url' => '/hr/players',
'can' => 'admin.userlist', 'can' => 'admin.userlist',
], ],
[
'text' => 'm_teams',
'icon' => 'fas fa-user-friends',
'url' => 'teams',
'can' => 'teams.view',
],
[ [
'text' => 'sm_hiring_man', 'text' => 'sm_hiring_man',
'icon' => 'far fa-calendar-plus', 'icon' => 'far fa-calendar-plus',

View File

@ -89,20 +89,8 @@
<div class="row"> <div class="row">
<div class="col-3">
<h3>{{__('messages.application_m.all_apps')}}</h3>
</div>
<div class="col"> <div class="col">
<h3>{{__('messages.application_m.all_apps')}}</h3>
<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> {{__('messages.application_m.outstanding_apps')}}</button>
<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='{{ route('pendingInterview') }}'"><i class="fas fa-microphone-alt"></i> {{__('messages.application_m.interview_q')}}</button>
<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='{{ route('peerReview') }}'"><i class="fas fa-search"></i> {{__('messages.application_m.p_review')}}</button>
</div>
</div> </div>
</div> </div>

View File

@ -1,196 +0,0 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('messages.application_m.int_applications'))
@section('content_header')
<h4>{{__('messages.application_m.title')}} / {{__('messages.application_m.interview_q')}}</h4>
@stop
@section('content')
<div class="row">
<div class="col">
<div class="small-box bg-warning">
<div class="inner">
<h3>{{$applications->count()}}</h3>
<p>{{__('messages.application_m.interview_q')}}</p>
</div>
<div class="icon">
<i class="fas fa-microphone-alt"></i>
</div>
</div>
</div>
<div class="col">
<div class="small-box bg-success">
<div class="inner">
<h3>{{$finishedCount}}</h3>
<p>{{__('messages.application_m.finished_int')}}</p>
</div>
<div class="icon">
<i class="fas fa-check"></i>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
<div class="card-title"><h3>{{__('messages.application_m.schedule_int')}}</h3></div>
</div>
<div class="card-body">
@if (!$applications->isEmpty())
<table class="table" style="white-space: nowrap">
<thead>
<tr>
<th>#</th>
<th>{{__('messages.application_m.interviewee')}}</th>
<th>{{__('messages.reusable.status')}}</th>
<th>{{__('messages.reusable.actions')}}</th>
</tr>
</thead>
<tbody>
@foreach($applications as $application)
<tr>
<td>{{$application->id}}</td>
<td>{{$application->user->name}}</td>
<td><span class="badge-warning badge">{{($application->applicationStatus == 'STAGE_INTERVIEW') ? __('messages.application_m.pending_int') : __('messages.application_m.unknown_stat')}}</span></td>
<td>
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{route('showUserApp', ['application' => $application->id])}}'"><i class="fa fa-eye"></i> {{__('messages.reusable.view')}}</button>
<button type="button" class="btn btn-sm btn-warning"><i class="fa fa-clock"></i> {{__('messages.application_m.schedule')}}</button>
</td>
</tr>
@endforeach
</tbody>
</table>
@else
<div class="alert alert-danger">
<b><i class="fa fa-exclamation-triangle"></i> {{__('messages.application_m.no_apps_pending_int')}}</b>
<p>{{__('messages.application_m.no_apps_pending_int_exp')}}</p>
</div>
@endif
</div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-header">
<div class="card-title"><h3>{{__('messages.application_m.upcoming_int')}}</h3></div>
</div>
<div class="card-body">
@if (!$upcomingApplications->isEmpty())
<table class="table" style="white-space: nowrap">
<thead>
<tr>
<th>#</th>
<th>{{__('messages.application_m.interviewee')}}</th>
<th>{{__('messages.reusable.status')}}</th>
<th>{{__('messages.reusable.datetime')}}</th>
<th>{{__('messages.reusable.location')}}</th>
<th>{{__('messages.reusable.actions')}}</th>
</tr>
</thead>
<tbody>
@foreach($upcomingApplications as $upcomingApp)
<tr>
<td>{{$upcomingApp->id}}</td>
<td>{{$upcomingApp->user->name}}</td>
@if (is_null($upcomingApp->appointment))
<td><span class="badge badge-warning"><i class="fa fa-question-circle"></i>{{__('messages.application_m.pending_schedule')}}</span></td>
<td>{{__('messages.reusable.none_yet')}}</td>
<td><span class="badge badge-warning"><i class="fa fa-question-circle"></i>{{__('messages.application_m.pending_int')}}</span></td>
@else
<td><span class="badge badge-success"><i class="fa fa-check"></i> {{ucfirst(strtolower($upcomingApp->appointment->appointmentStatus))}}</span></td>
<td>{{$upcomingApp->appointment->appointmentDate}}</td>
<td><span class="badge badge-success"><i class="fa fa-check"></i> {{ucfirst(strtolower($upcomingApp->appointment->appointmentLocation))}}</span></td>
@endif
<td>
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{route('showUserApp', ['application' => $upcomingApp->id])}}'"><i class="fa fa-eye"></i> {{__('messages.reusable.view_c')}}</button>
</td>
</tr>
@endforeach
</tbody>
</table>
@else
<x-alert alert-type="danger">
<p><i class="fa fa-exclamation-triangle"></i><b>{{__('messages.application_m.no_upcoming')}}</b></p>
{{__('messages.application_m.no_upcoming_exp')}}
</x-alert>
@endif
</div>
</div>
</div>
</div>
<div class="row mr-5">
<div class="col text-center">
<button type="button" class="btn btn-success mr-3" onclick="window.location.href='{{route('staffPendingApps')}}'">{{__('messages.application_m.view_outstanding_queue')}}</button>
<button type="button" class="btn btn-success mr-3" onclick="window.location.href='{{route('peerReview')}}'">{{__('messages.application_m.view_approval_queue')}}</button>
</div>
</div>
@stop
@section('footer')
@include('breadcrumbs.dashboard.footer')
@stop

View File

@ -1,110 +0,0 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('messages.application_m.title'))
@section('content_header')
<h4>{{__('messages.application_m.title')}} / {{__('messages.application_m.outstanding_apps')}}</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">
<p>{{__('messages.application_m.no_outstanding')}}</p>
<p>{{__('messages.application_m.no_outstanding_exp')}}</p>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
<div class="card-title"><h4>{{__('messages.application_m.outstanding_apps')}}</h4></div>
</div>
<div class="card-body">
@if (!$applications->isEmpty())
<table class="table" style="white-space: nowrap">
<thead>
<tr>
<th>#</th>
<th>{{__('messages.application_m.applicant_name')}}</th>
<th>{{__('messages.reusable.status')}}</th>
<th>{{__('messages.application_m.application_date')}}</th>
<th>{{__('messages.last_updated')}}</th>
<th>{{__('messages.reusable.status')}}</th>
</tr>
</thead>
<tbody>
@foreach($applications as $application)
<tr>
<td>{{$application->id}}</td>
<td>{{$application->user->name}}</td>
<td><span class="badge badge-warning">{{($application->applicationStatus == 'STAGE_SUBMITTED') ? __('messages.application_m.outstanding_sm') : __('messages.application_m.unknown_stat')}}</span></td>
<td>{{$application->created_at}}</td>
<td>{{$application->updated_at}}</td>
<td>
<button type="button" class="btn btn-sm btn-warning" onclick="window.location.href='{{route('showUserApp', ['application' => $application->id])}}'"><i class="fas fa-clipboard-check"></i> {{__('messages.application_r.review')}}</button>
</td>
</tr>
@endforeach
</tbody>
</table>
@else
<div class="alert alert-warning">
<i class="fas fa-exclamation-triangle"></i><b> {{__('messages.application_m.no_pending')}}</b>
<p>{{__('messages.application_m.no_pending_exp')}}</p>
</div>
@endif
</div>
<div class="card-footer text-center">
<button type="button" class="btn btn-success" onclick="window.location.href='{{route('pendingInterview')}}'">{{__('messages.application_m.view_interview_queue')}}</button>
</div>
</div>
</div>
</div>
@stop
@section('footer')
@include('breadcrumbs.dashboard.footer')
@stop

View File

@ -1,97 +0,0 @@
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('messages.application_m.p_review'))
@section('content_header')
<h4>{{__('messages.application_m.title')}} / {{__('messages.application_m.p_review')}}</h4>
@stop
@section('content')
<div class="row">
<div class="col">
<div class="callout callout-info">
<h4>{{__('messages.application_m.voting_reminder.title')}}</h4>
<p>{{__('messages.application_m.voting_reminder.line1')}}</p>
<p>{{__('messages.application_m.voting_reminder.line2')}}</p>
<p>{{__('messages.application_m.voting_reminder.line3')}}</p>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
<div class="card-title"><h3>{{__('messages.v_backlog')}}</h3></div>
</div>
<div class="card-body">
@if(!$applications->isEmpty())
<table class="table" style="white-space: nowrap">
<thead>
<tr>
<th>#</th>
<th>{{__('messages.application_m.applicant_name')}}</th>
<th>{{__('messages.last_updated')}}</th>
<th>{{__('messages.reusable.status')}}</th>
<th>{{__('messages.reusable.actions')}}</th>
</tr>
</thead>
<tbody>
@foreach($applications as $application)
<td>{{$application->id}}</td>
<td>{{$application->user->name}}</td>
<td>{{$application->created_at}}</td>
<td><span class="badge badge-warning">{{($application->applicationStatus == 'STAGE_PEERAPPROVAL') ? __('messages.application_m.p_review') : __('messages.application_m.unknown_stat')}}</span></td>
<td>
<button type="button" class="btn btn-info btn-sm" onclick="window.location.href='{{route('showUserApp', ['application' => $application->id])}}'"><i class="far fa-clipboard"></i> {{__('messages.application_r.review')}}</button>
</td>
@endforeach
</tbody>
</table>
@else
<x-alert alert-type="warning">
<p class="text-bold"><i class="fa fa-exclamation-triangle"></i> {{__('messages.application_m.no_pending_review')}}</p>
{{__('messages.application_m.no_pending_review_exp')}}
</x-alert>
@endif
</div>
</div>
</div>
</div>
@stop
@section('footer')
@include('breadcrumbs.dashboard.footer')
@stop

View File

@ -120,7 +120,8 @@
</div> </div>
<div class="card-footer text-center"> <div class="card-footer text-center">
<button type="button" class="btn btn-warning" onclick="$('#upload-dropzone').modal('show')"><i class="fas fa-upload"></i> Upload Files</button> <button type="button" class="btn btn-warning ml-3" onclick="$('#upload-dropzone').modal('show')"><i class="fas fa-upload"></i> Upload Files</button>
<button type="button" class="btn btn-success ml-3" onclick="window.location.href='{{route('teams.index')}}'"><i class="fas fa-arrow-circle-left"></i> Back</button>
{{ $files->links() }} {{ $files->links() }}
</div> </div>

View File

@ -129,14 +129,6 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo
Route::get('/staff/all', [ApplicationController::class, 'showAllApps']) Route::get('/staff/all', [ApplicationController::class, 'showAllApps'])
->name('allApplications'); ->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']) Route::post('{application}/staff/vote', [VoteController::class, 'vote'])
->name('voteApplication'); ->name('voteApplication');