chg: [organisation:index] Added quickfilter showing all orgs having the same nationality as logged user.org

pull/121/head
Sami Mokaddem 2022-11-15 11:41:30 +01:00
parent 31750da7c9
commit ae8ecf3955
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 10 additions and 0 deletions

View File

@ -56,6 +56,16 @@ class OrganisationsController extends AppController
// ], // ],
]; ];
$loggedUserOrganisationNationality = $this->ACL->getUser()['organisation']['nationality'];
if (!empty($loggedUserOrganisationNationality)) {
$customContextFilters[] = [
'label' => __('Country: {0}', $loggedUserOrganisationNationality),
'filterCondition' => [
'nationality' => $loggedUserOrganisationNationality,
]
];
}
$this->CRUD->index([ $this->CRUD->index([
'filters' => $this->filterFields, 'filters' => $this->filterFields,
'quickFilters' => $this->quickFilterFields, 'quickFilters' => $this->quickFilterFields,