<div class="select-user-container" data-e2e="e2e-IF-task-details-designatedUsers">
  <%= select_tag 'user_my_modules',
                 options_for_select(my_module.user_my_modules.map{ |um|
                   user = um.user
                   [
                     user.full_name,
                     user.id,
                     {'data-params' => {avatar_url: avatar_path(user, :icon_small), user_module_id: um.id }.to_json}
                   ]
                 }),
                 {
                   id: 'module-assigned-users-selector',
                   'data-module-id': my_module.id,
                   'data-project-id': my_module.experiment.project_id,
                   'data-placeholder': t('my_modules.details.no_assigned_users'),
                   'data-users-create-url': my_module_user_my_modules_path(my_module_id: my_module.id),
                   'data-ajax-url': search_my_module_user_my_module_path(my_module, skip_assigned: true),
                   'data-update-module-users-url': my_module_user_my_modules_url(my_module),
                   'data-view-mode': !can_manage_my_module_designated_users?(my_module)
                 } %>
</div>

<%= javascript_include_tag 'my_modules/assigned_users' %>
