Bug candidatures (sF v1 et web app)

This commit is contained in:
2021-03-10 14:12:46 +01:00
parent c0e25f5d10
commit a5636bf2b5
2 changed files with 9 additions and 9 deletions
@@ -681,15 +681,13 @@ class AnswerController extends Controller
// But if that werent't the case, its value should have been tested
// before assigning it to $responseTemp
if($answer->getCompany()){
if($answer->getAd()){
$responseTemp = $answer->getAd()->getTitle();
}else{
$responseTemp = "Candidature spontanée";
}
}else{
$responseTemp = "ND";
}
break;
}
@@ -190,11 +190,13 @@ class AnswerRepository extends AbstractRepository
->join('a.user', 'user')
->leftjoin('a.ad', 'ad')
->leftjoin('a.video', 'video')
->leftjoin('a.company', 'c')
->leftjoin('ad.company', 'company');
$countQuery
->join('a.user', 'user')
->leftjoin('a.ad', 'ad')
->leftjoin('a.video', 'video')
->leftjoin('a.company', 'c')
->leftjoin('ad.company', 'company');
// $countQuery
// ->join('town.department', 'department')
@@ -205,8 +207,8 @@ class AnswerRepository extends AbstractRepository
{
// No
// However, add a "always true" condition to keep an uniform treatment in all cases
$query->where("company.id=".$otherConditions);
$countQuery->where("company.id=".$otherConditions);
$query->where("(company.id=".$otherConditions." OR c.id=".$otherConditions.")");
$countQuery->where("(company.id=".$otherConditions." OR c.id=".$otherConditions.")");
$query->andWhere("a.status='SENDED'");
$countQuery->andWhere("a.status='SENDED'");
}else{