Skip to content

Commit afb7f83

Browse files
committed
Sorting the FI items by reason title
1 parent c70c8fe commit afb7f83

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

app/view_objects/teacher_interface/further_information_request_view_object.rb

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -88,23 +88,26 @@ def items_by_assessment_section
8888
end
8989

9090
def task_list_items(items)
91-
items.map do |item|
92-
{
93-
title: item_name(item),
94-
description: item_description(item),
95-
value_title: item_value_title(item),
96-
value: item_value(item),
97-
assessor_note: item.failure_reason_assessor_feedback,
98-
href: [
99-
:edit,
100-
:teacher_interface,
101-
:application_form,
102-
further_information_request,
103-
item,
104-
],
105-
status: item.status,
106-
}
107-
end
91+
list_items =
92+
items.map do |item|
93+
{
94+
title: item_name(item),
95+
description: item_description(item),
96+
value_title: item_value_title(item),
97+
value: item_value(item),
98+
assessor_note: item.failure_reason_assessor_feedback,
99+
href: [
100+
:edit,
101+
:teacher_interface,
102+
:application_form,
103+
further_information_request,
104+
item,
105+
],
106+
status: item.status,
107+
}
108+
end
109+
110+
list_items.sort_by { |item| item[:title] }
108111
end
109112

110113
def item_value_title(item)

spec/system/teacher_interface/further_information_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def text_task_list_item
298298
def text_check_answers_item
299299
teacher_check_further_information_request_answers_page
300300
.summary_lists
301-
.second
301+
.first
302302
.rows
303303
.first
304304
end
@@ -318,7 +318,7 @@ def document_task_list_item
318318
def document_check_answers_item
319319
teacher_check_further_information_request_answers_page
320320
.summary_lists
321-
.first
321+
.third
322322
.rows
323323
.first
324324
end

0 commit comments

Comments
 (0)