diff --git a/eq-author/README.md b/eq-author/README.md index 42be767c9e..0d097e75b5 100644 --- a/eq-author/README.md +++ b/eq-author/README.md @@ -112,3 +112,4 @@ theme colours and action names. `yarn storybook` Start the local server. `yarn build-storybook -o ../docs` deploy updates to static site (run from eq-author folder). + diff --git a/eq-author/src/App/page/Logic/Routing/DestinationSelector/RoutingDestinationContentPicker.js b/eq-author/src/App/page/Logic/Routing/DestinationSelector/RoutingDestinationContentPicker.js index 20725ec0ae..9c875d42c6 100644 --- a/eq-author/src/App/page/Logic/Routing/DestinationSelector/RoutingDestinationContentPicker.js +++ b/eq-author/src/App/page/Logic/Routing/DestinationSelector/RoutingDestinationContentPicker.js @@ -1,6 +1,6 @@ import React, { useState, useMemo } from "react"; import PropTypes from "prop-types"; -import { takeRightWhile } from "lodash"; +import { takeRightWhile, reject } from "lodash"; import { ContentSelectButton, @@ -42,12 +42,19 @@ export const generateAvailableRoutingDestinations = ( const currentSectionPages = currentSection.folders.flatMap( ({ pages }) => pages ); - const routablePages = takeRightWhile( + let routablePages = takeRightWhile( currentSectionPages, ({ id }) => id !== pageId ); routablePages.forEach((page) => (page.section = currentSection)); + routablePages = reject(routablePages, { + pageType: "ListCollectorAddItemPage", + }); + routablePages = reject(routablePages, { + pageType: "ListCollectorConfirmationPage", + }); + return { pages: routablePages || [], }; diff --git a/eq-author/src/App/page/Logic/Routing/DestinationSelector/index.js b/eq-author/src/App/page/Logic/Routing/DestinationSelector/index.js index ee82b32767..89b8348708 100644 --- a/eq-author/src/App/page/Logic/Routing/DestinationSelector/index.js +++ b/eq-author/src/App/page/Logic/Routing/DestinationSelector/index.js @@ -16,7 +16,7 @@ const DESTINATION_TYPE = { Section: "Section", QuestionPage: "QuestionPage", CalculatedSummaryPage: "CalculatedSummaryPage", - ListCollectorPage: "ListCollectorPage", + ListCollectorPage: "ListCollectorQualifierPage", }; const RoutingRuleResult = styled.div`