diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b17463b1..81b8acab 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,7 +53,7 @@ jobs: npm test-ci --coverage # Build sonar reports - name: Upload deploy artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coverage path: coverage/ diff --git a/src/enumerations/StateDataStateEnum.ts b/src/enumerations/StateDataStateEnum.ts index 4cebe8eb..ed41880b 100644 --- a/src/enumerations/StateDataStateEnum.ts +++ b/src/enumerations/StateDataStateEnum.ts @@ -3,5 +3,4 @@ export enum StateDataStateEnum { VALIDATED = "VALIDATED", TOEXTRACT = "TO-EXTRACT", EXTRACTED = "EXTRACTED", - COMPLETED = "COMPLETED", } diff --git a/src/pages/end-survey/EndSurvey.tsx b/src/pages/end-survey/EndSurvey.tsx index 75bc8934..8ab5b49e 100644 --- a/src/pages/end-survey/EndSurvey.tsx +++ b/src/pages/end-survey/EndSurvey.tsx @@ -91,7 +91,7 @@ const EndSurveyPage = () => { const remoteSaveSurveyAndGoBackHome = useCallback(() => { const dataWithIsEnvoyed = setValue(idSurvey, FieldNameEnum.ISENVOYED, true); const stateData: StateData = { - state: StateDataStateEnum.COMPLETED, + state: StateDataStateEnum.VALIDATED, date: Date.now(), currentPage: getCurrentPage(callbackHolder.getData(), context.source), }; diff --git a/src/service/survey-service.ts b/src/service/survey-service.ts index 2968b517..bb4b87f1 100644 --- a/src/service/survey-service.ts +++ b/src/service/survey-service.ts @@ -1075,9 +1075,7 @@ const getStateOfSurvey = (idSurvey: string): StateDataStateEnum => { const isValidated = surveyValidated(idSurvey); let state: StateDataStateEnum = StateDataStateEnum.INIT; - if (isSent) { - state = StateDataStateEnum.COMPLETED; - } else if (isValidated) { + if (isSent || isValidated) { state = StateDataStateEnum.VALIDATED; } return state;