Skip to content

Commit

Permalink
chore: small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MailineN committed Aug 26, 2024
1 parent 7fd947e commit 34e2d7d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion src/pages/home-surveyed/HomeSurveyed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ const HomeSurveyedPage = () => {

const renderHomeReviewer = () => {
let userDatas = groupBy(userDatasMap(), nameSurveyData => nameSurveyData.num);
console.log("userDatas", userDatas);
let groups = Object.keys(userDatas);
return renderPageOrLoadingOrError(
<ErrorBoundary FallbackComponent={ErrorProvider}>
Expand Down
2 changes: 0 additions & 2 deletions src/service/survey-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,6 @@ const saveData = (
const dataIsChanged = dataIsChange(idSurvey, data, oldDataSurvey);
const isChange = forceUpdate || dataIsChanged;
datas.set(idSurvey, data);

data = updateLocked(idSurvey, data);
let stateData: StateData = data?.stateData ?? stateDataForced ?? initStateData(data);

Expand All @@ -921,7 +920,6 @@ const saveData = (
data: data,
};
data.lastRemoteSaveDate = stateData.date;
console.log("StateData to save", stateData);

if (isReviewerMode) {
return remotePutSurveyDataReviewer(idSurvey, stateData, data).then(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/service/survey-state-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const lockSurvey = (idSurvey: string) => {
} else if (data.COLLECTED) {
data.COLLECTED.ISLOCKED = variable;
}
return saveData(idSurvey, data);
return saveData(idSurvey, data, false, true);
};

const lockAllSurveys = (idHousehold: string) => {
Expand Down
1 change: 0 additions & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function getSurveyIdFromUrl(context: OrchestratorContext, location: Location) {
}

function addItemToSession(idSurvey: string, item: any) {
console.log("Add item to session", idSurvey, item);
sessionStorage.setItem(idSurvey, JSON.stringify(item));
}

Expand Down

0 comments on commit 34e2d7d

Please sign in to comment.