diff --git a/web/app/components/datasets/create/step-one/index.tsx b/web/app/components/datasets/create/step-one/index.tsx index 3f938e7dc0..92cee7cf95 100644 --- a/web/app/components/datasets/create/step-one/index.tsx +++ b/web/app/components/datasets/create/step-one/index.tsx @@ -24,6 +24,7 @@ import NotionConnector from '@/app/components/base/notion-connector' import type { DataSourceAuth } from '@/app/components/header/account-setting/data-source-page-new/types' import PlanUpgradeModal from '@/app/components/billing/plan-upgrade-modal' import { useBoolean } from 'ahooks' +import { Plan } from '@/app/components/billing/type' type IStepOneProps = { datasetId?: string @@ -112,7 +113,7 @@ const StepOne = ({ const hasNotin = notionPages.length > 0 const isVectorSpaceFull = plan.usage.vectorSpace >= plan.total.vectorSpace const isShowVectorSpaceFull = (allFileLoaded || hasNotin) && isVectorSpaceFull && enableBilling - const supportBatchUpload = !enableBilling || plan.type !== 'sandbox' + const supportBatchUpload = !enableBilling || plan.type !== Plan.sandbox const notSupportBatchUpload = !supportBatchUpload const [isShowPlanUpgradeModal, { diff --git a/web/app/components/datasets/documents/detail/segment-add/index.tsx b/web/app/components/datasets/documents/detail/segment-add/index.tsx index 22e4a478ef..5204354138 100644 --- a/web/app/components/datasets/documents/detail/segment-add/index.tsx +++ b/web/app/components/datasets/documents/detail/segment-add/index.tsx @@ -44,7 +44,7 @@ const SegmentAdd: FC = ({ }] = useBoolean(false) const { plan, enableBilling } = useProviderContext() const { usage, total } = plan - const canAdd = enableBilling && (usage.vectorSpace < total.vectorSpace) + const canAdd = enableBilling ? (usage.vectorSpace < total.vectorSpace) : true const withNeedUpgradeCheck = useCallback((fn: () => void) => { return () => {