PageSourceSearch

https://compubrainexpert.com/assets/quote-status-DhmpY8mB.js

js compubrainexpert.com collected 2026-09-30 06:40:57 UTC 5,841 bytes, 1 lines download raw bytes

1import{r as i,j as e,L as S}from"./index-Bd8H2eI-.js";import{u as k}from"./useServerFn-C28kv-Qm.js";import{L as C}from"./Layout-g57e8EAA.js";import{B as L}from"./button-DUXNn62U.js";import{I as j}from"./input-CcNwb0yS.js";import{L as N}from"./label-C_CxEqSX.js";import{B as q}from"./badge-DMaBN2v1.js";import{l as F,q as E}from"./business-quote.functions-DzNte1zb.js";import{L as I}from"./loader-circle-Dony5JSH.js";import{S as D}from"./search-C3X_wl1X.js";import{C as Q}from"./circle-x-DonnCLK_.js";import{C as T}from"./circle-check-BuL_ZtWL.js";import{F as w}from"./file-text-auOg4sLN.js";import{C as y}from"./clock-BN1X_fkV.js";import"./index-Dot946r2.js";import"./use-auth-C0tpqzqO.js";import"./index-BfQKQZDS.js";import"./index-DGocwkQy.js";import"./index-CcA2RQE5.js";import"./Combination-JvzXc5JR.js";import"./index-DZuKcp8M.js";import"./index-DJ8vF3f1.js";import"./index-BbaGnVos.js";import"./check-B8_1mFvx.js";import"./index-CAQYpiav.js";import"./x-OROR5czD.js";import"./trash-2-B5FF4h8S.js";import"./plus-a2v8IACL.js";import"./phone-3VtaqEjy.js";import"./log-out-BEitqMfM.js";import"./mail-1Z_R5nU8.js";import"./map-pin-CJqn3d0z.js";import"./sparkles-CCYk1-GQ.js";import"./createServerFn-DT9RdALF.js";import"./types-lPmCx_cL.js";const B={new:{label:"Received",note:"We have your request and a specialist is reviewing it. Expect contact the same business day.",icon:y,className:"bg-amber-500 text-white hover:bg-amber-500"},in_review:{label:"In review",note:"We're pricing out the details for your team right now.",icon:w,className:"bg-blue-600 text-white hover:bg-blue-600"},quoted:{label:"Quote sent",note:"Your quote has been sent by email. Check your inbox (and spam folder).",icon:w,className:"bg-primary text-primary-foreground"},won:{label:"Completed",note:"All set — thanks for choosing us. Reach out any time for changes.",icon:T,className:"bg-green-600 text-white hover:bg-green-600"},closed:{label:"Closed",note:"This request is closed. Submit a new request if you'd still like a quote.",icon:Q,className:"bg-muted text-muted-foreground"}};function R(a){return B[a]??{label:a.replace(/_/g," "),note:"We'll be in touch with the next update.",icon:y,className:"bg-secondary text-secondary-foreground"}}function be(){const a=k(F),[o,c]=i.useState({}),[n,d]=i.useState(!1),[r,u]=i.useState(null),[x,l]=i.useState(null);async function v(h){h.preventDefault();const f=new FormData(h.currentTarget),m=E.safeParse({reference:String(f.get("reference")??""),email:String(f.get("email")??"")});if(!m.success){const t={};for(const g of m.error.issues){const b=String(g.path[0]);t[b]||(t[b]=g.message)}c(t);return}c({}),l(null),u(null),d(!0);try{const t=await a({data:m.data});t.ok?u(t.quote):l(t.error)}catch{l("Something went wrong. Please try again.")}finally{d(!1)}}const s=r?R(r.status):null,p=s?.icon;return e.jsx(C,{children:e.jsxs("main",{className:"container mx-auto max-w-2xl px-4 py-14",children:[e.jsxs("header",{className:"text-center",children:[e.jsx("h1",{className:"text-3xl font-bold tracking-tight md:text-4xl",children:"Quote status tracker"}),e.jsx("p",{className:"mx-auto mt-3 max-w-lg text-muted-foreground",children:"Enter the reference ID from your confirmation along with the email you used, and we'll show the latest update on your request."})]}),e.jsxs("form",{onSubmit:v,noValidate:!0,className:"mt-8 rounded-2xl border bg-card p-6 text-left md:p-8",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{htmlFor:"reference",children:"Reference ID"}),e.jsx(j,{id:"reference",name:"reference",maxLength:40,placeholder:"BQ-260805-AV4NG",className:"font-mono uppercase"}),o.reference&&e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:o.reference})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{htmlFor:"email",children:"Email on the request"}),e.jsx(j,{id:"email",name:"email",type:"email",maxLength:255,autoComplete:"email",placeholder:"[email protected]"}),o.email&&e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:o.email})]})]}),e.jsxs(L,{type:"submit",size:"lg",className:"mt-6 w-full sm:w-auto",disabled:n,children:[n?e.jsx(I,{className:"h-4 w-4 animate-spin"}):e.jsx(D,{className:"h-4 w-4"}),n?"Checking…":"Check status"]})]}),x&&e.jsx("div",{className:"mt-6 rounded-xl border border-destructive/40 bg-destructive/5 p-4 text-sm text-destructive",children:x}),r&&s&&p&&e.jsxs("section",{className:"mt-6 rounded-2xl border bg-card p-6 md:p-8",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Reference"}),e.jsx("p",{className:"font-mono text-lg font-semibold",children:r.reference})]}),e.jsxs(q,{className:s.className,children:[e.jsx(p,{className:"mr-1 h-3.5 w-3.5"}),s.label]})]}),e.jsxs("dl",{className:"mt-6 grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Service"}),e.jsx("dd",{className:"mt-1 font-medium",children:r.service_title})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Submitted"}),e.jsx("dd",{className:"mt-1 font-medium",children:new Date(r.created_at).toLocaleStr
1ing(void 0,{dateStyle:"medium",timeStyle:"short"})})]})]}),e.jsx("p",{className:"mt-6 rounded-xl bg-muted/50 p-4 text-sm text-muted-foreground",children:s.note})]}),e.jsxs("p",{className:"mt-8 text-center text-sm text-muted-foreground",children:["Lost your reference ID?"," ",e.jsx(S,{to:"/contact",className:"font-medium text-primary underline-offset-4 hover:underline",children:"Contact us"})," ","and we'll look it up for you."]})]})})}export{be as component};

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.