File tree Expand file tree Collapse file tree 4 files changed +27
-29
lines changed
views/immunisation_imports Expand file tree Collapse file tree 4 files changed +27
-29
lines changed Original file line number Diff line number Diff line change @@ -44,23 +44,6 @@ def create
44
44
return
45
45
end
46
46
47
- flash [
48
- :success
49
- ] = "#{ @immunisation_import . new_record_count } vaccinations uploaded"
50
-
51
- # TODO: Move to "Check and confirm" page
52
- if ( duplicate_count = @immunisation_import . exact_duplicate_record_count ) > 1
53
- flash [
54
- :info
55
- ] = "#{ duplicate_count } previously uploaded records were omitted"
56
- end
57
-
58
- if ( ignored_count = @immunisation_import . not_administered_record_count ) > 1
59
- flash [
60
- :info
61
- ] = "#{ ignored_count } records for children who were not vaccinated were omitted"
62
- end
63
-
64
47
redirect_to edit_campaign_immunisation_import_path (
65
48
@campaign ,
66
49
@immunisation_import
Original file line number Diff line number Diff line change 10
10
<span class ="nhsuk-caption-l "> <%= @campaign . name %> </ span >
11
11
<%= h1 title , page_title : "#{ @campaign . name } – #{ title } " %>
12
12
13
+ <% if @immunisation_import . exact_duplicate_record_count > 1 || @immunisation_import . not_administered_record_count > 1 %>
14
+ < div class ="nhsuk-warning-callout ">
15
+ < h3 class ="nhsuk-warning-callout__label ">
16
+ < span class ="nhsuk-u-visually-hidden "> Important: </ span >
17
+ Uploaded records will differ from the file
18
+ </ h3 >
19
+
20
+ < ul class ="nhsuk-list nhsuk-list--bullet ">
21
+ <% if @immunisation_import . exact_duplicate_record_count > 1 %>
22
+ < li > <%= @immunisation_import . exact_duplicate_record_count %> previously uploaded records were omitted</ li >
23
+ <% end %>
24
+
25
+ <% if @immunisation_import . not_administered_record_count > 1 %>
26
+ < li > <%= @immunisation_import . not_administered_record_count %> records for children who were not vaccinated were omitted</ li >
27
+ <% end %>
28
+ </ ul >
29
+ </ div >
30
+ <% end %>
31
+
13
32
<%= govuk_button_to "Upload records" , campaign_immunisation_import_path (
14
33
@campaign ,
15
34
@immunisation_import
Original file line number Diff line number Diff line change 22
22
and_i_go_back_to_the_upload_page
23
23
24
24
when_i_upload_a_valid_file
25
- then_i_should_see_the_success_banner
25
+ then_i_should_see_the_success_heading
26
26
and_i_should_see_the_vaccination_records
27
27
28
28
when_i_click_on_upload_records
@@ -114,8 +114,8 @@ def when_i_upload_a_valid_file
114
114
click_on "Continue"
115
115
end
116
116
117
- def then_i_should_see_the_success_banner
118
- expect ( page ) . to have_content ( "7 vaccinations uploaded " )
117
+ def then_i_should_see_the_success_heading
118
+ expect ( page ) . to have_content ( "7 new vaccination records " )
119
119
end
120
120
121
121
def and_i_should_see_the_vaccination_records
Original file line number Diff line number Diff line change 191
191
end
192
192
193
193
it "stores statistics on the import" do
194
- expect { process! } . to change (
195
- immunisation_import ,
196
- :exact_duplicate_record_count
197
- ) . to ( 0 ) . and change ( immunisation_import , :new_record_count ) . to (
198
- 7
199
- ) . and change (
200
- immunisation_import ,
201
- :not_administered_record_count
202
- ) . to ( 0 )
194
+ # stree-ignore
195
+ expect { process! }
196
+ . to change ( immunisation_import , :exact_duplicate_record_count ) . to ( 0 )
197
+ . and change ( immunisation_import , :new_record_count ) . to ( 7 )
198
+ . and change ( immunisation_import , :not_administered_record_count ) . to ( 0 )
203
199
end
204
200
205
201
it "ignores and counts duplicate records" do
You can’t perform that action at this time.
0 commit comments