feat: purchase-plans global update

This commit is contained in:
ivannoskov
2026-02-02 21:01:11 +03:00
parent f9c334ba22
commit 735077e707
11 changed files with 2575 additions and 534 deletions

View File

@@ -83,6 +83,7 @@ export default function PlacementDetailPage() {
const [placement, setPlacement] = useState<Placement | null>(null);
const [loading, setLoading] = useState(true);
const [copiedLink, setCopiedLink] = useState(false);
const [projectId, setProjectId] = useState<string | null>(null);
const canWrite = hasPermission("placements_write");
@@ -93,8 +94,14 @@ export default function PlacementDetailPage() {
const loadPlacement = async () => {
try {
setLoading(true);
// First, try to load placement without project_id (deprecated endpoint)
// If that fails, we'd need projectId
const data = await placementsApi.get(workspaceId, placementId);
setPlacement(data);
// Store projectId from placement for future operations
if (data.project?.id) {
setProjectId(data.project.id);
}
} catch (err) {
console.error("Failed to load placement:", err);
} finally {

File diff suppressed because it is too large Load Diff