From fd2be71821334cf24efc6c10d079834eaca67288 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Thu, 2 Jan 2025 09:10:38 +0100 Subject: [PATCH 1/4] - added env var websocket url; --- environments/dev/dev.env | 1 + 1 file changed, 1 insertion(+) diff --git a/environments/dev/dev.env b/environments/dev/dev.env index 38e36ec..ae149fd 100644 --- a/environments/dev/dev.env +++ b/environments/dev/dev.env @@ -1,6 +1,7 @@ REACT_APP_TAB_TITLE=Gepafin REACT_APP_API_EXECUTION_ADDRESS=https://api-dev-gepafin.memento.credit/v1 REACT_APP_API_ADDRESS=https://api-dev-gepafin.memento.credit +REACT_APP_API_ADDRESS_WS=https://api-dev-gepafin.memento.credit/wss REACT_APP_LOGO_FILENAME=gepafin-logo.svg REACT_APP_FAVICON_FILENAME=gepafin-favicon.ico REACT_APP_HUB_ID=p4lk3bcx1RStqTaIVVbXs From 8430b0a7d5bb0f86978b7ef8e252d2dc701aa9e6 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Thu, 2 Jan 2025 10:17:41 +0100 Subject: [PATCH 2/4] - saving progress; --- src/pages/DomandaEditPreInstructor/index.js | 52 ++++++++++++++++----- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index 9c2c517..2e7a81e 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -6,7 +6,7 @@ import { klona } from 'klona'; import { wrap } from 'object-path-immutable'; // store -import { storeSet, useStore } from '../../store'; +import { storeGet, storeSet, useStore } from '../../store'; // api import ApplicationEvaluationService from '../../service/application-evaluation-service'; @@ -502,6 +502,11 @@ const DomandaEditPreInstructor = () => { // TODO } + const evaluationShouldBeBlocked = (data = {}) => { + const userData = storeGet.main.userData() + return isAsyncRequest || userData.id !== data.assignedUserId; + } + useEffect(() => { const maxScore = pathOr(0, ['minScore'], data); const criteria = pathOr([], ['criteria'], data); @@ -767,7 +772,7 @@ const DomandaEditPreInstructor = () => { ?