From 802e0e602b66164ef63d3a1e8e596b3fc126e713 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 6 Jan 2023 11:43:23 +0100 Subject: [PATCH] Experiment table - fix view moda for assigned users [SCI-7693] --- app/assets/javascripts/experiments/table.js | 3 +- .../experiments/table_view_service.rb | 3 +- .../experiments/_assigned_users.html.erb | 54 ++++++++++--------- config/locales/en.yml | 1 + 4 files changed, 34 insertions(+), 27 deletions(-) diff --git a/app/assets/javascripts/experiments/table.js b/app/assets/javascripts/experiments/table.js index 67585495a..603625ced 100644 --- a/app/assets/javascripts/experiments/table.js +++ b/app/assets/javascripts/experiments/table.js @@ -227,11 +227,12 @@ var ExperimnetTable = { $(this.table).on('show.bs.dropdown', '.assign-users-dropdown', (e) => { let usersList = $(e.target).find('.users-list'); let isArchivedView = $('#experimentTable').hasClass('archived'); + let viewOnly = $(e.target).data('view-only'); let checkbox = ''; usersList.find('.user-container').remove(); $.get(usersList.data('list-url'), (result) => { $.each(result, (_i, user) => { - if (!isArchivedView) { + if (!isArchivedView && !viewOnly) { checkbox = `
-