Open shaunakwyn opened 4 years ago
[File]
/home/gtalents/public_html/alpha/app/Http/Controllers/VacancyController.php
[Changes]
Add this to include category repository...
{code}
use Vanguard\Repositories\Category\CategoryRepository;
{code}
public function __construct( CategoryRepository $categories ){
$this->categories = $categories;
}
in show_post_user() :
{code}
$userposition = Auth::user()->company[0]->category->name;
$userLevel = $this->categories->findbyname($userposition);
&
return view('dashboard_user.post.post_user',compact('userLevel')) ;
return view('dashboard_user.post.post_supplier',compact('userLevel')) ;
{code}
[File]
/home/gtalents/public_html/alpha/resources/views/dashboard_user/post/post_supplier.blade.php
[Changes]
{code}
Place "$userLevel" instead of "$userCategorie"
{code}
[File]
/home/gtalents/public_html/resources/views/dashboard_user/post/post_user.blade.php
[Changes]
{code}
Place "$userLevel" instead of "$userCategorie"
{code}
[File]
/home/gtalents/public_html/alpha/app/Http/Viewcomposers/VacancyComposer.php
[Changes]
in compose() :
{code}
try{
preg_match_all('/\d{1,3}/' ,$vacancy->range_salary, $matches);
$matches=$matches[0];
$as = ((intval($matches[0]).'000')+(intval($matches[1]).'000'))/2;
if($vacancy->group1==1) {
$factura = ($vacancy->fee * $as) / 100;
$factura = number_format($factura, 2, '.', ',');
} else {
$factura = intval($vacancy->fee);
}
} catch (\Exception $e){
$factura = '';
}
{code}
https://github.com/roberto-robles/gtalents-code/pull/6 this is already merged here, thanks
[File]
[Changes]