Skip to content

Commit

Permalink
N'affiche le filtre par parc que si nécessaire (+ petites améliorations)
Browse files Browse the repository at this point in the history
  • Loading branch information
polosson committed Feb 24, 2021
1 parent ed2a3c1 commit f91ffc6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div class="MaterialsFilters">
<select
v-if="parks.length > 1"
v-model="filters.park"
class="MaterialsFilters__park"
@change="changePark"
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Materials/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
},
methods: {
getParkName(parkId) {
return store.getters['parks/parkName'](parkId);
return store.getters['parks/parkName'](parkId) || '--';
},

getCategoryName(categoryId) {
Expand Down
1 change: 1 addition & 0 deletions server/src/App/Models/Park.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Park extends BaseModel
{
use SoftDeletes;

protected $orderField = 'name';
protected $searchField = 'name';

public function __construct(array $attributes = [])
Expand Down

0 comments on commit f91ffc6

Please sign in to comment.