improve location: customizeQuery

This commit is contained in:
nobohan 2021-10-25 09:34:05 +02:00
parent c46065d9c5
commit 911e709a74
2 changed files with 1 additions and 5 deletions

View File

@ -9,11 +9,9 @@ class LocationController extends CRUDController
{ {
protected function customizeQuery(string $action, Request $request, $query): void protected function customizeQuery(string $action, Request $request, $query): void
{ {
//$query->where('e.availableforusers', "'TRUE'"); // not working
$query->where('e.availableForUsers = true'); //TODO not working $query->where('e.availableForUsers = true'); //TODO not working
} }
protected function createEntity(string $action, Request $request): object protected function createEntity(string $action, Request $request): object
{ {
$entity = parent::createEntity($action, $request); $entity = parent::createEntity($action, $request);

View File

@ -16,8 +16,7 @@
</thead> </thead>
<tbody> <tbody>
{% for entity in entities %} {% for entity in entities %}
{% if entity.availableForUsers %} <tr>
<tr>
<td>{{ entity.name }}</td> <td>{{ entity.name }}</td>
<td>{{ entity.phonenumber1 }}</td> <td>{{ entity.phonenumber1 }}</td>
<td>{{ entity.phonenumber2 }}</td> <td>{{ entity.phonenumber2 }}</td>
@ -42,7 +41,6 @@
</ul> </ul>
</td> </td>
</tr> </tr>
{% endif %}
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>