fix(portfolio): open the bulk-upload dialog from "Bulk excel import"

The BulkUploadComingSoonModal (drag/drop upload, template download, header
validation → creates the upload and routes into the map-columns onboarding
step) existed but was never wired to anything. The "Bulk excel import" menu
item routed to the uploads list instead. Point it at the dialog so the bulk
upload onboarding starts from there.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jun-te Kim 2026-07-07 11:53:26 +00:00
parent fe55a28622
commit 1ac9f0fdcf

View file

@ -17,6 +17,7 @@ import {
} from "@heroicons/react/24/outline";
import { useRouter } from "next/navigation";
import { HomeIcon } from "@heroicons/react/24/outline";
import BulkUploadComingSoonModal from "@/app/components/portfolio/BulkUploadComingSoonModal";
import { sapToEpc } from "@/app/utils";
import { columns } from "@/app/portfolio/[slug]/components/propertyTableColumns";
import { PropertyWithRelations } from "@/app/db/schema/property";
@ -307,6 +308,7 @@ export default function PropertyTable({
}) {
const router = useRouter();
const [sidebarOpen, setSidebarOpen] = useState(false);
const [bulkImportOpen, setBulkImportOpen] = useState(false);
const [committedAddress, setCommittedAddress] = useState("");
const [committedPostcode, setCommittedPostcode] = useState("");
@ -655,9 +657,7 @@ export default function PropertyTable({
</DropdownMenuItem>
<DropdownMenuItem
className="flex items-start gap-3 cursor-pointer rounded-lg p-3"
onSelect={() =>
router.push(`/portfolio/${portfolioId}/bulk-upload`)
}
onSelect={() => setBulkImportOpen(true)}
>
<DocumentArrowUpIcon className="h-[18px] w-[18px] mt-0.5 text-gray-700 shrink-0" />
<span className="flex-1">
@ -671,6 +671,12 @@ export default function PropertyTable({
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<BulkUploadComingSoonModal
isOpen={bulkImportOpen}
onClose={() => setBulkImportOpen(false)}
portfolioId={portfolioId}
/>
</div>
</div>