Skip to content
Snippets Groups Projects
Commit e1aef88e authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Fixing the edit location in the be module

parent 3abc422b
No related branches found
No related tags found
No related merge requests found
......@@ -92,15 +92,8 @@ class BackendController extends ActionController {
/** @noinspection PhpUndefinedMethodInspection */
/** @var QueryResultInterface $categories */
$companies = $this->companyRepository->findByPid($pageUid);
$locationOptions = [];
$this->view->assign('locationOptions', $companies);
/** @var Company $companies */
/** @var $companies Company[][] */
foreach ($companies as $company) {
$city = $company->getCity();
$locationOptions[$city] = $city;
}
$this->view->assign('locationOptions', $locationOptions);
$this->view->assign('filters', $filters);
$this->view->assign('pageUid', $pageUid);
$this->view->assign('typo3Version', VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version));
......
......@@ -79,7 +79,7 @@ class JobRepository extends Repository {
foreach ($filters['locations'] as $location) {
$statement->andWhere(
$queryBuilder->expr()->eq(
'b.city', $queryBuilder->createNamedParameter($location)
'a.company', $queryBuilder->createNamedParameter($location)
)
);
}
......
......@@ -5,8 +5,7 @@
<label for="filter-locations">
<f:translate key="backend.filters.locations" />
</label>
<f:form.select class="form-control" multiple="1" size="4" property="locations" options="{locationOptions}" id="filter-locations" />
<f:form.select class="form-control" multiple="1" size="4" property="locations" optionLabelField="name" options="{locationOptions}" id="filter-locations" />
<small>
<f:format.raw><f:translate key="backend.filters.locations.description" />
</f:format.raw>
......@@ -16,7 +15,7 @@
</script>
<f:for each="{locationOptions}" key="uid" as="location">
<script>
LocationEditLinks["{uid}"] = "{sg:backend.editLink(table: 'tx_sgjobs_domain_model_location', uid: uid) -> f:format.raw()}";
LocationEditLinks["{uid}"] = "{sg:backend.editLink(table: 'tx_sgjobs_domain_model_company', uid: uid) -> f:format.raw()}";
</script>
</f:for>
<br />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment