diff --git a/app/components/OrganizationForm.tsx b/app/components/OrganizationForm.tsx index a38df1b..937f780 100644 --- a/app/components/OrganizationForm.tsx +++ b/app/components/OrganizationForm.tsx @@ -1,18 +1,20 @@ import { Form } from "@remix-run/react"; +import { Radio } from "@material-tailwind/react"; + +import { OrganizationUpdate } from "@app-types/graphql"; +import { ChangeEventHandler } from "react"; + import { - Input, - Typography, - Radio, + Button, + TextField as Input, + TextareaAutosize, Card, + CardContent, List, ListItem, - CardBody, - Textarea, -} from "@material-tailwind/react"; - -import { OrganizationUpdate } from "@app-types/graphql"; -import { ChangeEventHandler } from "react"; -import { Button } from "@mui/material"; + Typography, + CardHeader, +} from "@mui/material"; export type OrganizationFormData = Omit & { isPersonal: boolean; @@ -64,35 +66,23 @@ export function OrganizationForm({
{!organization.isPersonal && !organization.isSystem && ( <> - - Name - { updateData({ ...organization, name: target.value }); }} /> - - Owner - { updateData({ ...organization, ownerEmail: target.value }); }} @@ -101,16 +91,8 @@ export function OrganizationForm({ )} {!organization.isSystem && ( <> - - Github Organizations (comma separated) - { updateData({ ...organization, githubOrgs: target.value }); @@ -118,128 +100,118 @@ export function OrganizationForm({ /> )} - - Github API Key - - - - {!organization.isSystem && ( - + + + + + {!organization.isSystem && ( + + + + )} + + { + updateData({ + ...organization, + githubToken: target.value, + }); + }} + /> - )} - - - { - updateData({ - ...organization, - githubToken: target.value, - }); - }} - /> - - + + - - AI Engines Settings - {!organization.isSystem && ( - - - - - - system default - - {!organization.isSystem && ( + + + + + + - consumed{" "} - {( - organization.systemAiEngineUsedCompletionTokens + - organization.systemAiEngineUsedPromptTokens - ).toLocaleString()}{" "} - of{" "} - {organization.systemAiEngineMaxTokens.toLocaleString()}{" "} - allowed tokens. + system default - )} -
- } - crossOrigin={undefined} - value={true.toString()} - checked={organization.useSystemAiEngine} - onChange={onUseSystemAiEngine} - /> - - - - - + {!organization.isSystem && ( + + consumed{" "} + {( + organization.systemAiEngineUsedCompletionTokens + + organization.systemAiEngineUsedPromptTokens + ).toLocaleString()}{" "} + of{" "} + {organization.systemAiEngineMaxTokens.toLocaleString()}{" "} + allowed tokens. + + )} + + } + crossOrigin={undefined} + value={true.toString()} + checked={organization.useSystemAiEngine} + onChange={onUseSystemAiEngine} + /> + + + + + + )} {!organization.useSystemAiEngine && ( <> {organization?.aiEngines?.map(({ id, title, settings }) => (
- - - - {title} - -