Skip to content

Commit

Permalink
fix: fix mixed content error on recruitment process (#1475)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaiss authored May 5, 2022
1 parent f2ad839 commit 759d0a5
Show file tree
Hide file tree
Showing 6 changed files with 247 additions and 228 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public function index(): Response
{
$company = InstanceHelper::getLoggedCompany();

$templates = AdminRecruitmentViewHelper::index($company);
$data = AdminRecruitmentViewHelper::index($company);

return Inertia::render('Adminland/Recruitment/Index', [
'notifications' => NotificationHelper::getNotifications(InstanceHelper::getLoggedEmployee()),
'templates' => $templates,
'data' => $data,
]);
}

Expand Down
14 changes: 10 additions & 4 deletions app/Http/ViewHelpers/Adminland/AdminRecruitmentViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Http\ViewHelpers\Adminland;

use App\Models\Company\Company;
use Illuminate\Support\Collection;
use App\Models\Company\RecruitingStageTemplate;

class AdminRecruitmentViewHelper
Expand All @@ -12,9 +11,9 @@ class AdminRecruitmentViewHelper
* Get all the recruiting stage templates in the company.
*
* @param Company $company
* @return Collection
* @return array
*/
public static function index(Company $company): ?Collection
public static function index(Company $company): ?array
{
$templates = $company->recruitingStageTemplates()
->with('stages')
Expand Down Expand Up @@ -44,7 +43,14 @@ public static function index(Company $company): ?Collection
]);
}

return $templatesCollection;
return [
'templates' => $templatesCollection,
'url' => [
'store' => route('recruitment.store', [
'company' => $company,
]),
],
];
}

/**
Expand Down
Loading

0 comments on commit 759d0a5

Please sign in to comment.