mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
(ui) edit teams
This commit is contained in:
parent
dd76517a0b
commit
08b87a1b90
1 changed files with 3 additions and 4 deletions
|
@ -166,17 +166,16 @@ const handleEditSubmit = async (formValues: Record<string, any>) => {
|
|||
return;
|
||||
}
|
||||
|
||||
let newTeamValues = await teamUpdateCall(accessToken, formValues);
|
||||
|
||||
// Update the teams state with the updated team data
|
||||
if (teams) {
|
||||
const updatedTeams = teams.map((team) =>
|
||||
team.team_id === teamId ? formValues : team
|
||||
team.team_id === teamId ? newTeamValues.data : team
|
||||
);
|
||||
setTeams(updatedTeams);
|
||||
}
|
||||
|
||||
console.log("Editing team:", teamId, "with values:", formValues);
|
||||
message.success("Team updated successfully");
|
||||
teamUpdateCall(accessToken, formValues);
|
||||
|
||||
setEditModalVisible(false);
|
||||
setSelectedTeam(null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue