+ {#each steps as step, i}
+
+ {#if i < steps.length - 1}
+
+ {/if}
+ {/each}
+
+ {#if submitError}
+
+
+
{submitError}
+
+
+ {/if}
+
+
+ {#if currentStep === 0}
+
+
+
+
+ Opportunity Details
+
+
+
+
+
+
+
+
+ Description
+
+
+
+
+
+
+ {:else if currentStep === 1}
+
+
+
+
+ Sales Team
+
+
+
+
+
+
+
+
+ Company
+
+
+
+
+
+
+
+ {:else if currentStep === 2}
+
+
+
+
+ Company Contact
+
+
+ {#if isLoadingCompanyDetails}
+
+
+ Loading company details…
+
+ {:else}
+
+
+ {#if selectedContact}
+
+ {/if}
+
+ {#if contacts.length === 0 && !isLoadingCompanyDetails}
+
+
+
No contacts found for this company
+
+ {/if}
+ {/if}
+
+
+
+
+
+ Company Site
+
+
+ {#if isLoadingCompanyDetails}
+
+
+ Loading site information…
+
+ {:else if companyAddress}
+
+
+
+
Primary Address
+
{companyAddress.line1 ?? ""}
+ {#if companyAddress.line2}
+
{companyAddress.line2}
+ {/if}
+
+ {companyAddress.city ?? ""}{companyAddress.city &&
+ companyAddress.state
+ ? ", "
+ : ""}{companyAddress.state ?? ""}
+ {companyAddress.zip ?? ""}
+
+ {#if companyAddress.country && companyAddress.country !== "United States"}
+
{companyAddress.country}
+ {/if}
+
+
+ {:else}
+
+
+
No address on file for this company
+
+ {/if}
+
+
+
+
+ {:else if currentStep === 3}
+
+
+
+
+
+
+
+
+ Details
+
+
+
+
- Expected Close
+ -
+ {new Date(
+ expectedCloseDate + "T00:00:00",
+ ).toLocaleDateString("en-US", {
+ month: "long",
+ day: "numeric",
+ year: "numeric",
+ })}
+
+
+ {#if source}
+
+
- Source
+ - {source}
+
+ {/if}
+ {#if customerPO}
+
+
- Customer PO
+ - {customerPO}
+
+ {/if}
+
+
+
+
+
+
+ Assignment
+
+
+
+
- Primary Rep
+ - {selectedPrimaryRep?.name || "—"}
+
+ {#if selectedSecondaryRep}
+
+
- Secondary Rep
+ - {selectedSecondaryRep.name}
+
+ {/if}
+
+
- Company
+ - {companyName || "—"}
+
+
+
+
+
+
+
+ Contact & Site
+
+
+
+
- Contact
+ -
+ {selectedContact
+ ? `${selectedContact.firstName} ${selectedContact.lastName}`
+ : "—"}
+
+
+ {#if companyAddress}
+
+
- Site
+ -
+ {companyAddress.city ?? ""}{companyAddress.city &&
+ companyAddress.state
+ ? ", "
+ : ""}{companyAddress.state ?? ""}
+
+
+ {/if}
+
+
+
+
+ {#if description}
+
+
+
+ Description
+
+
{description}
+
+ {/if}
+
+
+
+
+ {/if}
+