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 : 52.14.255.122


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

"use strict";(self.webpackChunkcollege_portal_app=self.webpackChunkcollege_portal_app||[]).push([[488],{2987:(e,t,a)=>{a.d(t,{W0:()=>d,iM:()=>i,yy:()=>n});var l=a(1600),c=a(4692),r=a(2951),s=a(4387),o=a(2496);const n=e=>({filterDropdown:t=>{let{setSelectedKeys:a,selectedKeys:n,confirm:d,clearFilters:i,close:p}=t;return(0,o.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,o.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,o.jsxs)(c.c,{children:[(0,o.jsx)(r.cp,{type:"primary",onClick:()=>d(),icon:(0,o.jsx)(s.c,{}),size:"small",style:{width:90},children:"Search"}),(0,o.jsx)(r.cp,{onClick:()=>{i(),d()},size:"small",style:{width:90},children:"Reset"})]})]})},filterIcon:e=>(0,o.jsx)(s.c,{style:{color:e?"#1677ff":"#fff"}}),onFilter:(t,a)=>a[e].toString().toLowerCase().includes(t.toLowerCase())}),d=(e,t)=>t.value.toString().toLowerCase().indexOf(e.toLowerCase())>=0||t.label.toString().toLowerCase().indexOf(e.toLowerCase())>=0,i=(e,t,a)=>e[a].localeCompare(t[a])},7488:(e,t,a)=>{a.r(t),a.d(t,{default:()=>w});var l=a(9060),c=a(6592),r=a(8836),s=a(4692),o=a(2951),n=a(3752),d=a(9196),i=a(3516),p=a(5866),g=a(8372),h=a(1344),u=a(1224);const y=async(e,t,a)=>{t(x(!0));try{await(0,g.c)({method:"GET",url:h.G+"cgetDegreedet&collcode="+a+"&type="+e+"&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,u._)(e.data.data.msg);t({type:"DEGREE",payload:e.data.data}),t(x(!1))}))}catch(l){t(x(!1)),(0,u._)(l)}},x=e=>({type:"LOADING",load:e});var C=a(624),f=a(2987),m=a(8384),D=a(2496);const E=e=>{let{open:t,Ok:a,cancel:c}=e;const[r,s]=(0,l.useState)(!1);return(0,D.jsx)(D.Fragment,{children:(0,D.jsx)(m.c,{title:"Vertically centered modal dialog",centered:!0,open:t,onOk:a,onCancel:c})})},j=[{value:"selectedonly",label:"Selected Only"},{value:"all",label:"All"}],w=(0,C.Ul)((function(e){return{user:e.AuthReducer.userData,degreeData:e.degreeReducer.degreeData,loading:e.degreeReducer.loading}}))((e=>{const[t,a]=(0,l.useState)("selectedonly"),[m,w]=(0,l.useState)([]),[v,S]=(0,l.useState)(!1),k=(0,C.OY)();(0,l.useEffect)((()=>{w(e.degreeData),y(t,k,e.user.fcollcode)}),[]),(0,l.useEffect)((()=>{let t=e.degreeData.length>0?e.degreeData.map(((e,t)=>(e.index=t,e))):[];w([...t])}),[e.degreeData]);const O=async()=>{let t=new FormData,a=m.filter(((e,t)=>"T"===e.ACTION));t.append("data",JSON.stringify(a)),t.append("collcode",e.user.fcollcode),t.append("user",e.user.fuser),await(async(e,t)=>{e(x(!0));try{await g.c.post(h.G+"csaveDegreedet",t).then((t=>{if(0!==t.data.error_code)return(0,u._)(t.data.data.msg),void e(x(!1));(0,u._)(t.data.data.msg),e(x(!1))}))}catch(a){e(x(!1)),(0,u._)(a)}})(k,t)},_=async()=>{await(async(e,t)=>{window.open(h.G+"degreeListReportpdf&collcode="+t+"&type="+e)})(t,k,e.user.funivcode,e.user.fcollcode)},N=[{title:"Sl. No",dataIndex:"slno",align:"center",width:"10%"},{title:"Degree",dataIndex:"degree",...(0,f.yy)("degree"),sorter:(e,t)=>(0,f.iM)(e,t,"degree"),sortDirections:["descend","ascend"],align:"center",width:"30%"},{title:"Description",dataIndex:"description",...(0,f.yy)("description"),sorter:(e,t)=>(0,f.iM)(e,t,"description"),sortDirections:["descend","ascend"],width:"50%"},{title:(0,D.jsx)(c.c,{onChange:e=>(e=>{const t=m.map(((t,a)=>(t.CHECKED=e?"CHECKED":"",t.ACTION="T",t)));w(t)})(e.target.checked)}),dataIndex:"select",align:"center",width:"10%"}],b=m.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=m;a[t].CHECKED=e?"CHECKED":"",a[t].ACTION="T",w([...a])})(t.target.checked,e.index)})})));return(0,D.jsxs)("div",{className:"container-fluid",children:[(0,D.jsxs)(r.c,{hoverable:!0,title:"Degree",style:{width:"100%"},extra:(0,D.jsxs)(s.c,{direction:"horizontal",children:[(0,D.jsx)(o.cp,{className:"save",onClick:()=>O(),children:"Save"}),(0,D.jsx)(o.cp,{className:"report",onClick:()=>{S(!0)},children:"Report"}),(0,D.jsx)(o.cp,{className:"clear",children:"Clear"}),(0,D.jsx)(o.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:j,filterOption:f.W0,value:t,onChange:t=>(async t=>{a(t),await y(t,k,e.user.fcollcode)})(t)})]})})}),(0,D.jsx)(p.c,{scroll:{y:400},bordered:!0,columns:N,loading:e.loading,dataSource:b,size:"small"})]}),(0,D.jsx)(E,{open:v,Ok:()=>{_(),S(!1)},cancel:()=>S(!1)})]})}))}}]);
//# sourceMappingURL=488.ee7b1964.chunk.js.map