Removed unnecessary condition

This commit is contained in:
Alex Tselegidis 2020-12-15 10:49:16 +02:00
parent cf7bad9f19
commit 78ab4ac3d2
1 changed files with 2 additions and 4 deletions

View File

@ -1565,12 +1565,10 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
$('#select-filter-item').prop('disabled', true); $('#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) { if (GlobalVariables.user.role_slug === Backend.DB_SLUG_SECRETARY) {
// Remove the providers that are not connected to the 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) { $('#select-filter-item option[type="provider"]').each(function (index, option) {
var provider = GlobalVariables.secretaryProviders.find(function (secretaryProviderId) { var provider = GlobalVariables.secretaryProviders.find(function (secretaryProviderId) {
return Number($(option).val()) === Number(secretaryProviderId); return Number($(option).val()) === Number(secretaryProviderId);