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.12.76.168
"use strict";(self.webpackChunkcollege_portal_app=self.webpackChunkcollege_portal_app||[]).push([[563],{24868:(e,a,t)=>{t.d(a,{RB:()=>n,u3:()=>d,u6:()=>r,vB:()=>o});var s=t(86213),l=t(150),c=t(15355);const o=async(e,a,t,c,o)=>{try{await(0,s.A)({method:"GET",url:l.A+"getDegSemSubDetnew&collcode="+a+"&univcode="+t+"&teach="+c+"&cls="+o,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"GETSUB",payload:a.data.data.subelement}):e({type:"CLEAR_DATA",payload:[]})}))}catch(n){}},n=async(e,a,t,c,o,n)=>{try{await(0,s.A)({method:"GET",url:l.A+"getTestMaxQnnew&collcode="+a+"&univcode="+t+"&teach="+c+"&cls="+o+"&subelement="+n,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"GETTESTANDMARKS",payload:a.data.data.sub}):e({type:"CLEAR_DATA",payload:[]})}))}catch(d){}},d=(e,a,t,c)=>async(o,n)=>{await(0,s.A)({method:"GET",url:l.A+"viewCOMarks&teachcode="+e+"&clscode="+a+"&test="+t+"&subcode="+c,headers:{"Content-Type":"application/json"}}).then((e=>{console.log(e),0==e.data.error_code?o({type:"CO_MARKS_DETAILS",payload:e.data.data}):o({type:"CLEAR_DATA",payload:[]})})).catch((e=>console.log("Error====>",e)))},r=async(e,a)=>{try{await s.A.post(l.A+"saveCoMarksNew",a).then((e=>{e.data.error_code,(0,c.F)(e.data.data)}))}catch(t){}}},4853:(e,a,t)=>{t.d(a,{B3:()=>i,PV:()=>h,Si:()=>r,jE:()=>n,ji:()=>d,zo:()=>p});var s=t(86213),l=t(150),c=t(15355);const o=e=>({type:"LOADING",load:e}),n=async(e,a,t,c,o)=>{try{await(0,s.A)({method:"GET",url:l.A+"loaddayteachname&collcode="+a+"&univcode="+t+"&usertype="+c+"&user="+o,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"GETTEACHNAMES",payload:a.data.data}):e({type:"CLEAR_DATA",payload:[]})}))}catch(n){}},d=async(e,a,t,c,o)=>{try{await(0,s.A)({method:"GET",url:l.A+"loadclassnameday&collcode="+a+"&usertype="+t+"&user="+c+"&teachcode="+o,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?(console.log("anita"),e({type:"GETCLANAME",payload:a.data.data})):e({type:"CLEAR_DATA",payload:[]})}))}catch(n){}},r=async(e,a,t,c)=>{e(o(!1));try{await s.A.post(l.A+"viewattendanceentry&collcode="+t+"&sort="+c,a).then((a=>{0==a.data.error_code?(e(o(!1)),e({type:"VIEW1DATA",payload:a.data.data})):(e(o(!1)),e({type:"CLEAR_DATA",payload:[]}))}))}catch(n){e(o(!1))}},i=async(e,a)=>{try{await s.A.post(l.A+"saveattendanceentry",a).then((e=>0==e.data.error_code?void(0,c.F)(e.data.msg):void(0,c.F)(e.data.data.msg)))}catch(t){}},h=async(e,a,t,c,o,n,d)=>{try{await(0,s.A)({method:"GET",url:l.A+"viewDeleteAddStudDet&collcode="+a+"&univcode="+t+"&usertype="+c+"&user="+o+"&fromteach="+n+"&toteach="+d,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"GETFORDELETE",payload:a.data.data}):e({type:"CLEAR_DATA",payload:[]})}))}catch(r){}},p=async(e,a,t,o,n,d)=>{try{await(0,s.A)({method:"GET",url:l.A+"deleteAddstudentry&collcode="+e+"&teachcode="+a+"&clsid="+t+"&period="+o+"&noofcls="+n+"&date="+d,headers:{"Content-Type":"application/json"}}).then((e=>{e.data.error_code,(0,c.F)(e.data.data)}))}catch(r){}}},65563:(e,a,t)=>{t.r(a),t.d(a,{default:()=>x});var s=t(15444),l=t(32513),c=t(5397),o=t(6051),n=t(87021),d=t(79672),r=t(14647),i=t(95010),h=t(70170),p=t(65043),u=t(4853),y=t(83003),A=t(24868),m=t(70579);const x=(0,y.Ng)((e=>({user:e.AuthReducer.userData,teachData:e.getattEntryTeacherNameReducer.teachData,classData:e.getattEntryClassNameReducer.classData,subDetData:e.subDetailsReducer.subDetData,testmarksData:e.testMarksReducer.testmarksData,coData:e.putMarksReducer.putcoData})),{getCOmarksdet:A.u3})((function(e){const[a,t]=(0,p.useState)(""),[x,g]=(0,p.useState)(""),[j,C]=(0,p.useState)(""),[D,w]=(0,p.useState)([]),[T,S]=(0,p.useState)(""),[v,E]=(0,p.useState)(""),[k,f]=(0,p.useState)(!1),[b,_]=(0,p.useState)([]),N=(0,y.wA)();(0,p.useEffect)((()=>{R(),t(e.teachData);const a=["A","B"];let s=[];for(let e=1;e<=10;e++)for(let t=0;t<a.length;t++){let l={};l.slno=e,l.qnno=e+a[t],l.maxmarks="",l.co="",s.push(l)}_(s)}),[]);const R=()=>{t(e.teachData),(0,u.jE)(N,e.user.fcollcode,e.user.funivcode,e.user.fusertype,e.user.fuser)},L=[{value:"select",label:"---Select Teacher---"},...e.teachData],O=[{value:"select",label:"---Select Class---"},...e.classData],M=async t=>{g(t),await(0,A.vB)(N,e.user.fcollcode,e.user.funivcode,a,t)},G=[{key:"select",value:"Select",label:"---Select Subject Element---"},...e.subDetData];let B=[],q=e.testmarksData.value;for(let s=1;s<=q;s++){let e={key:s,value:"Test "+s,label:"Test-"+s};B.push(e)}const F=async a=>{S(a),E(e.testmarksData.fvalmax)},I=(e,a,t)=>{console.log(e.target.checked,a,t);const s=b;s[t].co=e.target.checked?a:"",_([...s])};console.log(b,"anita");let z=b.map(((e,a)=>({key:a,slno:e.slno,qnno:e.qnno,maxmarks:(0,m.jsx)(s.A,{value:e.maxmarks,onChange:e=>((e,a)=>{const t=b;t[a].maxmarks=e,_([...t]),console.log(t)})(e.target.value,a)}),co:(0,m.jsxs)("div",{children:["CO1"," ",(0,m.jsx)(l.A,{checked:1==e.co,onChange:e=>I(e,"1",a)}),"\xa0\xa0 CO2"," ",(0,m.jsx)(l.A,{checked:2==e.co,onChange:e=>I(e,"2",a)}),"\xa0\xa0 CO3"," ",(0,m.jsx)(l.A,{checked:3==e.co,onChange:e=>I(e,"3",a)}),"\xa0\xa0 CO4"," ",(0,m.jsx)(l.A,{checked:4==e.co,onChange:e=>I(e,"4",a)}),"\xa0\xa0 CO5"," ",(0,m.jsx)(l.A,{checked:5==e.co,onChange:e=>I(e,"5",a)}),"\xa0\xa0 CO6"," ",(0,m.jsx)(l.A,{checked:6==e.co,onChange:e=>I(e,"6",a)}),"\xa0"]})})));return(0,m.jsx)("div",{className:"container-fluid",children:(0,m.jsxs)(c.A,{hoverable:!0,title:"CO Marks Entry",style:{width:"100%"},extra:(0,m.jsxs)(o.A,{direction:"horizontal",children:[(0,m.jsx)(n.Ay,{className:"save",onClick:()=>(async()=>{let a=new FormData,t=b.filter(((e,a)=>""!=e.co));a.append("data",JSON.stringify(t)),console.log(t,"newTableData"),a.append("collcode",e.user.fcollcode),a.append("user",e.user.fuser),a.append("testName",T),a.append("classId",x),a.append("subelement",j),await(0,A.u6)(N,a)})(),children:"Save"}),(0,m.jsx)(n.Ay,{className:"clear",children:"Clear"}),(0,m.jsx)(n.Ay,{className:"exit",children:"Exit"})]}),children:[(0,m.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,m.jsxs)(d.A,{style:{marginBottom:"10px"},children:[(0,m.jsx)(r.A,{span:3,children:(0,m.jsx)("label",{children:"Teacher Name"})}),(0,m.jsx)(r.A,{xs:24,sm:24,md:12,lg:8,xl:8,children:(0,m.jsx)(i.A,{showSearch:!0,placeholder:"Select",style:{width:"100%"},value:a,options:L,onChange:a=>(async a=>{t(a),await(0,u.ji)(N,e.user.fcollcode,e.user.fusertype,e.user.fuser,a),w(e.subDetData),M()})(a)})}),(0,m.jsx)(r.A,{span:2,style:{marginLeft:"80px"},children:(0,m.jsx)("label",{children:"Class Name"})}),(0,m.jsx)(r.A,{xs:24,sm:24,md:12,lg:8,xl:8,children:(0,m.jsx)(i.A,{showSearch:!0,placeholder:"Select",style:{width:"100%"},value:x,options:O,onChange:e=>M(e)})})]}),(0,m.jsxs)(d.A,{style:{marginBottom:"10px"},children:[(0,m.jsx)(r.A,{span:3,children:(0,m.jsx)("label",{children:"Subject Element"})}),(0,m.jsx)(r.A,{xs:24,sm:24,md:12,lg:8,xl:8,children:(0,m.jsx)(i.A,{showSearch:!0,placeholder:"Select",style:{width:"100%"},value:j,options:G,onChange:t=>(async t=>{C(t),await(0,A.RB)(N,e.user.fcollcode,e.user.funivcode,a,x,t),w(e.subDetData),F()})(t)})}),(0,m.jsx)(r.A,{span:2,style:{marginLeft:"80px"},children:(0,m.jsx)("label",{children:"Test"})}),(0,m.jsx)(r.A,{xs:24,sm:24,md:12,lg:8,xl:8,children:(0,m.jsx)(i.A,{showSearch:!0,placeholder:"Select",style:{width:"100%"},value:T,options:B,onChange:e=>F(e)})})]}),(0,m.jsxs)(d.A,{style:{marginBottom:"10px"},children:[(0,m.jsx)(r.A,{span:3,children:(0,m.jsx)("label",{children:"Marks"})}),(0,m.jsx)(r.A,{xs:24,sm:24,md:12,lg:8,xl:8,children:(0,m.jsx)(s.A,{showSearch:!0,placeholder:"Select",style:{width:"100%"},value:v})})]}),(0,m.jsx)(d.A,{style:{marginBottom:"10px",marginLeft:"148px"},children:(0,m.jsx)(n.Ay,{className:"save",onClick:()=>(async()=>{await e.getCOmarksdet(a,x,T,j),f(!0);let t=b.map(((a,t)=>(e.coData.map(((e,s)=>(a.qnno==e.fqnno&&(a.slno=t+1,a.qnno=e.fqnno,a.maxmarks=e.FMARKS,a.co=e.FCO),a))),a)));_([...t])})(),children:"View"})})]}),k&&(0,m.jsx)(h.A,{scroll:{y:400},pagination:!1,bordered:!0,columns:[{title:"Sl. No",dataIndex:"slno",align:"center",width:"2%",onCell:(e,a)=>({rowSpan:a%2===0?2:0})},{title:"Question No",dataIndex:"qnno",align:"center",width:"3%"},{title:"Max Marks",dataIndex:"maxmarks",align:"left",width:"3%"},{title:"Details",dataIndex:"co",align:"center",width:"13%"}],dataSource:z,size:"small",style:{padding:"2px",width:"70%",marginLeft:"15%",marginTop:"-10px",position:"sticky",top:0}})]})})}))}}]);
//# sourceMappingURL=563.d7eb95d3.chunk.js.map
|