1import{i as O,M as p,r as N,e as l,o as a,b as _,w as b,a as e,j as c,t as o,F as v,f as j,n as S,k as x,u as I,ap as C}from"./app-GEZjK6dO.js";import{_ as E}from"./PortalLayout.vue_vue_type_script_setup_true_lang-DHqTHHMn.js";const F=e("div",{class:"mb-6"},[e("h1",{class:"text-2xl font-semibold text-slate-900"},"My Interviews"),e("p",{class:"mt-1 text-sm text-slate-600"},"Manage your upcoming and past interview schedules")],-1),J={class:"grid grid-cols-1 gap-4 sm:grid-cols-3 mb-6"},W={class:"bg-white border border-slate-200/60 rounded-xl p-5"},Z={class:"flex items-center justify-between"},q=e("p",{class:"text-sm font-medium text-slate-600"},"Upcoming",-1),G={class:"mt-2 text-3xl font-semibold text-slate-900"},K=e("div",{class:"flex h-12 w-12 items-center justify-center rounded-xl bg-blue-50"},[e("svg",{class:"h-6 w-6 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1),Q={class:"bg-white border border-slate-200/60 rounded-xl p-5"},X={class:"flex items-center justify-between"},Y=e("p",{class:"text-sm font-medium text-slate-600"},"Completed",-1),ee={class:"mt-2 text-3xl font-semibold text-slate-900"},te=e("div",{class:"flex h-12 w-12 items-center justify-center rounded-xl bg-green-50"},[e("svg",{class:"h-6 w-6 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1),se={class:"bg-white border border-slate-200/60 rounded-xl p-5"},oe={class:"flex items-center justify-between"},ne=e("p",{class:"text-sm font-medium text-slate-600"},"Total",-1),le={class:"mt-2 text-3xl font-semibold text-slate-900"},ae=e("div",{class:"flex h-12 w-12 items-center justify-center rounded-xl bg-purple-50"},[e("svg",{class:"h-6 w-6 text-purple-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})])],-1),ie={key:0,class:"mb-6"},re=e("h2",{class:"text-lg font-semibold text-slate-900 mb-4"},"Upcoming Interviews",-1),de={class:"space-y-4"},ce={class:"flex items-start justify-between gap-4 mb-4"},ue={class:"flex-1"},he={class:"flex items-center gap-3 mb-2"},me={class:"text-lg font-semibold text-slate-900"},pe={class:"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium bg-emerald-100 text-emerald-800"},_e={class:"text-sm text-slate-600"},xe={class:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4"},fe={class:"flex items-start gap-3"},ge=e("div",{class:"flex h-10 w-10 items-center justify-center rounded-lg bg-slate-100"},[e("svg",{class:"h-5 w-5 text-slate-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1),be={class:"flex-1"},ve={class:"text-sm font-medium text-slate-900"},we={class:"text-sm text-slate-600"},ye={key:0,class:"text-xs text-emerald-600 mt-1 font-medium"},ke={key:0,class:"flex items-start gap-3"},je=e("div",{class:"flex h-10 w-10 items-center justify-center rounded-lg bg-slate-100"},[e("svg",{class:"h-5 w-5 text-slate-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"})])],-1),Ie={class:"flex-1"},Ce={class:"text-sm font-medium text-slate-900"},Me={class:"text-sm text-slate-600"},De={key:0,class:"mb-4"},Ve={class:"text-sm font-medium text-slate-900 mb-2"},$e={class:"flex flex-wrap gap-2"},Be={class:"flex h-8 w-8 items-center justify-center rounded-full bg-slate-200 text-slate-600 text-sm font-medium"},Se={class:"text-sm font-medium text-slate-900"},Te={key:0,class:"text-xs text-slate-500"},Ae={key:1,class:"p-4 bg-amber-50 border border-amber-100 rounded-lg mb-4"},Ue={class:"flex items-start gap-2"},ze=e("svg",{class:"h-5 w-5 text-amber-600 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),Le={class:"flex-1"}
1,He=e("p",{class:"text-sm font-medium text-amber-900 mb-1"},"Interview Instructions",-1),Pe={class:"text-sm text-amber-800"},Re={class:"flex flex-wrap items-center gap-3"},Oe=["href"],Ne=e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),Ee=["onClick"],Fe=e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),Je=e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1),We={key:1},Ze={class:"flex items-center justify-between mb-4"},qe=e("h2",{class:"text-lg font-semibold text-slate-900"},"Past Interviews",-1),Ge={class:"space-y-3"},Ke={class:"flex items-start justify-between gap-4"},Qe={class:"flex-1"},Xe={class:"flex items-center gap-3 mb-1"},Ye={class:"text-base font-semibold text-slate-900"},et={class:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-slate-100 text-slate-700"},tt={class:"text-sm text-slate-600 mb-2"},st={class:"flex items-center gap-4 text-xs text-slate-500"},ot={key:0},nt={key:2,class:"bg-white border border-slate-200/60 rounded-xl p-12 text-center"},lt=e("div",{class:"inline-flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 mb-4"},[e("svg",{class:"h-8 w-8 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1),at=e("h3",{class:"text-base font-semibold text-slate-900 mb-2"},"No interviews scheduled",-1),it=e("p",{class:"text-sm text-slate-600 mb-6 max-w-sm mx-auto"}," When employers schedule interviews with you, they'll appear here ",-1),rt=e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1),ut={__name:"Interviews",props:{client:Object,candidate:Object,interviews:Array},setup(f){const T=f,g=O(!1),m=p(()=>T.interviews||[]),w=p(()=>{const s=new Date;return m.value.filter(n=>n.status==="scheduled"&&new Date(n.scheduled_at)>s).sort((n,d)=>new Date(n.scheduled_at)-new Date(d.scheduled_at))}),y=p(()=>{const s=new Date;return m.value.filter(n=>n.status==="completed"||n.status==="cancelled"||new Date(n.scheduled_at)<=s).sort((n,d)=>new Date(d.scheduled_at)-new Date(n.scheduled_at))}),A=p(()=>g.value?y.value:y.value.slice(0,3)),U=p(()=>m.value.filter(s=>s.status==="completed")),M=s=>new Date(s).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}),z=s=>new Date(s).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),L=s=>{const n=new Date,d=new Date(s),t=Math.floor((n-d)/(1e3*60*60*24));return t===0?"today":t===1?"yesterday":t<7?`${t} days ago`:t<30?`${Math.floor(t/7)} weeks ago`:`${Math.floor(t/30)} months ago`},D=s=>{const n=new Date,t=new Date(s)-n;if(t<0)return null;const i=Math.floor(t/(1e3*60*60)),r=Math.floor(i/24);return r>0?`In ${r} day${r>1?"s":""}`:i>0?`In ${i} hour${i>1?"s":""}`:"Starting soon"},k=s=>({phone:"Phone Screen",video:"Video Interview",onsite:"On-site Interview",technical:"Technical Interview",behavioral:"Behavioral Interview",panel:"Panel Interview"})[s]||s,H=s=>({phone:"bg-blue-100 text-blue-800",video:"bg-purple-100 text-purple-800",onsite:"bg-green-100 text-green-800",technical:"bg-orange-100 text-orange-800",behavioral:"bg-cyan-100 text-cyan-800",panel:"bg-indigo-100 text-indigo-800"})[s]||"bg-slate-100 text-slate-800",P=s=>{var V,$,B;const n=new Date(s.scheduled_at),d=new Date(n.getTime()+s.duration_minutes*6e4),t=R=>R.toISOString().replace(/[-:]/g,"").split(".")[0]+"Z",i=`Interview: ${(V=s.application.job)==null?void 0:V.title} at ${(B=($=s.application.job)==null?void 0:$.client)==null?void 0:B.name}`,r=s.instructions||`${k(s.interview_type)} - Round ${s.interview_round}`,h=s.location||s.meeting_url||"Online",u=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(i)}&dates=${t(n)}/${t(d)}&details=${encodeURIComponent(r)}&location=${encodeURIComponent(h)}`;window.open(u,"_blank")};return(s,n)=>{const d=N("Head");return a(),l(v,null,[_(d,{title:"My Interviews"}),_(E,{client:f.client,candidate:f.candidate,"client-slug":f.client.slug},{default:b(()=>[F,e("div",J,[e("div",W,[e("div",Z,[e("div",null,[q,e("p",G,o(w.value.length),1)]),K])]),e("div",Q,[e("div",X,[e("div",null,[Y,e("p",ee,o(U.value.length),1)]),te])]),e("div",se,[e("div",oe,[e("div",null,[ne,e("p",le,o(m.value.length),1)]),ae])])]),w.value.length>0?(a(),l("div",ie,[re,e("div",de,[(a(!0),l(v,null,j(w.value,t=>{var i,r,h;return a(),l("div",{key:t.id,class:"bg-white border border-slate-200/60 rounded-xl p-6 hover:shadow-sm transition-shadow"},[e("div",ce,[e("div",ue,[e("div",he,[e("h3",me,o(((i=t.application.job)==null?void 0:i.title)||"Interview"),1),e("span",pe," Round "+o(t.interview_round),1)]),e("p",_e,o(((h=(r=t.application.job)==null?void 0:r.client)==null?void 0:h.name)||"Company"),1)]),e("span",{class:S(["inline-flex items-center px-3 py-1.5 rounded-lg text-sm font-medium",H(t.interview_type)])},o(k(t.interview_type)),3)]),e("div",xe,[e("div",fe,[ge,e("div",be,[e("p",ve,o(M(t.scheduled_at)),1),e("p",we,o(z(t.scheduled_at))+" ⢠"+o(t.duration_minutes)+" min",1),D(t.scheduled_at)?(a(),l("p",ye,o(D(t.scheduled_at)),1)):c("",!0)])]),t.location||t.meeting_url?(a(),l("div",ke,[je,e("div",Ie,[e("p",Ce,o(t.meeting_url?"Virtual Meeting":"Location"),1),e("p",Me,o(t.location||"Online"),1)])])):c("",!0)]),t.interviewers&&t.interviewers.length>
10?(a(),l("div",De,[e("p",Ve,o(t.interviewers.length===1?"Interviewer":"Interview Panel"),1),e("div",$e,[(a(!0),l(v,null,j(t.interviewers,u=>(a(),l("div",{key:u.id,class:"inline-flex items-center gap-2 px-3 py-2 bg-slate-50 rounded-lg"},[e("div",Be,o(u.name.charAt(0).toUpperCase()),1),e("div",null,[e("p",Se,o(u.name),1),u.title?(a(),l("p",Te,o(u.title),1)):c("",!0)])]))),128))])])):c("",!0),t.instructions?(a(),l("div",Ae,[e("div",Ue,[ze,e("div",Le,[He,e("p",Pe,o(t.instructions),1)])])])):c("",!0),e("div",Re,[t.meeting_url?(a(),l("a",{key:0,href:t.meeting_url,target:"_blank",class:"inline-flex items-center gap-2 px-4 py-2.5 bg-emerald-600 text-white text-sm font-medium rounded-lg hover:bg-emerald-700 transition-colors shadow-sm"},[Ne,x(" Join Meeting ")],8,Oe)):c("",!0),e("button",{onClick:u=>P(t),class:"inline-flex items-center gap-2 px-4 py-2.5 bg-white border border-slate-300 text-slate-700 text-sm font-medium rounded-lg hover:bg-slate-50 transition-colors"},[Fe,x(" Add to Calendar ")],8,Ee),_(I(C),{href:s.route("apply.portal.applications.show",{applicationId:t.application.id}),class:"inline-flex items-center gap-2 px-4 py-2.5 bg-white border border-slate-300 text-slate-700 text-sm font-medium rounded-lg hover:bg-slate-50 transition-colors"},{default:b(()=>[x(" View Application "),Je]),_:2},1032,["href"])])])}),128))])])):c("",!0),y.value.length>0?(a(),l("div",We,[e("div",Ze,[qe,e("button",{onClick:n[0]||(n[0]=t=>g.value=!g.value),class:"text-sm font-medium text-emerald-600 hover:text-emerald-700"},o(g.value?"Show Less":"Show All"),1)]),e("div",Ge,[(a(!0),l(v,null,j(A.value,t=>{var i,r,h;return a(),l("div",{key:t.id,class:"bg-white border border-slate-200/60 rounded-xl p-5 hover:shadow-sm transition-shadow"},[e("div",Ke,[e("div",Qe,[e("div",Xe,[e("h3",Ye,o(((i=t.application.job)==null?void 0:i.title)||"Interview"),1),e("span",et," Round "+o(t.interview_round),1),e("span",{class:S(["inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",t.status==="completed"?"bg-green-100 text-green-800":"bg-slate-100 text-slate-700"])},o(t.status),3)]),e("p",tt,o(((h=(r=t.application.job)==null?void 0:r.client)==null?void 0:h.name)||"Company"),1),e("div",st,[e("span",null,o(M(t.scheduled_at)),1),e("span",null,o(k(t.interview_type)),1),t.completed_at?(a(),l("span",ot,"Completed "+o(L(t.completed_at)),1)):c("",!0)])]),_(I(C),{href:s.route("apply.portal.applications.show",{applicationId:t.application.id}),class:"text-sm font-medium text-emerald-600 hover:text-emerald-700"},{default:b(()=>[x(" View Details ")]),_:2},1032,["href"])])])}),128))])])):c("",!0),m.value.length===0?(a(),l("div",nt,[lt,at,it,_(I(C),{href:s.route("apply.portal.applications"),class:"inline-flex items-center gap-2 px-5 py-2.5 bg-blue-600 text-white text-sm font-medium rounded-lg hover:bg-blue-700 transition-colors shadow-sm"},{default:b(()=>[x(" View Applications "),rt]),_:1},8,["href"])])):c("",!0)]),_:1},8,["client","candidate","client-slug"])],64)}}};export{ut as default}; 2//# sourceMappingURL=Interviews-BQms22tF.js.map
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.