PageSourceSearch

https://smartmanageai.ai/assets/bid-inbox-BFClGAac.js

js smartmanageai.ai collected 2026-10-05 15:07:42 UTC 23,069 bytes, 1 lines download raw bytes

1import{r as y,j as e}from"./vendor-react-DKbe1Umz.js";import{H as se,bu as te,C as m,v as h,A as ae,S as ie,g as ne,h as re,i as le,j as S,E as de,F as E,s as f,a as U,u as I,o as P,B as d,t as D,L as l,T as C,l as v,K as w,D as V,Z as G,c as W,d as z,e as Q,f as K,n as Y,I as q,P as F,O as T,k as B,R as O}from"./index-DZ74KeH3.js";import{u as H,a as A}from"./vendor-data-CjSe2wkl.js";import{C as $}from"./calendar-D1tc6ow-.js";import{ay as _,cd as X,ce as k,bG as oe,i as ce,c1 as ue,M as L,bz as xe,k as M,U as me,cD as Z,b8 as he}from"./vendor-ui-DMaW9-Ov.js";import{a as b,p as R}from"./vendor-dates-5UNeOyFW.js";import"./vendor-charts-DWX9qznF.js";import"./vendor-forms-C2vWC2ab.js";function J({status:a}){const j={PENDING:{color:"bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200",icon:e.jsx(_,{className:"w-3 h-3"})},VIEWED:{color:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",icon:e.jsx(Z,{className:"w-3 h-3"})},DECLINED:{color:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",icon:e.jsx(k,{className:"w-3 h-3"})},RESPONDED:{color:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",icon:e.jsx(X,{className:"w-3 h-3"})},WITHDRAWN:{color:"bg-muted text-muted-foreground",icon:e.jsx(k,{className:"w-3 h-3"})}},o=j[a]||j.PENDING;return e.jsxs(v,{className:`${o.color} gap-1`,children:[o.icon,a]})}function pe({invitation:a,onRefresh:j}){const[,o]=U(),{toast:c}=I(),[g,s]=y.useState(!1),[r,t]=y.useState(""),u=Math.ceil((new Date(a.request.bidDueDate).getTime()-Date.now())/(1e3*60*60*24)),p=u<0,i=u<=3&&u>=0,n=A({mutationFn:async()=>{await P("POST",`/api/bid-network/inbox/${a.id}/decline`,{reason:r})},onSuccess:()=>{c({title:"Invitation declined"}),s(!1),j()},onError:()=>{c({title:"Error",description:"Failed to decline invitation",variant:"destructive"})}});return e.jsxs(m,{className:"hover-elevate","data-testid":`card-invitation-${a.id}`,children:[e.jsx(f,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(xe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm text-muted-foreground truncate",children:a.gcOrganization.name})]}),e.jsx(D,{className:"text-lg truncate",children:a.request.title})]}),e.jsx(J,{status:a.status})]})}),e.jsxs(h,{children:[e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-3",children:a.request.description||a.request.scopeOfWork}),e.jsxs("div",{className:"flex flex-wrap gap-1 mb-3",children:[a.request.requiredTrades.slice(0,3).map(N=>e.jsx(v,{variant:"secondary",className:"text-xs",children:N.replace(/_/g," ")},N)),a.request.requiredTrades.length>3&&e.jsxs(v,{variant:"secondary",className:"text-xs",children:["+",a.request.requiredTrades.length-3]})]}),e.jsxs("div",{className:"flex items-center justify-between text-sm mb-3",children:[e.jsxs("div",{className:`flex items-center gap-1 ${p?"text-destructive":i?"text-amber-600":"text-muted-foreground"}`,children:[e.jsx(M,{className:"w-3 h-3"}),e.jsx("span",{children:p?"Overdue":i?`Due in ${u} days`:`Due: ${b(new Date(a.request.bidDueDate),"MMM d, yyyy")}`})]}),a.request.budgetRangeMin&&a.request.budgetRangeMax&&e.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(me,{className:"w-3 h-3"}),e.jsxs("span",{children:["$",(a.request.budgetRangeMin/1e3).toFixed(0),"K - $",(a.request.budgetRangeMax/1e3).toFixed(0),"K"]})]})]}),a.myResponse&&e.jsx("div",{className:"bg-muted/50 rounded-md p-2 mb-3",children:e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Your Response:"}),e.jsxs(v,{variant:a.myResponse.status==="SUBMITTED"?"default":"secondary",children:["$",a.myResponse.totalBidAmount.toLocaleString()," -"," ",a.myResponse.status]})]})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(d,{variant:"default",size:"sm",className:"flex-1",onClick:()=>o(`/bid-inbox/${a.id}`),"data-testid":`button-view-${a.id}`,children:[e.jsx(Z,{className:"w-3 h-3 mr-1"}),"View Details"]}
1),a.status!=="DECLINED"&&a.status!=="RESPONDED"&&e.jsxs(V,{open:g,onOpenChange:s,children:[e.jsx(G,{asChild:!0,children:e.jsxs(d,{variant:"outline",size:"sm","data-testid":`button-decline-${a.id}`,children:[e.jsx(k,{className:"w-3 h-3 mr-1"}),"Decline"]})}),e.jsxs(W,{children:[e.jsxs(z,{children:[e.jsx(Q,{children:"Decline Invitation"}),e.jsx(K,{children:"Let the GC know why you're declining this bid request."})]}),e.jsx("div",{className:"grid gap-4 py-4",children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"reason",children:"Reason (optional)"}),e.jsx(C,{id:"reason",placeholder:"e.g., Not enough capacity, outside service area...",value:r,onChange:N=>t(N.target.value),"data-testid":"input-decline-reason"})]})}),e.jsxs(Y,{children:[e.jsx(d,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(d,{variant:"destructive",onClick:()=>n.mutate(),disabled:n.isPending,"data-testid":"button-confirm-decline",children:n.isPending?"Declining...":"Decline Invitation"})]})]})]})]})]})]})}function je({invitation:a,onSuccess:j}){var u,p;const[o,c]=y.useState(!1),{toast:g}=I(),[s,r]=y.useState({totalBidAmount:((p=(u=a.myResponse)==null?void 0:u.totalBidAmount)==null?void 0:p.toString())||"",laborCost:"",materialCost:"",equipmentCost:"",proposalNotes:"",scopeInclusions:"",scopeExclusions:"",assumptions:"",proposedStartDate:"",proposedDuration:"",quoteValidUntil:""}),t=A({mutationFn:async i=>{const n={invitationId:a.id,totalBidAmount:parseFloat(s.totalBidAmount),laborCost:s.laborCost?parseFloat(s.laborCost):null,materialCost:s.materialCost?parseFloat(s.materialCost):null,equipmentCost:s.equipmentCost?parseFloat(s.equipmentCost):null,proposalNotes:s.proposalNotes||null,scopeInclusions:s.scopeInclusions||null,scopeExclusions:s.scopeExclusions||null,assumptions:s.assumptions||null,proposedStartDate:s.proposedStartDate||null,proposedDuration:s.proposedDuration?parseInt(s.proposedDuration):null,quoteValidUntil:s.quoteValidUntil||null,status:i?"DRAFT":"SUBMITTED"};return(await P("POST","/api/bid-network/responses",n)).json()},onSuccess:(i,n)=>{g({title:n?"Draft saved":"Response submitted",description:n?"Your draft has been saved.":"Your bid response has been submitted to the GC."}),c(!1),j()},onError:()=>{g({title:"Error",description:"Failed to submit response",variant:"destructive"})}});return e.jsxs(V,{open:o,onOpenChange:c,children:[e.jsx(G,{asChild:!0,children:e.jsxs(d,{"data-testid":"button-submit-response",children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),a.myResponse?"Update Response":"Submit Response"]})}),e.jsxs(W,{className:"sm:max-w-2xl max-h-[85vh] overflow-y-auto",children:[e.jsxs(z,{children:[e.jsx(Q,{children:"Submit Bid Response"}),e.jsxs(K,{children:['Provide your quote and proposal details for "',a.request.title,'"']})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"totalBid",children:"Total Bid Amount ($) *"}),e.jsx(q,{id:"totalBid",type:"number",placeholder:"0.00",value:s.totalBidAmount,onChange:i=>r({...s,totalBidAmount:i.target.value}),"data-testid":"input-total-bid"})]}),e.jsx(w,{}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"labor",children:"Labor Cost ($)"}),e.jsx(q,{id:"labor",type:"number",placeholder:"0.00",value:s.laborCost,onChange:i=>r({...s,laborCost:i.target.value}),"data-testid":"input-labor-cost"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"material",children:"Material Cost ($)"}),e.jsx(q,{id:"material",type:"number",placeholder:"0.00",value:s.materialCost,onChange:i=>r({...s,materialCost:i.target.value}),"data-testid":"input-material-cost"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"equipment",children:"Equipment Cost ($)"}),e.jsx(q,{id:"equipment",type:"number",placeholder:"0.00",value:s.equipmentCost,onChange:i=>r({...s,equipmentCost:i.target.value}),"data-testid":"input-equipment-cost"})]})]}),e.jsx(w,{}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"notes",children:"Proposal Notes"}),e.jsx(C,{id:"notes",placeholder:"Additional details about your proposal...",value:s.proposalNotes,onChange:i=>r({...s,proposalNotes:i.target.value}),"data-testid":"input-proposal-notes"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"inclusions",children:"Scope Inclusions"}),e.jsx(C,{id:"inclusions",placeholder:"What's included in your bid...",value:s.scopeInclusions,onChange:i=>r({...s,scopeInclusions:i.target.value}),"data-testid":"input-inclusions"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"exclusions",children:"Scope Exclusions"}),e.jsx(C,{id:"exclusions",placeholder:"What's NOT included...",value:s.scopeExclusions,onChange:i=>r({...s,scopeExclusions:i.target.value}),"data-testid":"input-exclusions"})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"assumptions",children:"Assumptions"}),e.jsx(C,{id:"assumptions",placeholder:"Key assumptions your bid is based on...",value:s.assumptions,onChange:i=>r({...s,assumptions:i.target.value}),"data-testid":"input-assumptions"})]}),e.jsx(w,{}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"startDate",children:"Proposed Start Date"}),e.jsxs(F,{children:[e.jsx(T,{asChild:!0,children:e.jsxs(d,{variant:"outline",className:B("w-full justify-start text-left font-normal",!s.proposedStartDate&&"text-muted-foreground"),"data-testid":"input-start-date",children:[e.jsx(M,{className:"mr-2 h-4 w-4"}),s.proposedStartDate?b(R(s.proposedStartDate),"PPP"):"Pick a date"]})}),e.jsx(O,{className:"w-auto p-0",align:"start",children:e.jsx($,{mode:"single",selected:s.proposedStartDate?R(s.proposedStartDate):void 0,onSelect:i=>r({...s,proposedStartDate:i?b(i,"yyyy-MM-dd"):""}),initialFocus:!0})})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"duration",children:"Duration (days)"}),e.jsx(q,{id:"duration",type:"number",placeholder:"0",value:s.proposedDuration,onChange:i=>r({...s,proposedDuration:i.target.value}),"data-testid":"input-duration"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"validUntil",children:"Quote Valid Until"}),e.jsxs(F,{children:[e.jsx(T,{asChild:!0,children:e.jsxs(d,{variant:"outline",className:B("w-full justify-start text-left font-normal",!s.quoteValidUntil&&"text-muted-foreground"),"data-testid":"input-valid-u
1ntil",children:[e.jsx(M,{className:"mr-2 h-4 w-4"}),s.quoteValidUntil?b(R(s.quoteValidUntil),"PPP"):"Pick a date"]})}),e.jsx(O,{className:"w-auto p-0",align:"start",children:e.jsx($,{mode:"single",selected:s.quoteValidUntil?R(s.quoteValidUntil):void 0,onSelect:i=>r({...s,quoteValidUntil:i?b(i,"yyyy-MM-dd"):""}),initialFocus:!0})})]})]})]})]}),e.jsxs(Y,{className:"gap-2",children:[e.jsx(d,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(d,{variant:"secondary",onClick:()=>t.mutate(!0),disabled:!s.totalBidAmount||t.isPending,"data-testid":"button-save-draft-response",children:"Save Draft"}),e.jsx(d,{onClick:()=>t.mutate(!1),disabled:!s.totalBidAmount||t.isPending,"data-testid":"button-submit-final",children:t.isPending?"Submitting...":"Submit Response"})]})]})]})}function ge({invitationId:a}){const[,j]=U(),{toast:o}=I(),[c,g]=y.useState(!1),[s,r]=y.useState(""),{data:t,isLoading:u,refetch:p}=H({queryKey:["/api/bid-network/inbox",a]}),i=A({mutationFn:async()=>(await P("POST","/api/bid-network/clarifications",{bidRequestId:t==null?void 0:t.bidRequestId,question:s})).json(),onSuccess:()=>{o({title:"Question submitted",description:"The GC will be notified."}),g(!1),r(""),p()},onError:()=>{o({title:"Error",description:"Failed to submit question",variant:"destructive"})}});if(u)return e.jsx("div",{className:"container mx-auto p-6",children:e.jsxs(m,{className:"animate-pulse",children:[e.jsx(f,{children:e.jsx("div",{className:"h-8 bg-muted rounded w-1/2"})}),e.jsx(h,{children:e.jsx("div",{className:"h-40 bg-muted rounded"})})]})});if(!t)return e.jsx("div",{className:"container mx-auto p-6",children:e.jsx(m,{children:e.jsxs(h,{className:"flex flex-col items-center justify-center py-12",children:[e.jsx(ce,{className:"w-12 h-12 text-destructive mb-4"}),e.jsx("h3",{className:"text-lg font-medium mb-2",children:"Invitation not found"}),e.jsx(d,{onClick:()=>j("/bid-inbox"),"data-testid":"button-back-to-inbox",children:"Back to Inbox"})]})})});const N=Math.ceil((new Date(t.request.bidDueDate).getTime()-Date.now())/(1e3*60*60*24))<0,ee=!N&&t.status!=="DECLINED"&&t.request.status==="OPEN";return e.jsxs("div",{className:"container mx-w-full p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(d,{variant:"ghost",size:"icon",onClick:()=>j("/bid-inbox"),"data-testid":"button-back",children:e.jsx(ue,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h1",{className:"text-2xl font-bold","data-testid":"text-invitation-title",children:t.request.title}),e.jsxs("p",{className:"text-muted-foreground",children:["From ",t.gcOrganization.name]})]}),e.jsx(J,{status:t.status})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsxs(m,{children:[e.jsx(f,{children:e.jsx(D,{children:"Scope of Work"})}),e.jsxs(h,{children:[e.jsx("p",{className:"whitespace-pre-wrap","data-testid":"text-scope",children:t.request.scopeOfWork}),t.request.description&&e.jsxs("div",{className:"mt-4 pt-4 border-t",children:[e.jsx("h4",{className:"font-medium mb-2",children:"Additional Description"}),e.jsx("p",{className:"text-muted-foreground",children:t.request.description})]}),t.request.specialRequirements&&e.jsxs("div",{className:"mt-4 pt-4 border-t",children:[e.jsx("h4",{className:"font-medium mb-2",children:"Special Requirements"}),e.jsx("p",{className:"text-muted-foreground",children:t.request.specialRequirements})]})]})]}),t.personalMessage&&e.jsxs(m,{children:[e.jsx(f,{children:e.jsxs(D,{className:"flex items-center gap-2",children:[e.jsx(L,{className:"w-4 h-4"}),"Personal Message"]})}),e.jsx(h,{children:e.jsxs("p",{className:"text-muted-foreground italic",children:['"',t.personalMessage,'"']})})]}),e.jsxs(m,{children:[e.jsx(f,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(D,{children:"Clarifications"}),e.jsxs(d,{variant:"outline",size:"sm",onClick:()=>g(!0),"data-testid":"button-ask-question",children:[e.jsx(L,{className:"w-4 h-4 mr-2"}),"Ask Question"]})]})}),e.jsxs(h,{children:[c&&e.jsxs("div",{className:"mb-4 p-4 border rounded-lg",children:[e.jsx(l,{htmlFor:"question",children:"Your Question"}),e.jsx(C,{id:"question",placeholder:"Ask the GC a question about this bid request...",className:"mt-2",value:s,onChange:x=>r(x.target.value),"data-testid":"input-question"}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(d,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(d,{size:"sm",onClick:()=>i.mutate(),disabled:!s.trim()||i.isPending,"data-testid":"button-send-question",children:i.isPending?"Sending...":"Send Question"})]})]}),t.clarifications&&t.clarifications.length>0?e.jsx("div",{className:"space-y-4",children:t.clarifications.map(x=>e.jsxs("div",{className:"border-l-2 border-primary pl-4",children:[e.jsx("p",{className:"font-medium",children:x.question}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Asked"," ",b(new Date(x.questionAskedAt),"MMM d, yyyy")]}),x.answer?e.jsxs("div",{className:"mt-2 bg-muted/50 rounded p-2",children:[e.jsx("p",{className:"text-sm",children:x.answer}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Answered"," ",x.answeredAt&&b(new Date(x.answeredAt),"MMM d, yyyy")]})]}):e.jsx("p",{className:"text-sm text-muted-foreground mt-2 italic",children:"Awaiting response..."})]},x.id))}):e.jsx("p",{className:"text-muted-foreground text-center py-4",children:"No clarifications yet"})]})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(m,{children:[e.jsx(f,{children:e.jsx(D,{children:"Project Details"})}),e.jsxs(h,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(l,{className:"text-muted-foreground",children:"Required Trades"}),e.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:t.request.requiredTrades.map(x=>e.jsx(v,{variant:"secondary",className:"text-xs",children:x.replace(/_/g," ")},x))})]}),e.jsx(w,{}),e.jsxs("div",{children:[e.jsx(l,{className:"text-muted-foreground",children:"Bid Due Date"}),e.jsx("p",{className:`font-medium ${N?"text-destructive":""}`,children:b(new Date(t.request.bidDueDate),"MMMM d, yyyy 'at' h:mm a")}),N&&e.jsx("p",{className:"text-xs text-destructive",children:"This bid request has expired"})]}),t.request.projectStartDate&&e.jsxs("div",{children:[e.jsx(l,{className:"text-muted-foreground",children:"Project Start"}),e.jsx("p",{className:"font-medium",children:b(new Date(t.request.projectStartDate),"MMMM d, yyyy")})]}),(t.request.projectAddress||t.request.projectCity)&&e.jsxs("div",{children:[e.jsx(l,{className:"text-muted-foreground",children:"Location"}),e.jsx("p",{className:"font-medium",children:[t.request.projectAddress,t.request.projectCity,t.request.projectState].filter(
1Boolean).join(", ")})]}),e.jsx(w,{}),t.request.budgetRangeMin&&t.request.budgetRangeMax&&e.jsxs("div",{children:[e.jsx(l,{className:"text-muted-foreground",children:"Budget Range"}),e.jsxs("p",{className:"font-medium text-lg",children:["$",t.request.budgetRangeMin.toLocaleString()," - $",t.request.budgetRangeMax.toLocaleString()]})]}),e.jsxs("div",{className:"flex gap-2",children:[t.request.requiresBonding&&e.jsx(v,{variant:"outline",children:"Bonding Required"}),t.request.requiresInsurance&&e.jsx(v,{variant:"outline",children:"Insurance Required"})]})]})]}),t.myResponse&&e.jsxs(m,{children:[e.jsx(f,{children:e.jsx(D,{children:"Your Response"})}),e.jsx(h,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Total Bid:"}),e.jsxs("span",{className:"font-bold text-lg",children:["$",t.myResponse.totalBidAmount.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Status:"}),e.jsx(v,{children:t.myResponse.status})]}),t.myResponse.submittedAt&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Submitted:"}),e.jsx("span",{children:b(new Date(t.myResponse.submittedAt),"MMM d, yyyy")})]})]})})]}),e.jsxs("div",{className:"space-y-2",children:[ee&&e.jsx(je,{invitation:t,onSuccess:()=>p()}),N&&e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"This bid request has expired and is no longer accepting responses."})]})]})]})]})}function we(){const a=se(),j=te(),[o,c]=y.useState("all");if(a.id)return e.jsx(ge,{invitationId:a.id});const g=o!=="all"?`/api/bid-network/inbox?status=${o}`:"/api/bid-network/inbox",{data:s=[],isLoading:r,refetch:t}=H({queryKey:[g]}),u=s.filter(n=>n.status==="PENDING"||n.status==="VIEWED").length,p=s.filter(n=>n.status==="RESPONDED").length,i=s.filter(n=>n.status==="DECLINED").length;return e.jsxs("div",{className:"container max-w-full p-6 space-y-6",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold","data-testid":"text-page-title",children:"Bid Inbox"}),e.jsx("p",{className:"text-muted-foreground",children:"View and respond to bid invitations from GCs"})]})}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 sm:gap-4",children:[e.jsx(m,{className:"cursor-pointer hover-elevate",onClick:()=>c("PENDING"),"data-testid":"card-stat-pending",children:e.jsx(h,{className:"pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:u}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Pending"})]}),e.jsx(_,{className:"w-8 h-8 text-amber-500"})]})})}),e.jsx(m,{className:"cursor-pointer hover-elevate",onClick:()=>c("RESPONDED"),"data-testid":"card-stat-responded",children:e.jsx(h,{className:"pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:p}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Responded"})]}),e.jsx(X,{className:"w-8 h-8 text-green-500"})]})})}),e.jsx(m,{className:"cursor-pointer hover-elevate",onClick:()=>c("DECLINED"),"data-testid":"card-stat-declined",children:e.jsx(h,{className:"pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:i}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Declined"})]}),e.jsx(k,{className:"w-8 h-8 text-red-500"})]})})})]}),e.jsx(ae,{value:o,onValueChange:c,children:j?e.jsxs(ie,{value:o,onValueChange:c,children:[e.jsx(ne,{"data-testid":"select-bid-inbox-status",children:e.jsx(re,{})}),e.jsxs(le,{children:[e.jsxs(S,{value:"all",children:["All (",s.length,")"]}),e.jsxs(S,{value:"PENDING",children:["Pending (",u,")"]}),e.jsxs(S,{value:"RESPONDED",children:["Responded (",p,")"]}),e.jsxs(S,{value:"DECLINED",children:["Declined (",i,")"]})]})]}):e.jsxs(de,{children:[e.jsxs(E,{value:"all","data-testid":"tab-all",children:["All (",s.length,")"]}),e.jsxs(E,{value:"PENDING","data-testid":"tab-pending",children:["Pending (",u,")"]}),e.jsxs(E,{value:"RESPONDED","data-testid":"tab-responded",children:["Responded (",p,")"]}),e.jsxs(E,{value:"DECLINED","data-testid":"tab-declined",children:["Declined (",i,")"]})]})}),r?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3].map(n=>e.jsxs(m,{className:"animate-pulse",children:[e.jsxs(f,{children:[e.jsx("div",{className:"h-6 bg-muted rounded w-3/4"}),e.jsx("div",{className:"h-4 bg-muted rounded w-1/2 mt-2"})]}),e.jsx(h,{children:e.jsx("div",{className:"h-20 bg-muted rounded"})})]},n))}):s.length===0?e.jsx(m,{children:e.jsxs(h,{className:"flex flex-col items-center justify-center py-12",children:[e.jsx(oe,{className:"w-12 h-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium mb-2",children:"No bid invitations"}),e.jsx("p",{className:"text-muted-foreground text-center",children:"When General Contractors invite you to bid on projects, they'll appear here."})]})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map(n=>e.jsx(pe,{invitation:n,onRefresh:()=>t()},n.id))})]})}export{we 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.