Skip to content

Commit

Permalink
fix: save withSomeone & WithPhone
Browse files Browse the repository at this point in the history
  • Loading branch information
MailineN committed Aug 6, 2024
1 parent 4a16afa commit 9898d72
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const LoopSurveyPageStep = (props: LoopSurveyPageStepProps) => {
const currentIteration = paramIteration ? +paramIteration : 0;
const isRoute = getValue(idSurvey, FieldNameEnum.ISROUTE, currentIteration) as boolean;
const stepData = getStepData(currentPage, isRoute);
console.log("stepData", stepData);
const modifiable = !surveyReadOnly(context.rightsSurvey);
const IconError = errorIcon as React.FunctionComponent<React.SVGProps<SVGSVGElement>>;

Expand Down Expand Up @@ -113,7 +112,6 @@ const LoopSurveyPageStep = (props: LoopSurveyPageStepProps) => {
modifiable: modifiable,
idSurvey: idSurvey,
};
console.log("Context", context);
const loopSurveyPageProps = {
onNext: useCallback((e: React.MouseEvent) => onNext(e, setNextClickEvent), [nextClickEvent]),
onPrevious: useCallback(
Expand Down
13 changes: 0 additions & 13 deletions src/orchestrator/Orchestrator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,19 +345,6 @@ export const OrchestratorForStories = (props: OrchestratorProps) => {
{components.map(function (component: any) {
const { id, componentType, response, options, value, ...other } = component;
const Component = lunatic[componentType];
console.log("response", response);
console.log(
"variables",
getVariables(
data,
getDataLocal(),
iteration,
getBindingDependencies(components),
value,
source,
),
);
console.log("Value", value);
return (
<div className="lunatic lunatic-component" key={`component-${id}`}>
<Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ const WithScreenPage = () => {
getOrchestratorPage(EdtRoutesNameEnum.ACTIVITY_OR_ROUTE_PLANNER),
context.source,
),
undefined,
undefined,
undefined,
true,
);
},
onSelectValue: () => {
Expand All @@ -96,10 +92,6 @@ const WithScreenPage = () => {
getOrchestratorPage(EdtRoutesNameEnum.ACTIVITY_OR_ROUTE_PLANNER),
context.source,
),
undefined,
undefined,
undefined,
true,
);
});
},
Expand Down
4 changes: 1 addition & 3 deletions src/service/navigation-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,8 @@ const saveAndNav = (
value?: FieldNameEnum,
routeNotSelection?: string,
currentIteration?: number,
forceUpdate?: boolean,
): void => {
forceUpdate ?? console.log("saveAndNav", getData(idSurvey));
saveData(idSurvey, getData(idSurvey), forceUpdate).then(() => {
saveData(idSurvey, _callbackHolder.getData() ?? getData(idSurvey)).then(() => {
navToRouteOrRouteNotSelection(idSurvey, route, value, routeNotSelection, currentIteration);
});
};
Expand Down
1 change: 1 addition & 0 deletions src/service/survey-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ const saveData = (
forceUpdate = false,
stateDataForced?: StateData,
): Promise<LunaticData> => {
console.log("Attempt to save data", data.COLLECTED);
data.lastLocalSaveDate = navigator.onLine ? Date.now() : Date.now() + 1;
if (!data.houseReference) {
const regexp = new RegExp(process.env.REACT_APP_HOUSE_REFERENCE_REGULAR_EXPRESSION || "");
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1631,10 +1631,10 @@
dependencies:
antlr4 "4.8.0"

"@inseefrlab/lunatic-edt@0.12.6":
version "0.12.6"
resolved "https://registry.yarnpkg.com/@inseefrlab/lunatic-edt/-/lunatic-edt-0.12.6.tgz#1946f52e2ef3c7254c15a684f56a2cfbabeb3109"
integrity sha512-CxRoUYuWHQdeVjRi8fX4D5J4h1t8dSm+S1UNqmGULVLS5JlKiHBkJSoLgjQ+GyLdsEIsnqNmd6B5up/kq1pn5w==
"@inseefrlab/lunatic-edt@0.13.3":
version "0.13.3"
resolved "https://registry.yarnpkg.com/@inseefrlab/lunatic-edt/-/lunatic-edt-0.13.3.tgz#fe9544e5dc4ca6d7b032c4919d4d8d736d3b9398"
integrity sha512-hWpeq0u0VvikH5NOwNy70ZMkHQ8TeRdqYBbdopMBr1LPDIWbDvOPzHOWvlYBP4gWJipybxHf48ZXabSNdxoPkw==
dependencies:
"@date-io/dayjs" "^2.16.0"
"@emotion/react" "^11.10.4"
Expand Down

0 comments on commit 9898d72

Please sign in to comment.