PageSourceSearch

https://www.ajiriwa.net/build/assets/Index-BgAodfGP.js

js ajiriwa.net collected 2026-10-04 02:01:55 UTC 14,984 bytes, 1 lines download raw bytes

1import{r as N,O as R,k as X,l as A,o,w as F,b as e,h as f,D as Y,v as Z,c as a,F as b,g as m,t as d,H,e as v,d as g,I as ee,u as w,n as y,s as te,f as re,C as U}from"./vendor-core-C42Os7bm.js";import{l as se,r as oe}from"./vendor-inertia--4SwMw6d.js";import{_ as ae}from"./AdminLayout-BHd3A19r.js";import{a as z}from"./candidateName-DbQTvJFR.js";import{f as B}from"./feature-jobs-COCWk5Gp.js";import{a as S}from"./vendor-izitoast-DmE-2cdH.js";import"./vendor-84Wnd_bx.js";import"./vendor-charts-D6-qvknE.js";import"./vendor-swal-DqgyAEpo.js";import"./feature-applications-BzFev5Wu.js";import"./vendor-editors-DtSPydHE.js";import"./vendor-utils-D_g9guu3.js";import"./vendor-firebase-B3-1BnB6.js";import"./vendor-lucide-9BRyh9x5.js";import"./vendor-headlessui-24D15VP8.js";const ne={class:"p-6"},de={class:"bg-white dark:bg-gray-800 p-6 rounded-xl shadow-sm border border-gray-100 dark:border-gray-700 mb-8"},ie={class:"flex flex-col md:flex-row md:items-center justify-between gap-4"},le={class:"flex flex-wrap items-center gap-4"},ce={class:"relative"},ge=["value"],xe=["value"],ue={class:"flex items-center gap-2"},ye=["disabled"],pe={key:0,class:"bx bx-loader-alt bx-spin mr-2"},be={key:1,class:"bx bx-repost mr-2"},me={class:"bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-100 dark:border-gray-700 overflow-hidden"},he={class:"overflow-x-auto"},ke={class:"min-w-full divide-y divide-gray-200 dark:divide-gray-700"},fe={class:"bg-gray-50 dark:bg-gray-700/50"},ve={scope:"col",class:"px-6 py-3 text-left"},we=["checked"],_e={class:"divide-y divide-gray-200 dark:divide-gray-700"},Ce={class:"px-6 py-4 whitespace-nowrap"},je=["value"],Ae={class:"px-6 py-4 whitespace-nowrap"},Se={class:"flex items-center"},Me={class:"ml-4"},De={class:"text-sm font-medium text-gray-900 dark:text-white"},Le={class:"text-sm text-gray-500"},Te=["href"],$e={class:"px-6 py-4"},Ve={class:"text-sm text-gray-900 dark:text-gray-200 font-medium"},Ne={class:"text-xs text-gray-500"},Re={class:"px-6 py-4 whitespace-nowrap text-center"},Fe={key:0,class:"mt-1 text-[11px]"},He=["onClick"],Ue={key:1,class:"text-gray-400 dark:text-gray-500"},ze={class:"px-6 py-4 whitespace-nowrap text-center"},Be={class:"px-2 py-1 text-xs font-medium rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 capitalize"},Ee={class:"px-6 py-4 whitespace-nowrap text-center"},Ie={class:"px-6 py-4 whitespace-nowrap text-right text-sm text-gray-500"},Oe={class:"px-6 py-4 whitespace-nowrap text-center text-sm font-medium"},Pe=["onClick","disabled"],Je={key:0},Ke={key:0,class:"px-6 py-4 bg-gray-50 dark:bg-gray-700/50 border-t border-gray-200 dark:border-gray-700"},We={class:"flex items-center justify-between"},qe={class:"text-sm text-gray-700 dark:text-gray-400"},Ge={class:"flex items-center gap-1"},Qe=["innerHTML"],Xe={key:1,class:"px-3 py-1 text-sm rounded-md border border-gray-200 dark:border-gray-700 text-gray-400 dark:text-gray-600 cursor-not-allowed"},Ye=["innerHTML"],Ze={class:"relative w-full max-w-2xl max-h-[80vh] overflow-y-auto bg-white dark:bg-gray-900 rounded-xl shadow-2xl"},et={class:"flex items-center justify-between px-5 py-4 border-b border-gray-200 dark:border-gray-700"},tt={class:"font-bold text-gray-900 dark:text-white"},rt={key:0,class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},st={class:"p-5 space-y-6"},ot={key:0},at={key:1},nt={key:1,class:"text-center text-gray-400 py-10"},dt={key:2,class:"text-center text-red-500 py-10"},it={key:3,class:"text-center text-gray-400 py-10"},lt={class:"text-xs text-gray-500 dark:text-gray-400 mb-2"},ct={class:"font-semibold text-gray-700 dark:text-gray-300"},gt={key:1},xt={class:"whitespace-pre-wrap text-sm text-gray-800 dark:text-gray-200 font-sans"},Mt={__name:"Index",props:{applications:Object,filters:Object,applyMethods:Array,outcomes:{type:Array,default:()=>[]},outcomeSources:{type:Object,default:()=>({})}},setup(i){const u=i,l=N([]),p=N(!1),x=R({search:u.filters.search||"",apply_method:u.filters.apply_method||"",outcome:u.filters.outcome||""}),h=()=>{oe.get(window.route("admin.job-applications.index"),{search:x.search,apply_method:x.apply_method,outcome:x.outcome},{preserveState:!0,replace:!0})},E=s=>{var r;return((r=u.outcomes.find(t=>t.code===s))==null?void 0:r.label)||"Awaiting response"},k={pending:["text-gray-600 bg-gray-100 dark:bg-gray-700 dark:text-gray-300","bg-gray-400"],acknowledged:["text-gray-600 bg-gray-100 dark:bg-gray-700 dark:text-gray-300","bg-gray-400"],no_response:["text-gray-500 bg-gray-100 dark:bg-gray-700 dark:text-gray-400","bg-gray-400"],rejected:["text-red-600 bg-red-100 dark:bg-red-900/30 dark:text-red-400","bg-red-500"],shortlisted:["text-blue-600 bg-blue-100 dar
1k:bg-blue-900/30 dark:text-blue-400","bg-blue-500"],assessment:["text-indigo-600 bg-indigo-100 dark:bg-indigo-900/30 dark:text-indigo-400","bg-indigo-500"],interview:["text-yellow-700 bg-yellow-100 dark:bg-yellow-900/30 dark:text-yellow-400","bg-yellow-500"],offer:["text-green-600 bg-green-100 dark:bg-green-900/30 dark:text-green-400","bg-green-500"],hired:["text-green-700 bg-green-100 dark:bg-green-900/30 dark:text-green-400","bg-green-500"],withdrawn:["text-gray-500 bg-gray-100 dark:bg-gray-700 dark:text-gray-400","bg-gray-400"]},_=s=>s.outcome&&s.outcome!=="pending"&&u.outcomeSources[s.outcome_source]||null,C=s=>{var r;return(s==null?void 0:s.phone)||((r=s==null?void 0:s.user)==null?void 0:r.phone)||null},I=s=>(k[s]||k.pending)[0],O=s=>(k[s]||k.pending)[1],n=R({open:!1,loading:!1,replies:[],context:"",error:"",outcome:null,interviewConfirmedAt:null}),P=async s=>{var r;n.open=!0,n.loading=!0,n.replies=[],n.error="",n.context=`${z(s.candidate)} — ${((r=s.job)==null?void 0:r.title)??""}`.trim(),n.outcome=s.outcome??null,n.interviewConfirmedAt=s.interview_confirmed_at??null;try{const{data:t}=await U.get(window.route("admin.job-applications.replies",s.id));n.replies=t.replies}catch{n.error="Could not load the emails for this application."}finally{n.loading=!1}},J=X(()=>u.applications.data.length>0&&l.value.length===u.applications.data.length),K=s=>{s.target.checked?l.value=u.applications.data.map(r=>r.id):l.value=[]},W=s=>s?new Date(s)<new Date:!1,q=s=>new Date(s).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),G=s=>{M([s])},Q=()=>{l.value.length!==0&&M(l.value)},M=async s=>{var r,t;if(!p.value&&confirm(`Are you sure you want to resend ${s.length} application(s)?`)){p.value=!0;try{const c=await U.post(window.route("admin.job-applications.resend"),{ids:s});c.data.count>0?S.success({title:"Success",message:c.data.message,position:"topRight"}):S.warning({title:"Warning",message:c.data.message,position:"topRight"}),l.value=[]}catch(c){S.error({title:"Error",message:((t=(r=c.response)==null?void 0:r.data)==null?void 0:t.message)||"Failed to resend applications.",position:"topRight"})}finally{p.value=!1}}};return(s,r)=>(o(),A(ae,{title:"Job Applications Management"},{default:F(()=>[e("div",ne,[e("div",de,[e("div",ie,[e("div",le,[e("div",ce,[f(e("input",{"onUpdate:modelValue":r[0]||(r[0]=t=>x.search=t),type:"text",placeholder:"Search applications...",class:"pl-10 pr-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:ring-green-500 focus:border-green-500 w-64",onKeyup:Y(h,["enter"])},null,544),[[Z,x.search]]),r[6]||(r[6]=e("span",{class:"absolute left-3 top-2.5 text-gray-400"},[e("i",{class:"bx bx-search"})],-1))]),f(e("select",{"onUpdate:modelValue":r[1]||(r[1]=t=>x.apply_method=t),class:"rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:ring-green-500 focus:border-green-500",onChange:h},[r[7]||(r[7]=e("option",{value:""},"All Methods",-1)),(o(!0),a(b,null,m(i.applyMethods,t=>(o(),a("option",{key:t.code,value:t.code},d(t.label),9,ge))),128))],544),[[H,x.apply_method]]),f(e("select",{"onUpdate:modelValue":r[2]||(r[2]=t=>x.outcome=t),class:"rounded-lg border border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:ring-green-500 focus:border-green-500",onChange:h},[r[8]||(r[8]=e("option",{value:""},"All Statuses",-1)),(o(!0),a(b,null,m(i.outcomes,t=>(o(),a("option",{key:t.code,value:t.code},d(t.label),9,xe))),128))],544),[[H,x.outcome]]),e("button",{onClick:h,class:"px-4 py-2 bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-200 font-medium rounded-lg transition-colors"}," Filter ")]),e("div",ue,[e("button",{onClick:Q,disabled:l.value.length===0||p.value,class:"inline-flex items-center px-4 py-2 bg-green-600 hover:bg-green-700 disabled:bg-gray-400 text-white font-medium rounded-lg transition-colors shadow-sm"},[p.value?(o(),a("i",pe)):(o(),a("i",be)),v(" Resend Selected ("+d(l.value.length)+") ",1)],8,ye)])])]),e("div",me,[e("div",he,[e("table",ke,[e("thead",fe,[e("tr",null,[e("th",ve,[e("input",{type:"checkbox",onChange:K,checked:J.value,class:"rounded border-gray-300 text-green-600 focus:ring-green-500"},null,40,we)]),r[9]||(r[9]=e("th",{scope:"col",class:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"Candidate",-1)),r[10]||(r[10]=e("th",{scope:"col",class:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"Job",-1)),r[11]||(r[11]=e("th",{scope:"col",class:"px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"Status",-1)),r[12]||(r[12]=e("th",{scope:"col",class:"px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"Method",-1)),r[13]||(r[13]=e("th",{scope:"col",class:"px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"}
1,"Deadline",-1)),r[14]||(r[14]=e("th",{scope:"col",class:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"Applied At",-1)),r[15]||(r[15]=e("th",{scope:"col",class:"px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"Action",-1))])]),e("tbody",_e,[(o(!0),a(b,null,m(i.applications.data,t=>{var c,D,L,T,$,V;return o(),a("tr",{key:t.id,class:"hover:bg-gray-50 dark:hover:bg-gray-700/30 transition-colors"},[e("td",Ce,[f(e("input",{type:"checkbox","onUpdate:modelValue":r[3]||(r[3]=j=>l.value=j),value:t.id,class:"rounded border-gray-300 text-green-600 focus:ring-green-500"},null,8,je),[[ee,l.value]])]),e("td",Ae,[e("div",Se,[e("div",Me,[e("div",De,d(w(z)(t.candidate)),1),e("div",Le,"Candidate ID: #"+d((c=t.candidate)==null?void 0:c.id),1),C(t.candidate)?(o(),a("a",{key:0,href:`tel:${C(t.candidate)}`,class:"inline-flex items-center gap-1 text-xs text-gray-500 dark:text-gray-400 hover:text-green-600 dark:hover:text-green-400"},[r[16]||(r[16]=e("i",{class:"bx bx-phone"},null,-1)),v(d(C(t.candidate)),1)],8,Te)):g("",!0)])])]),e("td",$e,[e("div",Ve,d((D=t.job)==null?void 0:D.title),1),e("div",Ne,d((L=t.job)==null?void 0:L.application_email),1)]),e("td",Re,[e
1("span",{class:y(["inline-flex items-center gap-1.5 px-2 py-1 text-xs font-medium rounded-full",I(t.outcome)])},[e("span",{class:y(["w-1.5 h-1.5 rounded-full",O(t.outcome)])},null,2),v(" "+d(E(t.outcome)),1)],2),_(t)?(o(),a("div",Fe,[t.replies_count>0?(o(),a("button",{key:0,onClick:j=>P(t),class:"text-green-600 dark:text-green-400 underline decoration-dotted underline-offset-2 hover:text-green-700 dark:hover:text-green-300",title:"View the employer email behind this status"},d(_(t)),9,He)):(o(),a("span",Ue,d(_(t)),1))])):g("",!0)]),e("td",ze,[e("span",Be,d((T=t.job)==null?void 0:T.apply_method),1)]),e("td",Ee,[e("span",{class:y([{"text-red-600 font-bold":W(($=t.job)==null?void 0:$.deadline)},"text-sm"])},d((V=t.job)==null?void 0:V.deadline),3)]),e("td",Ie,d(q(t.created_at)),1),e("td",Oe,[e("button",{onClick:j=>G(t.id),class:"text-green-600 hover:text-green-900 dark:hover:text-green-400",disabled:p.value}," Resend ",8,Pe)])])}),128)),i.applications.data.length===0?(o(),a("tr",Je,r[17]||(r[17]=[e("td",{colspan:"8",class:"px-6 py-10 text-center text-gray-500"}," No applications found. ",-1)]))):g("",!0)])])]),i.applications.links&&i.applications.links.length>3?(o(),a("div",Ke,[e("div",We,[e("div",qe," Showing "+d(i.applications.from)+" to "+d(i.applications.to)+" of "+d(i.applications.total)+" applications ",1),e("div",Ge,[(o(!0),a(b,null,m(i.applications.links,(t,c)=>(o(),a(b,{key:c},[t.url?(o(),A(w(se),{key:0,href:t.url,class:y(["px-3 py-1 text-sm rounded-md border transition-colors",t.active?"bg-green-600 border-green-600 text-white":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"])},{default:F(()=>[e("span",{innerHTML:t.label},null,8,Qe)]),_:2},1032,["href","class"])):(o(),a("span",Xe,[e("span",{innerHTML:t.label},null,8,Ye)]))],64))),128))])])])):g("",!0)])]),(o(),A(te,{to:"body"},[n.open?(o(),a("div",{key:0,class:"fixed inset-0 z-[100] flex items-center justify-center p-4",onClick:r[5]||(r[5]=re(t=>n.open=!1,["self"]))},[r[19]||(r[19]=e("div",{class:"absolute inset-0 bg-black/50 backdrop-blur-sm"},null,-1)),e("div",Ze,[e("div",et,[e("div",null,[e("h3",tt,"Employer Email"+d(n.replies.length>1?"s":""),1),n.context?(o(),a("p",rt,d(n.context),1)):g("",!0)]),e("button",{onClick:r[4]||(r[4]=t=>n.open=!1),class:"p-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800"},r[18]||(r[18]=[e("i",{class:"bx bx-x text-xl"},null,-1)]))]),e("div",st,[n.outcome==="interview"?(o(),a("div",{key:0,class:y(["rounded-lg px-4 py-3 text-sm flex items-start gap-2",n.interviewConfirmedAt?"bg-green-50 text-green-800 dark:bg-green-900/20 dark:text-green-300":"bg-yellow-50 text-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-300"])},[e("i",{class:y(["bx text-base mt-0.5",n.interviewConfirmedAt?"bx-check-circle":"bx-time-five"])},null,2),n.interviewConfirmedAt?(o(),a("span",ot," Candidate confirmed attendance on "+d(w(B)(n.interviewConfirmedAt))+". ",1)):(o(),a("span",at," Candidate has not confirmed attendance yet. "))],2)):g("",!0),n.loading?(o(),a("div",nt,"Loading...")):n.error?(o(),a("div",dt,d(n.error),1)):n.replies.length===0?(o(),a("div",it,"No email on file for this application.")):g("",!0),(o(!0),a(b,null,m(n.replies,t=>(o(),a("div",{key:t.id,class:"border border-gray-200 dark:border-gray-700 rounded-lg p-4"},[e("div",lt,[e("span",ct,d(t.from_name||t.from_address),1),t.direction?(o(),a("span",{key:0,class:y(["ml-1.5 px-1.5 py-0.5 rounded-full text-[10px] font-medium",t.direction==="employer"?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"])},d(t.direction),3)):g("",!0),v(" · "+d(w(B)(t.received_at))+" ",1),t.subject?(o(),a("span",gt," · "+d(t.subject),1)):g("",!0)]),e("pre",xt,d(t.body_text),1)]))),128))])])])):g("",!0)]))]),_:1}))}};export{Mt 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.