-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(chat): init users management container
- Loading branch information
Showing
73 changed files
with
1,272 additions
and
115 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './user-organization-info-form-field'; | ||
export * from './user-organization-settings-form-field'; | ||
export * from './user-update-auth-methods-form-field'; |
39 changes: 0 additions & 39 deletions
39
apps/admin/src/modules/users/form/update/fields/user-organization-info-form-field.tsx
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
apps/admin/src/modules/users/form/update/fields/user-organization-settings-form-field.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { | ||
controlled, | ||
useFormValidatorMessages, | ||
type ValidationErrorsListProps, | ||
} from '@under-control/forms'; | ||
|
||
import type { SdkTableRowWithIdNameT, SdkUpdateUserOrganizationInputT } from '@llm/sdk'; | ||
|
||
import { FormField } from '@llm/ui'; | ||
import { useI18n } from '~/i18n'; | ||
import { OrganizationsSearchSelect, UserOrganizationRoleSelect } from '~/modules/organizations'; | ||
|
||
type Props = ValidationErrorsListProps<SdkUpdateUserOrganizationInputT> & { | ||
organization: SdkTableRowWithIdNameT; | ||
}; | ||
|
||
export const UserOrganizationSettingsFormField = controlled<SdkUpdateUserOrganizationInputT, Props>(( | ||
{ | ||
organization, | ||
errors, | ||
control: { bind }, | ||
}, | ||
) => { | ||
const t = useI18n().pack.modules.users.form.fields.organization; | ||
const validation = useFormValidatorMessages({ errors }); | ||
|
||
return ( | ||
<> | ||
<FormField | ||
className="uk-margin" | ||
label={t.choose.label} | ||
> | ||
<OrganizationsSearchSelect | ||
defaultValue={organization} | ||
disabled | ||
/> | ||
</FormField> | ||
|
||
<FormField | ||
className="uk-margin" | ||
label={t.role.label} | ||
{...validation.extract('role')} | ||
> | ||
<UserOrganizationRoleSelect {...bind.path('role')} required /> | ||
</FormField> | ||
|
||
<hr /> | ||
</> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { | ||
SdkTableRowWithIdT, | ||
SdkUpdateUserInputT, | ||
} from '@llm/sdk'; | ||
|
||
export type UpdateUserFormValue = | ||
SdkTableRowWithIdT & | ||
SdkUpdateUserInputT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.