Skip to content

Commit

Permalink
💚 Fix the CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush8923 committed Sep 13, 2023
1 parent a168371 commit 528fe5c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function saveOfferLetter(Application $application)
$pdf = Pdf::loadView('hr.application.draft-joining-letter', compact('applicant', 'job', 'offer_letter_body'));
$fileName = FileHelper::getOfferLetterFileName($applicant, $pdf);
$directory = 'app/public/' . config('constants.hr.offer-letters-dir');
if (!is_dir(storage_path($directory)) && !file_exists(storage_path($directory))) {
if (! is_dir(storage_path($directory)) && ! file_exists(storage_path($directory))) {
mkdir(storage_path($directory), 0, true);
}
$fullPath = storage_path($directory . '/' . $fileName);
Expand Down Expand Up @@ -219,7 +219,7 @@ public function sendApplicationMail(CustomApplicationMailRequest $mailRequest, A

public function viewOfferLetter(Application $application)
{
if (!Storage::exists($application->offer_letter)) {
if (! Storage::exists($application->offer_letter)) {
return false;
}

Expand Down
51 changes: 25 additions & 26 deletions Modules/HR/Services/ApplicationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@
use Carbon\Carbon;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;
use Modules\HR\Contracts\ApplicationServiceContract;
use Modules\HR\Entities\Applicant;
use Modules\HR\Entities\ApplicantMeta;
use Modules\HR\Entities\Application;
use Modules\HR\Entities\Job;
use Modules\HR\Entities\Round;
use Modules\HR\Entities\University;
use Modules\HR\Events\CustomMailTriggeredForApplication;
use Modules\User\Entities\User;
use Illuminate\Support\Str;
use Modules\HR\Entities\University;
use Modules\HR\Entities\Round;
use Modules\HR\Entities\ApplicantMeta;

class ApplicationService implements ApplicationServiceContract
{


public function index($applicationType)
{

Expand Down Expand Up @@ -53,19 +52,19 @@ public function index($applicationType)

$loggedInUserId = auth()->id();
$applications = Application::select('hr_applications.*')
->join('hr_application_round', function ($join) {
$join->on('hr_application_round.hr_application_id', '=', 'hr_applications.id')
->where('hr_application_round.is_latest', true);
})
->with(['applicant', 'job', 'tags', 'latestApplicationRound'])
->whereHas('latestApplicationRound')
->applyFilter($filters)
->orderByRaw("FIELD(hr_application_round.scheduled_person_id, {$loggedInUserId} ) DESC")
->orderByRaw('ISNULL(hr_application_round.scheduled_date) ASC')
->orderByRaw('hr_application_round.scheduled_date ASC')
->latest()
->paginate(config('constants.pagination_size'))
->appends(request()->except('page'));
->join('hr_application_round', function ($join) {
$join->on('hr_application_round.hr_application_id', '=', 'hr_applications.id')
->where('hr_application_round.is_latest', true);
})
->with(['applicant', 'job', 'tags', 'latestApplicationRound'])
->whereHas('latestApplicationRound')
->applyFilter($filters)
->orderByRaw("FIELD(hr_application_round.scheduled_person_id, {$loggedInUserId} ) DESC")
->orderByRaw('ISNULL(hr_application_round.scheduled_date) ASC')
->orderByRaw('hr_application_round.scheduled_date ASC')
->latest()
->paginate(config('constants.pagination_size'))
->appends(request()->except('page'));
$countFilters = array_except($filters, ['status', 'round']);
$attr = [
'applications' => $applications,
Expand Down Expand Up @@ -177,15 +176,15 @@ public function addSubscriberToCampaigns($parameters, $subscriptionLists)

Http::withHeaders([
'Accept' => 'application/json',
'Content-Type'=>'application/json',
'Content-Type' => 'application/json',
])
->withToken($token)
->post($url, [
'name' => $name,
'email' => $parameters['email'],
'phone' => $parameters['phone'],
'subscription_lists' => $subscriptionLists,
]);
->withToken($token)
->post($url, [
'name' => $name,
'email' => $parameters['email'],
'phone' => $parameters['phone'],
'subscription_lists' => $subscriptionLists,
]);
}

public function getToken()
Expand Down

0 comments on commit 528fe5c

Please sign in to comment.