PageSourceSearch

https://www.cvtailor.ai/_nuxt/CUl7r2ut.js

js cvtailor.ai collected 2026-10-05 14:07:04 UTC 11,657 bytes, 2 lines download raw bytes

1import{bC as J,bk as Q,b9 as X,bD as Z,bb as i,bc as t,be as x,bf as V,bB as Y,bE as _,bF as y,bm as o,bG as d,bo as r,bp as m,bq as C,by as k,bj as tt,bi as l,bd as S,bH as et,bx as H,bg as st,bh as at,ba as nt,bI as lt}from"./B4qfXnzP.js";import{u as it}from"./CosOX6pN.js";import{u as ot}from"./DbB2ljHR.js";import{_ as rt}from"./C8tdCacw.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new f.Error().stack;b&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[b]="76446c43-ead0-42cc-a115-d3850727e484",f._sentryDebugIdIdentifier="sentry-dbid-76446c43-ead0-42cc-a115-d3850727e484")}catch{}})();const ct={class:"applications container mx-auto py-8 md:py-20 px-4 md:px-6"},dt={class:"flex flex-col md:flex-row md:items-end justify-between gap-4"},ut={class:"mt-8 grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-3"},pt=["onClick"],_t={class:"flex items-baseline gap-2"},gt={class:"text-2xl md:text-3xl font-bold tabular-nums text-black-500"},mt={key:0,class:"applications_stage__nudge"},bt={class:"mt-1 flex items-center gap-2"},xt={class:"text-xs font-medium text-gray-500"},yt={class:"applications_stage__track"},ft={key:0,class:"mt-6 py-16 px-6 flex flex-col items-center text-center bg-white border border-gray-50 rounded-lg"},ht={class:"flex items-center gap-2"},vt={key:0,class:"w-8 h-px bg-gray-100"},kt={class:"px-4 md:px-6 py-3 flex items-center gap-2.5 border-b border-gray-50"},wt={class:"text-sm font-bold text-black-500"},Ct={class:"text-xs text-gray-400 tabular-nums"},St={class:"ml-auto text-2xs text-gray-400 hidden md:block"},At={class:"flex-1 min-w-0"},$t={class:"text-sm font-semibold text-black truncate"},Dt={class:"text-xs text-black-300 truncate"},Tt={key:0,class:"hidden md:flex items-center gap-1.5 text-xs font-medium text-orange-400 shrink-0"},jt={class:"hidden sm:block w-14 text-right shrink-0"},It={key:1,class:"text-xs text-gray-300"},Vt={class:"hidden md:block w-24 text-right text-xs text-gray-400 shrink-0"},Mt={class:"relative shrink-0"},Nt=["onClick"],Ut={class:"applications_status-menu"},Ot=["onClick"],zt={class:"flex flex-col text-left"},Bt={class:"text-sm font-medium text-gray-800 leading-tight"},Ft={class:"text-2xs text-gray-400 leading-tight"},Et={key:0,class:"mt-4 md:mt-6"},Lt={class:"text-xs tabular-nums"},Yt={key:0,class:"mt-2 bg-white border border-gray-50 rounded-lg"},Ht={class:"flex-1 min-w-0"},Pt={class:"text-sm font-semibold text-gray-400 truncate"},Gt={class:"text-xs text-gray-300 truncate"},Rt={class:"hidden md:block text-xs text-gray-300"},qt={class:"relative shrink-0"},Kt=["onClick"],Wt={class:"applications_status-menu"},Jt=["onClick"],Qt={class:"flex flex-col text-left"},Xt={class:"text-sm font-medium text-gray-800 leading-tight"},Zt={class:"text-2xs text-gray-400 leading-tight"},te=7,ee={__name:"applications",async setup(f){let b,A;J({title:"Your Applications"});const M=Q(),P=it(),u={not_applied:{label:"To apply",hint:"CV ready, waiting to be sent",description:"CV ready, not sent yet",dotClass:"bg-gray-300",railClass:"bg-gray-200",fillClass:"bg-gray-300"},applied:{label:"Applied",hint:"Sent, waiting for an answer",description:"Application sent",dotClass:"bg-green-300",railClass:"bg-green-300",fillClass:"bg-green-300"},interview:{label:"Interview",hint:"You are in the process",description:"Interview scheduled or ongoing",dotClass:"bg-green-500",railClass:"bg-green-500",fillClass:"bg-green-500"},offer:{label:"Offer",hint:"They want you",description:"You got an offer",dotClass:"bg-green-800",railClass:"bg-green-800",fillClass:"bg-green-800"},rejected:{label:"Rejected",hint:"",description:"This one said no",dotClass:"bg-gray-200",railClass:"bg-gray-100",fillClass:"bg-gray-200"},archived:{label:"Archived",hint:"",description:"Not pursuing anymore",dotClass:"bg-gray-200",railClass:"bg-gray-100",fillClass:"bg-gray-200"}},$=["not_applied","applied","interview","offer"],D=$.map(e=>({key:e,...u[e]})),N=["not_applied","applied","interview","offer","rejected","archived"].map(e=>({key:e,...u[e]})),{data:G}=([b,A]=X(()=>ot("applications","/applications")),b=await b,A(),b),h=C([]);Z(G,e=>{h.value=e?.applications?[...e.applications]:[]},{immediate:!0});const g=C(null),v=C(null),w=C(!1),T=k(()=>h.value.filter(e=>$.includes(e.applicationStatus))),j=k(()=>h.value.filter(e=>e.applicationStatus==="rejected"||e.applicationStatus==="archived")),U=k(()=>{const e={};return h.value.forEach(s=>{e[s.applicationStatus]=(e[s.applicationStatus]||0)+1}),e}),R=k(()=>(v.value?[v.value]:$).map(s=>({key:s,items:T.value.filter(c=>c.applicationStatus===s)})).filter(s=>s.items.length>0));function q(e){const s=T.value.length;return s?Math.max(8,Math.round((U.value[e]||0)/s*100)):0}function O(e){return e?Math.floor((Date.now()-new Date(e).getTime())/(1e3*60*60*24)):0}function z(e){return e.applicationStatus==="applied"&&O(e.lastActivityAt)>=te}const B=k(()=>T.value.filter(z).length);function F(e){const s=O(e);
1if(s<=0)return"today";if(s===1)return"yesterday";if(s<7)return`${s} days ago`;const c=Math.floor(s/7);return c<5?c===1?"1 week ago":`${c} weeks ago`:new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"})}function K(e){return e>=70?"bg-green-500 text-white":e>=50?"bg-yellow-500 text-white":"bg-black-400 text-white"}function W(e){v.value=v.value===e?null:e}const E=async(e,s)=>{if(g.value=null,s===e.applicationStatus)return;const c=e.applicationStatus,I=e.lastActivityAt;e.applicationStatus=s,e.lastActivityAt=new Date().toISOString();const{error:a}=await nt(`/tailors/${e.id}/application`,{method:"PATCH",body:{status:s}});if(a.value){e.applicationStatus=c,e.lastActivityAt=I;return}try{lt()?.capture("application_status_changed",{tailorId:e.id,from:c,to:s})}catch{}},L=()=>{if(M?.user?.credits?.canTailor===!1){P.openModal("needCredits");return}const e=M?.user?.resumes?.[0];at(e?`/job/${e.id}`:"/job/new")};return(e,s)=>{const c=tt,I=st;return l(),i("div",ct,[t("div",dt,[s[4]||(s[4]=t("div",null,[t("h1",{class:"text-3xl md:text-4xl font-bold text-black-500"},"Applications"),t("p",{class:"mt-2 text-sm text-gray-500"},"Every tailored CV is an application in motion. Keep them moving.")],-1)),x(Y,{color:"main",icon:"plus",size:"medium",onClick:L},{default:V(()=>[...s[3]||(s[3]=[S("New tailor",-1)])]),_:1})]),t("div",ut,[(l(!0),i(_,null,y(o(D),a=>(l(),i("button",{key:a.key,class:d(["applications_stage",{"-active":o(v)===a.key}]),type:"button",onClick:n=>W(a.key)},[t("span",_t,[t("span",gt,r(o(U)[a.key]||0),1),a.key==="applied"&&o(B)>0?(l(),i("span",mt,[s[5]||(s[5]=t("span",{class:"applications_stage__nudge-dot"},null,-1)),S(" "+r(o(B))+" to follow up ",1)])):m("",!0)]),t("span",bt,[t("span",{class:d(["applications_stage__dot",a.dotClass])},null,2),t("span",xt,r(a.label),1)]),t("span",yt,[t("span",{class:d(["applications_stage__fill",a.fillClass]),style:et({width:`${q(a.key)}%`})},null,6)])],10,pt))),128))]),o(h).length===0?(l(),i("div",ft,[t("div",ht,[(l(!0),i(_,null,y(o(D),(a,n)=>(l(),i("span",{key:a.key,class:"flex items-center gap-2"},[t("span",{class:d(["w-3 h-3 rounded-full",a.dotClass])},null,2),n<o(D).length-1?(l(),i("span",vt)):m("",!0)]))),128))]),s[7]||(s[7]=t("p",{class:"mt-6 text-lg font-bold text-black-500"},"Your pipeline is empty",-1)),s[8]||(s[8]=t("p",{class:"mt-1 mb-6 text-sm text-gray-500 max-w-sm"},"Tailor a CV for a job you want, then track it here from application to offer.",-1)),x(Y,{color:"main",icon:"arrow-right",size:"large",onClick:L},{default:V(()=>[...s[6]||(s[6]=[S("Tailor my first CV",-1)])]),_:1})])):(l(),i(_,{key:1},[(l(!0),i(_,null,y(o(R),a=>(l(),i("div",{key:a.key,class:"mt-4 md:mt-6 bg-white border border-gray-50 rounded-lg"},[t("div",kt,[t("span",{class:d(["w-2 h-2 rounded-full shrink-0",u[a.key].dotClass])},null,2),t("span",wt,r(u[a.key].label),1),t("span",Ct,r(a.items.length),1),t("span",St,r(u[a.key].hint),1)]),(l(!0),i(_,null,y(a.items,n=>(l(),i("div",{key:n.id,class:"applications_row"},[t("span",{class:d(["applications_row__rail",u[n.applicationStatus].railClass])},null,2),t("div",At,[t("div",$t,r(n.job.company||"Unknown company"),1),t("div",Dt,r(n.job.title||"Untitled position"),1)]),z(n)?(l(),i("div",Tt,[...s[9]||(s[9]=[t("span",{class:"relative flex w-2 h-2"},[t("span",{class:"absolute inline-flex w-full h-full rounded-full bg-orange-400 animate-ping opacity-75"}),t("span",{class:"relative inline-flex w-2 h-2 rounded-full bg-orange-400"})],-1),S(" Time to follow up ",-1)])])):m("",!0),t("div",jt,[n.atsScore?(l(),i("span",{key:0,class:d(["inline-flex px-2 py-0.5 text-xs font-medium rounded-full",K(n.atsScore)])},r(Math.round(Math.max(0,n.atsScore)))+"% ",3)):(l(),i("span",It,"-"))]),t("div",Vt,r(F(n.lastActivityAt)),1),t("div",Mt,[t("button",{class:"applications_status-btn",type:"button",onClick:p=>g.value=o(g)===n.id?null:n.id},[t("span",{class:d(["w-2 h-2 rounded-full",u[n.applicationStatus].dotClass])},null,2),t("span",null,r(u[n.applicationStatus].label),1),x(c,{name:"cvtailor:chevron-down",class:"text-2xs text-gray-400"})],8,Nt),o(g)===n.id?(l(),i(_,{key:0},[t("div",{class:"fixed inset-0 z-30",onClick:s[0]||(s[0]=p=>g.value=null)}),t("div",Ut,[(l(!0),i(_,null,y(o(N),p=>(l(),i("button",{key:p.key,class:d(["applications_status-item",{"-current":p.key===n.applicationStatus}]),type:"button",onClick:se=>E(n,p.key)},[t("span",{class:d(["w-2 h-2 rounded-full shrink-0",p.dotClass])},null,2),t("span",zt,[t("span",Bt,r(p.label),1),t("span",Ft,r(p.description),1)]),p.key===n.applicationStatus?(l(),H(c,{key:0,name:"cvtailor:check",class:"ml-auto text-xs text-green-500"})):m("",!0)],10,Ot))),128))])],64)):m("",!0)]),x(I,{to:`/tailor/${n.id}/viewer`,class:"applications_row__view",title:"View tailored CV"},{default:V(()=>[x(c,{name:"cvtailor:arrow-right",class:"text-sm"})]),_:1},8,["to"])]))),128))]))),128)),o(j).length>0?(l(),i("div",Et,[t("button",{class:"w-full px-4 md:px-6 py-3 flex items-center gap-2 text-sm text-gray-400 bg-white border border-gray-50 rounded-lg hover:text-gray-600 transition-colors",type:"button",onClick:s[1]||(s[1]=a=>w.value=!o(w))},[x(c,{name:"cvtailor:chevron-down",class:d(["text-xs transition-transform",{"rotate-180":o(w)}])},null,8,["class"]),s[10]||(s[10]=t("span",{class:"font-medium"},"Closed",-1)),t("span",Lt,r(o(j).length),1)]),o(w)?(l(),i("div",Yt,[(l(!0),i(_,null,y(o(j),a=>(l(),i("div",{key:a.id,class:"applications_row -closed"},[s[11]||(s[11]=t("span",{class:"applications_row__rail bg-gray-100"},null,-1)),t("div",Ht,[t("div",Pt,r(a.job.company||"Unknown company"),1),t("div",Gt,r(a.job.title||"Untitled position"),1)]),t("div",Rt,r(F(a.lastActivityAt)),1),t("div",qt,[t("button",{class:"applications_status-btn",type:"button",onClick:n=>g.value=o(g)===a.id?null:a.id},[t("span",{class:d(["w-2 h-2 rounded-full",u[a.applicationStatus].dotClass])},null,2),t("span",null,r(u[a.applicationStatus].label),1),x(c,{name:"cvtailor:chevron-down",class:"text-2xs text-gray-400"})],8,Kt),o(g)===a.id?(l(),i(_,{key:0},[t("div",{class:"fixed inset-0 z-30",onClick:s[2]||(s[2]=n=>g.value=null)}),t("div",Wt,[(l(!0),i(_,null,y(o(N),n=>(l(),i("button",{key:n.key,class:d(["applications_status-item",{"-current":n.key===a.applicationStatus}]),type:"button",onClick:p=>E(a,n.key)},[t("span",{class:d(["w-2 h-2 rounded-full shrink-0",n.dotClass])},null,2),t("span",Qt,[t("span",Xt,r(n.label),1),t("span",Zt,r(n.description),1)]),n.key===a.applicationStatus?(l(),H(c,{key:0,name:"cvtailor:check",class:"ml-auto text-xs text-green-500"})):m("",!0)],10,Jt))),128))])],64)):m("",!0)])]))),128))])):m("",!0)])):m("",!0)],64))])}}},oe=rt(ee,[["__scopeId","data-v-a5ef33fa"]]);export{oe as default};
2//# sourceMappingURL=CUl7r2ut.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.