From 92b302b5822b73adb89a962b2ef1a192cbfad1f8 Mon Sep 17 00:00:00 2001 From: eirikhaugstulen Date: Thu, 10 Oct 2024 16:29:57 +0200 Subject: [PATCH] fix: allow navigate back despite displayFrontPageList --- i18n/en.pot | 7 +++++-- .../components/Pages/MainPage/MainPage.container.js | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index d299bcedcf..4d7bef69b6 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-09-02T11:08:16.281Z\n" -"PO-Revision-Date: 2024-09-02T11:08:16.281Z\n" +"POT-Creation-Date: 2024-10-10T14:29:59.249Z\n" +"PO-Revision-Date: 2024-10-10T14:29:59.249Z\n" msgid "Choose one or more dates..." msgstr "Choose one or more dates..." @@ -1119,6 +1119,9 @@ msgstr "Create new event" msgid "Search for a {{trackedEntityName}} in {{programName}}" msgstr "Search for a {{trackedEntityName}} in {{programName}}" +msgid "Back to list" +msgstr "Back to list" + msgid "No tracked entity types available" msgstr "No tracked entity types available" diff --git a/src/core_modules/capture-core/components/Pages/MainPage/MainPage.container.js b/src/core_modules/capture-core/components/Pages/MainPage/MainPage.container.js index 8fcad393d9..e937fe7640 100644 --- a/src/core_modules/capture-core/components/Pages/MainPage/MainPage.container.js +++ b/src/core_modules/capture-core/components/Pages/MainPage/MainPage.container.js @@ -139,7 +139,7 @@ const MainPageContainer = () => { }, [showAllAccessible, dispatch]); useEffect(() => { - if (programId && trackedEntityTypeId && displayFrontPageList && selectedTemplateId === undefined) { + if (programId && trackedEntityTypeId && selectedTemplateId === undefined) { if (reduxSelectedTemplateId && workingListProgramId === programId) { handleChangeTemplateUrl({ programId, @@ -150,6 +150,7 @@ const MainPageContainer = () => { }); return; } + if (!displayFrontPageList) return; handleChangeTemplateUrl({ programId, orgUnitId,