Skip to content

Commit 070be03

Browse files
Show import details even if no records were created
This shows the new "Import summary details" for national reporting users, even if no records were created from the upload. This information is still useful to users; it allows them to diagnose what might have gone wrong with their upload. Jira-Issue: MAV-3374
1 parent 05b953b commit 070be03

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/components/app_import_summary_component.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
<% end %>
4949
<% end %>
5050

51-
<% if import.records_count && import.records_count.positive? %>
51+
<% if import.records_count && import.status == "processed" %>
5252
<% if import.is_a?(ImmunisationImport) && import.type == "national_reporting" %>
5353
<%= summary_list.with_row do |row| %>
5454
<%= row.with_key { "Import summary" } %>
5555
<%= row.with_value { render AppImportStatisticsComponent.new(import: import) } %>
5656
<% end %>
57-
<% else %>
57+
<% elsif import.records_count.positive? %>
5858
<%= summary_list.with_row do |row| %>
5959
<%= row.with_key { "Records" } %>
6060
<%= row.with_value { import.records_count.to_s } %>

0 commit comments

Comments
 (0)