From a264c793fd4c907b83c8fdab9cf8e08d6ca9400b Mon Sep 17 00:00:00 2001 From: hazeltonbw Date: Tue, 18 Jun 2024 22:15:03 -0700 Subject: [PATCH 1/3] Added restart session button for when user is stuck in an error state --- .../app/components/router/ErrorComponent.tsx | 14 ++++++++++++++ src/client/app/translations/data.ts | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/client/app/components/router/ErrorComponent.tsx b/src/client/app/components/router/ErrorComponent.tsx index a95176c78..40107ce35 100644 --- a/src/client/app/components/router/ErrorComponent.tsx +++ b/src/client/app/components/router/ErrorComponent.tsx @@ -11,8 +11,13 @@ import translate from '../../utils/translate'; /** * @returns A error page that then returns to main dashboard page. */ + export default function ErrorComponent() { const nav = useNavigate(); + const refreshPage = () => { + nav('/'); + window.location.reload(); + }; return ( {/* Pass div as child prop to AppLayout */} @@ -31,6 +36,15 @@ export default function ErrorComponent() { > {translate('return.dashboard')} +

+ {translate('page.user.refresh.directions')} +

+
diff --git a/src/client/app/translations/data.ts b/src/client/app/translations/data.ts index 0b21ce823..ab914ea0d 100644 --- a/src/client/app/translations/data.ts +++ b/src/client/app/translations/data.ts @@ -380,6 +380,8 @@ const LocaleTranslationData = { "options": "Options", "page.choice.login": "Page choices & login", "page.choice.logout": "Page choices & logout", + "page.user.refresh.directions": "If clicking the 'Return to Dashboard button does not work then please click the button below to restart your OED session", + "page.restart.button": "Restart OED session", "password": "Password", "password.confirm": "Confirm password", "per.day": "Per Day", From a4e7ff516cd677dd937fa57a4772c04fd44b6c45 Mon Sep 17 00:00:00 2001 From: hazeltonbw Date: Wed, 24 Jul 2024 15:26:21 -0700 Subject: [PATCH 2/3] Added restart session button and translations --- src/client/app/translations/data.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/app/translations/data.ts b/src/client/app/translations/data.ts index ab914ea0d..d21ed983d 100644 --- a/src/client/app/translations/data.ts +++ b/src/client/app/translations/data.ts @@ -878,6 +878,8 @@ const LocaleTranslationData = { "options": "Options", "page.choice.login": "Page choices & login\u{26A1}", "page.choice.logout": "Page choices & logout\u{26A1}", + "page.user.refresh.directions": "If clicking the 'Return to Dashboard button does not work then please click the button below to restart your OED session\u{26A1}", + "page.restart.button": "Restart OED session\u{26A1}", "password": "Mot de passe", "password.confirm": "Confirm password\u{26A1}", "per.day": "Per Day\u{26A1}", @@ -1374,6 +1376,8 @@ const LocaleTranslationData = { "options": "Opciones", "page.choice.login": "Selección de página y inicio de sesión", "page.choice.logout": "Selección de página y fin de sesión", + "page.user.refresh.directions": "If clicking the 'Return to Dashboard button does not work then please click the button below to restart your OED session\u{26A1}", + "page.restart.button": "Restart OED session\u{26A1}", "password": "Contraseña", "password.confirm": "Confirmar contraseña", "per.day": "Por día", From 0b31cff11c78e71f50226508df1188ddbe3b9e7b Mon Sep 17 00:00:00 2001 From: hazeltonbw Date: Wed, 31 Jul 2024 01:50:34 -0700 Subject: [PATCH 3/3] Fix requested changes --- src/client/app/components/router/ErrorComponent.tsx | 1 - src/client/app/translations/data.ts | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client/app/components/router/ErrorComponent.tsx b/src/client/app/components/router/ErrorComponent.tsx index 40107ce35..bc58cbcee 100644 --- a/src/client/app/components/router/ErrorComponent.tsx +++ b/src/client/app/components/router/ErrorComponent.tsx @@ -11,7 +11,6 @@ import translate from '../../utils/translate'; /** * @returns A error page that then returns to main dashboard page. */ - export default function ErrorComponent() { const nav = useNavigate(); const refreshPage = () => { diff --git a/src/client/app/translations/data.ts b/src/client/app/translations/data.ts index d21ed983d..a2983be0d 100644 --- a/src/client/app/translations/data.ts +++ b/src/client/app/translations/data.ts @@ -380,8 +380,8 @@ const LocaleTranslationData = { "options": "Options", "page.choice.login": "Page choices & login", "page.choice.logout": "Page choices & logout", - "page.user.refresh.directions": "If clicking the 'Return to Dashboard button does not work then please click the button below to restart your OED session", "page.restart.button": "Restart OED session", + "page.user.refresh.directions": "If clicking the \"Return to Dashboard\" button does not work then please click the button below to restart your OED session\u{26A1}", "password": "Password", "password.confirm": "Confirm password", "per.day": "Per Day", @@ -878,8 +878,8 @@ const LocaleTranslationData = { "options": "Options", "page.choice.login": "Page choices & login\u{26A1}", "page.choice.logout": "Page choices & logout\u{26A1}", - "page.user.refresh.directions": "If clicking the 'Return to Dashboard button does not work then please click the button below to restart your OED session\u{26A1}", "page.restart.button": "Restart OED session\u{26A1}", + "page.user.refresh.directions": "If clicking the \"Return to Dashboard\" button does not work then please click the button below to restart your OED session\u{26A1}", "password": "Mot de passe", "password.confirm": "Confirm password\u{26A1}", "per.day": "Per Day\u{26A1}", @@ -1376,8 +1376,8 @@ const LocaleTranslationData = { "options": "Opciones", "page.choice.login": "Selección de página y inicio de sesión", "page.choice.logout": "Selección de página y fin de sesión", - "page.user.refresh.directions": "If clicking the 'Return to Dashboard button does not work then please click the button below to restart your OED session\u{26A1}", "page.restart.button": "Restart OED session\u{26A1}", + "page.user.refresh.directions": "If clicking the \"Return to Dashboard\" button does not work then please click the button below to restart your OED session\u{26A1}", "password": "Contraseña", "password.confirm": "Confirmar contraseña", "per.day": "Por día",