diff --git a/furniture-3d-system/src/app/intake/non-integrated/NonIntegratedDetailClient.tsx b/furniture-3d-system/src/app/intake/non-integrated/NonIntegratedDetailClient.tsx index 9a9d4946..d1e4d05c 100644 --- a/furniture-3d-system/src/app/intake/non-integrated/NonIntegratedDetailClient.tsx +++ b/furniture-3d-system/src/app/intake/non-integrated/NonIntegratedDetailClient.tsx @@ -7,7 +7,6 @@ import type { ChangeEvent, ClipboardEvent, CompositionEvent, - ComponentType, } from "react"; import { Fragment, @@ -48,8 +47,14 @@ import { DocumentAttachmentWorkspace } from "./DocumentAttachmentWorkspace"; import { FirstQualityWorkspace } from "./FirstQualityWorkspace"; import { InstallationWorkspace } from "./InstallationWorkspace"; import { OpeningReferenceWorkspace } from "./OpeningReferenceWorkspace"; -import { PatentApplicationWorkspace } from "./PatentApplicationWorkspace"; import { PlanningLayoutWorkspace } from "./PlanningLayoutWorkspace"; +import { + ProductPatentApplicationDomain, + ProductPatentLedgerDomain, + type LinkEntryProductPatentDashboardComponent, + type LinkEntryProductPatentDashboardUser, + type ProductPatentLedgerTarget, +} from "./ProductPatentDomain"; import { ProductLimitWorkspace } from "./ProductLimitWorkspace"; import { ProductPricingWorkspace } from "./ProductPricingWorkspace"; import { ProjectReviewWorkspace } from "./ProjectReviewWorkspace"; @@ -803,14 +808,6 @@ import { } from "@/lib/open-product/platform-view"; type DocumentWorkspaceView = "detail" | "document"; -type ProductPatentLedgerTarget = { - productId?: string; - patentGroupKey?: string; - applicationNo?: string; - patentNo?: string; - spu?: string; - patentName?: string; -}; type LinkEntryWorkspaceTab = | { id: string; @@ -824,22 +821,6 @@ type LinkEntryWorkspaceTab = label: string; target: ProductPatentLedgerTarget; }; -type LinkEntryProductPatentDashboardUser = { - id: string; - name: string; - email: string; - role: string; - businessRoles?: string[]; - departmentPaths?: string[]; - avatar: string | null; - department: { id: string; name: string } | null; -}; -type LinkEntryProductPatentDashboardComponent = ComponentType<{ - products: NonIntegratedProductRecord[]; - user: LinkEntryProductPatentDashboardUser; - target?: ProductPatentLedgerTarget; - readOnly?: boolean; -}>; type InstallationStyleEntry = { key: string; label: string; @@ -18599,7 +18580,7 @@ export default function NonIntegratedDetailClient({ } function renderPatentApplicationWorkspace() { return ( - - 正在打开产品专利明细... - - ); - } - return ( - ); } diff --git a/furniture-3d-system/src/app/intake/non-integrated/ProductPatentDomain.tsx b/furniture-3d-system/src/app/intake/non-integrated/ProductPatentDomain.tsx new file mode 100644 index 00000000..b8be4fba --- /dev/null +++ b/furniture-3d-system/src/app/intake/non-integrated/ProductPatentDomain.tsx @@ -0,0 +1,118 @@ +"use client"; + +import type { ComponentType, ReactNode } from "react"; +import type { PatentApplicationFieldKey } from "./openingReferenceHelpers"; +import type { + NonIntegratedOpeningReference, + NonIntegratedPatentApplication, + NonIntegratedProductRecord, +} from "./nonIntegratedStorage"; +import { PatentApplicationWorkspace } from "./PatentApplicationWorkspace"; + +export type ProductPatentLedgerTarget = { + productId?: string; + patentGroupKey?: string; + applicationNo?: string; + patentNo?: string; + spu?: string; + patentName?: string; +}; + +export type LinkEntryProductPatentDashboardUser = { + id: string; + name: string; + email: string; + role: string; + businessRoles?: string[]; + departmentPaths?: string[]; + avatar: string | null; + department: { id: string; name: string } | null; +}; + +export type LinkEntryProductPatentDashboardComponent = ComponentType<{ + products: NonIntegratedProductRecord[]; + user: LinkEntryProductPatentDashboardUser; + target?: ProductPatentLedgerTarget; + readOnly?: boolean; +}>; + +type ProductPatentApplicationDomainProps = { + patentApplication: NonIntegratedPatentApplication; + openingReference: NonIntegratedOpeningReference; + formSpu: string; + formDesigner: string; + copiedFromSpu?: string; + currentProductDisplayName: string; + sharedProductImage: string; + sharedProductImageName: string; + isReadOnly: boolean; + confirmationAction: ReactNode; + onFieldChange: (field: PatentApplicationFieldKey, value: string) => void; + onPreviewImage: (src: string, alt: string) => void; + onOpenLedger: () => void; +}; + +type ProductPatentLedgerDomainProps = { + dashboard: LinkEntryProductPatentDashboardComponent | null; + product: NonIntegratedProductRecord | null; + user: LinkEntryProductPatentDashboardUser; + target: ProductPatentLedgerTarget; +}; + +export function ProductPatentApplicationDomain({ + patentApplication, + openingReference, + formSpu, + formDesigner, + copiedFromSpu, + currentProductDisplayName, + sharedProductImage, + sharedProductImageName, + isReadOnly, + confirmationAction, + onFieldChange, + onPreviewImage, + onOpenLedger, +}: ProductPatentApplicationDomainProps) { + return ( + + ); +} + +export function ProductPatentLedgerDomain({ + dashboard: Dashboard, + product, + user, + target, +}: ProductPatentLedgerDomainProps) { + if (!Dashboard) { + return ( +
+ 正在打开产品专利明细... +
+ ); + } + + return ( + + ); +}