Skip to content

Commit

Permalink
Task #230243 fix if data is null or undefined (#48)
Browse files Browse the repository at this point in the history
* Task #230243 fix code rabit issue

* Task #230243 fix height fix

* Task #230243 fix height, remove block not used change case

* Task #230243 fix try catch issue

* Task #230243 fix try catch issue

* Task #230243 fix try catch issue

* Task #230243 fix confirm api call

* Task #230243 fix if data is null or undefined

* Task #230243 fix data is undefined
  • Loading branch information
namita-25 authored Nov 30, 2024
1 parent a96d2e2 commit 2cad1e2
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/utils/jsHelper/helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,23 +247,23 @@ export const transformUserDataToFormData = (userData) => {
};
export const transformData = (userData) => {
return {
firstName: userData.firstName ?? "",
middleName: userData.fatherName ?? "",
lastName: userData.lastName ?? "",
gender: userData.gender ?? "",
class: userData.class ? `${userData.class}` : "",
annualIncome: userData.annualIncome ?? "",
caste: userData.caste.toLowerCase() ?? "",
disabled: userData.disability ? "yes" : "no",
state: userData.current_school_address?.split(",")[1]?.trim() ?? "",
studentType: userData.studentType === "Day" ? "dayScholar" : '"hostler"',
firstName: userData?.firstName ?? "",
middleName: userData?.fatherName ?? "",
lastName: userData?.lastName ?? "",
gender: userData?.gender ?? "",
class: userData?.class ? `${userData.class}` : "",
annualIncome: userData?.annualIncome ?? "",
caste: userData?.caste?.toLowerCase() ?? "",
disabled: userData?.disability ? "yes" : "no",
state: userData?.current_school_address?.split(",")?.[1]?.trim() ?? "",
studentType: userData?.studentType === "Day" ? "dayScholar" : "hostler",
docs: userData?.docs ?? [],
bankAccountHolderName: userData.bankAccountHolderName ?? "",
bankName: userData.bankName ?? "",
bankAccountNumber: userData.bankAccountNumber ?? "",
bankIfscCode: userData.bankIfscCode ?? "",
previousClassMarks: userData.previousYearMarks ?? "",
mobile: userData.phoneNumber ?? "",
bankAccountHolderName: userData?.bankAccountHolderName ?? "",
bankName: userData?.bankName ?? "",
bankAccountNumber: userData?.bankAccountNumber ?? "",
bankIfscCode: userData?.bankIfscCode ?? "",
previousClassMarks: userData?.previousYearMarks ?? "",
mobile: userData?.phoneNumber ?? "",
};
};

Expand Down

0 comments on commit 2cad1e2

Please sign in to comment.