PageSourceSearch

https://www.aptechproconnect.com/assets/StudentJobOfferedListPage-BNqKkIYf.js

js aptechproconnect.com collected 2026-10-09 04:42:05 UTC 15,642 bytes, 144 lines download raw bytes

1import{g as c,i as it,d as at,f as lt,r,X as ct,u as dt,h as A,k,v as pt,dQ as Te,j as t,br as xt,_ as ut,ac as ht,F as y,b as h,I as L,T as g,a8 as te,bq as ne,cP as gt,s as ft,D as Be,df as bt,cQ as mt,cT as jt,cU as yt,cV as Ct,cW as St}from"./index-QgM5GAdg.js";import{D as Ee}from"./DashboardCountCard-BZWzWHQa.js";import"./styles-DfOkP1Ma.js";const At=[{columnKey:"name",label:"Name"},{columnKey:"studentID",label:"Student Id"},{columnKey:"job.company.companyName",label:"Company"},{columnKey:"jobRole",label:"Job Role"}],vt=(p,oe)=>{var o,P,z,H;if(!((P=(o=p==null?void 0:p.item)==null?void 0:o.jobApplicationList)!=null&&P.length))return"";let pe=oe.map(s=>s.label).join(",")+`
2`;const i=(H=(z=p==null?void 0:p.item)==null?void 0:z.jobApplicationList)==null?void 0:H.map(s=>{var T,B,v,D,a,F,re,R,se,x,J;return[((B=(T=s==null?void 0:s.user)==null?void 0:T.profile)==null?void 0:B.firstName)+" "+((D=(v=s==null?void 0:s.user)==null?void 0:v.profile)!=null&&D.lastName?(F=(a=s==null?void 0:s.user)==null?void 0:a.profile)==null?void 0:F.lastName:"")+" ,"+((re=s==null?void 0:s.user)==null?void 0:re.userId)+" ,"+((se=(R=s==null?void 0:s.job)==null?void 0:R.company)==null?void 0:se.companyName)+", "+((J=(x=s==null?void 0:s.job)==null?void 0:x.jobRole)==null?void 0:J.name)].join(",")});return pe+i.join(`
3`)};c.div`
4  gap: 20px;
5  width: 100%;
6  height: 100%;
7  padding: 40px 100px;
8  display: flex;
9  flex-direction: column;
10  box-sizing: border-box;
11  background-color: #f8f8f8;
12`;c.div`
13  gap: 20px;
14  width: 100%;
15  height: 100%;
16  padding: 40px;
17  display: flex;
18  border: 1px solid #ecf1f4;
19  flex-direction: column;
20  box-sizing: border-box;
21  border-radius: 15px;
22  background-color: #fff;
23`;const Dt=c.div`
24  width: 100%;
25  display: flex;
26  align-items: center;
27  padding: 12px 16px 12px 16px;
28  box-sizing: border-box;
29  height: 40px;
30  background-color: #fff;
31  border-radius: 8px;
32  border: 1px solid #878a9c;
33  height: 40px;
34`,Ft=c.span`
35  margin-right: 10px;
36  display: flex;
37  align-items: center;
38  justify-content: center;
39  svg {
40    fill: #8c8ca1;
41  }
42`,Rt=c.input`
43  padding: 0px;
44  border: none;
45  background: #fff;
46  outline: none;
47  font-size: 16px;
48  color: var(--text-full);
49  box-sizing: border-box;
50  height: fit-content;
51  width: 100%;
52  &:placeholder {
53    color: var(--text-fifty);
54  }
55`,kt=c.button`
56  border: 1px solid #0d2f55;
57  padding: 10px 10px;
58  height: 40px;
59  color: 0D2F55 !important;
60  background: #fff;
61  text-transform: uppercase;
62  font-size: 14px;
63  font-weight: 700;
64  border-radius: 10px;
65  cursor: pointer;
66  align-items: center;
67  display: flex;
68`;c.button`
69  border: 1px solid #0d2f55;
70  display: flex;
71  padding: 10px 15px;
72  height: 40px;
73  background: #0d2f55 !important;
74  color: #fff;
75  text-transform: uppercase;
76  font-size: 14px;
77  font-weight: 700;
78  border-radius: 10px;
79  cursor: pointer;
80  align-items: center;
81`;c.button`
82  display: flex;
83  padding: 10px 15px;
84  height: 40px;
85  background: #ecf1f4 !important;
86  color: #11173a;
87  font-size: 16px;
88  font-weight: 500;
89  border-radius: 10px;
90  cursor: pointer;
91  align-items: center;
92  border: none;
93`;const Lt=c.table`
94  border-collapse: separate;
95  width: 100%;
96  border-spacing: 0 1em;
97`,Z=c.th`
98  padding: 15px;
99  height: 40px;
100  box-sizing: border-box;
101  background-color: ${p=>p.bgColor?p.bgColor:"#ecf1f4"};
102  text-align: left;
103  &:first-child {
104    border-radius: 10px 0px 0px 10px;
105    /* for top and bottom left corners  */
106  }
107
108  &:last-child {
109    border-radius: 0px 10px 10px 0px;
110    /* for top and bottom right corners  */
111  }
112`,Pt=c.tr`
113  border-bottom: 1px solid #ecf1f4;
114  &:hover {
115    background-color: #ecf1f4;
116  }
117`,K=c.td`
118  min-height: 50px;
119  border-bottom: 1px solid #ecf1f4;
120  border-radius: 0px !important;
121  height: fit-content;
122  box-sizing: border-box;
123  padding: 10px 15px;
124  &:first-child {
125    border-radius: 10px 0px 0px 10px;
126    /* for top and bottom left corners  */
127  }
128
129  &:last-child {
130    border-radius: 0px 10px 10px 0px;
131    /* for top and bottom right corners  */
132  }
133`,zt=c.a`
134  text-decoration: none;
135  color: #11173a;
136  &:hover {
137    color: var(--primary);
138    text-decoration: underline;
139  }
140`,Tt=c(y)`
141  select {
142    min-width: 150px;
143  },
144`,Mt=()=>{var he,ge,fe,be,me,je,ye,Ce,Se,Ae,ve;const{handleError:p}=it(),oe=at(),i=lt().state||{},[o,P]=r.useState(null),[z,H]=r.useState({x:0,y:0}),s=r.useRef(null),{errorToast:T,successToast:B}=ct(),[v,D]=r.useState(!1),a=dt(e=>e.profile),[F,re]=r.useState("createdAt"),[R,se]=r.useState(10),[x,J]=r.useState([]),[ie,Ne]=r.useState(0),[Ie,Oe]=r.useState(0),[U,Me]=r.useState(0),[ae,qe]=r.useState(""),[le,Bt]=r.useState("offered"),[V,W]=r.useState(1),[xe,Ye]=r.useState(""),[u,Ze]=r.useState((i==null?void 0:i.zone)||""),[f,ue]=r.useState((i==null?void 0:i.region)||""),[C,ce]=r.useState((i==null?void 0:i.selectedArea)||""),[E,w]=r.useState((i==null?void 0:i.centre)||""),[$,Ke]=r.useState(i!=null&&i.startDate?A(i.startDate).toDate():A().subtract(1,"month").toDate()),[Q,He]=r.useState(i!=null&&i.endDate?A(i.endDate).toDate():new Date),[j,Je]=r.useState(""),X=e=>A(e).format("YYYY-MM-DD"),Ue=e=>{e?window.open(e,"_blank"):p("No document URL provided")},Ve=()=>{const e=Math.ceil((d==null?void 0:d.count)/R);V<e&&W(n=>n+1)},We=()=>{V>1&&W(e=>e-1)},we=e=>{W(e)},$e=(e,n)=>{const l=n.clientX,S=n.clientY;P(e),H({x:l,y:S})},Qe=()=>{P(null)},Xe=e=>{e&&navigator.clipboard.writeText(e).then(()=>B("Phone number copied to clipboard!")).catch(n=>console.error("Failed to copy text: ",n))},_e=()=>{W(1),qe(xe)},_=(e,n)=>{const l=e.target.value;n==="zone"?(Ze(l),ue(""),ce(""),w("")):n==="region"?(ue(l),ce(""),w("")):n==="area"?(ce(l),w("")):n==="centre"&&w(l)};r.useEffect(()=>{const e=n=>{s.current&&!s.current.contains(n.target)&&Qe()};return window.addEventListener("mousedown",e),()=>{window.removeEventListener("mousedown",e)}},[]);const{data:b}=k({queryKey:["offeredBrandKey"],queryFn:()=>mt(a==null?void 0:a.brandId),refetchOnWindowFocus:!1});r.useEffect(()=>{b&&Je(b==null?void 0:b.key)},[b]),r.useEffect(()=>{b&&Me(b==null?void 0:b.id)},[b]);const{data:Ge}=k({queryKey:["offeredZoneOptions",j],queryFn:()=>jt({brand:j,userRole:a==null?void 0:a.role}),enabled:!!j}),{data:et}=k({queryKey:["offeredRegionOptions",j,u],queryFn:()=>yt({brand:j,userRole:a==null?void 0:a.role,zone:u}),enabled:u.length>0,select:e=>e.map(n=>({...n,name:n.name.split(">").pop().trim()}))}),{data:tt}=k({queryKey:["offeredAreaOptions",j,u,f],queryFn:()=>Ct({brand:j,userRole:a==null?void 0:a.role,zone:u,region:f}),enabled:f.length>0,select:e=>e.map(n=>({...n,name:n.name.split(">").pop().trim()}))}),{data:nt}=k({queryKey:["offeredCenterOptions",j,u,f,C],queryFn:()=>St({brand:j,userRole:a==null?void 0:a.role,zone:u,region:f,area:C}),enabled:C.length>0,select:e=>e.map(n=>({...n,name:n.name.split(">").pop().trim()}))}),{data:d,status:ot,error:de}=k({queryKey:["getStudentJobOfferedApi",le,F,R,ae,U,u,f,C,E,$,Q],queryFn:async()=>await Te({applicationStatus:le,pageNo:V,sortBy:F,limit:R,search:ae,...U?{brandId:U}:{},...u&&{zone:u},...f&&{region:f},...C&&{area:C},...E&&{centreId:E},startDate:X($),endDate:X(Q)})});r.useEffect(()=>{var e,n,l;J((e=d==null?void 0:d.item)==null?void 0:e.jobApplicationList),Ne((n=d==null?void 0:d.item)==null?void 0:n.applicationStatusCount),Oe((l=d==null?void 0:d.item)==null?void 0:l.totalApplicationCount)},[d]);const rt=pt({mutationFn:({pageNo:e,sortBy:n,limit:l,search:S,applicationStatus:m,brandId:G,zone:N,region:I,area:O,centreId:M,startDate:q,endDate:Y})=>Te({pageNo:e,sortBy:n,limit:l,search:S,applicationStatus:m,...G?{brandId:U}:{}
144,...N&&{zone:N},...I&&{region:I},...O&&{area:O},...M&&{centreId:M},...q&&{startDate:q},...Y&&{endDate:Y}}),onSuccess(e){return e},onError(e){console.log("jobListMutation Error",e)}}),st=async()=>{D(!0),rt.mutate({pageNo:0,sortBy:F,limit:-1,search:ae,applicationStatus:le,zone:u,region:f,area:C,centreId:E,startDate:X($),endDate:X(Q)},{onSuccess:e=>{const n=vt(e,At),l=new Blob([n],{type:"text/csv;charset=utf-8;"}),S=URL.createObjectURL(l),m=document.createElement("a");m.href=S,m.setAttribute("download","job-offered-students.csv"),document.body.appendChild(m),m.click(),document.body.removeChild(m),D(!1),B("Report downloaded successfully!")},onError:e=>{D(!1),T("Download report failed!"),console.error("Failed to fetch user data:",e)}})};return de&&p(de),ot==="pending"?t.jsx(xt,{}):t.jsxs(t.Fragment,{children:[v&&t.jsx(ut,{visibility:v,children:t.jsx(ht,{isLoading:v,title:"Loading data",subtitle:"This might take few moments"})}),t.jsx(y,{width:"100%",horizontalalign:"start",verticalalign:"start",style:{flexWrap:"nowrap"},children:t.jsxs(h,{gap:"15px",children:[t.jsxs(y,{gap:"24px",width:"fit-content",horizontalalign:"start",onClick:()=>oe(-1),children:[t.jsx(L,{name:"leftArrow",color:"#4A4A68"}),t.jsx(g,{type:"h3",color:"#4A4A68",children:"Students Placed"})]}),t.jsx(y,{horizontalalign:"space-between",gap:"10px",wrap:"no-wrap",children:t.jsxs(Tt,{width:"100%",gap:"5px",wrap:"no-wrap",horizontalalign:"start",children:[t.jsx("div",{children:t.jsxs(h,{gap:"5px",children:[t.jsx(g,{type:"body",color:"#4A4A68",children:"Zone:"}),t.jsx(te,{name:"filterZone",onChange:e=>_(e,"zone"),value:u,options:ne(Ge,"name",!0,"Select Zone")})]})}),t.jsx("div",{children:t.jsxs(h,{gap:"5px",children:[t.jsx(g,{type:"body",color:"#4A4A68",children:"Region:"}),t.jsx(te,{name:"filterRegion",onChange:e=>
144_(e,"region"),value:f,options:ne(et,"name",!0,"Select Region")})]})}),t.jsx("div",{children:t.jsxs(h,{gap:"5px",children:[t.jsx(g,{type:"body",color:"#4A4A68",children:"Area:"}),t.jsx(te,{name:"filterArea",onChange:e=>_(e,"area"),value:C,options:ne(tt,"name",!0,"Select Area")})]})}),t.jsx("div",{children:t.jsxs(h,{gap:"5px",children:[t.jsx(g,{type:"body",color:"#4A4A68",children:"Center:"}),t.jsx(te,{name:"filterCenter",onChange:e=>_(e,"centre"),value:E,options:ne(nt,"name",!0,"Select Center")})]})}),t.jsx("div",{style:{marginLeft:"auto"},children:t.jsxs(h,{gap:"5px",children:[t.jsx(g,{type:"body",color:"#4A4A68",children:"Date Range:"}),t.jsx(gt,{calendarDirection:"right",initialStart:A($).toDate(),initialEnd:A(Q).toDate(),onChange:e=>{e.start&&Ke(A(e.start).format("YYYY-MM-DD")),e.end&&He(A(e.end).format("YYYY-MM-DD"))}})]})})]})}),t.jsx(y,{gap:"20px",width:"fit-content",horizontalalign:"start",children:t.jsxs(kt,{style:{backgroundColor:"#F371201A",border:"1px solid #F37120",gap:"10px",color:"#F37120"},onClick:st,children:[t.jsx(L,{name:"exportCSV",color:"#F37120"})," Get Report"]})}),t.jsx(y,{children:t.jsxs(h,{gap:"10px",width:"100%",style:{alignItems:"center",flexDirection:"initial",justifyContent:"flex-start"},children:[t.jsx(Ee,{iconImg:"selectedStudents",count:ie,currentDateCount:"",title:"Jobs Offered",label:"",onClick:()=>{},totalCount:"0"}),t.jsx(Ee,{iconImg:"totalApplicants",count:Ie,currentDateCount:"",title:"Total Applicants",label:"",onClick:()=>{},totalCount:"0"})]})}),t.jsx(y,{gap:"24px",children:t.jsxs(h,{width:"100%",gap:"10px",style:{flexDirection:"initial"},children:[t.jsx(Dt,{children:t.jsx(Rt,{placeholder:"Search by Student Name or Student Id",value:xe,onChange:e=>Ye(e.target.value)})}),t.jsx(ft,{onHandleClick:()=>_e(),buttonType:"primary",buttonStyle:{width:"min-content",padding:"10px",height:"40px",margin:"0px"},children:t.jsxs(Ft,{style:{margin:"0px",gap:"8px"},children:[t.jsx(L,{name:"search",color:"#fff"}),"Search"]})})]})}),t.jsx(y,{children:t.jsx(h,{gap:"10px",width:"100%",style:{alignItems:"center",flexDirection:"initial",justifyContent:"flex-end"},children:t.jsx(h,{children:((x==null?void 0:x.count)??0)>0&&t.jsxs(g,{type:"small",color:"#8C8CA1",children:["TOTAL",t.jsxs("span",{style:{color:"#F37120",paddingLeft:"15px",paddingRight:"15px"},children:[x==null?void 0:x.count," candidates"]}),"selected"]})})})}),t.jsx(y,{children:t.jsx(h,{children:t.jsxs(Lt,{children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx(Z,{bgColor:"#ECF1F4",children:t.jsx(g,{type:"bodyBold",color:"#878A9C",children:"Name"})},"name"),t.jsx(Z,{bgColor:"#ECF1F4",children:t.jsx(g,{type:"bodyBold",color:"#878A9C",children:"Student ID"})},"studentid"),t.jsx(Z,{bgColor:"#ECF1F4",children:t.jsx(g,{type:"bodyBold",color:"#878A9C",children:"Document / CV"})},"document"),t.jsx(Z,{bgColor:"#ECF1F4",children:t.jsx(g,{type:"bodyBold",color:"#878A9C",children:"Company"})},"company"),t.jsx(Z,{bgColor:"#ECF1F4",children:t.jsx(g,{type:"bodyBold",color:"#878A9C",children:"Job Role"})},"jobRole")]})}),t.jsx("tbody",{children:x==null?void 0:x.map((e,n)=>{var l,S,m,G,N,I,O,M,q,Y,De,Fe,Re,ke,Le;return t.jsxs(Pt,{children:[t.jsx(K,{children:t.jsx("span",{style:{cursor:"pointer"},onClick:ee=>$e(e,ee),children:`${((S=(l=e==null?void 0:e.user)==null?void 0:l.profile)!=null&&S.firstName?(G=(m=e==null?void 0:e.user)==null?void 0:m.profile)==null?void 0:G.firstName:" ")+" "+((I=(N=e==null?void 0:e.user)==null?void 0:N.profile)!=null&&I.lastName?(M=(O=e==null?void 0:e.user)==null?void 0:O.profile)==null?void 0:M.lastName:" ")}`})},e[n+"studentId"]),t.jsx(K,{children:(q=e==null?void 0:e.user)==null?void 0:q.userId},e.userid),t.jsx(K,{children:t.jsx("button",{style:{paddingLeft:"15px",paddingRight:"15px",fontSize:"12px",height:"28px",fontWeight:"700",backgroundColor:"transparent",border:"1px solid #F37120",color:"#F37120",borderRadius:"30px"},onClick:()=>{var Pe,ze;const ee=(ze=(Pe=e==null?void 0:e.user)==null?void 0:Pe.profilePlacement)==null?void 0:ze.attachmentFile;ee?Ue(ee):T("No Document URL Available")},children:"View"})},e.document),t.jsx(K,{children:t.jsx(zt,{href:(De=(Y=e==null?void 0:e.job)==null?void 0:Y.company)==null?void 0:De.website,children:(Re=(Fe=e==null?void 0:e.job)==null?void 0:Fe.company)==null?void 0:Re.companyName})},e.company),t.jsx(K,{children:(Le=(ke=e==null?void 0:e.job)==null?void 0:ke.jobRole)==null?void 0:Le.name},e.company)]},n)})})]})})}),ie!==0&&!de?t.jsxs(h,{gap:"10px",style:{height:"fit-content",marginTop:"auto"},children:[t.jsx(Be,{}),t.jsx(bt,{currentPage:V,onPrev:()=>We(),onNext:()=>Ve(),onSkip:e=>we(e),totalItemCount:ie,recordPerPage:10})]}):null]})}),o&&t.jsxs("div",{ref:s,style:{position:"absolute",top:`${z.y}px`,left:`${z.x}px`,backgroundColor:"#fff",padding:"20px",width:"335px",borderRadius:"8px",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)",zIndex:1e3},children:[t.jsxs("h3",{style:{fontSize:"24px",lineHeight:"30px",fontWeight:"300",paddingBottom:"25px"},children:[(ge=(he=o==null?void 0:o.user)==null?void 0:he.profile)==null?void 0:ge.firstName," ",(be=(fe=o==null?void 0:o.user)==null?void 0:fe.profile)==null?void 0:be.lastName]}),t.jsxs("p",{children:["StudentId ID : ",(me=o==null?void 0:o.user)==null?void 0:me.userId]}),t.jsxs("p",{children:["Portfolio :"," ",t.jsx("span",{style:{textDecoration:"underline"},children:(ye=(je=o==null?void 0:o.user)==null?void 0:je.placementAssistant)==null?void 0:ye.portfolioLink})]}),t.jsx(Be,{style:{marginTop:"20px",marginBottom:"20px"}}),t.jsxs("p",{style:{display:"flex",alignItems:"center"},children:[t.jsx(L,{name:"envelope",width:"24",height:"24",color:"#F37120"}),t.jsx("span",{style:{paddingLeft:"15px"},children:(Se=(Ce=o==null?void 0:o.user)==null?void 0:Ce.profile)==null?void 0:Se.email})]}),t.jsxs("p",{style:{display:"flex",alignItems:"center"},children:[t.jsx(L,{name:"phone",width:"24",height:"24",color:"#F37120"}),t.jsx("span",{style:{paddingLeft:"15px"},children:(ve=(Ae=o==null?void 0:o.user)==null?void 0:Ae.profile)==null?void 0:ve.mobile}),t.jsxs("span",{style:{paddingLeft:"55%"},onClick:()=>{var e,n;return Xe((n=(e=o==null?void 0:o.user)==null?void 0:e.profile)==null?void 0:n.mobile)}
144,children:[" ",t.jsx(L,{name:"copy",width:"24",height:"24",color:"#878A9C"})]})]})]})]})};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.