From a4ee676f67b26fec5d744fd8e4d5ea09e94c181c Mon Sep 17 00:00:00 2001 From: sudeep Date: Thu, 30 May 2024 10:58:07 +0100 Subject: [PATCH] refetched get page query Signed-off-by: sudeep --- .../App/QuestionnaireDesignPage/NavigationSidebar/index.js | 4 +++- .../src/App/page/Design/ListCollectorPageEditor/index.js | 3 +++ eq-author/src/App/page/Design/QuestionPageEditor/index.js | 3 +++ eq-author/src/App/page/Design/index.js | 4 ++++ eq-author/src/graphql/movePage.graphql | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/eq-author/src/App/QuestionnaireDesignPage/NavigationSidebar/index.js b/eq-author/src/App/QuestionnaireDesignPage/NavigationSidebar/index.js index f23738fe7e..443438faac 100644 --- a/eq-author/src/App/QuestionnaireDesignPage/NavigationSidebar/index.js +++ b/eq-author/src/App/QuestionnaireDesignPage/NavigationSidebar/index.js @@ -110,7 +110,9 @@ const NavigationSidebar = ({ questionnaire }) => { const [openSections, toggleSections] = useState(true); const [entity, setEntity] = useState({}); // Allows data for entity being dragged by user to be used in other droppables - const [movePage] = useMutation(MOVE_PAGE_MUTATION); + const [movePage] = useMutation(MOVE_PAGE_MUTATION, { + refetchQueries: ["GetPage"], + }); const [moveFolder] = useMutation(MOVE_FOLDER_MUTATION); const [moveSection] = useMutation(MOVE_SECTION_MUTATION); diff --git a/eq-author/src/App/page/Design/ListCollectorPageEditor/index.js b/eq-author/src/App/page/Design/ListCollectorPageEditor/index.js index cc6f0b8517..02269d5968 100644 --- a/eq-author/src/App/page/Design/ListCollectorPageEditor/index.js +++ b/eq-author/src/App/page/Design/ListCollectorPageEditor/index.js @@ -782,6 +782,9 @@ UnwrappedListCollectorPageEditor.fragments = { folder { id position + ... on ListCollectorFolder { + listId + } } section { id diff --git a/eq-author/src/App/page/Design/QuestionPageEditor/index.js b/eq-author/src/App/page/Design/QuestionPageEditor/index.js index 2b95e35d54..6445575678 100644 --- a/eq-author/src/App/page/Design/QuestionPageEditor/index.js +++ b/eq-author/src/App/page/Design/QuestionPageEditor/index.js @@ -239,6 +239,9 @@ UnwrappedQuestionPageEditor.fragments = { folder { id position + ... on ListCollectorFolder { + listId + } } section { id diff --git a/eq-author/src/App/page/Design/index.js b/eq-author/src/App/page/Design/index.js index bb7a561239..094091a084 100644 --- a/eq-author/src/App/page/Design/index.js +++ b/eq-author/src/App/page/Design/index.js @@ -63,6 +63,10 @@ export const PAGE_QUERY = gql` listId } } + section { + id + repeatingSectionListId + } } } ${CalculatedSummaryPageEditor.fragments.CalculatedSummaryPage} diff --git a/eq-author/src/graphql/movePage.graphql b/eq-author/src/graphql/movePage.graphql index d5b38de94a..f8f02b160a 100644 --- a/eq-author/src/graphql/movePage.graphql +++ b/eq-author/src/graphql/movePage.graphql @@ -49,6 +49,10 @@ mutation MovePage($input: MovePageInput!) { listId } } + section { + id + repeatingSectionListId + } ... on QuestionPage { answers { ...Answer