diff --git a/src/app/api/admin/import/clone/batch/route.ts b/src/app/api/admin/import/clone/batch/route.ts index eb31bbe2..6c4a32a5 100644 --- a/src/app/api/admin/import/clone/batch/route.ts +++ b/src/app/api/admin/import/clone/batch/route.ts @@ -34,6 +34,7 @@ export const POST = withAdmin( const body = await request.json(); const sourceId: string = body.sourceId || ""; const rawClassnames: string[] = body.classnames || []; + const isFinal = body.final === true; if (!sourceId) return apiError("Missing sourceId", 400); if (rawClassnames.length === 0) @@ -65,8 +66,8 @@ export const POST = withAdmin( } } - if (items.length > 500) - return apiError("Too many classnames (max 500)", 400); + if (items.length > 5000) + return apiError("Too many classnames (max 5000)", 400); // FurnitureData entries for successfully cloned items are appended once // at the end (single read-modify-write instead of one per item), which @@ -138,6 +139,8 @@ export const POST = withAdmin( ); } + if (!isFinal) return; + // Post-import consolidation, mirroring the furni batch route: // force offer_id to mirror its catalog row id, keep the // FurnitureData in sync with the new local sprite ids, verify diff --git a/src/components/admin/confirm-dialog.tsx b/src/components/admin/confirm-dialog.tsx index 53c68376..91704929 100644 --- a/src/components/admin/confirm-dialog.tsx +++ b/src/components/admin/confirm-dialog.tsx @@ -1,5 +1,6 @@ "use client"; +import { AlertTriangle } from "lucide-react"; import { AnimatePresence, motion } from "motion/react"; import { useCallback, useEffect, useRef, useState } from "react"; import { createPortal } from "react-dom"; @@ -77,7 +78,7 @@ export function ConfirmDialog({ )} + + {selectedMissingNitro.length > 0 && !batchProgress && ( + + )} + + {selectedImported.length > 0 && !batchProgress && ( + + )} {/* ── Body: rail + grid + drawer ────────────────────── */}