PageSourceSearch

https://crediarc-marketing.pages.dev/assets/KYBQuestionnaire-DM1UhZMM.js

js crediarc-marketing.pages.dev collected 2026-10-03 06:40:08 UTC 6,420 bytes, 1 lines download raw bytes

1import{j as e}from"./main-BTCjLP8H.js";import{r as x,f as g}from"./marketing-Cm_MclIW.js";import{B as N}from"./button-Cehk8y_M.js";import{I as j,s as C}from"./input-N7lEMOD2.js";import{L as l}from"./label-D_jLc9rm.js";import{C as _,a as O,b as S,c as R,d as w}from"./card-DwiC-A_6.js";import{S as t,b as o,d as u,e as c,f as r}from"./select-Bh0jiFxx.js";import{u as E,e as T}from"./App-DtIaMnaG.js";import"./index-DX77wubG.js";import"./index-BH7Nkt5p.js";import"./index-X_jj8t3W.js";import"./circle-check-B31OGsv6.js";import"./dialog-CQXU5JzC.js";import"./users-tByqXxNX.js";import"./search-DasWx0C2.js";import"./textarea-C7DxxIz4.js";import"./checkbox-CWq1ygIz.js";import"./file-text-D5B4dsMv.js";import"./landmark-D9qk8Fyj.js";import"./database-gdzDopE4.js";import"./download-UF-cIb8d.js";import"./trash-2-y34zGtNc.js";import"./papaparse.min-lvSF84In.js";import"./external-link-DOds-Ka4.js";import"./refresh-cw-_Nt0OPsg.js";import"./html2canvas.esm-DXEQVQnt.js";import"./arrow-down-Qwzta_YA.js";import"./chart-column-tfeTS3_6.js";import"./git-merge-DNuRegLg.js";import"./bot-C6J91ffr.js";import"./file-spreadsheet-2Y_kj4EM.js";import"./calculator-BOVXcSwz.js";const ue=()=>{const[n,v]=x.useState({businessName:"",businessType:"",industry:"",userRole:"",annualRevenue:"",numberOfEmployees:"",countryOfOperation:""}),[d,m]=x.useState(!1),{toast:p}=E(),y=g(),{user:h}=T(),f=async s=>{s.preventDefault(),m(!0);try{if(!h)throw new Error("No user found");const{error:i}=await C.from("profiles").update({business_name:n.businessName,business_type:n.businessType,industry:n.industry,user_role:n.userRole,annual_revenue:n.annualRevenue,number_of_employees:n.numberOfEmployees,country_of_operation:n.countryOfOperation,kyb_completed:!0}).eq("user_id",h.id);if(i)throw i;p({title:"Profile completed!",description:"Welcome to CredArc. Your business profile has been set up successfully."}),y("/")}catch(i){console.error("Error updating profile:",i),p({title:"Error",description:"Failed to update your profile. Please try again.",variant:"destructive"})}finally{m(!1)}},a=(s,i)=>{v(b=>({...b,[s]:i}))};return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-background/50 flex items-center justify-center p-8",children:e.jsxs(_,{className:"w-full max-w-2xl shadow-lg",children:[e.jsxs(O,{className:"text-center space-y-2",children:[e.jsx(S,{className:"text-2xl font-bold",children:"Complete Your Business Profile"}),e.jsx(R,{children:"Please provide some basic information about your business to get started with CredArc"})]}),e.jsx(w,{children:e.jsxs("form",{onSubmit:f,className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"businessName",children:"Business Name *"}),e.jsx(j,{id:"businessName",value:n.businessName,onChange:s=>a("businessName",s.target.value),required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"userRole",children:"Your Role *"}),e.jsxs(t,{value:n.userRole,onValueChange:s=>a("userRole",s),required:!0,children:[e.jsx(o,{children:e.jsx(u,{placeholder:"Select your role"})}),e.jsxs(c,{children:[e.jsx(r,{value:"broker",children:"Broker"}),e.jsx(r,{value:"underwriter",children:"Underwriter"}),e.jsx(r,{value:"insurance_client",children:"Insurance Client"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"businessType",children:"Business Type"}),e.jsxs(t,{value:n.businessType,onValueChange:s=>a("businessType",s),children:[e.jsx(o,{children:e.jsx(u,{placeholder:"Select business type"})}),e.jsxs(c,{children:[e.jsx(r,{value:"corporation",children:"Corporation"}),e.jsx(r,{value:"llc",children:"LLC"}),e.jsx(r,{value:"partnership",children:"Partnership"}),e.jsx(r,{value:"sole_proprietorship",children:"Sole Proprietorship"}),e.jsx(r,{value:"other",children:"Other"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"industry",children:"Industry"}),e.jsxs(t,{value:n.industry,onValueChange:s=>a("industry",s),children:[e.jsx(o,{children:e.jsx(u,{placeholder:"Select industry"})}),e.jsxs(c,{children:[e.jsx(r,{value:"manufacturing",children:"Manufacturing"}),e.jsx(r,{value:"retail",children:"Retail"}),e.jsx(r,{value:"technology",children:"Technology"}),e.jsx(r,{value:"healthcare",children:"Healthcare"}),e.jsx(r,{value:"finance",children:"Finance"}),e.jsx(r,{value:"real_estate",children:"Real Estate"}),e.jsx(r,{value:"construction",children:"Construction"}),e.jsx(r,{value:"agriculture",children:"Agriculture"}),e.jsx(r,{value:"transportation",children:"Transportation"}),e.jsx(r,{value:"other",children:"Other"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"annualRevenue",children:"Annual Revenue"}),e.jsxs(t,{value:n.annualRevenue,onValueChange:s=>a("annualRevenue",s),children:[e.jsx(o,{children:e.jsx(u,{placeholder:"Select revenue range"})}),e.jsxs(c,{children:[e.jsx(r,{value:"under_1m",children:"Under $1M"}),e.jsx(r,{value:"1m_10m",children:"$1M - $10M"}),e.jsx(r,{value:"10m_50m",children:"$10M - $50M"}),e.jsx(r,{value:"50m_100m",children:"$50M - $100M"}),e.jsx(r,{value:"over_100m",children:"Over $100M"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"numberOfEmployees",children:"Number of Employees"}),e.jsxs(t,{value:n.numberOfEmployees,onValueChange:s=>a("numberOfEmployees",s),children:[e.jsx(o,{children:e.jsx(u,{placeholder:"Select employee count"})}),e.jsxs(c,{children:[e.jsx(r,{value:"1_10",children:"1-10"}),e.jsx(r,{value:"11_50",children:"11-50"}),e.jsx(r,{value:"51_200",children:"51-200"}),e.jsx(r,{value:"201_500",children:"201-500"}),e.jsx(r,{value:"over_500",children:"Over 500"})]})]})]}),e.jsxs("div",{className:"space-y-2 md:col-span-2",children:[e.jsx(l,{htmlFor:"countryOfOperation",children:"Primary Country of Operation"}),e.jsx(j,{id:"countryOfOperation",value:n.countryOfOperation,onChange:s=>a("countryOfOperation",s.target.value),placeholder:"e.g., United States"})]})]}),e.jsxs("div",{className:"flex flex-col space-y-4",children:[e.jsx(N,{type:"submit",className:"w-full",disabled:d||!n.businessName||!n.userRole,children:d?"Completing Setup...":"Complete Setup"}),e.jsx("div",{className:"text-center text-sm text-muted-foreground",children:"This information helps us provide you with a better experience tailored to your business needs."})]})]})})]})})};export{ue as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.