+
+
Base Salary
{" "}
+ {editMode ? (
+
{
+ const updatedSalaries = formData.salaries.map(
+ (s, i) =>
+ i === salaryIndex
+ ? { ...s, baseSalary: e.target.value }
+ : s
+ );
+ setFormData((prev) => ({
+ ...prev,
+ salaries: updatedSalaries,
+ }));
+ }}
+ />
+ ) : (
+
{salary.baseSalary}
+ )}
+
+
+
CTC
{" "}
+ {editMode ? (
+
{
+ const updatedSalaries = formData.salaries.map(
+ (s, i) =>
+ i === salaryIndex
+ ? { ...s, totalCTC: e.target.value }
+ : s
+ );
+ setFormData((prev) => ({
+ ...prev,
+ salaries: updatedSalaries,
+ }));
+ }}
+ />
+ ) : (
+
{salary.totalCTC}
+ )}
+
+
+
Take Home Salary
{" "}
+ {editMode ? (
+
{
+ const updatedSalaries = formData.salaries.map(
+ (s, i) =>
+ i === salaryIndex
+ ? { ...s, takeHomeSalary: e.target.value }
+ : s
+ );
+ setFormData((prev) => ({
+ ...prev,
+ salaries: updatedSalaries,
+ }));
+ }}
+ />
+ ) : (
+
{salary.takeHomeSalary}
+ )}
+
+
+
Gross Salary
{" "}
+ {editMode ? (
+
{
+ const updatedSalaries = formData.salaries.map(
+ (s, i) =>
+ i === salaryIndex
+ ? { ...s, grossSalary: e.target.value }
+ : s
+ );
+ setFormData((prev) => ({
+ ...prev,
+ salaries: updatedSalaries,
+ }));
+ }}
+ />
+ ) : (
+
{salary.grossSalary}
+ )}
+
+
+
+ Other Compensations
+
{" "}
+ {editMode ? (
+
{
+ const updatedSalaries = formData.salaries.map(
+ (s, i) =>
+ i === salaryIndex
+ ? { ...s, otherCompensations: e.target.value }
+ : s
+ );
+ setFormData((prev) => ({
+ ...prev,
+ salaries: updatedSalaries,
+ }));
+ }}
+ />
+ ) : (
+
{salary.otherCompensations}
+ )}
+
+