Skip to content

Commit

Permalink
Update consultant (#450)
Browse files Browse the repository at this point in the history
Co-authored-by: md <[email protected]>
  • Loading branch information
Dahly96 and md authored Mar 6, 2024
1 parent 59f69ca commit daf6b1e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ export default function EditableTableCompetencesCell({

useEffect(() => {
if (isEditing) {
setSelectedValues(
newCompetences.map((option) => ({
value: option.id,
label: option.name,
})),
);
setConsultant(newCompetences);
}
}, [newCompetences]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default function EditableTableDegreeCell({

useEffect(() => {
if (isEditing) {
setSelectedValue({
value: Degree[newDegree],
label: newDegree.toString(),
});
setConsultant(newDegree);
}
}, [newDegree]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export default function EditableTableSelectDepartmentCell({

useEffect(() => {
if (isEditing) {
setSelectedValues({
value: newDepartment.id,
label: newDepartment.name,
});
setConsultant(newDepartment);
}
}, [newDepartment]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export default function EditableTableSelectGradYearCell({

useEffect(() => {
if (isEditing) {
setSelectedValue({
value: newYear.toString(),
label: newYear.toString(),
});
setConsultant(newYear);
}
}, [newYear]);
Expand Down

0 comments on commit daf6b1e

Please sign in to comment.