Skip to content

Commit

Permalink
fix: rollback to keep local WEEKLYPLANNER
Browse files Browse the repository at this point in the history
  • Loading branch information
MailineN committed Aug 20, 2024
1 parent feda624 commit f610be7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/pages/work-time/weekly-planner/WeeklyPlanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const WeeklyPlannerPage = () => {
};

// TODO: Fix the addition of "S_" prefix to the variable name (response.names)
// This also causes the total work time to be set to zero as lunatic-edt does not recognize the variable name
const saveDuration = (idSurveyResponse: string, response: responsesHourChecker) => {
const callbackData = getData(idSurvey);
const dataCopy = { ...callbackData };
Expand Down
2 changes: 1 addition & 1 deletion src/service/survey-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ const getRemoteSavedSurveyData = (
if (shouldSaveRemoteData(remoteSurveyData, localSurveyData)) {
// TEMP: WeeklyPlanner stuff (to be removed)
//TODO: fix a bug where other variable are overwrited if there is no weeklyPlanner
const weeklyPlanner = localSurveyData?.COLLECTED?.WEEKLYPLANNER;
const weeklyPlanner = localSurveyData?.COLLECTED?.WEEKLYPLANNER ?? null;
if (weeklyPlanner) {
remoteSurveyData.COLLECTED.WEEKLYPLANNER = weeklyPlanner;
}
Expand Down

0 comments on commit f610be7

Please sign in to comment.