This commit is contained in:
Mukesh Kumar Shah 2026-05-01 20:49:58 +00:00 committed by GitHub
commit 0595bb0b92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 9 additions and 9 deletions

View file

@ -120,7 +120,7 @@ const ModelsAndEndpointsView: React.FC<ModelDashboardProps> = ({ premiumUser, te
const getProviderFromModel = (model: string) => {
if (modelCostMapData !== null && modelCostMapData !== undefined) {
if (typeof modelCostMapData == "object" && model in modelCostMapData) {
if (typeof modelCostMapData === "object" && model in modelCostMapData) {
return modelCostMapData[model]["litellm_provider"];
}
}
@ -251,7 +251,7 @@ const ModelsAndEndpointsView: React.FC<ModelDashboardProps> = ({ premiumUser, te
const isLoading = isLoadingModels || isLoadingModelCostMap || isLoadingCredentials || isLoadingUISettings;
if (userRole && userRole == "Admin Viewer") {
if (userRole && userRole === "Admin Viewer") {
const { Title, Paragraph } = Typography;
return (
<div>

View file

@ -113,7 +113,7 @@ const AllModelsTab = ({
const getProviderFromModel = (model: string) => {
if (modelCostMapData !== null && modelCostMapData !== undefined) {
if (typeof modelCostMapData == "object" && model in modelCostMapData) {
if (typeof modelCostMapData === "object" && model in modelCostMapData) {
return modelCostMapData[model]["litellm_provider"];
}
}

View file

@ -7,7 +7,7 @@ export const fetchTeams = async (
currentOrg: Organization | null,
) => {
let givenTeams;
if (userRole != "Admin" && userRole != "Admin Viewer") {
if (userRole !== "Admin" && userRole !== "Admin Viewer") {
givenTeams = await teamListCall(accessToken, currentOrg?.organization_id || null, userID);
} else {
givenTeams = await teamListCall(accessToken, currentOrg?.organization_id || null);

View file

@ -249,7 +249,7 @@ const TeamsView: React.FC<TeamProps> = ({
<div className="w-full mx-4 h-[75vh]">
<Grid numItems={1} className="gap-2 p-8 w-full mt-2">
<Col numColSpan={1} className="flex flex-col gap-2">
{(userRole == "Admin" || userRole == "Org Admin") && (
{(userRole === "Admin" || userRole === "Org Admin") && (
<Button className="w-fit" onClick={() => setIsTeamModalVisible(true)}>
+ Create New Team
</Button>
@ -281,7 +281,7 @@ const TeamsView: React.FC<TeamProps> = ({
}}
accessToken={accessToken}
is_team_admin={is_team_admin(teams?.find((team) => team.team_id === selectedTeamId))}
is_proxy_admin={userRole == "Admin"}
is_proxy_admin={userRole === "Admin"}
is_org_admin={(() => {
const team = teams?.find((t) => t.team_id === selectedTeamId);
if (!team?.organization_id || !organizations || !userID) return false;
@ -345,7 +345,7 @@ const TeamsView: React.FC<TeamProps> = ({
)}
</TeamsHeaderTabs>
)}
{(userRole == "Admin" || userRole == "Org Admin") && (
{(userRole === "Admin" || userRole === "Org Admin") && (
<CreateTeamModal
isTeamModalVisible={isTeamModalVisible}
handleOk={handleOk}

View file

@ -141,7 +141,7 @@ const TeamsTable = ({
</Text>
</TableCell>
<TableCell>
{userRole == "Admin" ? (
{userRole === "Admin" ? (
<>
<Icon
icon={PencilAltIcon}

View file

@ -169,7 +169,7 @@ const CreateTeamModal = ({
const handleCreate = async (formValues: Record<string, any>) => {
try {
console.log(`formValues: ${JSON.stringify(formValues)}`);
if (accessToken != null) {
if (accessToken !== null) {
const newTeamAlias = formValues?.team_alias;
const existingTeamAliases = teams?.map((t) => t.team_alias) ?? [];
let organizationId = formValues?.organization_id || currentOrg?.organization_id;