Fix the user-manage-organisations modal (column name & search)
This commit is contained in:
@@ -143,4 +143,6 @@ return [
|
|||||||
'LEAVE' => 'Leave',
|
'LEAVE' => 'Leave',
|
||||||
|
|
||||||
'ACTION_CANNOT_UNDONE' => 'This action cannot be undone!',
|
'ACTION_CANNOT_UNDONE' => 'This action cannot be undone!',
|
||||||
|
|
||||||
|
'IS_ADMINISTRATOR' => 'Administrator?',
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ class OrganisationSprunje extends Sprunje
|
|||||||
'member_count',
|
'member_count',
|
||||||
'admin_count',
|
'admin_count',
|
||||||
'status',
|
'status',
|
||||||
|
'info',
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $excludeForAll = [
|
||||||
|
'info',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,4 +114,26 @@ class OrganisationSprunje extends Sprunje
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter LIKE name OR description. (for user organisations modal)
|
||||||
|
*
|
||||||
|
* @param Builder $query
|
||||||
|
* @param mixed $value
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
protected function filterInfo($query, $value)
|
||||||
|
{
|
||||||
|
// Split value on separator for OR queries
|
||||||
|
$values = explode($this->orSeparator, $value);
|
||||||
|
$query->where(function ($query) use ($values) {
|
||||||
|
foreach ($values as $value) {
|
||||||
|
$query->orLike('name', $value)
|
||||||
|
->orLike('description', $value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>{{translate("NAME")}}</th>
|
<th>{{translate("NAME")}}</th>
|
||||||
<th>{{translate("DESCRIPTION")}}</th>
|
<th>{{translate("DESCRIPTION")}}</th>
|
||||||
|
<th>{{translate("IS_ADMINISTRATOR")}}</th>
|
||||||
<th>{{translate("REMOVE")}}</th>
|
<th>{{translate("REMOVE")}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
Reference in New Issue
Block a user