Update repository card view for stock [SCI-6685] (#3982)

Co-authored-by: Anton <anton@scinote.net>
This commit is contained in:
aignatov-bio 2022-04-01 13:59:44 +02:00 committed by GitHub
parent da6188df94
commit b6e34266f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 8 deletions

View file

@ -34,14 +34,20 @@
</span>
<% @repository_row.repository_cells.each do |repository_cell| %>
<br>
<span>
<%= t 'repository_row.modal_info.column_name', cf: repository_cell.repository_column.name %>
<% if repository_cell.value_type == 'RepositoryAssetValue' %>
<%= render partial: 'assets/asset_link', locals: { asset: repository_cell.value.asset, display_image_tag: false }, formats: :html %>
<% else %>
<%= custom_auto_link(repository_cell.value.formatted, simple_format: false, team: current_team) %>
<% end %>
</span>
<% if repository_cell.value_type == 'RepositoryStockValue' %>
<span><%= t('repository_row.modal_info.amount', value: repository_cell.value.formatted_value ) %></span>
<br>
<span><%= t('repository_row.modal_info.unit', unit: repository_cell.value.repository_stock_unit_item&.data ) %></span>
<% else %>
<span>
<%= t 'repository_row.modal_info.column_name', cf: repository_cell.repository_column.name %>
<% if repository_cell.value_type == 'RepositoryAssetValue' %>
<%= render partial: 'assets/asset_link', locals: { asset: repository_cell.value.asset, display_image_tag: false }, formats: :html %>
<% else %>
<%= custom_auto_link(repository_cell.value.formatted, simple_format: false, team: current_team) %>
<% end %>
</span>
<% end %>
<% end %>
</p>
</div>

View file

@ -1867,6 +1867,8 @@ en:
title: "This item is assigned to %{nr} tasks."
private_tasks: "%{nr} task(s) are private and will not be displayed."
no_tasks: "This item in not assigned to any task."
amount: "Amount: %{value}"
unit: "Unit: %{unit}"
modal_print_label:
head_title: "Print label - %{repository_row}"
head_title_multiple: "Print label - %{repository_rows} rows"