diff --git a/furniture-3d-system/src/app/asset-center/AssetCenterClient.test.tsx b/furniture-3d-system/src/app/asset-center/AssetCenterClient.test.tsx index c7d42c27..3d5a3b30 100644 --- a/furniture-3d-system/src/app/asset-center/AssetCenterClient.test.tsx +++ b/furniture-3d-system/src/app/asset-center/AssetCenterClient.test.tsx @@ -520,13 +520,14 @@ describe('AssetCenterClient', () => { ) expect(screen.getByTestId('family-status-family-board-available')).toHaveTextContent('可用') - expect(screen.getByTestId('family-status-family-board-available')).toHaveClass('h-7') + expect(screen.getByTestId('family-status-family-board-available')).toHaveClass('h-5') expect(screen.getByTestId('family-status-family-board-available')).not.toHaveClass('h-4') await actor.click(screen.getByText('可用桌面板资产族')) + expect(screen.queryByText(/适用品类系列/)).not.toBeInTheDocument() expect(screen.getByTestId('variant-status-variant-board-rejected')).toHaveTextContent('已驳回') - expect(screen.getByTestId('variant-status-variant-board-rejected')).toHaveClass('h-7') + expect(screen.getByTestId('variant-status-variant-board-rejected')).toHaveClass('h-5') expect(screen.getByRole('button', { name: '提审' })).toBeInTheDocument() }) diff --git a/furniture-3d-system/src/app/asset-center/AssetCenterClient.tsx b/furniture-3d-system/src/app/asset-center/AssetCenterClient.tsx index 39e49474..99f0fe33 100644 --- a/furniture-3d-system/src/app/asset-center/AssetCenterClient.tsx +++ b/furniture-3d-system/src/app/asset-center/AssetCenterClient.tsx @@ -326,21 +326,6 @@ function parseVariantUvEditorFormState( } } -function isFamilyCompatibleWithSeries( - family: AssetFamilyDTO, - seriesCode: string | null | undefined, -): boolean { - if (!seriesCode) { - return true - } - - if (!family.applicableSeriesCodes || family.applicableSeriesCodes.length === 0) { - return true - } - - return family.applicableSeriesCodes.includes(seriesCode) -} - function isEditableElement(target: EventTarget | null) { if (!(target instanceof HTMLElement)) { return false @@ -909,28 +894,34 @@ function canReviewAssets(role: string): boolean { } const compactRowActionClassName = - 'inline-flex h-7 items-center rounded-[4px] border border-black/[0.04] bg-black/[0.03] px-2 text-[11px] text-[#5a6062] transition hover:border-black/10 hover:bg-black/[0.05] hover:text-[#2d3335] disabled:cursor-not-allowed disabled:opacity-50' + 'inline-flex h-6 items-center rounded-[4px] px-1.5 text-[10px] font-apple-bold text-[#687477] transition hover:bg-black/[0.045] hover:text-[#263033] disabled:cursor-not-allowed disabled:opacity-45' const compactRowPrimaryActionClassName = - 'inline-flex h-7 items-center rounded-[4px] border border-[#101719]/15 bg-black/[0.045] px-2 text-[11px] font-bold text-[#101719] transition hover:bg-black/[0.07] disabled:cursor-not-allowed disabled:opacity-50' + 'inline-flex h-6 items-center rounded-[4px] bg-[#edf1f1] px-1.5 text-[10px] font-apple-bold text-[#101719] transition hover:bg-[#e3e9e9] disabled:cursor-not-allowed disabled:opacity-45' const compactRowDangerActionClassName = - 'inline-flex h-7 items-center rounded-[4px] border border-red-500/10 bg-red-500/5 px-2 text-[11px] text-red-600 transition hover:bg-red-500/10 disabled:cursor-not-allowed disabled:opacity-50' + 'inline-flex h-6 items-center rounded-[4px] px-1.5 text-[10px] font-apple-bold text-red-600 transition hover:bg-red-500/10 disabled:cursor-not-allowed disabled:opacity-45' const compactRowNeutralStatusClassName = - 'inline-flex h-7 shrink-0 items-center rounded-[4px] border border-black/[0.04] bg-black/[0.03] px-2 text-[11px] text-[#5a6062]' + 'inline-flex h-5 shrink-0 items-center rounded-[3px] bg-[#eef2f2] px-1.5 text-[10px] font-apple-bold text-[#687477]' const compactRowSuccessStatusClassName = - 'inline-flex h-7 shrink-0 items-center rounded-[4px] border border-[#101719]/10 bg-black/[0.035] px-2 text-[11px] font-bold text-[#3f4a4d]' + 'inline-flex h-5 shrink-0 items-center rounded-[3px] bg-[#e8eeee] px-1.5 text-[10px] font-apple-bold text-[#3f4a4d]' const compactRowWarningStatusClassName = - 'inline-flex h-7 shrink-0 items-center rounded-[4px] border border-[#101719]/10 bg-black/[0.035] px-2 text-[11px] text-[#5a6062]' + 'inline-flex h-5 shrink-0 items-center rounded-[3px] bg-[#f0eeee] px-1.5 text-[10px] font-apple-bold text-[#6a6260]' const compactRowDangerStatusClassName = - 'inline-flex h-7 shrink-0 items-center rounded-[4px] border border-red-500/10 bg-red-500/5 px-2 text-[11px] text-red-600' + 'inline-flex h-5 shrink-0 items-center rounded-[3px] bg-red-500/[0.08] px-1.5 text-[10px] font-apple-bold text-red-600' const compactRowIconActionClassName = - 'inline-flex h-7 w-7 items-center justify-center rounded-[4px] border border-black/[0.04] bg-black/[0.03] text-[#5a6062] transition hover:border-black/10 hover:bg-black/[0.05] hover:text-[#2d3335]' + 'inline-flex h-6 w-6 items-center justify-center rounded-[4px] text-[#7a878a] transition hover:bg-black/[0.045] hover:text-[#263033]' + +const variantInlineCreateButtonClassName = + 'flex h-9 min-w-0 items-center justify-center gap-2 rounded-[5px] border border-black/[0.08] bg-white px-3 text-[11px] font-black text-[#263033] shadow-[0_1px_2px_rgba(16,23,25,0.04)] transition hover:border-black/[0.14] hover:bg-[#f8faf9] hover:text-[#101719] focus-visible:ring-1 focus-visible:ring-[#2d3335]/15' + +const variantInlineImportButtonClassName = + 'flex h-9 min-w-0 items-center justify-center gap-2 rounded-[5px] border border-black/[0.08] bg-white px-3 text-[11px] font-black text-[#263033] shadow-[0_1px_2px_rgba(16,23,25,0.04)] transition hover:border-black/[0.14] hover:bg-[#f8faf9] hover:text-[#101719] focus-visible:ring-1 focus-visible:ring-[#2d3335]/15' type ReviewDialogState = { targetType: 'family' | 'variant' @@ -1078,19 +1069,6 @@ export default function AssetCenterClient({ () => families.find((family) => family.id === editingFamilyId) ?? null, [editingFamilyId, families], ) - const seriesTemplates = initialSeriesTemplates - const seriesTemplateByCode = useMemo( - () => new Map(seriesTemplates.map((template) => [template.code, template])), - [seriesTemplates], - ) - const seriesTemplateOptions = useMemo( - () => - seriesTemplates.map((template) => ({ - value: template.code, - label: `${template.name} · ${template.seriesName}`, - })), - [seriesTemplates], - ) const selectedFinish = useMemo( () => { if (!variantSubstrateDirty && selectedVariant?.finish) { @@ -2917,7 +2895,7 @@ export default function AssetCenterClient({ return ( <> -