1import{E as D,q as xe,c as ie,j as e,r as n,A as ce,d as o,k as Y,X as Qe,y as se,a0 as pe,o as q,P as t,I as ve,b as Ke,f as G,g as oe,p as Xe,x as De,F as Pe,Y as ue,D as he,Q as me,l as ge,m as fe,n as He,T as ye,H as es,aF as ss}from"./index-DOEDGpFv.js";import{N as Fe,C as rs,M as ts}from"./Contact-CeRQ2TkF.js";import{R as as}from"./RecruiterDashBroadHeader-JVQDnjTz.js";import{S as ns}from"./ShareProjectPopup-CiedVp-f.js";import{C as os}from"./CheckCircleTwoTone-Dq0qIYnk.js";import{L as is}from"./LockOpenTwoTone-BCtDkiWw.js";import{L as cs}from"./LockTwoTone-CKCu7COH.js";import{F as ls,a as ds,C as us,L as hs,D as ms,S as ps}from"./TalentMenuCard-BCGmzFKz.js";/* empty css */import{f as Ue}from"./findTalent.service-Bf6fInlV.js";import{S as xs}from"./ShortlistPopup-D6y9jE_I.js";import{C as _e}from"./CustomDropdown-KMCu6Cw8.js";import{i as Ze}from"./recruiter_404-BprXiUuV.js";import{T as Se}from"./TablePagination-rbCf-VGH.js";import{C as qe}from"./CustomDate-CuqrGms7.js";import{G as O}from"./Grid-DdjSVELe.js";import{c as js,b as we,j as gs,u as fs}from"./index.esm-DaRz_fRj.js";import{I as be}from"./InputAdornment-CYJ-dB-y.js";import{P as ys}from"./ProjectImgPlaceholder-DzGzBaip.js";import{R as ze}from"./RadioGroup-BVZKrqaO.js";import{F as ws}from"./FormControlLabel-Cv1jetH4.js";import{R as bs}from"./Radio-BcikqwZL.js";import{S as Cs}from"./Search-DRdjF7Sg.js";import"./PillsDropdown-Cc7vs6KQ.js";import"./close_icon-CFZZ4lWI.js";/* empty css */import"./Autocomplete-BiTc0fK0.js";import"./CheckboxContainer-DhXRkZn1.js";import"./Checkbox-DKFnH0fc.js";import"./SaveTwoTone-BeeFrSUG.js";import"./FavoriteTwoTone-BjeDQwGa.js";import"./Done-CZg-3UNm.js";import"./KeyboardArrowRight-K5Vapl4X.js";import"./LastPage-CTKFULy8.js";import"./AdapterDateFns-hg84jjcw.js";import"./DateCalendar-BvCUxFPP.js";import"./useThemeProps-AF4bYKqg.js";import"./useThemeProps-BeptFCZJ.js";import"./DesktopDatePicker-gwORp2KB.js";import"./listItemButtonClasses-COmYTSa9.js";import"./styled-Om9RrDqq.js";const Ns=xe.api.url,Ps=({recruiter_id:s,limit:i=5,page:d=0,sort:x})=>D.get(`${Ns}/v1/recruiter-unlocked/unlock_talents?limit=${i}&page=${d+1}&recruiter_id=${s}&sort=${x}`).then(f=>f.data),vs={getUnlockedDetails:Ps},Je=xe.api.url,_s=({recruiterId:s,startDate:i,endDate:d,changeType:x,page:f=0,limit:C=10})=>D.get(`${Je}/v1/recruiter-balance-history/balance-history/list?page=${f+1}&limit=${C}&recruiterId=${s}&startDate=${i}&endDate=${d}&changeType=${x}`,{}).then(c=>c.data),Ss=s=>D.get(`${Je}/v1/recruiter-balance-history/balance-unlocked-count?recruiterId=${s}`,{}).then(i=>i.data),Ee={getRecruiterBalanceCount:Ss,getRecruiterBalanceHistoryList:_s},le=xe.api.url,ks=({recruiter_id:s,page:i=0,limit:d=5,title:x="",status:f,projectType:C=""})=>D.get(`${le}/v1/recruiter-project/recruiter-getting/project-summary?page=${i+1}&limit=${d}&recruiterId=${s}&title=${x}&status=${f}&type=${C}`).then(c=>c.data),Ts=()=>D.get(`${le}/v1/project-type-audition/get-all`).then(s=>s.data),Ms=(s,i)=>D.patch(`${le}/v1/recruiter-project/${s}`,i).then(d=>d.data),Rs=s=>D.post(`${le}/v1/project-abuse-report`,s).then(i=>i.data),As=()=>D.get(`${le}/v1/report-reason/reportProjectList`).then(s=>s.data),re={getProjectSummary:ks,getProjectAuditionType:Ts,closeProject:Ms,projectAbuseReport:Rs,closeProjectReason:As},Ys=ie([e.jsx("path",{d:"M5 5h4v6H5zm10 8h4v6h-4zM5 17h4v2H5zM15 5h4v2h-4z",opacity:".3"},"0"),e.jsx("path",{d:"M3 13h8V3H3zm2-8h4v6H5zm8 16h8V11h-8zm2-8h4v6h-4zM13 3v6h8V3zm6 4h-4V5h4zM3 21h8v-6H3zm2-4h4v2H5z"},"1")]),Is=ie([e.jsx("path",{d:"M8 15.73C9.47 14.06 11.6 13 14 13s4.53 1.06 6 2.73V4H8zM14 5c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3",opacity:".3"},"0"),e.jsx("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10 5c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3m0-4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m6-5H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-9.31 14c.95-.63 2.09-1 3.31-1s2.36.37 3.31 1zm9.31-.27C18.53 14.06 16.4 13 14 13s-4.53 1.06-6 2.73V4h12z"},"1")]),Ve=ie([e.jsx("path",{d:"M15 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6",opacity:".3"},"0"),e.jsx("path",{d:"M15 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6M3 12c0-2.61 1.67-4.83 4-5.65V4.26C3.55 5.15 1 8.27 1 12s2.55 6.85 6 7.74v-2.09c-2.33-.82-4-3.04-4-5.65"},"1")]),Ce=ie(e.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"})),Ne=ie(e.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"})),ke=({talentDetails:s,HandleShareProject:i,HandleMakeOffer:d,RefreshAuditionData:x,DeclineOnClick:f,isUnlockTalentListPage:C})=>{var B,g,P,M,T,h,j,R,z,K,U,$,E,A,Z,V,J,r,m,v,l,W,I,te,w,F,de,Ae,Ye,Ie;const{user:c,isProfileFreezed:N}=n.useContext(ce),[b,u]=n.useState(((g=(B=s==null?void 0:s.user)==null?void 0:B.characterShortlist[0])==null?void 0:g.shortlist_notes)??""),[_,k]=n.useState(!1),[a,L]=n.useState(null),[y,S]=n.useState(!1),H=async p=>{var ee,Q,X,ae,Be,$e,Oe,Le;if((Q=(ee=s==null?void 0:s.applyAudition)==null?void 0:ee.shortlistData)!=null&&Q.id){let je={shortlist_notes:p,isFavourite:!0};return await Ue.HandleShortListNoteChanges((ae=(X=s==null?void 0:s.applyAudition)==null?void 0:X.shortlistData)==null?void 0:ae.id,je).then(async ne=>{if(ne)return x(),ne}).finally(()=>k(!1))}
1if(c!=null&&c.user_id&&(a!=null&&a.user_id)&&(($e=(Be=s==null?void 0:s.applyAudition)==null?void 0:Be.recruiterCharacter)!=null&&$e.id)){let je={charcter_id:(Le=(Oe=s==null?void 0:s.applyAudition)==null?void 0:Oe.recruiterCharacter)==null?void 0:Le.id,talent_id:a==null?void 0:a.user_id,user_id:a==null?void 0:a.user_id,isFavourite:!0,recruiter_id:c==null?void 0:c.user_id,shortlist_notes:p??""};return await Ue.AddShortlistbyCharacter(je).then(async ne=>{if(ne)return x(),ne}).finally(()=>k(!1))}};return n.useEffect(()=>{var p,ee,Q,X;(ee=(p=s==null?void 0:s.applyAudition)==null?void 0:p.shortlistData)!=null&&ee.shortlist_notes&&u((X=(Q=s==null?void 0:s.applyAudition)==null?void 0:Q.shortlistData)==null?void 0:X.shortlist_notes)},[(P=s==null?void 0:s.applyAudition)==null?void 0:P.shortlistData]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"TalentCard",className:"w-full bg-white p-6 rounded-xl",children:[e.jsxs(o.Row,{className:"gap-4 sm:gap-0",children:[e.jsx(o.Col,{lg:2,xs:12,sm:4,children:e.jsx("img",{onClick:()=>{var p;window.open(`/talent/${(p=s==null?void 0:s.user)==null?void 0:p.userUniqueId}`,"_blank")},className:"cursor-pointer",src:((T=(M=s==null?void 0:s.user)==null?void 0:M.gallaryData)==null?void 0:T.file_url)??"",alt:`${(h=s==null?void 0:s.user)==null?void 0:h.first_name}-talent`,style:{borderRadius:10}})}),e.jsx(o.Col,{lg:7.5,xs:12,sm:6,children:e.jsxs(o.Row,{className:"flex flex-col gap-5",children:[e.jsx(o.Col,{xs:12,className:"flex justify-between",children:e.jsxs("p",{className:"talent_name mb-2 flex justify-end",children:[e.jsxs("span",{className:"cursor-pointer",onClick:()=>{var p;window.open(`/talent/${(p=s==null?void 0:s.user)==null?void 0:p.userUniqueId}`,"_blank")},children:[`${(j=s==null?void 0:s.user)==null?void 0:j.first_name} ${(R=s==null?void 0:s.user)==null?void 0:R.last_name}`," "]}),e.jsx(os,{sx:{color:"#9B26B6",fontSize:20,margin:"7px 5px"}}),(s==null?void 0:s.isRecruiterUnlocked)===!0?e.jsxs("span",{className:"unlocked_date whitespace-nowrap",children:[e.jsx(is,{sx:{color:"#979797"}}),Y(s==null?void 0:s.updatedAt).format("DD-MMM-YYYY")]}):e.jsx(cs,{sx:{color:"#9B26B6"}})]})}),e.jsxs(o.Col,{xs:12,className:"flex justify-between",children:[e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("div",{className:"",children:e.jsx("img",{src:((K=(z=s==null?void 0:s.user)==null?void 0:z.talenter)==null?void 0:K.gender)==1?ls:ds,alt:""})}),e.jsxs("div",{className:"talent_catg",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Gender"})}),e.jsx("p",{className:"catg_value",children:(($=(U=s==null?void 0:s.user)==null?void 0:U.talenter)==null?void 0:$.gender)==0?"Female":((A=(E=s==null?void 0:s.user)==null?void 0:E.talenter)==null?void 0:A.gender)===1?"Male":"Neutral"})]})]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("div",{className:"",children:e.jsx(us,{sx:{color:"#9B26B6"}})}),e.jsxs("div",{className:"talent_catg",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Age"})}),e.jsx("p",{className:"catg_value",children:Qe(new Date((Z=s==null?void 0:s.user)==null?void 0:Z.date_of_birth))})]})]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("div",{className:"",children:e.jsx(hs,{sx:{color:"#9B26B6"}})}),e.jsxs("div",{className:"talent_catg",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Location"})}),e.jsx("p",{className:"catg_value",children:(r=(J=(V=s==null?void 0:s.user)==null?void 0:V.talenter)==null?void 0:J.currentCity)==null?void 0:r.city_name})]})]}),e.jsx("div",{})]}),e.jsx(o.Col,{xs:12,children:e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("div",{className:"",children:e.jsx(ms,{sx:{color:"#9B26B6"}})}),e.jsxs("div",{className:" talent_catg w-full",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Internal note"})}),e.jsx(se,{style:{width:"100%"},variant:"standard",id:"internal_note",name:"internal_note",placeholder:"Mention why are you shortlisting this talent. It helps recall later.",value:b,slotProps:{input:{autoComplete:"new-password",form:{autoComplete:"off"}}},multiline:!0,disabled:!0})]})]})})]})}),e.jsxs(o.Col,{lg:2.5,xs:12,sm:2,className:"flex flex-col gap-2 ",children:[e.jsx(pe,{title:(m=s==null?void 0:s.applyAudition)!=null&&m.shareProject?e.jsx(ps,{data:(v=s==null?void 0:s.applyAudition)==null?void 0:v.shareProject,talent_name:(l=s==null?void 0:s.user)==null?void 0:l.first_name}):"",placement:"top",children:e.jsx("div",{style:{width:"100%"},children:e.jsx(q,{text:(W=s==null?void 0:s.applyAudition)!=null&&W.shareProject?"Share more":"Share Project",white:!0,style:{padding:2,width:"100%"}
1,onClick:N?"":i,disableBtn:N})})}),((te=(I=s==null?void 0:s.user)==null?void 0:I.shareProjectData)==null?void 0:te.length)!==0?e.jsx(q,{text:"Shared projects",gray:!0,style:{padding:2},onClick:()=>S(p=>!p)}):e.jsx(pe,{title:"No projects shared with this talent",placement:"top",children:e.jsx("div",{style:{width:"100%"},children:e.jsx(q,{text:"Shared projects",gray:!0,style:{padding:2,width:"100%"},disableBtn:!0})})})]})]}),e.jsx(xs,{userDetails:a,open:_,HandleSave:H,setClose:k,oldNote:a==null?void 0:a.shortlist_notes})]}),y&&((F=(w=s==null?void 0:s.user)==null?void 0:w.shareProjectData)==null?void 0:F.length)!==0&&e.jsxs("div",{className:"w-full bg-white py-6 rounded-xl sharedProjectCard",children:[e.jsxs("h3",{className:" px-6",children:["Projects shared with"," ",`${(de=s==null?void 0:s.user)==null?void 0:de.first_name} ${(Ae=s==null?void 0:s.user)==null?void 0:Ae.last_name}`]}),e.jsx("p",{className:"border-b-2 mt-4"}),e.jsx("div",{className:"p-6",style:{maxWidth:"600px"},children:e.jsxs("table",{className:"tablelistcontent",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:e.jsx("div",{className:"col-span-5 sharedProjectCardHeading",children:"Project Title"})}),e.jsx("th",{children:e.jsx("div",{className:"col-span-4 sharedProjectCardHeading",children:"Character name"})}),e.jsxs("th",{children:[" ",e.jsx("div",{className:"col-span-3 sharedProjectCardHeading",children:"Date"})]})]})}),(Ie=(Ye=s==null?void 0:s.user)==null?void 0:Ye.shareProjectData)==null?void 0:Ie.map((p,ee)=>{var Q,X;return e.jsx("tbody",{children:e.jsxs("tr",{children:[e.jsx("td",{className:"col-span-5 sharedProjectLink cursor-pointer",onClick:()=>{var ae;window.open(`/app/my-projects#${(ae=p==null?void 0:p.recruiterProject)==null?void 0:ae.id}`,"_blank","noopener,noreferrer")},children:(Q=p==null?void 0:p.recruiterProject)==null?void 0:Q.project_title}),e.jsx("td",{className:"col-span-4 ",children:((X=p==null?void 0:p.characterData)==null?void 0:X.character_name)??e.jsx("span",{style:{fontStyle:"italic"},children:"NA"})}),e.jsx("td",{className:"col-span-3 ",style:{width:"100px"},children:Y(p==null?void 0:p.updatedAt).format("DD-MMM-YYYY")})]})},ee)})]})})]})]})};ke.propTypes={talentDetails:t.shape({id:t.oneOfType([t.string,t.number]),isRecruiterUnlocked:t.bool.isRequired,updatedAt:t.string,applyAudition:t.shape({id:t.oneOfType([t.string,t.number]),shareProject:t.any,shortlistData:t.shape({id:t.oneOfType([t.string,t.number]),shortlist_notes:t.string}),recruiterCharacter:t.shape({id:t.oneOfType([t.string,t.number])})}),user:t.shape({user_id:t.oneOfType([t.string,t.number]).isRequired,userUniqueId:t.string.isRequired,first_name:t.string.isRequired,last_name:t.string.isRequired,date_of_birth:t.string,gallaryData:t.shape({file_url:t.string}),talenter:t.shape({gender:t.number,currentCity:t.shape({city_name:t.string})}),characterShortlist:t.arrayOf(t.shape({shortlist_notes:t.string})),shareProjectData:t.arrayOf(t.shape({updatedAt:t.string,recruiterProject:t.shape({id:t.oneOfType([t.string,t.number]),project_title:t.string}),characterData:t.shape({character_name:t.string})}))}).isRequired}).isRequired,HandleShareProject:t.func.isRequired,HandleMakeOffer:t.func,RefreshAuditionData:t.func.isRequired,DeclineOnClick:t.func,isUnlockTalentListPage:t.bool};ke.defaultProps={HandleMakeOffer:null,DeclineOnClick:null,isUnlockTalentListPage:!1};const Te=({TextContent:s,disableImage:i})=>e.jsxs("div",{className:"flex flex-col justify-center items-center gap-8 pt-10 pb-16 mb-8 bg-white rounded-lg",children:[e.jsx("p",{className:"pb-4 px-4 fourbnottext",children:s||"No matching profiles found."}),e.jsx("div",{className:"startIMg",children:!i&&e.jsx("img",{src:Ze,alt:"No results found"})})]});Te.propTypes={TextContent:t.string,disableImage:t.bool};Te.defaultProps={TextContent:null,disableImage:!1};const Bs=()=>{var M,T;const{user:s,isProfileFreezed:i}=n.useContext(ce),[d,x]=n.useState(),[f,C]=n.useState(0),[c,N]=n.useState(5),[b,u]=n.useState(0),[_,k]=n.useState(""),[a,L]=n.useState(!0),[y,S]=n.useState({isOpen:!1,data:null}),H=(h,j)=>{u(j),g(j,c)},B=h=>{const j=parseInt(h.target.value,10);N(j),u(0),g(0,j)},g=async(h,j)=>(u(h),await vs.getUnlockedDetails({recruiter_id:s==null?void 0:s.user_id,limit:j,page:h,sort:_}).then(R=>(x(R),C(R.totalItems),R)).finally(()=>{L(!1)}));n.useEffect(()=>{g(0,c)},[_]);const P=[{id:1,value:"Last updated"},{id:2,value:"Date unlocked: Latest"},{id:3,value:"Date unlocked: Oldest"},{id:4,value:"A-Z"},{id:5,value:"Z-A"},{id:6,value:"Male"},{id:7,value:"Female"},{id:8,value:"Neutral"},{id:9,value:"Youngest"},{id:10,value:"Eldest"},{id:11,value:"Shared projects"}];return a?e.jsx(ve,{marginTop:" roundedbxcarditsbal"}):e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"unlock_list_page",style:{background:"#f4f4f4"},children:e.jsx("div",{className:"container mx-auto",children:e.jsx("div",{className:"w-full",children:e.jsx("div",{className:"filter_area flex-wrap lg:justify-end sm:justify-content",children:e.jsxs("div",{className:"flex gap-4 filterOption",children:[e.jsx("p",{children:"Sort:"}),e.jsx("div",{style:{minWidth:250},className:"value",children:e.jsx(_e,{data:P,autoComplete:!0,dropdownName:"value",handleChange:h=>{k(h)}})})]})})})})}),e.jsxs("div",{className:"flex flex-col gap-4",children:[(M=d==null?void 0:d.data)!=null&&M.length?e.jsxs(e.Fragment,{children:[(T=d==null?void 0:d.data)==null?void 0:T.map((h,j)=>h!=null&&h.user?e.jsx(ke,{talentDetails:h,isUnlockTalentListPage:!0,HandleShareProject:i?"":()=>{S(R=>({isOpen:!0,data:h.user}))}},j):null),e.jsx(Se,{id:"tablePagination_ui",rowsPerPageOptions:[5,10,20],component:"div",count:f,rowsPerPage:c,page:b,onPageChange:H,onRowsPerPageChange:B,slotProps:{select:{"aria-label":"rows per page",native:!0}}})]}):e.jsx("div",{className:"bg-white rounded-lg",children:e.jsx(Te,{})}),y.isOpen&&e.jsx(ns,{open:y.isOpen,selectedTalentData:[{talentData:y.data}],onClose:()=>i?"":S(h=>({...h,isOpen:!1})),setOpen:i?"":h=>{S(j=>({...j,isOpen:h})),g(b,c)},multiShareData:!0})]})]})},$s=[{id:0,value:"All"},{id:1,value:"Debit"},{id:2,value:"Credit"}],Os=()=>{const s=Ke(),{user:i}=n.useContext(ce),[d,x]=n.useState(""),[f,C]=n.useState(""),[c,N]=n.useState(null),[b,u]=n.useState(""),[_,k]=n.useState(""),[a,L]=n.useState(0),[y,S]=n.useState([]),[H,B]=n.useState(!0),[g,P]=n.useState(!1),[M,T]=n.useState(!1),[h,j]=G.useState(0),[R,z]=G.useState(10),[K,U]=n.useState(0);let $=b?Y(b).add(1,"days").utc().format():"",E=b?Y(_).add(1,"days").utc().format():"";n.useEffect(()=>{A()},[]);const A=(r,m,v)=>{j(r||0),v===1?(P(!0),Ee.getRecruiterBalanceHistoryList({recruiterId:i.user_id,startDate:$,endDate:E,changeType:a,page:r,limit:m}).then(l=>(P(!1),U(l==null?void 0:l.totalItems),S(l==null?void 0:l.data),x(l.myCredits),C(l.profile_unlocked),N(l),T(!1),l)).finally(()=>{B(!1),P(!1)})):(P(!0),Ee.getRecruiterBalanceHistoryList({recruiterId:i.user_id,startDate:$,endDate:E,changeType:a,page:r,limit:m}).then(l=>(P(!1),U(l==null?void 0:l.totalItems),S(l==null?void 0:l.data),x(l.myCredits),C(l.profile_unlocked),N(l),T(!0),l)).finally(()=>{P(!1),B(!1)}))},Z=(r,m)=>{j(m),A(m,R,1)},V=r=>{z(parseInt(r.target.value,10)),A(0,parseInt(r.target.value,10,1)),j(0)},J=r=>{if(r===!0)return"Details of your Credit Points usage will be displayed here.";if(r===!1)return"Sorry, no results found. Change the search criteria and try again."};return H?e.jsx(ve,{marginTop:" roundedbxcarditsbal"}):e.jsxs("div",{className:"bg-white roundedbxcarditsbal ",children:[e.jsxs("div",{className:"top_headingbxouter flex gap-10 flex-wrap",children:[e.jsx("div",{className:"top_headingbx",children:e.jsx("div",{className:"credit_points ",children:e.jsxs("div",{className:"credit_pointstop gap-14",children:[e.jsxs("div",{children:[e.jsx("h3",{children:"My Credit Balance"}),c!=null&&c.updatedAt?e.jsxs("p",{children:["As on ",Y(new Date).format("DD-MMM-YYYY hh:mm A")]}):null]}),e.jsxs("p",{children:[e.jsx("span",{children:d}),e.jsx("span",{children:c!=null&&c.balanceExpireDate?(()=>{const r=Y(c.balanceExpireDate),m=Y(),v=r.diff(m,"days"),l=r.diff(m,"months");return v<=30&&v>=0?e.jsxs("p",{style:{color:"red"},children:["Plan expires on ",r.format("D-MMM-YYYY")," (in ",v," ",v===1?"day":"days","). ",e.jsx(oe,{to:"/app/recruiter/dashboard/contact-us",style:{color:"red",textDecoration:"underline"},children:"Recharge now"}),"."]}):l===1&&v>30?e.jsxs("p",{style:{color:"red"},children:["Plan expires on ",r.format("D-MMM-YYYY")," (in ",l," month). ",e.jsx(oe,{to:"/app/recruiter/dashboard/contact-us",style:{color:"red",textDecoration:"underline"},children:"Recharge now"}),"."]}):l>1?e.jsxs("p",{children:["Valid until ",r.format("D-MMM-YYYY")]}):v<0?e.jsxs("p",{style:{color:"red"},children:["Plan expired on ",r.format("D-MMM-YYYY"),". ",e.jsx(oe,{to:"/app/recruiter/dashboard/contact-us",style:{color:"red",textDecoration:"underline"},children:"Recharge now"}),"."]}):e.jsxs("p",{style:{color:"red"},children:["Plan expires today. ",e.jsx(oe,{to:"/app/recruiter/dashboard/contact-us",style:{color:"red",textDecoration:"underline"},children:"Recharge now"}),"."]})})():null})]})]})})}),e.jsx("div",{className:"top_headingbx",children:e.jsxs("div",{className:"credit_points",children:[e.jsxs("div",{className:"credit_pointstop gap-20",children:[e.jsx("h3",{children:"Profiles unlocked"}),e.jsx(pe,{title:"View My Unlocked Talents",placement:"top",children:e.jsx("span",{className:"cursor-pointer",onClick:()=>s("/app/recruiter/dashboard/my-unlocked-profiles"),children:f})})]}),e.jsx("p",{children:"Talents found"})]})})]}),e.jsxs("div",{className:"top_middingbxouter",children:[e.jsxs("div",{className:"top_middingbxhead",children:[e.jsx("h4",{children:"Transactions"}),e.jsx("p",{children:"See the latest Points transactions"})]}),e.jsx("div",{className:"top_middingbxform IconsChanges",children:e.jsxs(O,{container:!0,rowSpacing:1,columnSpacing:{xs:1,sm:2,md:3},children:[e.jsxs(O,{item:!0,xs:12,sm:3,children:[e.jsx("p",{className:"subHeading",children:"Start date"}),e.jsx(qe,{formikDateValue:b,setFormikDateValue:r=>{Y(r).format("YYYY-MM-DD")!==Y(b).format("YYYY-MM-DD")&&u(r)}})]}),e.jsxs(O,{item:!0,xs:12,sm:3,children:[e.jsx("p",{className:"subHeading",children:"End date"}),e.jsx(qe,{formikDateValue:_,setFormikDateValue:r=>{Y(r).format("YYYY-MM-DD")!==Y(_).format("YYYY-MM-DD")&&k(r)}})," "]}),e.jsxs(O,{container:!0,spacing:2,className:"MobileFullWidth",children:[e.jsxs(O,{item:!0,xs:12,sm:4,children:[e.jsx("p",{className:"subHeading",children:"Transaction type"}),e.jsx(_e,{name:"changeType",data:$s,values:a,handleChange:L,style:{width:"100%"}})]}),e.jsx(O,{item:!0,xs:12,sm:2,children:e.jsx("div",{className:"showbuttons incresswidtj",style:{width:"100%"},children:e.jsx(q,{text:"Show",isLoading:g,onClick:()=>A(0,R,1),fullWidth:!0})})})]})]})}),y!=null&&y.length?e.jsxs(e.Fragment,{children:[y==null?void 0:y.map(r=>(r==null?void 0:r.change_type)===1?e.jsx("div",{className:"top_middingbxlistinner",children:e.jsx("div",{className:"top_middingbxlist",children:e.jsxs(O,{container:!0,rowSpacing:1,columnSpacing:{xs:1,sm:2,md:3},children:[e.jsx(O,{item:!0,xs:6,children:e.jsxs("div",{className:"transactionlistlft",children:[e.jsx("h5",{children:Y(new Date(r.updatedAt)).format("DD-MMM-YYYY hh:mm A")}),e.jsx("p",{className:"capitalize",children:Xe(r.reason)})]})}),e.jsx(O,{item:!0,xs:6,children:e.jsxs("div",{className:"transactionlistrgt text-right",children:[e.jsxs("h5",{className:"redText",children:["-",r.usage_point_balance," Points"]}),e.jsx("p",{children:"Success"})]})})]})})}):(r==null?void 0:r.change_type)===2?e.jsx("div",{className:"top_middingbxlistinner",children:e.jsx("div",{className:"top_middingbxlist",children:e.jsxs(O,{container:!0,rowSpacing:1,columnSpacing:{xs:1,sm:2,md:3},children:[e.jsx(O,{item:!0,xs:6,children:e.jsxs("div",{className:"transactionlistlft",children:[e.jsx("h5",{children:Y(new Date(r.createdAt)).format("DD-MMM-YYYY hh:mm A")}),e.jsx("p",{children:r.reason})]})}),e.jsx(O,{item:!0,xs:6,children:e.jsxs("div",{className:"transactionlistrgt text-right",children:[e.jsxs("h5",{className:"greenText",children:["+",r.available_point_balance," Points"]}),e.jsx("p",{children:"Success"})]})})]})})}):""),e.jsx(Se,{rowsPerPageOptions:[10,15,20],component:"div",count:K,page:h,onPageChange:Z,rowsPerPage:R,onRowsPerPageChange:V,style:{color:"#44454D"}})]}):e.jsxs("div",{className:"top_middingbxhead mt-10 flex justify-center",children:[" ",e.jsx("h4",{children:J(M)})]})]})]})};function Ls(){const[s,i]=n.useState(!1),[d,x]=n.useState(!1),[f,C]=n.useState(!1),[c,N]=n.useState(!1),[b,u]=n.useState(!1),{logout:_}=n.useContext(ce),k=js({currentPassword:we().required("Current password is required"),newPassword:we().required("New password is required").min(8,"Password must contain min 8 characters and special character and one number and one letter").matches(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]/,"Password must contain min 8 characters and special character and one number and one letter"),confirmPassword:we().required("Confirm password is required").oneOf([gs("newPassword"),null],"Both Passwords must match")}),a=fs({validateOnMount:!0,initialValues:{currentPassword:"",newPassword:"",confirmPassword:""},enableReinitialize:!0,validationSchema:k,onSubmit:(g,{setStatus:P,setSubmitting:
1M})=>{i(!0),P();const T={currentPassword:g.currentPassword,newPassword:g.newPassword,confirmPassword:g==null?void 0:g.confirmPassword};De.userProfileChangePassword(T).then(h=>{i(!1),x(!0)}).catch(h=>{i(!1),M(!1)})}}),L=()=>{a.resetForm()},y=()=>{x(!1),_&&_()},S=()=>{C(!f)},H=()=>{N(!c)},B=()=>{u(!b)};return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"bg-white rounded-lg flex flex-col Padding0",children:[e.jsxs("div",{className:"password-header",children:[e.jsx("h2",{className:"password-title",children:"Change password"}),e.jsx("p",{className:"password-subtitle",children:"Enter current and new passwords"})]}),e.jsx(Pe,{variant:"standard",sx:{m:1,minWidth:120,margin:0},children:e.jsxs(o.Row,{children:[e.jsx(o.Col,{sm:12,children:e.jsxs("div",{className:"password-field-wrapper",children:[e.jsx("label",{className:"password-label",children:"Current password"}),e.jsx(se,{fullWidth:!0,type:f?"text":"password",placeholder:"********",autoComplete:"off",variant:"standard",name:"currentPassword",value:a.values.currentPassword,onChange:a.handleChange,onBlur:a.handleBlur,error:a.touched.currentPassword&&!!a.errors.currentPassword,helperText:a.touched.currentPassword&&a.errors.currentPassword,slotProps:{input:{disableUnderline:!1,endAdornment:e.jsx(be,{position:"end",children:e.jsx(ue,{"aria-label":"toggle current password visibility",onClick:S,edge:"end",className:"visibility-icon-button",children:f?e.jsx(Ne,{className:"visibility-icon"}):e.jsx(Ce,{className:"visibility-icon"})})})}}})]})}),e.jsx(o.Col,{sm:12,children:e.jsxs("div",{className:"password-field-wrapper",children:[e.jsx("label",{className:"password-label",children:"New Password"}),e.jsx(se,{fullWidth:!0,type:c?"text":"password",placeholder:"********",autoComplete:"off",variant:"standard",name:"newPassword",value:a.values.newPassword,onChange:a.handleChange,onBlur:a.handleBlur,error:a.touched.newPassword&&!!a.errors.newPassword,slotProps:{input:{disableUnderline:!1,endAdornment:e.jsx(be,{position:"end",children:e.jsx(ue,{"aria-label":"toggle password visibility",onClick:H,edge:"end",className:"visibility-icon-button",children:c?e.jsx(Ne,{className:"visibility-icon"}):e.jsx(Ce,{className:"visibility-icon"})})})}}}),e.jsx("div",{className:`custom-helper-text ${a.touched.newPassword&&a.errors.newPassword?"helper-text-error":"helper-text-info"}`,children:a.touched.newPassword&&a.errors.newPassword?a.errors.newPassword:"Password must contain min 8 characters and special character and one number and one letter"})]})}),e.jsx(o.Col,{sm:12,children:e.jsxs("div",{className:"password-field-wrapper",children:[e.jsx("label",{className:"password-label",children:"Confirm New Password"}),e.jsx(se,{fullWidth:!0,type:b?"text":"password",placeholder:"********",autoComplete:"off",variant:"standard",name:"confirmPassword",value:a.values.confirmPassword,onChange:a.handleChange,onBlur:a.handleBlur,error:a.touched.confirmPassword&&!!a.errors.confirmPassword,helperText:a.touched.confirmPassword&&a.errors.confirmPassword,slotProps:{input:{disableUnderline:!1,endAdornment:e.jsx(be,{position:"end",children:e.jsx(ue,{"aria-label":"toggle confirm password visibility",onClick:B,edge:"end",className:"visibility-icon-button",children:b?e.jsx(Ne,{className:"visibility-icon"}):e.jsx(Ce,{className:"visibility-icon"})})})}}})]})}),e.jsx(o.Col,{sm:12,children:e.jsxs("div",{className:"password-button-group",children:[e.jsx("button",{type:"button",className:"cancel-button",onClick:L,disabled:s,children:"Cancel"}),e.jsx(q,{text:s?"Changing...":"Change",isLoading:s,onClick:a.handleSubmit,className:`change-button ${!a.isValid||s?"button-disabled":""}`,disabled:!a.isValid||s})]})})]})})]}),e.jsx(he,{open:d,onClose:()=>{},slotProps:{paper:{className:"success-modal"}},maxWidth:"sm",fullWidth:!0,children:e.jsxs(me,{className:"success-modal-content",children:[e.jsx("h2",{className:"success-title",children:"Password Changed"}),e.jsxs("p",{className:"success-message",children:["You have changed your password.",e.jsx("br",{}),"Re-Login with the new password to continue."]}),e.jsx("button",{className:"signout-button",onClick:y,children:"Sign-Out"})]})}),e.jsx("div",{className:"bottom_space_line"})]})}const Me=({projectDetails:s,indexKey:i,profileFreezed:d,HandleDetails:x,isPagination:f,re
1cruiterId:C,HandleApply:c})=>{var v,l,W,I,te;n.useEffect(()=>{f&&window.scrollTo({top:0})},[s,f]);const N=Ke(),[b,u]=G.useState(0),[_,k]=G.useState(0),[a,L]=G.useState(!1),y=()=>{L(!0)},S=()=>L(!1),[H,B]=G.useState(!1),[g,P]=G.useState(!1),[M,T]=n.useState(""),[h,j]=n.useState(null),[R,z]=G.useState([]),[K,U]=G.useState(!1),$=()=>{B(!H)},E=()=>{P(!0)},A=()=>{P(!1),T("")},Z=w=>{w.key==="Enter"&&V()},V=()=>{M.length!==0&&(r(),T(""))};function J(){u(1);let w={project_status:2,closedBy:C};re.closeProject(s.id,w).then(F=>{F!=null&&F!=null&&($(),c())}),S(),E()}function r(){k(1);let w={reason_id:h,others:M,recruiterProject_id:s.id,closed_by:C,closed_time:new Date};re.projectAbuseReport(w).then(F=>{U(!0),A()})}const m=()=>{U(!1)};return n.useEffect(()=>{a&&re.closeProjectReason().then(w=>{var F;z(w),j(((F=w[0])==null?void 0:F.id)||null)})},[a]),e.jsxs("div",{id:i,className:"w-full bg-white p-6 rounded-xl newSub1",children:[e.jsxs(o.Row,{className:"gap-4 sm:gap-0",children:[e.jsx(o.Col,{lg:2,xs:12,sm:4,className:"h-40",children:s.image_upload?e.jsx("img",{style:{borderRadius:10},src:s.image_upload,alt:`${s.project_title||"Project"} image`,className:"h-full w-full object-cover"}):e.jsx(ys,{isSmall:!0,letter:((v=s.project_title)==null?void 0:v.slice(0,1))||"?"})}),e.jsx(o.Col,{lg:7.5,xs:12,sm:6,children:e.jsxs(o.Row,{children:[e.jsxs(o.Col,{xs:12,children:[e.jsx("p",{className:"project_name cursor-pointer",onClick:()=>{window.open(`/app/my-projects#${s.id}`,"_blank","noopener,noreferrer")},children:s.project_title}),e.jsx("p",{className:"type_project_name",children:((l=s.projectData)==null?void 0:l.projectname)||"Unknown Type"})]}),e.jsx(o.Col,{xs:12,className:"flex justify-between my-5 flex-wrap",children:e.jsxs(o.Row,{style:{width:"100%"},children:[e.jsx(o.Col,{className:"flex gap-4 items-center",children:e.jsxs("div",{className:"project_catg",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Project Status"})}),e.jsx("p",{className:"project_status_value",style:{color:s.project_status===1?"#34A853":"#DB0000"},children:s.project_status===1?"Open":"Closed"})]})}),e.jsx(o.Col,{className:"flex gap-4 items-center",children:e.jsxs("div",{className:"project_catg",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Create Date"})}),e.jsx("p",{className:"project_value",children:s.createdAt?Y(new Date(s.createdAt)).format("DD-MMM-YYYY hh:mm A"):"-"})]})}),e.jsx(o.Col,{className:"flex gap-4 items-center",children:e.jsxs("div",{className:"project_catg",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Close Date"})}),e.jsx("p",{className:"project_value",children:s.closed_date?Y(new Date(s.closed_date)).format("DD-MMM-YYYY hh:mm A"):"-"})]})})]})}),e.jsx(o.Col,{children:e.jsx("hr",{})}),e.jsx(o.Col,{xs:12,className:"flex justify-between my-5 flex-wrap",children:e.jsxs(o.Row,{style:{width:"100%"},children:[e.jsx(o.Col,{className:"flex gap-4 items-center",children:e.jsxs("div",{className:"project_catg",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Characters"})}),e.jsx("p",{className:"count_value",children:((W=s.recruiterCharacterCount)==null?void 0:W.length)||0})]})}),e.jsx(o.Col,{className:"flex gap-4 items-center",children:e.jsxs("div",{className:"project_catg",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Locked"})}),e.jsx("p",{className:"count_value",children:((I=s.characterLockedCount)==null?void 0:I.length)||0})]})}),e.jsx(o.Col,{className:"flex gap-4 items-center",children:e.jsxs("div",{className:"project_catg",children:[e.jsx("p",{className:"title",children:e.jsx("strong",{children:"Remaining"})}),e.jsx("p",{className:"count_value",children:((te=s.characterRemainingCount)==null?void 0:te.length)||0})]})})]})})]})}),e.jsxs(o.Col,{lg:2.5,xs:12,sm:2,className:"flex flex-col gap-2 right_but_info",children:[x&&e.jsx(q,{text:"View details",onClick:x,style:{width:"100%",padding:0}}),e.jsx(pe,{title:s.project_status===1?"Once you close a Project, all the Job Postings associated with the project will also get closed.":"",children:e.jsx("div",{className:"link_list cursor-pointer",children:e.jsx("p",{style:{color:d?"#9f9f9f":"#9B26B6"},className:"project_addDoc",onClick:!d&&s.project_status!==2?y:void 0,children:s.project_status===1?"Close project":null})})})]})]}),e.jsxs(he,{className:"NewPopupClassClose",open:a,onClose:S,fullWidth:!0,maxWidth:"sm",children:[e.jsxs(ge,{id:"first_alert__title",className:"first_alert__title",children:['Close Project "',s.project_title,'"']}),e.jsx(me,{children:e.jsx("div",{children:e.jsxs("p",{id:"firrt-dialog-description",style:{textAlign:"center",width:"560px"},children:["All your Job Postings of this project will also get closed and",e.jsx("br",{}),"talents will no longer be able to Apply to this project any more.",e.jsx("br",{}),e.jsx("b",{children:"This action is irreversible."})," Close project?"]})})}),e.jsx(fe,{children:e.jsxs("div",{className:"pb-6 px-6 flex justify-end gap-3 w-full",children:[e.jsx(He,{text:"Cancel",onClick:S}),e.jsx(q,{text:"Yes, close project",onClick:J})]})})]}),b==1&&e.jsxs(he,{open:g,onClose:A,fullWidth:!0,maxWidth:"md",children:[e.jsx(ge,{id:"first_alert__title",className:"first_alert__title",children:"Project Closed"}),e.jsx(me,{children:e.jsxs("div",{children:[e.jsxs("p",{id:"firrt-dialog-description",style:{textAlign:"center"},className:"mb-6",children:["Project ",s.project_title," is closed. Any Job Postings under this project ",e.jsx("br",{}),"are also closed."]}),e.jsx("p",{id:"firrt-dialog-description",className:"ml-8",children:"Please indicate the reason to close this project:"}),e.jsx("div",{className:"pl-8",children:e.jsxs(Pe,{className:"radio_cus",children:[e.jsx(ze,{"aria-labelledby":"demo-radio-buttons-group-label",name:"radio-buttons-group",children:R.map((w,F)=>e.jsx(ws,{value:w.id,checked:h==w.id,onChange:de=>{j(de.target.value)},control:e.jsx(bs,{}),label:w==null?void 0:w.reason},F))}),e.jsxs("div",{className:"border_bottom",children:[e.jsx("h5",{className:"label_text",style:{marginTop:13},children:"Provide details (Optional)"}),e.jsx(se,{id:"standard-basic",variant:"standard",name:"closedProjectreason",style:{width:"100%"},className:"reason_text",placeholder:"Please add an optional note",multiline:!0,value:M,onChange:w=>T(w.target.value),slotProps:{input:{autoComplete:"new-password"}},onKeyDown:w=>{w.key==="Enter"&&Z(w)}})]})]})})]})}),e.jsx(fe,{children:e.jsxs("div",{className:"pb-9 px-12 flex justify-between w-full",children:[e.jsx(He,{text:"Cancel",onClick:A,style:{marginRight:20}}),e.jsx(q,{text:"Submit",onClick:r})]})})]}),_==1&&e.jsxs(he,{open:K,onClose:S,fullWidth:!0,maxWidth:"sm",children:[e.jsx(ge,{id:"first_alert__title",className:"first_alert__title",children:"Project Closed"}),e.jsx(me,{children:e.jsxs("div",{children:[e.jsx("p",{id:"firrt-dialog-description",style:{textAlign:"center"}
1,children:"Thank you for submitting your feedback"}),e.jsx("div",{className:"pl-8",children:e.jsx(Pe,{className:"radio_cus",children:e.jsx(ze,{"aria-labelledby":"demo-radio-buttons-group-label",name:"radio-buttons-group"})})})]})}),e.jsx(fe,{children:e.jsxs("div",{className:"pb-9 px-12 flex justify-between w-full",children:[e.jsx(q,{text:"Create New Project",onClick:()=>{N("/app/create-new-project",{state:{isCreated:!0}})},style:{marginRight:20}}),e.jsx(q,{text:"Close",onClick:m})]})})]})]})};Me.propTypes={projectDetails:t.shape({id:t.oneOfType([t.string,t.number]).isRequired,project_title:t.string.isRequired,project_status:t.number.isRequired,createdAt:t.string,closed_date:t.string,image_upload:t.string,projectData:t.shape({projectname:t.string.isRequired}).isRequired,recruiterCharacterCount:t.array.isRequired,characterLockedCount:t.array.isRequired,characterRemainingCount:t.array.isRequired}).isRequired,indexKey:t.oneOfType([t.string,t.number]),profileFreezed:t.bool,HandleDetails:t.func,isPagination:t.bool,recruiterId:t.oneOfType([t.string,t.number]),HandleApply:t.func.isRequired};Me.defaultProps={indexKey:0,profileFreezed:!1,HandleDetails:null,isPagination:!1,recruiterId:null};const Re=({TextContent:s,searchData:i,disableImage:d})=>e.jsxs("div",{className:"flex flex-col justify-center items-center gap-8 pt-10 pb-16 mb-8 bg-white rounded-lg",children:[e.jsx("p",{className:"pb-4 px-4 fourbnottext",children:s===0&&i!==!0?"Summary of all your projects":s===1&&i!==!0?"Your open projects will show-up here":s===2&&i!==!0?"Your closed project will show-up here":"No matching projects found."}),e.jsx("div",{className:"startIMg",children:!d&&e.jsx("img",{src:Ze,alt:"No projects found"})})]});Re.propTypes={TextContent:t.oneOf([0,1,2]).isRequired,searchData:t.bool,disableImage:t.bool};Re.defaultProps={searchData:!1,disableImage:!1};const Hs=()=>{const{user:s,isProfileFreezed:i}=n.useContext(ce),[d,x]=n.useState(),[f,C]=n.useState(0),[c,N]=n.useState(5),[b,u]=n.useState(0),[_,k]=n.useState(!0),[a,L]=n.useState(0),[y,S]=n.useState(""),[H,B]=n.useState(!1),[g,P]=n.useState(""),[M,T]=n.useState(""),[h,j]=n.useState([]),[R,z]=n.useState(!1),K=(r,m)=>{u(m),B(!0),$({page:m,limit:c,title:y,status:a,projectType:g})},U=r=>{N(parseInt(r.target.value,10)),u(0),$({page:0,limit:parseInt(r.target.value,10),title:y,status:a,projectType:g})},$=async({page:r,limit:m,title:v,status:l,projectType:W})=>(u(r),await re.getProjectSummary({recruiter_id:s==null?void 0:s.user_id,page:r,limit:m,title:v,status:l,projectType:W}).then(I=>(x(I.data),C(I.totalItems),I)).finally(()=>{k(!1)})),E=async()=>await re.getProjectAuditionType().then(r=>{j(r);let m={projectname:"All Projects",id:"default"};r.length?j([m,...r]):j([m])}),A=r=>{L(r),$({page:0,limit:c,title:y,status:r,projectType:g})},Z=r=>{S(r),V({page:0,limit:c,title:r,status:a,projectType:g})};n.useEffect(()=>{E(),s!=null&&s.user_id&&$({page:0,limit:c})},[s]);const V=async({page:r,limit:m,title:v,status:l,projectType:W})=>(u(r),await re.getProjectSummary({recruiter_id:s==null?void 0:s.user_id,page:r,limit:m,title:v,status:l,projectType:W}).then(I=>(I.data.length>0?(x(I.data),C(I.totalItems),z(!1)):(x([]),C(0),z(!0)),I)).finally(()=>{k(!1)})),J=()=>d!=null&&d.length?e.jsxs(e.Fragment,{children:[d==null?void 0:d.map((r,m)=>e.jsx(Me,{projectDetails:r,indexKey:m,profileFreezed:i,HandleDetails:()=>{window.open(`${xe.client_url}/app/my-projects#${r.id??(r==null?void 0:r.id)}`,"_blank","noopener,noreferrer")},isPagination:H,recruiterId:s==null?void 0:s.user_id,HandleApply:()=>{$({page:b,limit:c,title:y,status:a,projectType:g})}},r==null?void 0:r.id)),e.jsx(Se,{id:"tablePagination_ui",rowsPerPageOptions:[5,10,20,25],component:"div",count:f,rowsPerPage:c,page:b,onPageChange:K,onRowsPerPageChange:U,slotProps:{select:{"aria-label":"rows per page",native:!0}}})]}):f<=0?e.jsx("div",{className:"bg-white rounded-lg",children:e.jsx(Re,{TextContent:a,searchData:R})}):null;return _?e.jsx(ve,{marginTop:" roundedbxcarditsbal"}):e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"summary_list_page",style:{background:"#f4f4f4"},children:e.jsxs("div",{style:{background:"#E5E5E5"},className:"flex justify-between flex-wrap p-3 ",children:[e.jsx("div",{className:"flex flex-wrap pl-4 mt-2 drop_menuadjus",children:e.jsxs(o.Row,{className:"gap-4",children:[e.jsxs(o.Col,{className:"summary_filter ",children:[e.jsx(ye,{variant:"body1",className:a===0?"":"summary_text",onClick:()=>A(0),style:{cursor:"pointer"},children:"All"}),e.jsx("span",{className:a===0&&"active_menu_bar active_menu_barInner"})]}),e.jsxs(o.Col,{className:"summary_filter",children:[e.jsx(ye,{variant:"body1",className:a===1?"":"summary_text",onClick:()=>A(1),style:{cursor:"pointer"},children:"Open"}),e.jsx("span",{className:a===1&&"active_menu_bar active_menu_barInner"})]}),e.jsxs(o.Col,{className:"summary_filter",children:[e.jsx(ye,{variant:"body1",className:a===2?"":"summary_text",onClick:()=>A(2),style:{cursor:"pointer"},children:"Closed"}),e.jsx("span",{className:a===2&&"active_menu_bar active_menu_barInner"})]})]})}),e.jsx("div",{className:"innerdrop_menuadjus ChangeMobileSearch",children:e.jsxs(o.Row,{style:{marginRight:0},className:"Outerdrop_menuadjus",children:[e.jsx(o.Col,{id:"summary_openingsDropdown",className:"show_onlyActive justify-evenly textFeild gap-4 mt-1",children:e.jsx(_e,{name:"projectname",dropdownName:"projectname",values:M,placeholder:"Select Project Type",data:h,handleChange:r=>{if(T(r),Number(r)>=0||r==="default"){let m=r==="default"?"":r;V({page:0,limit:c,title:y,status:a,projectType:m}),P(m)}}})}),e.jsxs(o.Col,{className:"show_onlyActive bg-white pt-1 pl-4 pr-2 flex justify-evenly textFeild gap-4",children:[e.jsx(se,{id:"standard-search",className:"Changewidth",placeholder:"Search by project title",type:"text",variant:"standard",autoComplete:"off",onChange:r=>{r.target.value.length>=0&&Z(r.target.value)}}),e.jsx(ue,{children:e.jsx(Cs,{size:"20px",sx:{color:"#9B26B6"}})})]})]})})]})}),e.jsx("div",{className:"flex flex-col gap-4 pt-6",children:J()})]})},We={notification:{title:"My Dashboard - Notifications | Casting Bell",header:"Notifications"},"project-summary":{title:"My Dashboard - Project Summary | Casting Bell",header:"Project Summary"},"my-unlocked-profiles":{title:"My Dashboard - My Unlocked Profiles | Casting Bell",header:"My Unlocked Profiles"},"credits-balance":{title:"My Dashboard - Credits Balance & History | Casting Bell",header:"Credits Balance & History"},profile:{title:"My Dashboard - Profile Settings | Casting Bell",header:"Profile Settings"},"change-password":{title:"My Dashboard - Change Profile Password |
1Casting Bell",header:"Change Profile Password"},"contact-us":{title:"My Dashboard - Contact Us | Casting Bell",header:"Contact Us"}},Ge={title:"My Dashboard - Notifications | Casting Bell",header:"Notifications"},Sr=()=>{const s=window.location.href,[i,d]=n.useState("notification");n.useEffect(()=>{d(s.split("/").pop())},[s]);const x=()=>{var u;return((u=We[i])==null?void 0:u.title)||Ge.title},f=()=>{var u;return((u=We[i])==null?void 0:u.header)||Ge.header},C=u=>i===u?"#9B26B6":"#979797",c=u=>i===u?"active":"",N=(u,_,k)=>e.jsx("li",{className:c(u),children:e.jsxs(oe,{to:`/app/recruiter/dashboard/${u}`,style:{display:"flex"},children:[e.jsx(_,{sx:{color:C(u),"&:hover":{color:"#9B26B6"}},fontSize:"medium",className:"ml-4 mr-3"}),k]})}),b=()=>{switch(i){case"notification":return e.jsx(Fe,{});case"project-summary":return e.jsx(Hs,{});case"my-unlocked-profiles":return e.jsx(Bs,{});case"credits-balance":return e.jsx(Os,{});case"change-password":return e.jsx(Ls,{});case"contact-us":return e.jsx("div",{className:"bg-white rounded-lg",style:{padding:"37px"},children:e.jsx(rs,{})});default:return e.jsx(Fe,{})}};return e.jsxs("section",{children:[e.jsx(es,{htmlAttributes:{lang:"en",dir:"ltr"},children:e.jsx("title",{children:x()})}),e.jsx("section",{className:"py-3 sm:py-5",style:{backgroundColor:"#E5E5E5"},children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs(o.Row,{children:[e.jsx(o.Col,{lg:6,xs:12,sm:6,className:"header_left mobilemenuhidden",children:e.jsx("div",{className:"top_title",children:e.jsx("h2",{children:f()})})}),e.jsx(o.Col,{lg:6,xs:12,sm:6,className:"items-center justify-center",children:e.jsx(as,{isDashboard:!0})})]})})}),e.jsx("section",{className:"middle_bar_section",style:{background:"#f4f4f4",minHeight:"700px"},children:e.jsxs("div",{className:"container mx-auto",children:[e.jsx("div",{className:"w-full",children:e.jsx("div",{className:"w-full",children:e.jsxs(o.Row,{style:{marginRight:0},children:[e.jsx(o.Col,{md:3,sm:12,xs:12,children:e.jsx("div",{className:"cms_sidebar",children:e.jsxs("ul",{children:[N("project-summary",Ys,"Project Summary"),N("my-unlocked-profiles",Is,"My Unlocked Profiles"),N("notification",ss,"Notifications"),N("credits-balance",Ve,"Credits Balance & History"),N("change-password",Ve,"Change Profile Password"),N("contact-us",ts,"Contact us")]})})}),e.jsx(o.Col,{md:9,sm:12,xs:12,children:b()})]})})}),e.jsx("div",{className:"bottom_space"})]})})]})};export{Sr 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.