forked from phoenix/litellm-mirror
(ui) edit teams
This commit is contained in:
parent
84c5b56371
commit
c16f2f14eb
1 changed files with 3 additions and 4 deletions
|
@ -166,17 +166,16 @@ const handleEditSubmit = async (formValues: Record<string, any>) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let newTeamValues = await teamUpdateCall(accessToken, formValues);
|
||||||
|
|
||||||
// Update the teams state with the updated team data
|
// Update the teams state with the updated team data
|
||||||
if (teams) {
|
if (teams) {
|
||||||
const updatedTeams = teams.map((team) =>
|
const updatedTeams = teams.map((team) =>
|
||||||
team.team_id === teamId ? formValues : team
|
team.team_id === teamId ? newTeamValues.data : team
|
||||||
);
|
);
|
||||||
setTeams(updatedTeams);
|
setTeams(updatedTeams);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Editing team:", teamId, "with values:", formValues);
|
|
||||||
message.success("Team updated successfully");
|
message.success("Team updated successfully");
|
||||||
teamUpdateCall(accessToken, formValues);
|
|
||||||
|
|
||||||
setEditModalVisible(false);
|
setEditModalVisible(false);
|
||||||
setSelectedTeam(null);
|
setSelectedTeam(null);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue