Skip to content

Commit 3302201

Browse files
author
sunlei
committed
fix: ts type def error
1 parent c117258 commit 3302201

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

client/packages/openblocks/src/comps/queries/queryComp/queryPropertyView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
QUICK_GRAPHQL_ID,
3434
QUICK_REST_API_ID,
3535
} from "../../../constants/datasourceConstants";
36+
import { OLD_OPENBLOCKS_DATASOURCE } from "@openblocks-ee/constants/datasourceConstants";
3637

3738
export function QueryPropertyView(props: { comp: InstanceType<typeof QueryComp> }) {
3839
const { comp } = props;
@@ -187,8 +188,7 @@ export const QueryGeneralPropertyView = (props: {
187188
() =>
188189
datasource.find(
189190
(d) =>
190-
d.datasource.creationSource === 2 &&
191-
(d.datasource.type === "openblocksApi" || d.datasource.type === "majiangInternal")
191+
d.datasource.creationSource === 2 && OLD_OPENBLOCKS_DATASOURCE.includes(d.datasource.type)
192192
)?.datasource.id,
193193
[datasource]
194194
);

client/packages/openblocks/src/constants/datasourceConstants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ export const QUICK_GRAPHQL_ID = "#QUICK_GRAPHQL";
3636
export const OPENBLOCKS_API_ID = "#OPENBLOCKS_API";
3737
export const OPENBLOCKS_API_INFO = {
3838
icon: getBottomResIcon("openblocksApi"),
39-
name: "码匠数据源",
39+
name: "Openblocks API",
4040
};
41+
export const OLD_OPENBLOCKS_DATASOURCE: Partial<DatasourceType>[] = [];

client/packages/openblocks/src/pages/setting/permission/permissionMenuItems.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { OrgGroup } from "constants/orgConstants";
2+
13
export function usePermissionMenuItems(orgId: string) {
24
return {
3-
nameSuffixFunc: () => <></>,
5+
nameSuffixFunc: (group?: OrgGroup) => <></>,
46
menuItemsFunc: undefined as Function | undefined,
57
menuExtraView: undefined,
68
};

0 commit comments

Comments
 (0)