mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-03 19:24:48 +08:00
SCI-3649 All reagent data from step are not imported (#1881)
SCI-3649 All reagent data from step are not imported
This commit is contained in:
commit
721bb9ab77
4 changed files with 25 additions and 11 deletions
|
@ -115,10 +115,11 @@ module ProtocolImporters
|
|||
{
|
||||
type: 'reagent',
|
||||
name: desc_component[:source][:name],
|
||||
mol_weight: desc_component[:source][:mol_weight],
|
||||
details: {
|
||||
catalog_number: desc_component[:source][:sku],
|
||||
link: desc_component[:source][:vendor][:link],
|
||||
linear_formula: desc_component[:source][:linfor]
|
||||
linear_formula: desc_component[:source][:linfor],
|
||||
mol_weight: desc_component[:source][:mol_weight]
|
||||
}
|
||||
}
|
||||
when :gotostep
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<p>
|
||||
<%= item[:details]&.any? ? "<b>#{t('protocol_importers.templates.details.title') }</b>" : '' %>
|
||||
<% item[:details]&.each do |k, v| %>
|
||||
<%= "#{k.camelize.to_s}: #{v.to_s}" %>
|
||||
<% if item[:details]&.any? %>
|
||||
<b> <%= t('protocol_importers.templates.details.title')%>: </b>
|
||||
<br />
|
||||
<% item[:details].reject { |_,v| v.blank? }.each do |k, v| %>
|
||||
<%= "#{k.humanize}: #{v.to_s}" %>
|
||||
<br />
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
<p class="step-description-component-reagent"><b><%= t('protocol_importers.templates.reagent.title') %></b><br/>
|
||||
<p class="step-description-component-reagent">
|
||||
<b><%= t('protocol_importers.templates.reagent.title') %></b>
|
||||
<br/>
|
||||
<%= "#{t('protocol_importers.templates.reagent.name')}: #{item[:name]}" %>
|
||||
<%= "#{t('protocol_importers.templates.reagent.mol_weight')}: #{item[:mol_weight]}" %>
|
||||
<%= "#{t('protocol_importers.templates.reagent.link')}: <a href='#{item[:source]}'>#{item[:source]}</a>" if item[:source] %>
|
||||
<% if item[:source] %>
|
||||
<%= t('protocol_importers.templates.reagent.link') %>:
|
||||
<%= "<a href='#{item[:source]}'>#{item[:source]}</a>" %>
|
||||
<% end -%>
|
||||
</p>
|
||||
<%= render partial: 'protocol_importers/templates/details', locals: { item: item } %>
|
||||
<%= render(
|
||||
partial: 'protocol_importers/templates/details',
|
||||
locals: { item: item }
|
||||
)
|
||||
%>
|
||||
|
||||
|
|
|
@ -72,10 +72,11 @@
|
|||
{
|
||||
"type": "reagent",
|
||||
"name": "2 mg Gastrin I, human",
|
||||
"mol_weight": 0.1,
|
||||
"details": {
|
||||
"catalog_number": "",
|
||||
"link": "https://www.biorbyt.com/gastrin-i-human-orb321073",
|
||||
"linear_formula": "C130H204N38O31S"
|
||||
"linear_formula": "C130H204N38O31S",
|
||||
"mol_weight": 0.1
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue