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 = () => { ?