From 1fe39a216ca8a4622054e32a25dfe13690f62549 Mon Sep 17 00:00:00 2001 From: ajugo Date: Tue, 10 Jan 2023 11:09:23 +0100 Subject: [PATCH] Fix tag display in experiment table for viewer role [SCI-7696] (#4781) --- app/assets/javascripts/experiments/table.js | 5 +++++ app/services/experiments/table_view_service.rb | 1 + 2 files changed, 6 insertions(+) diff --git a/app/assets/javascripts/experiments/table.js b/app/assets/javascripts/experiments/table.js index 3c5a6d7ec..afb17e223 100644 --- a/app/assets/javascripts/experiments/table.js +++ b/app/assets/javascripts/experiments/table.js @@ -632,6 +632,11 @@ ExperimnetTable.render.assigned = function(data) { ExperimnetTable.render.tags = function(data) { const value = parseInt(data.tags, 10) === 0 ? I18n.t('experiments.table.add_tag') : data.tags; + + if (data.tags === 0 && !data.can_create) { + return `${I18n.t('experiments.table.not_set')}`; + } + return `