Skip to content

Commit

Permalink
fix(demo): fix change mode demo to mode reviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
lailabjil committed Sep 29, 2023
1 parent 68d07e1 commit 0552ff0
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/pages/home-surveyed/HomeSurveyed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ const HomeSurveyedPage = () => {

if (getUserRights() == EdtUserRightsEnum.REVIEWER && !isDemo) {
userDatas = userDatasMap();
const idsSurveysSelected = userDatas.map(data => data.data.surveyUnitId);
const idsSurveysSelected = userDatas
.map(data => data.data.surveyUnitId)
.filter(
(survey: string) =>
!survey.startsWith("activitySurvey") && !survey.startsWith("workTimeSurvey"),
);
if (navigator.onLine) {
getRemoteSavedSurveysDatas(idsSurveysSelected, setError, false).then(() => {
initHome(idsSurveysSelected);
Expand Down Expand Up @@ -366,17 +371,7 @@ const HomeSurveyedPage = () => {
}, []);

const renderHomeReviewer = () => {
//let userDatas: any[] = [];
let userDatas = userDatasMap();
/*initializeHomeSurveys(idHousehold ?? "").then(() => {
const idsSurveysSelected = userDatasCopy.map(data => data.data.surveyUnitId);
initializeSurveysDatasCache(idsSurveysSelected).finally(() => {
console.log("rerendere home", idsSurveysSelected);
userDatasCopy = userDatasMap();
});
});
if (userDatasCopy.length > 0) userDatas = userDatasCopy;
*/
return renderPageOrLoadingOrError(
<>
{renderReminderNote()}
Expand Down

0 comments on commit 0552ff0

Please sign in to comment.