From 5cf5c0b0671bf35fb78e07ff9bae3e483e95fc72 Mon Sep 17 00:00:00 2001 From: MickaelMenet Date: Mon, 23 Jan 2023 14:48:21 +0100 Subject: [PATCH 1/2] fix: fix readOnly on OrchestorManager --- .../manager/orchestratorManager.js | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/orchestrator/manager/orchestratorManager.js b/src/components/orchestrator/manager/orchestratorManager.js index 7a498e2f..90109d25 100644 --- a/src/components/orchestrator/manager/orchestratorManager.js +++ b/src/components/orchestrator/manager/orchestratorManager.js @@ -60,14 +60,18 @@ const OrchestratorManager = () => { const [errorSending, setErrorSending] = useState(null); const sendData = async (dataToSave) => { - const { data, stateData } = dataToSave; - const { /*status,*/ error: dataError } = await putData(data); - const { /*status,*/ error: stateDataError } = await putStateData(stateData); - const paradatas = LOGGER.getEventsToSend(); - const { error: paradataPostError } = await postParadata(paradatas); - if (dataError || stateDataError || paradataPostError) - if (paradataPostError) setErrorSending('Error during sending'); - LOGGER.clear(); + if (!readonly) { + const { data, stateData } = dataToSave; + const { /*status,*/ error: dataError } = await putData(data); + const { /*status,*/ error: stateDataError } = await putStateData( + stateData + ); + const paradatas = LOGGER.getEventsToSend(); + const { error: paradataPostError } = await postParadata(paradatas); + if (dataError || stateDataError || paradataPostError) + if (paradataPostError) setErrorSending('Error during sending'); + LOGGER.clear(); + } }; const logoutAndClose = () => { From e224d75160935ef50b0cb83d91bb355958c64a03 Mon Sep 17 00:00:00 2001 From: MickaelMenet Date: Tue, 24 Jan 2023 13:51:22 +0100 Subject: [PATCH 2/2] fix: update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 97bf81bc..e01af2fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stromae", - "version": "2.2.13", + "version": "2.2.14", "description": "Web application for the management of questionnaires powered by Lunatic", "repository": { "type": "git",