0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.143.7.112


Current Path : /proc/thread-self/root/var/www/college/static/js/
Upload File :
Current File : //proc/thread-self/root/var/www/college/static/js/860.69966001.chunk.js

"use strict";(self.webpackChunkcollege_portal_app=self.webpackChunkcollege_portal_app||[]).push([[860],{2987:(e,t,a)=>{a.d(t,{W:()=>d,y:()=>n});var l=a(1600),c=a(4692),s=a(9104),o=a(4387),r=a(2496);const n=e=>({filterDropdown:t=>{let{setSelectedKeys:a,selectedKeys:n,confirm:d,clearFilters:i,close:p}=t;return(0,r.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,r.jsx)(l.c,{autoFocus:!0,placeholder:"Search ".concat(e),value:n,onChange:e=>a(e.target.value?[e.target.value]:[]),onPressEnter:()=>{d()},style:{marginBottom:8,display:"block"}}),(0,r.jsxs)(c.c,{children:[(0,r.jsx)(s.cp,{type:"primary",onClick:()=>d(),icon:(0,r.jsx)(o.c,{}),size:"small",style:{width:90},children:"Search"}),(0,r.jsx)(s.cp,{onClick:()=>{i(),d()},size:"small",style:{width:90},children:"Reset"})]})]})},filterIcon:e=>(0,r.jsx)(o.c,{style:{color:e?"#1677ff":void 0}}),onFilter:(t,a)=>{a[e].toString().toLowerCase().includes(t.toString().toLowerCase())}}),d=(e,t)=>t.value.toString().toLowerCase().indexOf(e.toLowerCase())>=0||t.label.toString().toLowerCase().indexOf(e.toLowerCase())>=0},7860:(e,t,a)=>{a.r(t),a.d(t,{default:()=>v});var l=a(9060),c=a(6592),s=a(8836),o=a(4692),r=a(9104),n=a(3752),d=a(9196),i=a(3516),p=a(5866),g=a(8372),u=a(3392),h=a(1224);const y=async(e,t,a,l)=>{t(x(!0)),await(0,g.c)({method:"GET",url:u.G+"cgetDegreedet&collcode="+l+"&type="+e+"&univcode="+a+"&degree_range=",headers:{"Content-Type":"application/json"}}).then((e=>{if(console.log(e,"payload"),0!=e.data.error_code)return t({type:"CLEAR_DEGREE",payload:[]}),t(x(!1)),void(0,h._)(e.data.data.msg);t({type:"DEGREE",payload:e.data.data}),t(x(!1))}))},x=e=>({type:"LOADING",load:e});var C=a(624),f=a(2987),D=a(2496);const E=[{value:"selectedonly",label:"Selected Only"},{value:"all",label:"All"}],v=(0,C.Ul)((function(e){return console.log(e,"connect state"),{user:e.AuthReducer.userData,degreeData:e.degreeReducer.degreeData,loading:e.degreeReducer.loading}}))((e=>{const[t,a]=(0,l.useState)("selectedonly"),[v,m]=(0,l.useState)([]),j=(0,C.OY)();(0,l.useEffect)((()=>{m(e.degreeData),y(t,j,e.user.funivcode,e.user.fcollcode)}),[]),(0,l.useEffect)((()=>{let t=e.degreeData.length>0?e.degreeData.map(((e,t)=>(e.index=t,e))):[];m([...t])}),[e.degreeData]);const w=async()=>{let t=new FormData,a=v.filter(((e,t)=>"T"===e.ACTION));t.append("data",JSON.stringify(a)),t.append("univcode",e.user.funivcode),t.append("collcode",e.user.fcollcode),t.append("user",e.user.fuser),await(async(e,t)=>{e(x(!0)),await g.c.post(u.G+"csaveDegreedet",t).then((t=>{console.log(t),0===t.data.error_code?((0,h._)(t.data.data.msg),e(x(!1))):(0,h._)(t.data.data.msg)}))})(j,t)},S=async()=>{await(async(e,t,a,l)=>{window.open(u.G+"degreeListReportpdf&univcode="+a+"&collcode="+l+"&type="+e)})(t,0,e.user.funivcode,e.user.fcollcode)},k=[{title:"Sl. No",dataIndex:"slno"},{title:"Degree",dataIndex:"degree",...(0,f.y)("degree"),sorter:(e,t)=>e.degree.length-t.degree.length,sortDirections:["descend","ascend"]},{title:"Description",dataIndex:"description",...(0,f.y)("description"),sorter:(e,t)=>e.description.length-t.description.length,sortDirections:["descend","ascend"]},{title:(0,D.jsx)(c.c,{onChange:e=>(e=>{const t=v.map(((t,a)=>(t.CHECKED=e?"CHECKED":"",t.ACTION="T",t)));m(t)})(e.target.checked)}),dataIndex:"select"}],N=v.map(((e,t)=>({key:t,slno:t+1,degree:e.FDEGREE,description:e.FDESCPN,select:(0,D.jsx)(c.c,{checked:"CHECKED"===e.CHECKED,onChange:t=>((e,t)=>{let a=v;a[t].CHECKED=e?"CHECKED":"",a[t].ACTION="T",m([...a])})(t.target.checked,e.index)})})));return(0,D.jsx)("div",{style:{margin:"20px"},children:(0,D.jsxs)(s.c,{hoverable:!0,title:"Degree",style:{width:"100%"},extra:(0,D.jsxs)(o.c,{direction:"horizontal",children:[(0,D.jsx)(r.cp,{className:"save",onClick:()=>w(),children:"Save"}),(0,D.jsx)(r.cp,{className:"report",onClick:()=>S(),children:"Report"}),(0,D.jsx)(r.cp,{className:"clear",children:"Clear"}),(0,D.jsx)(r.cp,{className:"exit",children:"Exit"})]}),children:[(0,D.jsx)("div",{style:{marginBottom:"20px"},children:(0,D.jsx)(n.c,{gutter:16,children:(0,D.jsxs)(d.c,{xs:24,sm:24,md:12,lg:8,xl:8,children:[(0,D.jsx)("b",{children:(0,D.jsx)("label",{children:"Select Type"})}),(0,D.jsx)(i.c,{showSearch:!0,placeholder:"Select",style:{width:"100%"},options:E,filterOption:f.W,value:t,onChange:t=>(async t=>{a(t),await y(t,j,e.user.funivcode,e.user.fcollcode)})(t)})]})})}),(0,D.jsx)(p.c,{columns:k,loading:e.loading,dataSource:N,size:"small"})]})})}))}}]);
//# sourceMappingURL=860.69966001.chunk.js.map