From 1b916c0d850cc76f0738ec21a8d4dcf2e7eb0f03 Mon Sep 17 00:00:00 2001 From: Laurent Caouissin Date: Wed, 16 Dec 2020 11:59:24 +0100 Subject: [PATCH 1/8] Update .gitignore --- stromae-logging/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stromae-logging/.gitignore b/stromae-logging/.gitignore index 3f6cdf71..0a262559 100644 --- a/stromae-logging/.gitignore +++ b/stromae-logging/.gitignore @@ -1,4 +1,6 @@ .project +.idea +*.iml .classpath .settings / From 3cb8d3c9b5e505791cb5ea1d0df7283d3563ae16 Mon Sep 17 00:00:00 2001 From: Laurent Caouissin Date: Wed, 13 Jan 2021 14:41:58 +0100 Subject: [PATCH 2/8] Add conf of session heartbeat --- .../common/WEB-INF/orbeon-insee/config/properties-local.xml | 3 +++ pom.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/insee-overload/common/WEB-INF/orbeon-insee/config/properties-local.xml b/insee-overload/common/WEB-INF/orbeon-insee/config/properties-local.xml index 299db3cc..6d0e3d18 100644 --- a/insee-overload/common/WEB-INF/orbeon-insee/config/properties-local.xml +++ b/insee-overload/common/WEB-INF/orbeon-insee/config/properties-local.xml @@ -59,6 +59,9 @@ + + + diff --git a/pom.xml b/pom.xml index 4c8dc000..dac532c4 100644 --- a/pom.xml +++ b/pom.xml @@ -17,6 +17,7 @@ 1.8 1.8 default + true From b4351a8ad8b7011035e7d61478e3762fad3c74a7 Mon Sep 17 00:00:00 2001 From: Guylene Tandeau Date: Wed, 27 Jan 2021 14:47:18 +0100 Subject: [PATCH 3/8] Update initialisation.xsl : retrieve contacts data in the questionnaire --- .../orbeon-insee/services/personalization/initialisation.xsl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/insee-overload/common/WEB-INF/orbeon-insee/services/personalization/initialisation.xsl b/insee-overload/common/WEB-INF/orbeon-insee/services/personalization/initialisation.xsl index b51691c2..cc512115 100644 --- a/insee-overload/common/WEB-INF/orbeon-insee/services/personalization/initialisation.xsl +++ b/insee-overload/common/WEB-INF/orbeon-insee/services/personalization/initialisation.xsl @@ -22,6 +22,9 @@ + + + From 46790a7976655eb601af14e8ac22dbeaba958db9 Mon Sep 17 00:00:00 2001 From: Laurent Caouissin Date: Thu, 28 Jan 2021 08:09:58 +0100 Subject: [PATCH 4/8] Change export pdf for household Context and add target _blank to link --- .../WEB-INF/orbeon-overload/apps/fr/theme.xsl | 74 +++++++++++-------- 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/insee-overload/common/WEB-INF/orbeon-overload/apps/fr/theme.xsl b/insee-overload/common/WEB-INF/orbeon-overload/apps/fr/theme.xsl index 9daf966a..743895f9 100644 --- a/insee-overload/common/WEB-INF/orbeon-overload/apps/fr/theme.xsl +++ b/insee-overload/common/WEB-INF/orbeon-overload/apps/fr/theme.xsl @@ -20,16 +20,16 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xxf="http://orbeon.org/oxf/xml/xforms"> - + - + - + @@ -43,7 +43,28 @@ - + + + + + + + + + + + + + + + + + + + + + + @@ -57,13 +78,13 @@ - + - + @@ -75,20 +96,20 @@ - + - + - + @@ -109,7 +130,7 @@ Visualiser le questionnaire PDF - + @@ -118,29 +139,29 @@ Informations de diffusion - + Contacter l'assistance Déconnexion - + - + - + Vous devez activer javascript si vous souhaitez répondre à cette enquête. - + @@ -157,7 +178,7 @@ - + @@ -167,7 +188,7 @@ - + @@ -192,26 +213,15 @@ - + - - - - - - - - - - - - - + + - + From fa6cec8fa99e1fd48509f3c4c61816199d6415ba Mon Sep 17 00:00:00 2001 From: Laurent Caouissin Date: Thu, 28 Jan 2021 08:58:06 +0100 Subject: [PATCH 5/8] Revert "Change export pdf for household Context" This reverts commit 46790a7976655eb601af14e8ac22dbeaba958db9. --- .../WEB-INF/orbeon-overload/apps/fr/theme.xsl | 74 ++++++++----------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/insee-overload/common/WEB-INF/orbeon-overload/apps/fr/theme.xsl b/insee-overload/common/WEB-INF/orbeon-overload/apps/fr/theme.xsl index 743895f9..9daf966a 100644 --- a/insee-overload/common/WEB-INF/orbeon-overload/apps/fr/theme.xsl +++ b/insee-overload/common/WEB-INF/orbeon-overload/apps/fr/theme.xsl @@ -20,16 +20,16 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xxf="http://orbeon.org/oxf/xml/xforms"> - + - + - + @@ -43,28 +43,7 @@ - - - - - - - - - - - - - - - - - - - - - - + @@ -78,13 +57,13 @@ - + - + @@ -96,20 +75,20 @@ - + - + - + @@ -130,7 +109,7 @@ Visualiser le questionnaire PDF - + @@ -139,29 +118,29 @@ Informations de diffusion - + Contacter l'assistance Déconnexion - + - + - + Vous devez activer javascript si vous souhaitez répondre à cette enquête. - + @@ -178,7 +157,7 @@ - + @@ -188,7 +167,7 @@ - + @@ -213,15 +192,26 @@ - + + + + + + + + + + + - - + + + - + From 271ee434ceaaf6fb43bf426caeab447c8552b34e Mon Sep 17 00:00:00 2001 From: Laurent Caouissin Date: Sun, 30 May 2021 22:02:56 +0200 Subject: [PATCH 6/8] Fix welcomeBack page --- src/components/orchestrator/collector/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/orchestrator/collector/index.js b/src/components/orchestrator/collector/index.js index 220a431f..9e15538c 100644 --- a/src/components/orchestrator/collector/index.js +++ b/src/components/orchestrator/collector/index.js @@ -93,7 +93,12 @@ export const Orchestrator = ({ }; const [currentPage, setCurrentPage] = useState(() => { - if (!validated && stateData?.currentPage) return stateData?.currentPage; + if (!validated && stateData?.currentPage) { + if (isLunaticPage(stateData?.currentPage)) { + setPage(stateData?.currentPage); + } + return stateData?.currentPage; + } if (validated) return END_PAGE; return WELCOME_PAGE; }); @@ -220,7 +225,7 @@ export const Orchestrator = ({ setInit(!o)} - goToFirstPage={() => setCurrentPage(0)} + goToFirstPage={() => setPage('1')} /> Date: Sun, 30 May 2021 22:03:10 +0200 Subject: [PATCH 7/8] Fix some minor bugs --- src/components/genericPages/end.js | 8 ++++++-- src/utils/hooks/auth.js | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/genericPages/end.js b/src/components/genericPages/end.js index 807fabfb..0eebed9b 100644 --- a/src/components/genericPages/end.js +++ b/src/components/genericPages/end.js @@ -46,7 +46,11 @@ const EndPage = () => { logoutAndClose, metadata: { inseeContext, variables }, personalization, + stateData: { date }, } = useContext(OrchestratorContext); + + const finalDate = date || 0; + const { pathname } = useLocation(); const { idQ, idSU } = useParams(); @@ -61,10 +65,10 @@ const EndPage = () => { console.log(`${status} : ${error}`); }; - const validatedDate = `${formatDistance(new Date(), new Date(), { + const validatedDate = `${formatDistance(finalDate, new Date(), { addSuffix: true, locale: dateFnsLocal, - })} (${format(new Date(), formatLocal)})`; + })} (${format(finalDate, formatLocal)})`; const getBodyWithVariables = myBody => interpret(['VTL'])({ diff --git a/src/utils/hooks/auth.js b/src/utils/hooks/auth.js index 7b1dbf8c..8de2cca8 100644 --- a/src/utils/hooks/auth.js +++ b/src/utils/hooks/auth.js @@ -2,11 +2,17 @@ import { useContext } from 'react'; import { AppContext } from 'App'; import { useReactOidc } from '@axa-fr/react-oidc-context'; import { NONE, OIDC } from 'utils/constants'; +import { useHistory } from 'react-router'; export const useAuth = () => { + const history = useHistory(); const { authenticationType } = useContext(AppContext); if (authenticationType === NONE) - return { authenticationType, name: 'Fake User' }; + return { + authenticationType, + name: 'Fake User', + logout: () => history.push('/'), + }; if (authenticationType === OIDC) { /** * Assume this conditional hook does not break anything From d1cd9749a0bf0475d6ea7f6c3ae702c2d7c79b78 Mon Sep 17 00:00:00 2001 From: Laurent Caouissin Date: Sun, 30 May 2021 22:03:21 +0200 Subject: [PATCH 8/8] Upgrade version to 2.0.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b8a0f69..1b69191b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stromae", - "version": "2.0.5", + "version": "2.0.6", "private": true, "dependencies": { "@axa-fr/react-oidc-context": "^3.1.6",