diff --git a/packages/admin/src/components/SchoolCSV.jsx b/packages/admin/src/components/SchoolCSV.jsx index 8f7e612f..495f93ee 100644 --- a/packages/admin/src/components/SchoolCSV.jsx +++ b/packages/admin/src/components/SchoolCSV.jsx @@ -143,7 +143,7 @@ function CSVImportForm() { } try { - const result = await schoolBulkAPI(requestData.schools); + const result = await schoolBulkAPI(requestData); if (result === true) { let names = localStorage.getItem("bulkErrorsNames") || ""; let errorMessage = localStorage.getItem("errorMessage") || ""; diff --git a/packages/admin/src/components/TeacherCSV.jsx b/packages/admin/src/components/TeacherCSV.jsx index 7b6f9d28..a8520fe0 100644 --- a/packages/admin/src/components/TeacherCSV.jsx +++ b/packages/admin/src/components/TeacherCSV.jsx @@ -80,18 +80,18 @@ function CSVImportForm() { const teacherData = csvData[i]; const teacherObject = { name: teacherData["Name"] || null, - username: null, + username: studentData["username"] || "", email: teacherData["Email Id"] || null, - mobile: teacherData["Mobile"] || null, - gender: teacherData["Gender"] || null, - dateOfBirth: teacherData["DoB"] || null, - board: teacherData["board"] || null, + mobile: teacherData["Mobile"] || "", + gender: teacherData["Gender"] || "", + dateOfBirth: teacherData["DoB"] || "", + board: teacherData["board"] || "", password: null, status: teacherData["Status"] || null, groups: [], educationalQualification: teacherData["Educational Qualification"] || null, - schoolUdise: teacherData["School Udise"] || null, + schoolUdise: teacherData["School Udise"] || "", currentRole: teacherData["Current role"] || null, natureOfAppointment: teacherData["Nature of appointment"] || null, appointedPost: teacherData["Appointed Postname"] || null, @@ -115,7 +115,7 @@ function CSVImportForm() { } try { - const result = await teacherBulkAPI(requestData.teachers); + const result = await teacherBulkAPI(requestData); if (result === true) { let names = localStorage.getItem("bulkErrorsNames") || "";