mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-11 23:54:43 +08:00
Merge pull request #8586 from aignatov-bio/ai-sci-12008-sanity-test-fixes-for-link-results
Sanity test fixes for link results [SCI-12008]
This commit is contained in:
commit
7638a5fe25
4 changed files with 6 additions and 5 deletions
|
@ -83,12 +83,12 @@
|
|||
:data-object-type="step.attributes.type"
|
||||
tabindex="0"
|
||||
></span> <!-- Hidden element to support legacy code -->
|
||||
<button v-if="step.attributes.results.length == 0" class="btn btn-light icon-btn" @click="this.openLinkResultsModal = true">
|
||||
<button v-if="step.attributes.results.length == 0" :title="i18n.t('protocols.steps.link_results')" class="btn btn-light icon-btn" @click="this.openLinkResultsModal = true">
|
||||
<i class="sn-icon sn-icon-results"></i>
|
||||
</button>
|
||||
<GeneralDropdown v-else ref="linkedResultsDropdown" position="right">
|
||||
<template v-slot:field>
|
||||
<button class="btn btn-light icon-btn">
|
||||
<button class="btn btn-light icon-btn" :title="i18n.t('protocols.steps.link_results')">
|
||||
<i class="sn-icon sn-icon-results"></i>
|
||||
<span class="absolute top-1 right-1 h-4 min-w-4 bg-sn-science-blue text-white flex items-center justify-center rounded-full text-[10px]">
|
||||
{{ step.attributes.results.length }}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<GeneralDropdown v-else ref="linkedStepsDropdown" position="right">
|
||||
<template v-slot:field>
|
||||
<button class="btn btn-light icon-btn">
|
||||
{{ i18n.t('my_modules.results.link_to_step') }}
|
||||
<i class="sn-icon sn-icon-steps"></i>
|
||||
<span class="absolute top-1 -right-1 h-4 min-w-4 bg-sn-science-blue text-white flex items-center justify-center rounded-full text-[10px]">
|
||||
{{ result.attributes.steps.length }}
|
||||
</span>
|
||||
|
|
|
@ -225,7 +225,7 @@ export default {
|
|||
if (this.newValue.length === 0) {
|
||||
return false;
|
||||
}
|
||||
if (this.newValue.length === 1) {
|
||||
if (this.newValue.length === 1 && this.rawOptions.length > 1) {
|
||||
this.selectAllState = 'indeterminate';
|
||||
return this.renderLabel(this.rawOptions.find((option) => option[0] === this.newValue[0]));
|
||||
}
|
||||
|
|
|
@ -1647,7 +1647,7 @@ en:
|
|||
modals:
|
||||
link_steps:
|
||||
title: 'Link result to protocol steps'
|
||||
description: 'You can link result to multipple steps'
|
||||
description: 'You can link a result to multiple steps.'
|
||||
empty_description: 'No step found. Add a step first to enable linking with a result.'
|
||||
steps_label: 'Protocol steps'
|
||||
placeholder: 'Select steps'
|
||||
|
@ -4054,6 +4054,7 @@ en:
|
|||
timestamp: "Created on %{date} by %{user}"
|
||||
timestamp_iso_html: "Created on <span class='iso-formatted-date'>%{date}</span> by %{user}"
|
||||
manage_links: "Manage links"
|
||||
link_results: "Link results to this step"
|
||||
status:
|
||||
complete: "Mark as done"
|
||||
uncomplete: "Unmark as done"
|
||||
|
|
Loading…
Add table
Reference in a new issue