Skip to content

Commit

Permalink
Merge pull request #401 from AkshataKatwal16/relese-changes
Browse files Browse the repository at this point in the history
Issue feat: Fix translation issue on rjsf form and  reload issue upon cohort creation at master data
  • Loading branch information
itsvick authored Dec 3, 2024
2 parents 27b01f6 + 6bcb538 commit 46b2d6b
Show file tree
Hide file tree
Showing 5 changed files with 606 additions and 599 deletions.
4 changes: 2 additions & 2 deletions src/components/AddNewCenters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Box, Button, Typography } from "@mui/material";
import { IChangeEvent } from "@rjsf/core";
import { RJSFSchema } from "@rjsf/utils";
import React, { useEffect, useState } from "react";
import { useTranslation } from "next-i18next";
import { i18n, useTranslation } from "next-i18next";
import { transformArray } from "../utils/Helper";
import AreaSelection from "./AreaSelection";
import { showToastMessage } from "./Toastify";
Expand Down Expand Up @@ -152,7 +152,7 @@ const AddNewCenters: React.FC<AddLearnerModalProps> = ({
}
};
getAddLearnerFormData();
}, [cohortFormData]);
}, [cohortFormData,i18n?.language]);

const handleDependentFieldsChange = () => {
setShowForm(true);
Expand Down
5 changes: 4 additions & 1 deletion src/components/CommonUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const CommonUserModal: React.FC<UserModalProps> = ({
queryFn: () => getFormRead(FormContext.USERS, FormContextType.TEAM_LEADER),
staleTime: apiCatchingDuration.GETREADFORM,
});
const { i18n } = useTranslation();

const {
data: contentCreatorFormData,
Expand Down Expand Up @@ -258,7 +259,7 @@ console.log("userType",userType, FormContextType.CONTENT_CREATOR)
}
};
getAddUserFormData();
}, [userType, teacherFormData, studentFormData, teamLeaderFormData, contentCreatorFormData]);
}, [userType, teacherFormData, studentFormData, teamLeaderFormData, contentCreatorFormData, i18n.language]);
const { getNotification } = useNotification();
const handleSubmit = async (
data: IChangeEvent<any, RJSFSchema, any>,
Expand Down Expand Up @@ -786,6 +787,8 @@ console.log("userType",userType, FormContextType.CONTENT_CREATOR)
showErrorList={true}
customFields={customFields}
formData={formValue}
key={`${i18n.language}`}

>
{/* <CustomSubmitButton onClose={primaryActionHandler} /> */}
</DynamicForm>
Expand Down
Loading

0 comments on commit 46b2d6b

Please sign in to comment.