mirror of https://github.com/buster-so/buster.git
reasoning message should not be clickable until it has a message
This commit is contained in:
parent
9924120267
commit
73a07afbd8
|
@ -12,5 +12,6 @@ export enum BusterOrganizationRole {
|
|||
WORKSPACE_ADMIN = 'workspaceAdmin',
|
||||
DATA_ADMIN = 'dataAdmin',
|
||||
QUERIER = 'querier',
|
||||
RESTRICTED_QUERIER = 'restrictedQuerier'
|
||||
RESTRICTED_QUERIER = 'restrictedQuerier',
|
||||
VIEWER = 'viewer'
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { BusterOrganization } from '../organizations';
|
||||
import type { BusterOrganization, BusterOrganizationRole } from '../organizations';
|
||||
import type { BusterPermissionUser } from '../permission';
|
||||
import type { ShareAssetType } from '../share';
|
||||
|
||||
|
@ -70,7 +70,7 @@ export interface OrganizationUser {
|
|||
email: string;
|
||||
name: string;
|
||||
status: 'active' | 'inactive';
|
||||
role: 'dataAdmin' | 'workspaceAdmin' | 'querier' | 'restrictedQuerier' | 'viewer';
|
||||
role: BusterOrganizationRole;
|
||||
datasets: OrganizationUserDataset[];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
import { type BusterUser, type OrganizationUser } from '@/api/asset_interfaces';
|
||||
import {
|
||||
BusterOrganizationRole,
|
||||
type BusterUser,
|
||||
type OrganizationUser
|
||||
} from '@/api/asset_interfaces';
|
||||
import React from 'react';
|
||||
import { Title, Text } from '@/components/ui/typography';
|
||||
import {
|
||||
|
@ -41,10 +45,11 @@ export const UserDefaultAccess: React.FC<{
|
|||
};
|
||||
|
||||
const accessOptions: SelectItem<OrganizationUser['role']>[] = [
|
||||
{ label: 'Data Admin', value: 'dataAdmin' },
|
||||
{ label: 'Workspace Admin', value: 'workspaceAdmin' },
|
||||
{ label: 'Querier', value: 'querier' },
|
||||
{ label: 'Restricted Querier', value: 'restrictedQuerier' }
|
||||
{ label: 'Data Admin', value: BusterOrganizationRole.DATA_ADMIN },
|
||||
{ label: 'Workspace Admin', value: BusterOrganizationRole.WORKSPACE_ADMIN },
|
||||
{ label: 'Querier', value: BusterOrganizationRole.QUERIER },
|
||||
{ label: 'Restricted Querier', value: BusterOrganizationRole.RESTRICTED_QUERIER },
|
||||
{ label: 'Viewer', value: BusterOrganizationRole.VIEWER }
|
||||
];
|
||||
|
||||
const DefaultAccessCard = React.memo(
|
||||
|
@ -74,21 +79,23 @@ const DefaultAccessCard = React.memo(
|
|||
<CardContent className="!pt-0">
|
||||
<div className="flex items-center justify-between">
|
||||
<Text variant="secondary">Access level</Text>
|
||||
<AppTooltip
|
||||
title={
|
||||
isDisabled
|
||||
? userIsMe
|
||||
? 'You cannot change your own access'
|
||||
: 'Only admins can change access'
|
||||
: undefined
|
||||
}>
|
||||
<Select
|
||||
items={accessOptions}
|
||||
value={role}
|
||||
onChange={onChange}
|
||||
disabled={isDisabled}
|
||||
/>
|
||||
</AppTooltip>
|
||||
<div className="min-w-44">
|
||||
<AppTooltip
|
||||
title={
|
||||
isDisabled
|
||||
? userIsMe
|
||||
? 'You cannot change your own access'
|
||||
: 'Only admins can change access'
|
||||
: undefined
|
||||
}>
|
||||
<Select
|
||||
items={accessOptions}
|
||||
value={role}
|
||||
onChange={onChange}
|
||||
disabled={isDisabled}
|
||||
/>
|
||||
</AppTooltip>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
|
@ -50,6 +50,8 @@ export const ChatResponseReasoning: React.FC<{
|
|||
}, [lastMessageTitle, finalReasoningMessage, blackBoxMessage]);
|
||||
|
||||
const href = useMemo(() => {
|
||||
if (!messageId) return '';
|
||||
|
||||
if (isReasonginFileSelected) {
|
||||
return createBusterRoute({
|
||||
route: BusterRoutes.APP_CHAT_ID,
|
||||
|
|
Loading…
Reference in New Issue