Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followup Content Display #3685

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Modules\HR\Entities\Application;
use Modules\HR\Entities\ApplicationMeta;
use Modules\HR\Entities\ApplicationRound;
use Modules\HR\Entities\FollowUp;
use Modules\HR\Entities\Job;
use Modules\HR\Entities\Round;
use Modules\HR\Entities\University;
Expand Down Expand Up @@ -219,6 +220,9 @@ public function edit($id)

$offerLetterTemplate = Setting::getOfferLetterTemplate();
$desiredResume = DB::table('hr_applications')->select(['hr_applications.resume'])->where('hr_applications.hr_job_id', '=', $job->id)->where('is_desired_resume', '=', 1)->get();

$hrApplicationRoundIds = ApplicationRound::where('hr_application_id', $id)->pluck('id');
$followUpEntries = Followup::whereIn('hr_application_round_id', $hrApplicationRoundIds)->get();
$attr = [
'applicant' => $application->applicant,
'application' => $application,
Expand All @@ -235,6 +239,7 @@ public function edit($id)
],
'type' => config("constants.hr.opportunities.{$job->type}.type"),
'universities' => University::orderBy('name')->get(),
'followUpEntries' => $followUpEntries,
];

if ($job->type == 'job') {
Expand Down
10 changes: 5 additions & 5 deletions resources/views/hr/application/details.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@
</div>
</label>
@if ($applicationRound['0']->scheduled_date)
<input type="date"
name="scheduled_date" id="scheduled_date"
class="form-control form-control-sm"
<input type="date"
name="scheduled_date" id="scheduled_date"
class="form-control form-control-sm"
value="{{ $applicationRound['0']->scheduled_date->format(config('constants.date_format')) }}">
@else
<div class="fz-16 leading-tight">Pending calendar confirmation</div>
Expand Down Expand Up @@ -182,7 +182,7 @@ class="form-control form-control-sm"
<img src="{{ $applicationRound['0']->scheduledPerson->avatar }}" alt="{{ $applicationRound['0']->scheduledPerson->name }}" class="w-25 h-25 rounded-circle">
<span>{{ $applicationRound['0']->scheduledPerson->name }}</span>
</div>
@endif
@endif
</div>
@if ($applicationRound['0']->scheduled_date)
<div class="form-group col-md-3 d-flex align-items-end">
Expand All @@ -191,7 +191,7 @@ class="form-control form-control-sm"
@endif
</div>
@endif

</div>
</div>
<input type="hidden" name="action" value="schedule-update">
Expand Down
66 changes: 3 additions & 63 deletions resources/views/hr/application/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@extends('layouts.app')

@section('content')
<div :class="[showResumeFrame ? 'container-fluid' : 'container']" id="page_hr_applicant_edit">
<div class="row">
Expand All @@ -15,6 +14,7 @@
@include('hr.application.timeline', [
'timeline' => $timeline,
'currentApplication' => $application,
'followUpEntries' => $followUpEntries,
])
</div>
<div v-bind:class="[showResumeFrame ? 'offset-md-2 col-md-7 pl-9' : 'col-md-8']">
Expand All @@ -39,26 +39,6 @@
$applicationRoundReview = $applicationRound->applicationRoundReviews->where('review_key', 'feedback')->first();
$applicationRoundReviewValue = $applicationRoundReview ? $applicationRoundReview->review_value : '';
@endphp
@if (sizeof($applicationRound->followUps))
<div class="my-2">
@foreach ($applicationRound->followUps as $followUp)
<div class="d-flex align-items-center mb-1.5">
<i class="fa fa-clock-o fz-20 mr-1" aria-hidden="true"></i>
<span class="fz-14 leading-none">
<span class="mr-0.5">Followed up by</span>
<img src="{{ $followUp->conductedBy->avatar }}"
class="w-20 h-20 rounded-circle mr-0.5" data-toggle="tooltip"
title="{{ $followUp->conductedBy->name }}">
<span class="mr-1.5">on
{{ $followUp->created_at->format(config('constants.full_display_date_format')) }}</span>
<a href="#" data-toggle="modal"
data-target="#followUp{{ $followUp->id }}">View feedback</a>
@include('hr::follow-up.modal')
</span>
</div>
@endforeach
</div>
@endif
@if ($loop->last && $applicationRound->application->hasTag('need-follow-up'))
<div class="d-flex justify-content-start">
<button type="button"
Expand Down Expand Up @@ -112,7 +92,7 @@ class="fa fa-close"></i>&nbsp;{{ config('constants.hr.status.rejected.title') }}
value="{{ $applicationRound->id }}"
class="btn-sm btn-primary text-decoration-none finish_interview ">Finish
Interview</button>
</div>
</div>
@endif
@endif
<div class="icon-pencil position-relative ml-3 c-pointer"
Expand Down Expand Up @@ -349,26 +329,6 @@ class="btn btn-outline-danger ml-2"
$applicationRoundReview = $applicationRound->applicationRoundReviews->where('review_key', 'feedback')->first();
$applicationRoundReviewValue = $applicationRoundReview ? $applicationRoundReview->review_value : '';
@endphp
@if (sizeof($applicationRound->followUps))
<div class="mt-3">
@foreach ($applicationRound->followUps as $followUp)
<div class="d-flex align-items-center mb-1.5">
<i class="fa fa-clock-o fz-20 mr-1" aria-hidden="true"></i>
<span class="fz-14 leading-none">
<span class="mr-0.5">Followed up by</span>
<img src="{{ $followUp->conductedBy->avatar }}"
class="w-20 h-20 rounded-circle mr-0.5" data-toggle="tooltip"
title="{{ $followUp->conductedBy->name }}">
<span class="mr-1.5">on
{{ $followUp->created_at->format(config('constants.full_display_date_format')) }}</span>
<a href="#" data-toggle="modal"
data-target="#followUp{{ $followUp->id }}">View feedback</a>
@include('hr::follow-up.modal')
</span>
</div>
@endforeach
</div>
@endif
@if ($loop->last && $applicationRound->application->hasTag('need-follow-up'))
<div class="d-flex justify-content-start">
<button type="button"
Expand Down Expand Up @@ -855,26 +815,6 @@ class="btn btn-outline-danger ml-2"
$applicationRoundReviewValue = $applicationRoundReview ? $applicationRoundReview->review_value : '';
@endphp
<br>
@if (sizeof($applicationRound->followUps))
<div class="mt-3">
@foreach ($applicationRound->followUps as $followUp)
<div class="d-flex align-items-center mb-1.5">
<i class="fa fa-clock-o fz-20 mr-1" aria-hidden="true"></i>
<span class="fz-14 leading-none">
<span class="mr-0.5">Followed up by</span>
<img src="{{ $followUp->conductedBy->avatar }}"
class="w-20 h-20 rounded-circle mr-0.5" data-toggle="tooltip"
title="{{ $followUp->conductedBy->name }}">
<span class="mr-1.5">on
{{ $followUp->created_at->format(config('constants.full_display_date_format')) }}</span>
<a href="#" data-toggle="modal"
data-target="#followUp{{ $followUp->id }}">View feedback</a>
@include('hr::follow-up.modal')
</span>
</div>
@endforeach
</div>
@endif
@if ($loop->last && $applicationRound->application->hasTag('need-follow-up'))
<div class="d-flex justify-content-start">
<button type="button"
Expand Down Expand Up @@ -930,7 +870,7 @@ class="fa fa-close"></i>&nbsp;{{ config('constants.hr.status.rejected.title') }}
value="{{ $applicationRound->id }}"
class="btn-sm btn-primary text-decoration-none finish_interview ">Finish
Interview</button>
</div>
</div>
@endif
<div class="icon-pencil position-relative ml-3 c-pointer" data-toggle="collapse"
data-target="#collapse_{{ $loop->iteration }}"><i class="fa fa-pencil"></i>
Expand Down
14 changes: 14 additions & 0 deletions resources/views/hr/application/timeline.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,18 @@ class="{{ config("constants.hr.status.custom-mail.class") }} modal-toggler c-poi
</div>
</div>
@endforeach
@if(!empty($followUpEntries))
@foreach($followUpEntries as $followUp)
<div>
<b><u>{{ date(config('constants.display_date_format'), strtotime($followUp->created_at)) }}</u></b><br>
<span>Followed up by
<img src="{{ $followUp->conductedBy->avatar }}"
class="w-20 h-20 rounded-circle mr-0.5" data-toggle="tooltip"
title="{{ $followUp->conductedBy->name }}">
</span><br>
<span data-toggle="modal" data-target="#followUp{{ $followUp->id }}" class="badge badge-success text-white p-1 modal-toggler-text text-primary c-pointer fz-12">View mail</span><br></br>
@include('hr::follow-up.modal')
</div>
@endforeach
@endif
</div>
Loading