diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php index 2102759..cf38a33 100755 --- a/app/Http/Controllers/ApplicationController.php +++ b/app/Http/Controllers/ApplicationController.php @@ -85,56 +85,6 @@ class ApplicationController extends Controller ->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) { diff --git a/app/Http/Controllers/TeamFileController.php b/app/Http/Controllers/TeamFileController.php index a1fca52..415e696 100755 --- a/app/Http/Controllers/TeamFileController.php +++ b/app/Http/Controllers/TeamFileController.php @@ -85,7 +85,7 @@ class TeamFileController extends Controller { try { - return Storage::download('uploads/' . $teamFile->fs_location, $teamFile->name); + return Storage::download($teamFile->fs_location, $teamFile->name); } catch (FileNotFoundException $ex) { @@ -130,7 +130,7 @@ class TeamFileController extends Controller try { - Storage::delete('uploads/' . $teamFile->fs_location); + Storage::delete($teamFile->fs_location); $teamFile->delete(); $request->session()->flash('success', 'File deleted successfully.'); diff --git a/config/adminlte.php b/config/adminlte.php index 883d570..162c47c 100755 --- a/config/adminlte.php +++ b/config/adminlte.php @@ -279,22 +279,29 @@ return [ 'can' => 'applications.view.all', ], [ - 'text' => 'm_outstanding_apps', - 'url' => '/applications/staff/outstanding', - 'icon' => 'far fa-folder-open', - 'can' => 'applications.view.all', - ], - [ - 'text' => 'm_interview_queue', - 'url' => '/applications/staff/pending-interview', - 'icon' => 'fas fa-fw fa-microphone-alt', - 'can' => 'applications.view.all', - ], - [ - 'text' => 'm_peer_approval', - 'url' => '/applications/staff/peer-review', - 'icon' => 'fas fa-fw fa-search', - 'can' => 'applications.view.all', + 'text' => 'Teams', + 'icon' => 'fas fa-user-friends', + 'url' => 'teams', + 'can' => 'teams.view', + 'submenu' => [ + [ + 'text' => 'Dashboard', + 'icon' => 'fas fa-chart-line', + 'url' => 'teams/dashboard', + 'can' => 'teams.view' + ], + [ + 'text' => 'Files', + 'icon' => 'fas fa-file-alt', + 'url' => 'team/files', + 'can' => 'teams.view' + ], + [ + 'text' => 'Calendar', + 'icon' => 'far fa-calendar-alt', + 'url' => 'teams/calendar' + ] + ] ], [ 'header' => 'h_admin', @@ -318,12 +325,6 @@ return [ 'url' => '/hr/players', 'can' => 'admin.userlist', ], - [ - 'text' => 'm_teams', - 'icon' => 'fas fa-user-friends', - 'url' => 'teams', - 'can' => 'teams.view', - ], [ 'text' => 'sm_hiring_man', 'icon' => 'far fa-calendar-plus', diff --git a/resources/views/dashboard/appmanagement/all.blade.php b/resources/views/dashboard/appmanagement/all.blade.php index 194ea91..0577885 100755 --- a/resources/views/dashboard/appmanagement/all.blade.php +++ b/resources/views/dashboard/appmanagement/all.blade.php @@ -89,20 +89,8 @@
-
-

{{__('messages.application_m.all_apps')}}

-
-
- - - +

{{__('messages.application_m.all_apps')}}

diff --git a/resources/views/dashboard/appmanagement/interview.blade.php b/resources/views/dashboard/appmanagement/interview.blade.php deleted file mode 100755 index 209d5f0..0000000 --- a/resources/views/dashboard/appmanagement/interview.blade.php +++ /dev/null @@ -1,196 +0,0 @@ -@extends('adminlte::page') - -@section('title', config('app.name') . ' | ' . __('messages.application_m.int_applications')) - -@section('content_header') - -

{{__('messages.application_m.title')}} / {{__('messages.application_m.interview_q')}}

- -@stop - -@section('content') - -
- -
- -
-
-

{{$applications->count()}}

-

{{__('messages.application_m.interview_q')}}

-
-
- -
-
- -
- -
- -
-
-

{{$finishedCount}}

-

{{__('messages.application_m.finished_int')}}

-
-
- -
-
-
- -
- -
- -
- -
- -
-

{{__('messages.application_m.schedule_int')}}

-
- -
- - @if (!$applications->isEmpty()) - - - - - - - - - - - - - - - - - @foreach($applications as $application) - - - - - - - - - @endforeach - - - -
#{{__('messages.application_m.interviewee')}}{{__('messages.reusable.status')}}{{__('messages.reusable.actions')}}
{{$application->id}}{{$application->user->name}}{{($application->applicationStatus == 'STAGE_INTERVIEW') ? __('messages.application_m.pending_int') : __('messages.application_m.unknown_stat')}} - - -
- - @else - -
- - {{__('messages.application_m.no_apps_pending_int')}} -

{{__('messages.application_m.no_apps_pending_int_exp')}}

-
- - @endif - -
- -
- -
- -
- -
- -
- -

{{__('messages.application_m.upcoming_int')}}

- -
- -
- - @if (!$upcomingApplications->isEmpty()) - - - - - - - - - - - - - - - - - - - - @foreach($upcomingApplications as $upcomingApp) - - - - - @if (is_null($upcomingApp->appointment)) - - - - @else - - - - @endif - - - - @endforeach - - - -
#{{__('messages.application_m.interviewee')}}{{__('messages.reusable.status')}}{{__('messages.reusable.datetime')}}{{__('messages.reusable.location')}}{{__('messages.reusable.actions')}}
{{$upcomingApp->id}}{{$upcomingApp->user->name}}{{__('messages.application_m.pending_schedule')}}{{__('messages.reusable.none_yet')}}{{__('messages.application_m.pending_int')}} {{ucfirst(strtolower($upcomingApp->appointment->appointmentStatus))}}{{$upcomingApp->appointment->appointmentDate}} {{ucfirst(strtolower($upcomingApp->appointment->appointmentLocation))}} - -
- - @else - - -

{{__('messages.application_m.no_upcoming')}}

- {{__('messages.application_m.no_upcoming_exp')}} -
- - @endif - -
- -
- -
- -
- -
- -
- - - - -
- -
- -@stop - -@section('footer') - @include('breadcrumbs.dashboard.footer') -@stop diff --git a/resources/views/dashboard/appmanagement/outstandingapps.blade.php b/resources/views/dashboard/appmanagement/outstandingapps.blade.php deleted file mode 100755 index e231318..0000000 --- a/resources/views/dashboard/appmanagement/outstandingapps.blade.php +++ /dev/null @@ -1,110 +0,0 @@ -@extends('adminlte::page') - -@section('title', config('app.name') . ' | ' . __('messages.application_m.title')) - -@section('content_header') - -

{{__('messages.application_m.title')}} / {{__('messages.application_m.outstanding_apps')}}

- -@stop - -@section('js') - - - -@stop - - -@section('content') - -
- -
-
-

{{__('messages.application_m.no_outstanding')}}

-

{{__('messages.application_m.no_outstanding_exp')}}

-
-
- -
- -
- -
- -
- -
- -

{{__('messages.application_m.outstanding_apps')}}

- -
- -
- - @if (!$applications->isEmpty()) - - - - - - - - - - - - - - - - - - @foreach($applications as $application) - - - - - - - - - - - - - @endforeach - - - -
#{{__('messages.application_m.applicant_name')}}{{__('messages.reusable.status')}}{{__('messages.application_m.application_date')}}{{__('messages.last_updated')}}{{__('messages.reusable.status')}}
{{$application->id}}{{$application->user->name}}{{($application->applicationStatus == 'STAGE_SUBMITTED') ? __('messages.application_m.outstanding_sm') : __('messages.application_m.unknown_stat')}}{{$application->created_at}}{{$application->updated_at}} - -
- @else - -
- {{__('messages.application_m.no_pending')}} -

{{__('messages.application_m.no_pending_exp')}}

-
- - @endif - -
- - - -
- -
- -
- -@stop - -@section('footer') - @include('breadcrumbs.dashboard.footer') -@stop diff --git a/resources/views/dashboard/appmanagement/peerreview.blade.php b/resources/views/dashboard/appmanagement/peerreview.blade.php deleted file mode 100755 index 5b56f56..0000000 --- a/resources/views/dashboard/appmanagement/peerreview.blade.php +++ /dev/null @@ -1,97 +0,0 @@ -@extends('adminlte::page') - -@section('title', config('app.name') . ' | ' . __('messages.application_m.p_review')) - -@section('content_header') - -

{{__('messages.application_m.title')}} / {{__('messages.application_m.p_review')}}

- -@stop - -@section('content') - -
- -
- -
- -

{{__('messages.application_m.voting_reminder.title')}}

- -

{{__('messages.application_m.voting_reminder.line1')}}

-

{{__('messages.application_m.voting_reminder.line2')}}

- -

{{__('messages.application_m.voting_reminder.line3')}}

- -
- -
- -
- -
- -
- -
- -
-

{{__('messages.v_backlog')}}

-
- -
- - @if(!$applications->isEmpty()) - - - - - - - - - - - - - - - - - - @foreach($applications as $application) - - - - - - - - @endforeach - - - -
#{{__('messages.application_m.applicant_name')}}{{__('messages.last_updated')}}{{__('messages.reusable.status')}}{{__('messages.reusable.actions')}}
{{$application->id}}{{$application->user->name}}{{$application->created_at}}{{($application->applicationStatus == 'STAGE_PEERAPPROVAL') ? __('messages.application_m.p_review') : __('messages.application_m.unknown_stat')}} - -
- @else - -

{{__('messages.application_m.no_pending_review')}}

- - {{__('messages.application_m.no_pending_review_exp')}} -
- @endif - -
- -
- -
- -
- -@stop - -@section('footer') - @include('breadcrumbs.dashboard.footer') -@stop diff --git a/resources/views/dashboard/teams/team-files.blade.php b/resources/views/dashboard/teams/team-files.blade.php index 9f07e00..07143cc 100755 --- a/resources/views/dashboard/teams/team-files.blade.php +++ b/resources/views/dashboard/teams/team-files.blade.php @@ -120,7 +120,8 @@ diff --git a/routes/web.php b/routes/web.php index a6d366b..f6fef98 100755 --- a/routes/web.php +++ b/routes/web.php @@ -129,14 +129,6 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo Route::get('/staff/all', [ApplicationController::class, 'showAllApps']) ->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']) ->name('voteApplication');