Skip to content
Snippets Groups Projects
Commit 6dea518b authored by Remco Tukker's avatar Remco Tukker
Browse files

bugfixes

parent 60a4155b
No related branches found
No related tags found
1 merge request!57Feature/survey locking system
...@@ -74,7 +74,7 @@ def try_survey(year) -> Any: ...@@ -74,7 +74,7 @@ def try_survey(year) -> Any:
"data": {}, "data": {},
"page": 0, "page": 0,
"verification_status": {}, "verification_status": {},
"mode": "display" "mode": "edit"
} }
...@@ -113,7 +113,7 @@ def inspect_survey(year) -> Any: ...@@ -113,7 +113,7 @@ def inspect_survey(year) -> Any:
"data": {}, "data": {},
"page": 0, "page": 0,
"verification_status": {}, "verification_status": {},
"mode": "display" "mode": "edit"
} }
......
...@@ -38,6 +38,9 @@ function SurveyComponent({ surveyModel, verificationStatus }) { ...@@ -38,6 +38,9 @@ function SurveyComponent({ surveyModel, verificationStatus }) {
btn.innerHTML = "No change from previous year"; btn.innerHTML = "No change from previous year";
btn.className += " verification-required"; btn.className += " verification-required";
btn.onclick = function () { btn.onclick = function () {
if (surveyModel.mode == "display") {
return;
}
question.validate(); question.validate();
setVerifyButton(question, VerificationStatus.Verified); setVerifyButton(question, VerificationStatus.Verified);
} }
......
...@@ -29,7 +29,7 @@ function SurveyContainerComponent({ loadFrom }) { ...@@ -29,7 +29,7 @@ function SurveyContainerComponent({ loadFrom }) {
}, []); }, []);
const pageHideListener = useCallback(() => { const pageHideListener = useCallback(() => {
if (nren == '') { if (!nren) {
return; return;
} }
window.navigator.sendBeacon('/api/response/unlock/' + year + '/' + nren); window.navigator.sendBeacon('/api/response/unlock/' + year + '/' + nren);
...@@ -78,8 +78,8 @@ function SurveyContainerComponent({ loadFrom }) { ...@@ -78,8 +78,8 @@ function SurveyContainerComponent({ loadFrom }) {
} }
const saveSurveyData = async (survey, newState) => { const saveSurveyData = async (survey, newState) => {
if (nren == '') { if (!nren) {
return; return "Saving not available in inpect/try mode";
} }
const saveData = { const saveData = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment