Skip to content

Commit

Permalink
No calendars are being displayed in the calendar table view while bei…
Browse files Browse the repository at this point in the history
…ng logged in as a secretary (#1418)
  • Loading branch information
alextselegidis committed Dec 12, 2023
1 parent e6b3ffd commit 65aacce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions application/models/Providers_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ public function get_available_providers(bool $without_private = false): array
->result_array();

foreach ($providers as &$provider) {
$this->cast($provider);

$provider['settings'] = $this->db->get_where('user_settings', ['id_users' => $provider['id']])->row_array();

unset(
Expand Down
2 changes: 1 addition & 1 deletion assets/js/utils/calendar_table_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')))
);
Expand Down

0 comments on commit 65aacce

Please sign in to comment.