diff --git a/src/eq_schema/schema/Section/index.js b/src/eq_schema/schema/Section/index.js index 61c14c4f..d7bead77 100644 --- a/src/eq_schema/schema/Section/index.js +++ b/src/eq_schema/schema/Section/index.js @@ -102,6 +102,7 @@ class Section { }); this.summary.items = items; + this.summary.show_non_item_answers = true; } if ("showOnHub" in section) { @@ -151,20 +152,14 @@ class Section { static buildItem(itemId, listCollectorTitle, ctx) { const list = getList(ctx, itemId); - const anchorListItems = list.answers; - const [anchorItem, ...relatedItems] = anchorListItems; - const relatedAnswers = relatedItems.map((answer) => ({ - source: "answers", - identifier: `answer${answer.id}`, - })); + let anchorItem = list.answers[0]; const ListCollectorsSummary = { type: "List", for_list: list.listName, title: processPipe(ctx)(listCollectorTitle), - item_anchor_answer_id: anchorItem.id, + item_anchor_answer_id: `answer${anchorItem.id}`, item_label: anchorItem.label, - related_answers: relatedAnswers, add_link_text: "Add item to this list", empty_list_text: "There are no items", }; diff --git a/src/eq_schema/schema/Section/index.test.js b/src/eq_schema/schema/Section/index.test.js index 7b0a5645..070b6d51 100644 --- a/src/eq_schema/schema/Section/index.test.js +++ b/src/eq_schema/schema/Section/index.test.js @@ -453,22 +453,13 @@ describe("Section", () => { type: "List", for_list: "test3", title: "What is the name of this person?", - item_anchor_answer_id: "cdea9794-6f3c-40c1-9de4-8bbe6e7c54b5", + item_anchor_answer_id: "answercdea9794-6f3c-40c1-9de4-8bbe6e7c54b5", item_label: "

Text 1

", - related_answers: [ - { - source: "answers", - identifier: "answer57bdaf77-7f36-40f1-9994-e91862a95059", - }, - { - source: "answers", - identifier: "answer43ee1461-e363-493f-90cc-d515a205efeb", - }, - ], add_link_text: "Add item to this list", empty_list_text: "There are no items", }, ], + show_non_item_answers: true, }, }); });