1import{_ as T}from"./ClrA_iI3.js";import{q as Z,z as $,e as j,c as r,a as t,b as x,w as v,v as l,t as a,D as V,E as I,G as N,F as G,r as K,M as f,i as R,k as u,m as S,o as i,d as k,I as p,aD as U}from"./CJgdbCYG.js";/* empty css *//* empty css *//* empty css */import{_ as q}from"./CBnIvcDs.js";import{u as z}from"./vhiUy6yD.js";import{a as y}from"./DNFYb-Ji.js";const Q={class:"min-h-screen"},J={class:"app-container mx-auto px-4 py-6"},O={class:"flex items-center gap-2 text-sm text-[#666666] mb-4"},P={class:"ml-1 hover:text-[#00A0B5]"},W={class:"text-[32px] font-bold text-[#252525] mb-[40px]"},X={class:"space-y-4"},Y={class:"space-y-4"},tt={class:"flex justify-between items-center"},et={class:"relative flex-1 max-w-[360px]"},st=["placeholder"],at={class:"bg-white border border-[#E5E7EB] rounded-[20px] overflow-hidden"},nt={class:"overflow-x-auto"},ot={class:"w-full"},lt={class:"border-b border-[#E5E7EB]"},rt={class:"text-center py-4 px-6 text-sm text-[#9CA3AF] font-normal w-[60px]"},it={class:"text-start py-4 px-6 text-sm text-[#9CA3AF] font-normal w-[220px]"},dt={class:"text-center py-4 px-6 text-sm text-[#9CA3AF] font-normal w-[160px]"},ct={class:"text-center py-4 px-6 text-sm text-[#9CA3AF] font-normal w-[170px]"},_t={class:"text-center py-4 px-6 text-sm text-[#9CA3AF] font-normal w-[140px]"},pt={class:"text-center py-4 px-6 text-sm text-[#9CA3AF] font-normal w-[110px]"},mt={class:"text-center py-4 px-6 text-sm text-[#9CA3AF] font-normal w-[140px]"},xt={class:"text-left py-4 px-6 text-sm text-[#9CA3AF] font-normal w-[170px]"},ut={key:0},ht=["colspan"],Ct={key:1},gt=["colspan"],vt={class:"text-[#6B7280]"},ft={key:2},yt={class:"py-5 px-6 text-[#252525]"},bt={class:"py-5 px-6"},wt={class:"flex flex-col items-start"},Lt=["onClick"],kt={class:"text-[#9CA3AF] text-[13px] leading-5 mt-1"},At={class:"py-5 px-6 text-center text-[#252525]"},Mt={class:"py-5 px-6 text-center text-[#252525]"},Et={class:"py-5 px-6 text-center text-[#252525]"},Bt={class:"py-5 px-6 text-center"},Ft=["onClick"],Ht={class:"py-5 px-6 text-center text-[#252525]"},Dt={class:"py-5 px-6 text-center"},Tt={class:"text-[#252525] text-sm"},Zt={class:"py-5 px-6 text-center"},$t={class:"flex justify-end gap-4"},jt=["onClick"],Vt=["onClick"],Qt={__name:"index",setup(It){const{t:o}=Z(),b=S(),A=R();z();const h=u(!1),C=u([]),m=u(null),g=u(null),w=async s=>{try{h.value=!0;const e=await y.getAllLeadManagers(s);C.value=e.data.data||e.data||[]}catch{f.error(o("hr_lead_managers.load_error"))}finally{h.value=!1}};$(m,s=>{g.value&&clearTimeout(g.value),g.value=setTimeout(()=>{w(s)},600)});const M=()=>console.log(m.value),E=s=>b.push(`lead-managers/edit/${s.id}`),B=async s=>{await y.deleteLeadManager(s.id)},L=s=>{b.push({path:`lead-managers/leads/${s.id}`,state:{name:s.full_name}})},F=async(s,e)=>{const d=s.is_active;s.is_active=e,s._updating=!0;try{await y.updateLeadManager(s.id,{is_active:e}),f.success(o("hr_lead_managers.status_updated"))}catch(c){s.is_active=d;const n=c?.response?.data?.message||c?.response?.data?.error||c?.message||o("hr_lead_managers.status_update_error");f.error(n)}finally{s._updating=!1}},H=s=>{if(!s)return"-";const e=new Date(s);return new Intl.DateTimeFormat("en-GB",{day:"2-digit",month:"2-digit",year:"numeric"}).format(e)};return j(async()=>{await w()}),(s,e)=>{const d=T,c=U;return i(),r("div",Q,[t("div",J,[t("nav",O,[x(d,{to:`/${l(A).params.id}/hr/dashboard`,class:"flex gap-1"},{default:v(()=>[e[2]||(e[2]=t("img",{src:q,alt:"Icon",class:"w-4 h-4"},null,-1)),t("span",P,a(l(o)("common.home")),1)]),_:1},8,["to"]),e[3]||(e[3]=t("span",null,"/",-1)),x(d,{to:"lead-managers",class:"hover:text-[#00A0B5]"},{default:v(()=>[k(a(l(o)("hr_lead_managers.page_title")),1)]),_:1})]),t("h1",W,a(l(o)("hr_lead_managers.page_title")),1),t("main",null,[t("div",X,[t("div",Y,[t("div",tt,[t("div",et,[e[4]||(e[4]=t("svg",{class:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-[#87898E]",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M8.51799 1.48242C12.4069 1.48242 15.555 4.63057 15.555 8.51946C15.555 12.4083 12.4069 15.5565 8.51799 15.5565C4.62911 15.5565 1.48096 12.4083 1.48096 8.51946C1.48096 5.77872 3.04392 3.40835 5.33281 2.24538",stroke:"#808080","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),t("path",{d:"M16.2954 16.2959L14.814 14.8145",stroke:"#808080","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),V(t("input",{"onUpdate:modelValue":e[0]||(e[0]=n=>m.value=n),type:"text",placeholder:l(o)("hr_lead_managers.search_placeholder"),class:"w-full pl-12 pr-4 py-[11px] bg-[#F8F8FA] rounded-[16px] focus:outline-none focus:ring-2 focus:ring-[#0099B5] focus:border-transparent text-sm sm:text-base border border-[#
1E8E6E6]",onKeyup:N(M,["enter"])},null,40,st),[[I,m.value]])]),x(d,{to:"lead-managers/add-manager",class:"flex items-center bg-[#0099B5] hover:bg-[#007A91] text-white font-medium py-2.5 px-6 rounded-lg transition-colors gap-4"},{default:v(()=>[e[5]||(e[5]=t("span",{class:"text-2xl"},"+",-1)),k(" "+a(l(o)("hr_lead_managers.add_lead_manager")),1)]),_:1})]),t("div",at,[t("div",nt,[t("table",ot,[t("thead",null,[t("tr",lt,[t("th",rt,a(l(o)("hr_lead_managers.table.number")),1),t("th",it,a(l(o)("hr_lead_managers.table.name_and_id")),1),t("th",dt,a(l(o)("hr_lead_managers.table.login")),1),t("th",ct,a(l(o)("hr_lead_managers.table.phone")),1),t("th",_t,a(l(o)("hr_lead_managers.table.created_at")),1),t("th",pt,a(l(o)("hr_lead_managers.table.leads_count")),1),t("th",mt,a(l(o)("hr_lead_managers.table.total_submissions")),1),t("th",xt,a(l(o)("hr_lead_managers.table.status")),1),e[6]||(e[6]=t("th",{class:"py-4 px-6 w-[90px]"},null,-1))])]),h.value?(i(),r("tbody",ut,[t("tr",null,[t("td",{colspan:s.activeTab==="active"?9:7,class:"text-center py-12"},[...e[7]||(e[7]=[t("div",{class:"flex justify-center"},[t("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#0099B5]"})],-1)])],8,ht)])])):C.value.length===0?(i(),r("tbody",Ct,[t("tr",null,[t("td",{colspan:s.activeTab==="active"?9:7,class:"text-center py-12"},[t("p",vt,a(l(o)("common.no_data")),1)],8,gt)])])):(i(),r("tbody",ft,[(i(!0),r(G,null,K(C.value,(n,D)=>(i(),r("tr",{key:n.id,class:"border-b border-[#F3F4F6] hover:bg-gray-50 transition-colors"},[t("td",yt,a(D+1),1),t("td",bt,[t("div",wt,[t("button",{type:"button",class:"text-[#0099B5] hover:underline",onClick:p(_=>L(n),["stop"])},a(n.full_name),9,Lt),t("span",kt," #"+a(n.id),1)])]),t("td",At,a(n.login),1),t("td",Mt,a(n.phone||l(o)("common.not_specified")),1),t("td",Et,a(H(n.created_at)),1),t("td",Bt,[t("button",{type:"button",class:"text-[#0099B5] hover:underline",onClick:p(_=>L(n),["stop"])},a(n.leads_count),9,Ft)]),t("td",Ht,a(n.submissions_count),1),t("td",Dt,[t("div",{class:"flex items-center justify-start gap-3",onClick:e[1]||(e[1]=p(()=>{},["stop"]))},[x(c,{"model-value":n.is_active,loading:n._updating===!0,disabled:n._updating===!0,onChange:_=>F(n,_)},null,8,["model-value","loading","disabled","onChange"]),t("span",Tt,a(n.is_active?l(o)("common.active"):l(o)("common.inactive")),1)])]),t("td",Zt,[t("div",$t,[t("button",{type:"button",class:"w-9 h-9 grid place-items-center rounded hover:scale-110",onClick:p(_=>E(n),["stop"]),"aria-label":"Edit",title:"Edit"},[...e[8]||(e[8]=[t("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M19.0442 0.883386C18.4776 0.317717 17.7098 0 16.9092 0C16.1086 0 15.3407 0.317717 14.7742 0.883386L1.22085 14.4367C0.832722 14.8227 0.524981 15.2817 0.315428 15.7874C0.105874 16.293 -0.00133165 16.8352 1.24844e-05 17.3826V19.0934C1.24844e-05 19.3144 0.0878099 19.5264 0.24409 19.6826C0.40037 19.8389 0.612332 19.9267 0.833346 19.9267H2.54418C3.09148 19.9283 3.63365 19.8212 4.13931 19.6118C4.64496 19.4024 5.10406 19.0948 5.49001 18.7067L19.0442 5.15255C19.6096 4.58605 19.9271 3.81836 19.9271 3.01797C19.9271 2.21758 19.6096 1.44989 19.0442 0.883386ZM4.31168 17.5284C3.84168 17.9953 3.20665 18.2581 2.54418 18.2601H1.66668V17.3826C1.66584 17.0541 1.73014 16.7288 1.85588 16.4254C1.98161 16.122 2.16627 15.8466 2.39918 15.6151L12.685 5.32922L14.6017 7.24589L4.31168 17.5284ZM17.865 3.97422L15.7767 6.06339L13.86 4.15089L15.9492 2.06172C16.2033 1.80811 16.5478 1.66585 16.9069 1.66624C17.266 1.66663 17.6101 1.80964 17.8638 2.0638C18.1174 2.31797 18.2596 2.66247 18.2592 3.02153C18.2589 3.38058 18.1158 3.72477 17.8617 3.97839L17.865 3.97422Z",fill:"#87898E"})],-1)])],8,jt),t("button",{type:"button",class:"w-9 h-9 grid place-items-center rounded text-[#6B7280] hover:scale-110",onClick:p(_=>B(n),["stop"]),"aria-label":"Delete",title:"Delete"},[...e[9]||(e[9]=[t("svg",{width:"19",height:"20",viewBox:"0 0 19 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M12.255 9.75583L10.3442 11.6667L12.255 13.5775C12.4113 13.7338 12.499 13.9457 12.499 14.1667C12.499 14.3876 12.4113 14.5996 12.255 14.7558C12.0987 14.9121 11.8868 14.9999 11.6658 14.9999C11.4449 14.9999 11.2329 14.9121 11.0767 14.7558L9.16583 12.845L7.255 14.7558C7.17779 14.8335 7.08599 14.8951 6.98488 14.9372
1C6.88377 14.9792 6.77534 15.0009 6.66583 15.0009C6.55633 15.0009 6.4479 14.9792 6.34679 14.9372C6.24568 14.8951 6.15388 14.8335 6.07667 14.7558C5.99921 14.6785 5.93776 14.5867 5.89584 14.4856C5.85391 14.3845 5.83233 14.2761 5.83233 14.1667C5.83233 14.0572 5.85391 13.9489 5.89584 13.8478C5.93776 13.7467 5.99921 13.6548 6.07667 13.5775L7.9875 11.6667L6.07667 9.75583C5.9993 9.67846 5.93792 9.58661 5.89605 9.48552C5.85418 9.38443 5.83263 9.27608 5.83263 9.16667C5.83263 9.05725 5.85418 8.9489 5.89605 8.84781C5.93792 8.74672 5.9993 8.65487 6.07667 8.5775C6.15404 8.50013 6.24589 8.43876 6.34698 8.39688C6.44807 8.35501 6.55642 8.33346 6.66583 8.33346C6.77525 8.33346 6.8836 8.35501 6.98469 8.39688C7.08578 8.43876 7.17763 8.50013 7.255 8.5775L9.16583 10.4883L11.0767 8.5775C11.154 8.50013 11.2459 8.43876 11.347 8.39688C11.4481 8.35501 11.5564 8.33346 11.6658 8.33346C11.7753 8.33346 11.8836 8.35501 11.9847 8.39688C12.0858 8.43876 12.1776 8.50013 12.255 8.5775C12.3324 8.65487 12.3937 8.74672 12.4356 8.84781C12.4775 8.9489 12.499 9.05725 12.499 9.16667C12.499 9.27608 12.4775 9.38443 12.4356 9.48552C12.3937 9.58661 12.3324 9.67846 12.255 9.75583ZM18.3325 4.16667C18.3325 4.38768 18.2447 4.59964 18.0884 4.75592C17.9321 4.9122 17.7202 5 17.4992 5H16.7617L15.6983 16.2267C15.6041 17.2605 15.1259 18.2215 14.3579 18.92C13.59 19.6185 12.5881 20.0039 11.55 20H6.7775C5.74046 20.0038 4.73957 19.6192 3.97194 18.9219C3.20432 18.2246 2.72558 17.2651 2.63 16.2325L1.55 5H0.833333C0.61232 5 0.400358 4.9122 0.244078 4.75592C0.0877973 4.59964 0 4.38768 0 4.16667C0 3.94565 0.0877973 3.73369 0.244078 3.57741C0.400358 3.42113 0.61232 3.33333 0.833333 3.33333H4.25083C4.44436 2.39306 4.95602 1.5482 5.69962 0.941048C6.44323 0.3339 7.37335 0.00155955 8.33333 0L10 0C10.96 0.00140364 11.8902 0.333687 12.6339 0.940861C13.3775 1.54804 13.8891 2.39298 14.0825 3.33333H17.5C17.721 3.33333 17.933 3.42113 18.0893 3.57741C18.2455 3.73369 18.3325 3.94565 18.3325 4.16667ZM5.97583 3.33333H12.3558C12.1831 2.84624 11.8639 2.42455 11.4419 2.12614C11.0199 1.82773 10.516 1.66723 9.99917 1.66667H8.3325C7.81569 1.66723 7.31172 1.82773 6.88977 2.12614C6.46781 2.42455 6.14856 2.84624 5.97583 3.33333ZM15.0875 5H3.22417L4.28917 16.0725C4.34625 16.6922 4.63338 17.268 5.09397 17.6865C5.55456 18.105 6.1552 18.3357 6.7775 18.3333H11.55C12.173 18.3357 12.7743 18.1043 13.2352 17.685C13.696 17.2657 13.9829 16.6888 14.0392 16.0683L15.0875 5Z",fill:"#87898E"})],-1)])],8,Vt)])])]))),128))]))])])])])])])])])}}};export{Qt 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.