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 : 18.216.161.178
"use strict";(self.webpackChunkcollege_portal_app=self.webpackChunkcollege_portal_app||[]).push([[957],{10925:(e,a,t)=>{t.d(a,{NS:()=>d,Pe:()=>i,Yg:()=>c});var l=t(15444),n=t(6051),s=t(87021),o=t(62058),r=t(70579);const d=e=>({filterDropdown:a=>{let{setSelectedKeys:t,selectedKeys:d,confirm:c,clearFilters:i,close:x}=a;return(0,r.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,r.jsx)(l.A,{autoFocus:!0,placeholder:"Search ".concat(e),value:d,onChange:e=>t(e.target.value?[e.target.value]:[]),onPressEnter:()=>{c()},style:{marginBottom:8,display:"block"}}),(0,r.jsxs)(n.A,{children:[(0,r.jsx)(s.Ay,{type:"primary",onClick:()=>c(),icon:(0,r.jsx)(o.A,{}),size:"small",style:{width:90},children:"Search"}),(0,r.jsx)(s.Ay,{onClick:()=>{i(),c()},size:"small",style:{width:90},children:"Reset"})]})]})},filterIcon:e=>(0,r.jsx)(o.A,{style:{color:e?"#CFFF8D":"#fff"}}),onFilter:(a,t)=>t[e].toString().toLowerCase().includes(a.toLowerCase())}),c=(e,a)=>a.value.toString().toLowerCase().indexOf(e.toLowerCase())>=0||a.label.toString().toLowerCase().indexOf(e.toLowerCase())>=0,i=(e,a,t)=>e[t].localeCompare(a[t])},25957:(e,a,t)=>{t.r(a),t.d(a,{default:()=>A});var l=t(65043),n=t(15444),s=t(95010),o=t(87021),r=t(6051),d=t(5397),c=t(79672),i=t(14647),x=t(70170),u=t(86213),h=t(150),f=t(15355),m=t(35475),p=t(70579);var y=t(83003),g=t(67407),b=t(61966);t(10925);let j={fsubcode:"",fsubname:"",ftheory:"",fmaxmarks:"",fqnno:"",fnotest:"",fu1max:"",fu2max:"",forder:""};const A=(0,y.Ng)((e=>(console.log(e.viewSubjectDetailsReducer.subjectDetailData,"connect"),{user:e.AuthReducer.userData,subDegreeData:e.degreeDataforSubjectDetailsReducer.subDegreeData,subSemData:e.semDataforSubjectDetailsReducer.subSemData,subSubData:e.subDataforSubjectDetailsReducer.subSubData,maxMarksData:e.maxmarksforSubjectDetailsReducer.maxMarksData,subjectDetailData:e.viewSubjectDetailsReducer.subjectDetailData})))((function(e){const[a,t]=(0,l.useState)(""),[A,S]=(0,l.useState)([]),[v,w]=(0,l.useState)(""),[D,C]=(0,l.useState)([]),[k,T]=(0,l.useState)(""),[z,E]=(0,l.useState)([]),[I,N]=(0,l.useState)(""),[_,M]=(0,l.useState)(!1),[L,R]=(0,l.useState)(!1),[F,q]=(0,l.useState)(!1),[B,G]=(0,l.useState)([j]),O=(0,y.wA)();(0,l.useEffect)((()=>{U(),N(e.maxMarksData.fvalmax)}),[]);const U=async()=>{await(async(e,a)=>{try{await(0,u.A)({method:"GET",url:h.A+"degreeData&collcode="+a,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"GETDEGREE_SUBJECT",payload:a.data.data}):e({typr:"CLEAR_DATA",payload:[]})}))}catch(t){}})(O,e.user.fcollcode),S(e.subDegreeData)};let P=[{key:"select",value:"select",label:"---Select Degree---"},...e.subDegreeData];const J=async a=>{t(a),await(async(e,a,t)=>{try{await(0,u.A)({method:"GET",url:h.A+"getSemSubDetails&collcode="+a+"°ree="+t,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"GETSEM_SUBJECT",payload:a.data.data}):e({type:"CLEAR_DATA",payload:[]})}))}catch(l){}})(O,e.user.fcollcode,a),C(e.subSemData),K(),M(!1),q(!1)},H=[{key:"select",value:"select",label:"---Select Examno---"},...e.subSemData],K=async t=>{w(t),await(async(e,a,t,l)=>{try{await(0,u.A)({method:"GET",url:h.A+"getSubSubDetails&collcode="+a+"°ree="+t+"&sem="+l,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"GETSUB_SUBJECT",payload:a.data.data}):e({type:"CLEAR_DATA",payload:[]})}))}catch(n){}})(O,e.user.fcollcode,a,t),E(e.subSubData),V(),M(!1),q(!1)},Q=[{key:"select",value:"select",label:"---Select Subject---"},...e.subSubData],V=async t=>{T(t),N(e.maxMarksData.fvalmax),console.log(e.maxMarksData.fvalmax,"apple"),await(async(e,a,t,l,n)=>{try{await(0,u.A)({method:"GET",url:h.A+"getSubDetMaxMarks&collcode="+a+"°ree="+t+"&sem="+l+"&sub="+n,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"GET_MAX_MARKS",payload:a.data.data}):e({type:"CLEAR_DATA",payload:[]})}))}catch(s){}})(O,e.user.fcollcode,a,v,t),M(!1),q(!1)},X=async()=>(await(async(e,a,t,l,n)=>{try{await(0,u.A)({method:"GET",url:h.A+"getSubDetData&collcode="+a+"°ree="+t+"&sem="+l+"&sub="+n,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"GET_SUBJECT_DETAILS",payload:a.data.data}):e({type:"CLEAR_DATA",payload:[]})}))}catch(s){}})(O,e.user.fcollcode,a,v,k),console.log(a,"degree"),""==a||"select"==a?((0,f.F)("Select Degree"),M(!1),void q(!1)):""==v||"select "==v?((0,f.F)("Select Semester"),M(!1),void q(!1)):""==k||"select"==k?(M(!1),void q(!1)):(M(!0),q(!1),void R(!1))),Y=async(a,t,l,n)=>{await(async(e,a,t,l,n,s)=>{await(0,u.A)({method:"GET",url:h.A+"deleteSubdet&collcode="+a+"°ree="+t+"&sem="+l+"&sub="+n+"&element="+s,headers:{"Content-Type":"application/json"}}).then((e=>{0==e.data.error_code&&(0,f.F)(e.data.data.msg)}))})(0,e.user.fcollcode,a,t,l,n),X()};let W=[{key:"t",value:"t",label:"Theory"},{key:"p",value:"p",label:"Practical"}];const Z=(e,a)=>{const t=[...B];t[a].fsubcode=e,G(t)},$=(e,a)=>{const t=[...B];t[a].fsubname=e,G(t)},ee=(e,a)=>{const t=[...B];t[a].ftheory=e,G(t)},ae=(e,a)=>{const t=[...B];t[a].fmaxmarks=e,G(t)},te=(e,a)=>{const t=[...B];t[a].fqnno=e,G(t)},le=(e,a)=>{const t=[...B];t[a].fnotest=e,G(t)},ne=(e,a)=>{const t=[...B];t[a].fu1max=e,G(t)},se=(e,a)=>{const t=[...B];t[a].fu2max=e,G(t)},oe=(e,a)=>{const t=[...B];t[a].forder=e,G(t)},re=async()=>{let a=new FormData;a.append("data",JSON.stringify(B)),a.append("collcode",e.user.fcollcode),await(async(e,a)=>{try{await u.A.post(h.A+"saveUpdatedSubjectDetails",a).then((e=>{m.N_,(0,f.F)(e.data.data.msg)}))}catch(t){}})(0,a),X()};let de=[];const ce=[{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Element"}),dataIndex:"element",align:"center",width:"1.8%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Sub. Name"}),dataIndex:"subname",align:"center",width:"2.5%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Th/.Pr"}),dataIndex:"thpr",align:"center",width:"2%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Max Marks"}),dataIndex:"maxmarks",align:"left",width:"3%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Qn.No"}),dataIndex:"qnno",align:"center",width:"2%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"No. of Tests"}),dataIndex:"noOfTests",align:"center",width:"1.5%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"U1 Max"}),dataIndex:"u1max",align:"center",width:"1.5%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"U2 Max"}),dataIndex:"u2max",align:"center",width:"1.5%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Order"}),dataIndex:"order",align:"center",width:"1.6%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Action"}),dataIndex:"action",align:"center",width:"5%"}],ie=B.map(((e,a)=>({key:a,element:(0,p.jsx)(n.A,{type:"text",value:e.fsubcode,onChange:e=>Z(e.target.value,a)}),subname:(0,p.jsx)(n.A,{value:e.fsubname,onChange:e=>$(e.target.value,a)}),thpr:(0,p.jsx)(s.A,{value:"T"==e.ftheory?"Thoery":e.ftheory,options:W,onChange:e=>ee(e,a)}),maxmarks:(0,p.jsx)(n.A,{value:e.fmaxmarks,onChange:e=>ae(e.target.value,a)}),qnno:(0,p.jsx)(n.A,{value:e.fqnno,onChange:e=>te(e.target.value,a)}),noOfTests:(0,p.jsx)(n.A,{value:e.fnotest,onChange:e=>le(e.target.value,a)}),u1max:(0,p.jsx)(n.A,{value:e.fu1max,onChange:e=>ne(e.target.value,a)}),u2max:(0,p.jsx)(n.A,{value:e.fu2max,onChange:e=>se(e.target.value,a)}),order:(0,p.jsx)(n.A,{value:"null"==e.forder?"":e.forder,onChange:e=>oe(e.target.value,a)}),action:(0,p.jsx)(o.Ay,{className:"save",onClick:()=>re(),children:"Save"})}))),xe=[{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Sl. No"}),dataIndex:"slno",align:"center",width:"1.4%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Degree"}),dataIndex:"degree",align:"center",width:"2%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Exam No"}),dataIndex:"examno",align:"center",width:"1.5%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Subject"}),dataIndex:"sub",align:"left",width:"6.5%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Element"}),dataIndex:"element",align:"center",width:"1.6%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Sub. Name"}),dataIndex:"subname",align:"center",width:"2%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Th./Pr"}),dataIndex:"thpr",align:"center",width:"1%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Max Marks"}),dataIndex:"maxmarks",align:"center",width:"1.6%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Qn.No"}),dataIndex:"qnno",align:"center",width:"1%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"No. of Tests"}),dataIndex:"noOfTests",align:"center",width:"1.3%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"U1 Max"}),dataIndex:"u1max",align:"center",width:"1.3%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"U2 Max"}),dataIndex:"u2max",align:"center",width:"1.3%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Order"}),dataIndex:"order",align:"center",width:"1.3%"},{title:(0,p.jsx)("label",{style:{fontSize:"12px"},children:"Action"}),dataIndex:"action",align:"center",width:"3.5%"}],ue=e.subjectDetailData.map(((e,a)=>({key:a,slno:a+1,degree:e.fdegree,examno:e.fexamno,sub:e.fcsubname,element:e.fsubcode,subname:e.fsubname,thpr:e.ftheory,maxmarks:e.fmaxmarks,qnno:e.fqnno,noOfTests:e.fnotest,u1max:e.fu1max,u2max:e.fu2max,order:e.forder,action:(0,p.jsxs)(r.A,{children:[(0,p.jsx)(o.Ay,{className:"save",onClick:()=>((e,a,t,l,n,s,o,r,d,c,i,x)=>{M(!1);let u={};u.fdegree=e,u.fexamno=a,u.fcsubcode=t,u.fsubname=l,u.fsubcode=n,u.ftheory=s,u.fmaxmarks=o,u.fqnno=r,u.fnotest=d,u.fu1max=c,u.fu2max=i,u.forder=x,console.log(u,"hi"),de.push(u),G(de),q(!0),R(!1)})(e.fdegree,e.fexamno,e.fcsubcode,e.fsubname,e.fsubcode,e.ftheory,e.fmaxmarks,e.fqnno,e.fnotest,e.fu1max,e.fu2max,e.forder),children:(0,p.jsx)(g.A,{})}),(0,p.jsx)(o.Ay,{className:"save",onClick:()=>Y(e.fdegree,e.fexamno,e.fcsubcode,e.fsubcode),children:(0,p.jsx)(b.A,{})})]})}))),he=B.map(((e,a)=>({key:a,element:(0,p.jsx)(n.A,{type:"text",value:e.fsubcode,onChange:e=>Z(e.target.value,a)}),subname:(0,p.jsx)(n.A,{value:e.fsubname,onChange:e=>$(e.target.value,a)}),thpr:(0,p.jsx)(s.A,{options:W,value:"T"==e.ftheory?"Thoery":e.ftheory,onChange:e=>ee(e,a)}),maxmarks:(0,p.jsx)(n.A,{value:e.fmaxmarks,onChange:e=>ae(e.target.value,a)}),qnno:(0,p.jsx)(n.A,{value:e.fqnno,onChange:e=>te(e.target.value,a)}),noOfTests:(0,p.jsx)(n.A,{value:e.fnotest,onChange:e=>le(e.target.value,a)}),u1max:(0,p.jsx)(n.A,{value:e.fu1max,onChange:e=>ne(e.target.value,a)}),u2max:(0,p.jsx)(n.A,{value:e.fu2max,onChange:e=>se(e.target.value,a)}),order:(0,p.jsx)(n.A,{value:"null"==e.forder?"":e.forder,onChange:e=>oe(e.target.value,a)}),action:(0,p.jsx)(o.Ay,{className:"exit",onClick:()=>(e=>{if(""==B[e].fsubcode||void 0==B[e].fsubcode)return void(0,f.F)("cannot delete this");const a=B.filter(((a,t)=>t!==e));G(a),R(!0)})(a),onKeyDown:()=>(e=>{console.log(B,"arrass");let a=B;if(""!==a[e].fsubcode&&" "!==a[e].fsubname&&" "!==a[e].ftheory&&""!==a[e].fmaxmarks&&""!==a[e].fqnno&&""!==a[e].fnotest&&""!==a[e].forder){let e=[...a,j];G(e)}else(0,f.F)("Please fill all the details before adding a new row.")})(a),children:"Delete"})}))),fe=async()=>{let t=new FormData,l=B.filter(((e,a)=>""!=e.fsubcode));t.append("data",JSON.stringify(l)),t.append("degree",a),t.append("sem",v),t.append("sub",k),t.append("collcode",e.user.fcollcode),await(async(e,a)=>{try{await u.A.post(h.A+"saveNewAddedData",a).then((e=>{e.data.error_code,(0,f.F)(e.data.data.msg)}))}catch(t){}})(0,t),X()};return(0,p.jsx)("div",{className:"container-fluid",children:(0,p.jsxs)(d.A,{hoverable:!0,title:"Subject Details",style:{width:"100%"},extra:(0,p.jsxs)(r.A,{children:[(0,p.jsx)(o.Ay,{className:"save",onClick:()=>(R(!0),q(!1),void M(!1)),children:"Add"}),L&&(0,p.jsx)(o.Ay,{className:"save",onClick:()=>fe(),children:"Save"}),(0,p.jsx)(o.Ay,{className:"save",children:"Clear"}),(0,p.jsx)(o.Ay,{className:"exit",children:"Exit"})]}),children:[(0,p.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,p.jsxs)(c.A,{style:{marginBottom:"10px"},children:[(0,p.jsx)(i.A,{span:3,children:(0,p.jsx)("label",{children:"Degree"})}),(0,p.jsx)(i.A,{xs:24,sm:24,md:12,lg:8,xl:8,children:(0,p.jsx)(s.A,{placeholder:"Select",style:{width:"100%"},value:a,options:P,onChange:e=>J(e)})}),(0,p.jsx)(i.A,{span:2,style:{marginLeft:"80px"},children:(0,p.jsx)("label",{children:"Semester"})}),(0,p.jsx)(i.A,{xs:24,sm:24,md:12,lg:8,xl:8,children:(0,p.jsx)(s.A,{placeholder:"Select",style:{width:"100%"},value:v,options:H,onChange:e=>K(e)})})]}),(0,p.jsxs)(c.A,{style:{marginBottom:"10px"},children:[(0,p.jsx)(i.A,{span:3,children:(0,p.jsx)("label",{children:"Subject "})}),(0,p.jsx)(i.A,{xs:24,sm:24,md:12,lg:8,xl:8,children:(0,p.jsx)(s.A,{placeholder:"Select",style:{width:"100%"},value:k,options:Q,onChange:e=>V(e)})}),(0,p.jsx)(i.A,{span:2,style:{marginLeft:"80px"},children:(0,p.jsx)("label",{children:"Marks"})}),(0,p.jsx)(i.A,{xs:6,sm:6,md:3,lg:2,xl:2,children:(0,p.jsx)(n.A,{placeholder:"Select",style:{width:"100%"},value:I,disabled:!0})})]}),(0,p.jsx)(c.A,{style:{marginBottom:"10px",marginLeft:"148px"},children:(0,p.jsx)(o.Ay,{className:"save",onClick:()=>X(),children:"View"})})]}),_&&(0,p.jsx)(x.A,{scroll:{y:400},pagination:!1,bordered:!0,columns:xe,dataSource:ue,size:"small",style:{padding:"2px",width:"100%",marginTop:"-10px",position:"sticky",top:0}}),F&&(0,p.jsx)(x.A,{scroll:{y:400},pagination:!1,bordered:!0,columns:ce,dataSource:ie,size:"small",style:{padding:"2px",width:"100%",marginTop:"-10px",position:"sticky",top:0}}),L&&(0,p.jsx)(x.A,{scroll:{y:400},pagination:!1,bordered:!0,columns:ce,dataSource:he,size:"small",style:{padding:"2px",width:"100%",marginTop:"-10px",position:"sticky",top:0}})]})})}))},61966:(e,a,t)=>{t.d(a,{A:()=>d});var l=t(58168),n=t(65043);const s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var o=t(22172),r=function(e,a){return n.createElement(o.A,(0,l.A)({},e,{ref:a,icon:s}))};const d=n.forwardRef(r)},67407:(e,a,t)=>{t.d(a,{A:()=>d});var l=t(58168),n=t(65043);const s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var o=t(22172),r=function(e,a){return n.createElement(o.A,(0,l.A)({},e,{ref:a,icon:s}))};const d=n.forwardRef(r)}}]);
//# sourceMappingURL=957.075c99f1.chunk.js.map
|