Removed unnecessary condition

This commit is contained in:
Alex Tselegidis 2020-12-15 10:49:16 +02:00
parent cf7bad9f19
commit 78ab4ac3d2

View file

@ -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);