diff --git a/assets/js/backend_calendar_default_view.js b/assets/js/backend_calendar_default_view.js index 736dbc12..63817f5e 100755 --- a/assets/js/backend_calendar_default_view.js +++ b/assets/js/backend_calendar_default_view.js @@ -1565,12 +1565,10 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; $('#select-filter-item').prop('disabled', true); } - if (GlobalVariables.user.role_slug === Backend.DB_SLUG_SECRETARY) { - $('#select-filter-item optgroup:eq(1)').remove(); - } - if (GlobalVariables.user.role_slug === Backend.DB_SLUG_SECRETARY) { // Remove the providers that are not connected to the secretary. + $('#select-filter-item optgroup:eq(1)').remove(); + $('#select-filter-item option[type="provider"]').each(function (index, option) { var provider = GlobalVariables.secretaryProviders.find(function (secretaryProviderId) { return Number($(option).val()) === Number(secretaryProviderId);