No calendars are being displayed in the calendar table view while being logged in as a secretary (#1418)

This commit is contained in:
Alex Tselegidis 2023-12-12 11:58:07 +01:00
parent e6b3ffd66b
commit 65aacce924
2 changed files with 3 additions and 1 deletions

View file

@ -615,6 +615,8 @@ class Providers_model extends EA_Model
->result_array();
foreach ($providers as &$provider) {
$this->cast($provider);
$provider['settings'] = $this->db->get_where('user_settings', ['id_users' => $provider['id']])->row_array();
unset(

View file

@ -403,7 +403,7 @@ App.Utils.CalendarTableView = (function () {
(provider) =>
vars('role_slug') === App.Layouts.Backend.DB_SLUG_ADMIN ||
(vars('role_slug') === App.Layouts.Backend.DB_SLUG_SECRETARY &&
vars('secretary_providers').indexOf(provider.id) !== -1) ||
vars('secretary_providers').indexOf(Number(provider.id)) !== -1) ||
(vars('role_slug') === App.Layouts.Backend.DB_SLUG_PROVIDER &&
Number(provider.id) === Number(vars('user_id')))
);