1import{_ as b}from"./9oYYMk7_.js";import{A as N}from"./O_PWdBgI.js";import{T as h}from"./RJPhSWpd.js";import{_ as x,H as w,h as C,k as r,ae as n,Y as l,O as p,J as P,j as _,e as t,D as B,X as c,a3 as U}from"./weBJhu_6.js";import{u as z}from"./BjnqJ1A5.js";import{u as D}from"./C4tiERRK.js";import"./B69jfl-w.js";import"./CQ98rzOd.js";const E={class:"ap-cell"},O={class:"ap-av"},T={class:"ap-name"},j={class:"ap-email"},H={class:"str-cell"},M={class:"str-bar"},R={class:"str-num"},V={__name:"index",setup(J){z({title:"Applicants | Admin"});const{apiFetch:v}=D(),y=U(),d=p(!1),m=p(""),s=p([]),o=p({page:1,pageCount:1,total:0});var k=[{key:"fullName",label:"Applicant"},{key:"nationality",label:"Nationality"},{key:"phone",label:"Phone"},{key:"profileStrength",label:"Profile"},{key:"createdAt",label:"Joined",format:"date"}],u=[{id:1,fullName:"Nakamya Sarah Kirabo",email:"[email protected]",phone:"+256 772 123 456",nationality:"Ugandan",profileStrength:87,createdAt:"2026-02-10"},{id:2,fullName:"Opio Moses",email:"[email protected]",phone:"+256 701 234 567",nationality:"Ugandan",profileStrength:72,createdAt:"2026-03-05"},{id:3,fullName:"Kato Ronald",email:"[email protected]",phone:"+256 783 456 789",nationality:"Ugandan",profileStrength:91,createdAt:"2026-01-20"},{id:4,fullName:"Auma Grace",email:"[email protected]",phone:"+256 757 678 901",nationality:"Ugandan",profileStrength:78,createdAt:"2026-02-28"}];async function g(){d.value=!0;try{var i=new URLSearchParams({page:String(o.value.page),pageSize:"20"});m.value&&i.set("search",m.value);var a=await v("/applicants?"+i.toString());s.value=a.data||u,a.meta&&a.meta.pagination?o.value=a.meta.pagination:o.value.total=s.value.length}catch{s.value=u,o.value.total=u.length}finally{d.value=!1}}function A(){window.open(y.public.apiBase+"/applicants?format=excel","_blank")}function S(i){return(i||"").split(" ").map(function(a){return a[0]}).slice(0,2).join("").toUpperCase()}return w(g),(i,a)=>{const f=b;return P(),C("div",null,[r(N,{label:"People",title:"All Applicants",desc:"Browse all registered job seekers."},{actions:n(()=>[r(h,{variant:"ghost",size:"sm",onClick:A},{default:n(()=>[...a[2]||(a[2]=[_("Export Excel",-1)])]),_:1})]),_:1}),r(f,{columns:l(k),rows:l(s),loading:l(d),total:l(o).total,page:l(o).page,"page-count":l(o).pageCount,"row-key":"id","search-placeholder":"Search name or email...","empty-icon":"A","empty-title":"No applicants found",onSearch:a[0]||(a[0]=e=>{m.value=e,g()}),onPage:a[1]||(a[1]=e=>{l(o).page=e,g()})},{"cell-fullName":n(({row:e})=>[t("div",E,[t("div",O,c(S(e.fullName)),1),t("div",null,[t("div",T,c(e.fullName),1),t("div",j,c(e.email),1)])])]),"cell-profileStrength":n(({value:e})=>[t("div",H,[t("div",M,[t("div",{class:"str-fill",style:B({width:(e||0)+"%",background:(e||0)>=80?"var(--th-teal)":(e||0)>=50?"var(--th-gold)":"var(--th-danger)"})},null,4)]),t("span",R,c(e||0)+"%",1)])]),"row-actions":n(({row:e})=>[r(h,{variant:"ghost",size:"sm",to:"/admin/applicants/"+e.id},{default:n(()=>[...a[3]||(a[3]=[_("Profile",-1)])]),_:1},8,["to"])]),_:1},8,["columns","rows","loading","total","page","page-count"])])}}},Q=x(V,[["__scopeId","data-v-4e62c32d"]]);export{Q 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.