feat: duplicate product detection — STEP conflict warnings on Excel import and CAD upload
- Excel preview detects when a product already has a different STEP file linked - Excel preview detects intra-Excel conflicts (same product, different CAD model names) - Product STEP upload warns when replacing an existing file and shows render count - All warnings are non-blocking (amber badges, toast warnings) - LEARNINGS.md: all open items resolved Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -126,6 +126,8 @@ export interface ProductCadUploadResponse {
|
||||
file_hash: string
|
||||
status: string
|
||||
product_id: string
|
||||
warnings?: string[]
|
||||
existing_render_count?: number
|
||||
}
|
||||
|
||||
export async function uploadProductCad(id: string, file: File): Promise<ProductCadUploadResponse> {
|
||||
|
||||
@@ -13,6 +13,12 @@ export interface ExcelPreviewRow {
|
||||
has_step: boolean
|
||||
is_duplicate: boolean
|
||||
duplicate_of_row: number | null
|
||||
step_conflict: boolean
|
||||
step_conflict_existing_name: string | null
|
||||
step_conflict_excel_name: string | null
|
||||
cad_name_conflict: boolean
|
||||
cad_name_conflict_other_name: string | null
|
||||
cad_name_conflict_row: number | null
|
||||
}
|
||||
|
||||
export interface ExcelPreviewResult {
|
||||
@@ -26,6 +32,8 @@ export interface ExcelPreviewResult {
|
||||
has_step_count: number
|
||||
no_step_count: number
|
||||
duplicate_count: number
|
||||
step_conflict_count: number
|
||||
cad_name_conflict_count: number
|
||||
warnings: string[]
|
||||
rows: ExcelPreviewRow[]
|
||||
column_headers: string[]
|
||||
|
||||
Reference in New Issue
Block a user