1import{r as g,v as O,m as e,B as p,x as u,w as R,C as y,D as ae,a2 as V,a7 as le,u as X,U as q,s as $,H as z,ac as ie}from"./index-CpSGH3si.js";import{T as re,a as ne,b as K,c as B}from"./tabs-C2Ucxcpc.js";import{C as _,a as C,b as L,c as E}from"./card--3jAFIY6.js";import{S as de}from"./skeleton-D7CKVNpx.js";import{toast as D}from"./index-VOExC7zx.js";import{D as Y,a as Z,b as ee,c as se}from"./dialog-DjQOlXK_.js";import{I as w}from"./input-CJQwYE0h.js";import{L as v}from"./label-mxM2ZpWz.js";import{S as M,a as k,b as A,c as T,d as N}from"./select-DF7dIvp6.js";import{h as te,a as F}from"./format-DRR4LvZs.js";import{C as ce}from"./circle-check-zYGxtVka.js";import{p as J}from"./parseISO-Xi6EUFU9.js";import{U as oe}from"./user-check-BZd5_KuR.js";import{A as xe}from"./index-CtsrXVb9.js";import{m as me}from"./proxy-DFy_m_5J.js";import{P as he}from"./pencil-DQhK_CFW.js";import{W as ue}from"./wrench-BbTR8Tzx.js";import{P as pe}from"./phone-B5j7AMqT.js";import{M as ge}from"./mail-32WMcMo6.js";import{a as je}from"./addDays-DbcpP0x6.js";import{d as Q}from"./differenceInDays-CBb1kXVt.js";import{P as be}from"./PostSlotModal-3UQClCk7.js";import fe from"./InviteContractorModal-Zu73WSH1.js";import{L as ve}from"./layers-BrLtODAJ.js";import"./index-BdQq_4o_.js";import"./index-Bs3UMnWC.js";import"./index-Cy91vPlr.js";import"./chevron-up-xOaegNmi.js";import"./differenceInCalendarDays-CFJcUmo7.js";import"./textarea-DnsCXU4p.js";import"./loader-circle-CZ4nBqpt.js";import"./send-CpRLLNKN.js";const Ne=["owner","technician","installer","subcontractor","estimator","laborer"],we=["Framing","Roofing","Foundation","Concrete","Electrical","Plumbing","HVAC","Drywall","Painting","Flooring","Siding","General Labor","Other"];function ye({open:a,onOpenChange:h,contractor:o,existing:n,onSaved:j}){const d=!!n,[r,m]=g.useState({first_name:"",last_name:"",phone:"",email:"",role:"technician",trade:"",hourly_rate:""});g.useEffect(()=>{m(n?{first_name:n.first_name||"",last_name:n.last_name||"",phone:n.phone||"",email:n.email||"",role:n.role||"technician",trade:n.trade||"",hourly_rate:n.hourly_rate||""}:{first_name:"",last_name:"",phone:"",email:"",role:"technician",trade:"",hourly_rate:""})},[n,a]);const i=(s,c)=>m(b=>({...b,[s]:c})),t=O({mutationFn:()=>{const s={...r,contractor_id:o==null?void 0:o.id,hourly_rate:r.hourly_rate?parseFloat(r.hourly_rate):void 0};return d?u.entities.CrewMember.update(n.id,s):u.entities.CrewMember.create(s)},onSuccess:()=>{D.success(d?"Member updated":"Crew member added"),j(),h(!1)}});return e.jsx(Y,{open:a,onOpenChange:h,children:e.jsxs(Z,{className:"max-w-md",children:[e.jsx(ee,{children:e.jsx(se,{children:d?"Edit Crew Member":"Add Crew Member"})}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(v,{className:"text-xs",children:"First Name"}),e.jsx(w,{value:r.first_name,onChange:s=>i("first_name",s.target.value),placeholder:"John"})]}),e.jsxs("div",{children:[e.jsx(v,{className:"text-xs",children:"Last Name"}),e.jsx(w,{value:r.last_name,onChange:s=>i("last_name",s.target.value),placeholder:"Smith"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(v,{className:"text-xs",children:"Phone"}),e.jsx(w,{value:r.phone,onChange:s=>i("phone",s.target.value),placeholder:"(555) 555-0100"})]}),e.jsxs("div",{children:[e.jsx(v,{className:"text-xs",children:"Hourly Rate ($)"}),e.jsx(w,{type:"number",value:r.hourly_rate,onChange:s=>i("hourly_rate",s.target.value),placeholder:"25"})]})]}),e.jsxs("div",{children:[e.jsx(v,{className:"text-xs",children:"Email"}),e.jsx(w,{value:r.email,onChange:s=>i("email",s.target.value),placeholder:"[email protected]"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(v,{className:"text-xs",children:"Role"}),e.jsxs(M,{value:r.role,onValueChange:s=>i("role",s),children:[e.jsx(k,{children:e.jsx(A,{})}),e.jsx(T,{children:Ne.map(s=>e.jsx(N,{value:s,className:"capitalize",children:s},s))})]})]}),e.jsxs("div",{children:[e.jsx(v,{className:"text-xs",children:"Trade Specialty"}),e.jsxs(M,{value:r.trade,onValueChange:s=>i("trade",s),children:[e.jsx(k,{children:e.jsx(A,{placeholder:"Select..."})}),e.jsx(T,{children:we.map(s=>e.jsx(N,{value:s,children:s},s))})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx(p,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),e.jsx(p,{onClick:()=>t.mutate(),disabled:!r.first_name||!r.last_name||t.isPending,className:"bg-blue-600 hover:bg-blue-700",children:d?"Save Changes":"Add Member"})]})]})]})})}const _e={scheduled:"bg-blue-100 text-blue-700",in_progress:"bg-amber-100 text-amber-700",lead:"bg-slate-100 text-slate-600",quoted:"bg-violet-100 text-violet-700"};function Ce({open:a,onOpenChange:h,member:o,jobs:n,onSaved:j}){const[d,r]=g.useState(null),m=O({mutationFn:()=>u.entities.Job.update(d,{crew_id:o==null?void 0:o.id}),onSuccess:()=>{D.success(`${o==null?void 0:o.first_name} assigned to job`),j(),h(!1),r(null)}});return e.jsx(Y,{open:a,onOpenChange:h,children:e.jsxs(Z,{className:"max-w-lg",children:[e.jsx(ee,{children:e.jsxs(se,{children:["Assign Job â ",o==null?void 0:o.first_name," ",o==null?void 0:o.last_name]})}),e.jsx("div",{className:"space-y-2 max-h-80 overflow-y-auto py-2",children:n.length===0?e.jsx("p",{className:"text-slate-400 text-sm text-center py-6",children:"No active jobs available to assign."}):n.map(i=>e.jsx("button",{onClick:()=>r(i.id),className:`w-full text-left p-3 rounded-xl border transition-all ${d===i.id?"border-blue-500 bg-blue-50":"border-slate-200 hover:border-slate-300 hover:bg-slate-50"}`,children:e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:i.customer_name}),e.jsx(R,{className:`text-xs ${_e[i.status]||""}`,children:i.status})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:i.service_type}),e.jsxs("div",{className:"flex flex-wrap gap-3 mt-1 text-xs text-slate-400",children:[i.scheduled_date&&te(J(i.scheduled_date))&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(y,{className:"w-3 h-3"}),F(J(i.scheduled_date),"MMM d, yyyy")]}),i.service_address&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ae,{className:"w-3 h-3"}),i.service_address]})]})]}),d===i.id&&e.jsx(ce,{className:"w-5 h-5 text-blue-600 shrink-0"})]})},i.id))}),e.jsxs("div",{className:"flex justify-end gap-3 border-t pt-4",children:[e.jsx(p,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),e.jsx(p,{onClick:()=>m.mutate(),disabled:!d||m.isPending,className:"bg-blue-600 hover:bg-blue-700",children:"Assign to Selected Job"})]})]})})}const W={owner:"bg-violet-100 text-violet-700",technician:"bg-blue-100 text-blue-700",installer:"bg-cyan-100 text-cyan-700",subcontractor:"bg-amber-100 text-amber-700",estimator:"bg-pink-100 text-pink-700",laborer:"bg-slate-100 text-slate-700"};function Se({contractor:a,crewMembers:h,crews:o,jobs:n,isLoading:j,onDataChange:d}){const[r,m]=g.useState(!1),[i,t]=g.useState(null),[s,c]=g.useState(null),b=O({mutationFn:l=>u.entities.CrewMember.delete(l),onSuccess:()=>{d(),D.success("Crew member removed")}}),x=n.filter(l=>["scheduled","in_progress"].includes(l.status)),f={};return x.forEach(l=>{l.crew_id&&(f[l.crew_id]||(f[l.crew_id]=[]),f[l.crew_id].push(l))}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h2",{className:"text-lg font-semibold text-slate-900",children:[h.length," Member",h.length!==1?"s":""]}),e.jsxs(p,{onClick:()=>m(!0),className:"bg-blue-600 hover:bg-blue-700 gap-2",size:"sm",children:[e.jsx(V,{className:"w-4 h-4"})," Add Member"]})]}),j?e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(4)].map((l,I)=>e.jsx(de,{className:"h-40"},I))}):h.length===0?e.jsx(_,{children:e.jsxs(C,{className:"p-14 text-center",children:[e.jsx(oe,{className:"w-12 h-12 mx-auto mb-3 text-slate-300"}),e.jsx("p",{className:"font-semibold text-slate-700 mb-1",children:"No crew members yet"}),e.jsx("p",{className:"text-slate-400 text-sm mb-5",children:"Add your first team member to start managing assignments."}),e.jsxs(p,{onClick:()=>m(!0),className:"bg-blue-600 hover:bg-blue-700 gap-2",children:[e.jsx(V,{className:"w-4 h-4"})," Add Crew Member"]})]})}):e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:e.jsx(xe,{children:h.map((l,I)=>{var U,H;const S=f[l.crew_id]||[];return e.jsx(me.div,{initial:{opacity:0,y:10}
1,animate:{opacity:1,y:0},exit:{opacity:0},transition:{delay:I*.04},children:e.jsxs(_,{className:"hover:shadow-md transition-shadow",children:[e.jsxs(L,{className:"pb-2 flex flex-row items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center font-bold text-blue-700 text-sm shrink-0",children:[(U=l.first_name)==null?void 0:U[0],(H=l.last_name)==null?void 0:H[0]]}),e.jsxs("div",{children:[e.jsxs(E,{className:"text-sm font-semibold leading-tight",children:[l.first_name," ",l.last_name]}),e.jsx(R,{className:`text-xs mt-0.5 ${W[l.role]||W.laborer}`,children:l.role})]})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(p,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>t(l),children:e.jsx(he,{className:"w-3.5 h-3.5 text-slate-400"})}),e.jsx(p,{variant:"ghost",size:"icon",className:"h-7 w-7 text-red-400 hover:text-red-600",onClick:()=>b.mutate(l.id),children:e.jsx(le,{className:"w-3.5 h-3.5"})})]})]}),e.jsxs(C,{className:"space-y-2.5",children:[l.trade&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-600",children:[e.jsx(ue,{className:"w-3.5 h-3.5 text-slate-400"})," ",l.trade]}),l.phone&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-600",children:[e.jsx(pe,{className:"w-3.5 h-3.5 text-slate-400"})," ",l.phone]}),l.email&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-500 truncate",children:[e.jsx(ge,{className:"w-3.5 h-3.5 text-slate-400 shrink-0"})," ",l.email]}),S.length>0?e.jsxs("div",{className:"pt-1",children:[e.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Assigned jobs:"}),S.slice(0,2).map(P=>e.jsxs("div",{className:"text-xs bg-amber-50 text-amber-700 rounded px-2 py-1 mb-1 truncate",children:[P.customer_name," â ",P.service_type]},P.id)),S.length>2&&e.jsxs("p",{className:"text-xs text-slate-400",children:["+",S.length-2," more"]})]}):e.jsx("div",{className:"pt-1",children:e.jsx("span",{className:"text-xs text-slate-400 italic",children:"No active jobs"})}),e.jsx(p,{variant:"outline",size:"sm",className:"w-full text-xs mt-1 border-blue-200 text-blue-600 hover:bg-blue-50",onClick:()=>c(l),children:"Assign to Job"})]})]})},l.id)})})}),e.jsx(ye,{open:r||!!i,onOpenChange:l=>{m(l),l||t(null)},contractor:a,existing:i,onSaved:d}),e.jsx(Ce,{open:!!s,onOpenChange:l=>{l||c(null)},member:s,jobs:n.filter(l=>["scheduled","in_progress","lead","quoted"].includes(l.status)),onSaved:()=>{d()}})]})}const Me={scheduled:"bg-blue-400",in_progress:"bg-amber-400",completed:"bg-green-400",lead:"bg-slate-300",quoted:"bg-violet-300"},G={scheduled:"bg-blue-100 text-blue-700",in_progress:"bg-amber-100 text-amber-700",completed:"bg-green-100 text-green-700",lead:"bg-slate-100 text-slate-700",quoted:"bg-violet-100 text-violet-700"};function ke({jobs:a,crewMembers:h,contractorId:o,onJobUpdated:n}){X();const j=O({mutationFn:({jobId:t,crewMemberId:s})=>u.entities.Job.update(t,{crew_id:s}),onSuccess:()=>{n(),D.success("Crew assignment updated")}}),d=new Date;d.setHours(0,0,0,0);const r=Array.from({length:30},(t,s)=>je(d,s)),m=g.useMemo(()=>a.filter(t=>t.scheduled_date&&["scheduled","in_progress","lead","quoted"].includes(t.status)).sort((t,s)=>{var c;return(c=t.scheduled_date)==null?void 0:c.localeCompare(s.scheduled_date)}),[a]),i=t=>{const s=J(t.scheduled_date),c=t.scheduled_end_date?J(t.scheduled_end_date):s;if(!te(s))return null;const b=Q(s,d),x=Math.max(1,Q(c,s)+1),f=Math.max(0,b),l=Math.min(x,30-f);return b>29||b+x<0?null:{left:`${f/30*100}%`,width:`${l/30*100}%`}};return r.filter((t,s)=>s===0||t.getDay()===0),e.jsxs("div",{className:"space-y-4",children:[e.jsxs(_,{children:[e.jsx(L,{className:"pb-3",children:e.jsxs(E,{className:"text-base font-semibold flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-blue-600"}),"30-Day Job Timeline"]})}),e.jsx(C,{children:m.length===0?e.jsxs("div",{className:"py-12 text-center text-slate-400",children:[e.jsx(y,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No scheduled or active jobs to display."})]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("div",{className:"min-w-[700px]",children:[e.jsx("div",{className:"flex mb-1 pl-52",children:r.map((t,s)=>e.jsx("div",{className:`flex-1 text-center text-xs ${t.toDateString()===d.toDateString()?"font-bold text-blue-600":"text-slate-400"}`,children:t.getDate()===1||s===0?F(t,"MMM d"):t.getDay()===0?F(t,"d"):""},s))}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-blue-400 z-10 pointer-events-none",style:{left:`calc(${.5/30*100}% + 13rem)`}}),e.jsx("div",{className:"space-y-2",children:m.map(t=>{const s=i(t);return h.find(c=>c.id===t.crew_id),e.jsxs("div",{className:"flex items-center gap-2 group",children:[e.jsxs("div",{className:"w-52 shrink-0 pr-2",children:[e.jsx("p",{className:"text-xs font-medium text-slate-800 truncate",children:t.customer_name}),e.jsx("p",{className:"text-xs text-slate-400 truncate",children:t.service_type})]}),e.jsx("div",{className:"flex-1 h-8 bg-slate-100 rounded-lg relative",children:s&&e.jsx("div",{className:`absolute top-1 bottom-1 rounded-md ${Me[t.status]||"bg-slate-300"} flex items-center px-2 overflow-hidden`,style:s,title:`${t.customer_name} â ${t.service_type}`,children:e.jsx("span",{className:"text-xs text-white font-medium truncate",children:t.customer_name})})}),e.jsx("div",{className:"w-36 shrink-0",children:e.jsxs(M,{value:t.crew_id||"unassigned",onValueChange:c=>j.mutate({jobId:t.id,crewMemberId:c==="unassigned"?null:c}),children:[e.jsxs(k,{className:"h-7 text-xs bg-white",children:[e.jsx(q,{className:"w-3 h-3 mr-1 text-slate-400"}),e.jsx(A,{})]}),e.jsxs(T,{children:[e.jsx(N,{value:"unassigned",children:"Unassigned"}),h.map(c=>e.jsxs(N,{value:c.id,children:[c.first_name," ",c.last_name]},c.id))]})]})})]},t.id)})})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 mt-5 pt-4 border-t border-slate-100",children:[Object.entries(G).map(([t,s])=>e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${s}`,children:t.replace("_"," ")},t)),e.jsx("span",{className:"text-xs text-blue-500 font-medium ml-2",children:"â Today"})]})]})})})]}),a.filter(t=>!t.scheduled_date&&["scheduled","in_progress"].includes(t.status)).length>0&&e.jsxs(_,{children:[e.jsx(L,{className:"pb-2",children:e.jsx(E,{className:"text-sm font-semibold text-slate-600",children:"Jobs Without Scheduled Dates"})}),e.jsx(C,{children:e.jsx("div",{className:"space-y-2",children:a.filter(t=>!t.scheduled_date&&["scheduled","in_progress"].includes(t.status)).map(t=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-800",children:t.customer_name}),e.jsx("p",{className:"text-xs text-slate-500",children:t.service_type})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(R,{className:`text-xs ${G[t.status]||""}`,children:t.status}),e.jsxs(M,{value:t.crew_id||"unassigned",onValueChange:s=>j.mutate({jobId:t.id,crewMemberId:s==="unassigned"?null:s}),children:[e.jsx(k,{className:"h-7 text-xs w-36 bg-white",children:e.jsx(A,{placeholder:"Assign crew..."})}),e.jsxs(T,{children:[e.jsx(N,{value:"unassigned",children:"Unassigned"}),h.map(s=>e.jsxs(N,{value:s.id,children:[s.first_name," ",s.last_name]},s.id))]})]})]})]},t.id))})})]})]})}function ns(){const[a,h]=g.useState(null),[o,n]=g.useState(!1),[j,d]=g.useState(!1),r=X();g.useEffect(()=>{u.auth.me().then(x=>u.entities.Contractor.filter({created_by:x.email},"-created_date",1)).then(x=>{x!=null&&x[0]&&h(x[0])}).catch(()=>u.auth.redirectToLogin())},[]);const{data:m,isLoading:i}=$({queryKey:["crew-members",a==null?void 0:a.id],queryFn:()=>u.entities.CrewMember.filter({contractor_id:a==null?void 0:a.id},"first_name"),enabled:!!a}),{data:t}=$({queryKey:["crews",a==null?void 0:a.id],queryFn:()=>u.entities.Crew.filter({contractor_id:a==null?void 0:a.id}),enabled:!!a}),{data:s}=$({queryKey:["jobs-crew",a==null?void 0:a.id],queryFn:()=>u.entities.Job.filter({contractor_id:a==null?void 0:a.id},"-scheduled_date",100),enabled:!!a}),c=(s||[]).filter(x=>["scheduled","in_progress"].includes(x.status)),b=[{label:"Crew Members",value:(m==null?void 0:m.length)??0,icon:q,color:"text-blue-600",bg:"bg-blue-50"},{label:"Active Jobs",value:c.length,icon:y,color:"text-amber-600",bg:"bg-amber-50"},{label:"Crews",value:(t==null?void 0:t.length)??0,icon:z,color:"text-green-600",bg:"bg-green-50"}];return e.jsxs("div",{className:"min-h-screen bg-slate-50",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-8",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold text-slate-900 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-600 flex items-center justify-center",children:e.jsx(z,{className:"w-5 h-5 text-white"})}),"Crew Management"]}),e.jsx("p",{className:"text-slate-500 mt-1",children:"Manage your team, assign jobs, and view your active schedule"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(p,{onClick:()=>d(!0),variant:"outline",className:"gap-2 border-green-200 text-green-700 hover:bg-green-50",disabled:!a,children:[e.jsx(ie,{className:"w-4 h-4"})," Invite a Contractor"]}),e.jsxs(p,{onClick:()=>n(!0),className:"bg-green-600 hover:bg-green-700 gap-2",disabled:!a,children:[e.jsx(ve,{className:"w-4 h-4"})," Post Open Slot to Marketplace"]})]})]}),e.jsx("div",{className:"grid grid-cols-3 gap-4 mb-8",children:b.map(x=>e.jsx(_,{children:e.jsxs(C,{className:"p-4 flex items-center gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg ${x.bg} flex items-center justify-center shrink-0`,children:e.jsx(x.icon,{className:`w-5 h-5 ${x.color}`})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:x.value}),e.jsx("p",{className:"text-xs text-slate-500",children:x.label})]})]})},x.label))}),e.jsxs(re,{defaultValue:"roster",children:[e.jsxs(ne,{className:"bg-white border border-slate-200 mb-6",children:[e.jsxs(K,{value:"roster",children:[e.jsx(q,{className:"w-4 h-4 mr-2"})," Crew Roster"]}),e.jsxs(K,{value:"timeline",children:[e.jsx(y,{className:"w-4 h-4 mr-2"})," Job Timeline"]})]}),e.jsx(B,{value:"roster",children:e.jsx(Se,{contractor:a,crewMembers:m||[],crews:t||[],jobs:s||[],isLoading:i,onDataChange:()=>{r.invalidateQueries({queryKey:["crew-members",a==null?void 0:a.id]}),r.invalidateQueries({queryKey:["crews",a==null?void 0:a.id]})}})}),e.jsx(B,{value:"timeline",children:e.jsx(ke,{jobs:s||[],crewMembers:m||[],contractorId:a==null?void 0:a.id,onJobUpdated:()=>
1r.invalidateQueries({queryKey:["jobs-crew",a==null?void 0:a.id]})})})]})]}),e.jsx(be,{open:o,onOpenChange:n,contractor:a}),e.jsx(fe,{open:j,onOpenChange:d,inviterContractor:a})]})}export{ns 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.