diff --git a/apps/web/src/components/projects/ProjectWizard.tsx b/apps/web/src/components/projects/ProjectWizard.tsx index be99eb2..4ff8335 100644 --- a/apps/web/src/components/projects/ProjectWizard.tsx +++ b/apps/web/src/components/projects/ProjectWizard.tsx @@ -1,1288 +1,15 @@ "use client"; -import { createPortal } from "react-dom"; -import { useState, useEffect, useMemo, useRef } from "react"; -import { clsx } from "clsx"; -import type { StaffingRequirement, BlueprintFieldDefinition } from "@capakraken/shared"; -import { BlueprintTarget, FieldType, RolePresetsSchema } from "@capakraken/shared"; -import { trpc } from "~/lib/trpc/client.js"; -import { uuid } from "~/lib/uuid.js"; -import { DateInput } from "~/components/ui/DateInput.js"; -import { SkillTagInput } from "~/components/ui/SkillTagInput.js"; -import { usePermissions } from "~/hooks/usePermissions.js"; -import { InfoTooltip } from "~/components/ui/InfoTooltip.js"; -import { formatCents } from "~/lib/format.js"; import { ConfettiBurst } from "~/components/ui/ConfettiBurst.js"; import { SuccessToast } from "~/components/ui/SuccessToast.js"; -import { useAnchoredOverlay } from "~/hooks/useAnchoredOverlay.js"; -import { - ORDER_TYPE_OPTIONS, - ALLOCATION_TYPE_OPTIONS, - BTN_PRIMARY, - BTN_SECONDARY, - STEPS, - makeReq, - type Assignment, - type WizardState, - type SuggestionItem, -} from "./project-wizard/types.js"; +import { BTN_PRIMARY, BTN_SECONDARY } from "./project-wizard/types.js"; import { useProjectWizardForm } from "./project-wizard/useProjectWizardForm.js"; - -// ─── Step indicators ───────────────────────────────────────────────────────── - -function StepBar({ current }: { current: number }) { - return ( -
- {STEPS.map((label, idx) => ( -
-
-
- {idx < current ? "✓" : idx + 1} -
- - {label} - -
- {idx < STEPS.length - 1 && ( -
- )} -
- ))} -
- ); -} - -// ─── Dynamic Field Input ────────────────────────────────────────────────────── - -function DynamicFieldInput({ - field, - value, - onChange, -}: { - field: BlueprintFieldDefinition; - value: unknown; - onChange: (key: string, val: unknown) => void; -}) { - const strVal = value !== undefined && value !== null ? String(value) : ""; - const arrVal = Array.isArray(value) ? (value as string[]) : []; - - switch (field.type) { - case FieldType.TEXTAREA: - return ( -