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


Current Path : /var/www/qpms/assets/
Upload File :
Current File : /var/www/qpms/assets/SelectFinalQp-DrJmWm6Z.js

var Q=Object.defineProperty;var R=(o,r,s)=>r in o?Q(o,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[r]=s;var d=(o,r,s)=>R(o,typeof r!="symbol"?r+"":r,s);import{v as q,E,x as k,r as L,O as T,t as e,D as V,B as h,L as N,G as c}from"./index-D4tY2iBR.js";import{g as M,f as W,a as B,d as H,e as z}from"./UploadQpPattern-Bba5Beb3.js";import{a as m,c as _,s as G}from"./sem-D2Wh8RBS.js";import{g as J,s as $}from"./SelectFinalQP-4XVtIlrB.js";import{g as x,s as f}from"./datatable-BtsFi8gF.js";import{S as K}from"./index-CmzrOVIl.js";import{R as U}from"./SaveOutlined-DWK3ZADU.js";import{R as X}from"./HomeOutlined-CMFgccJg.js";import{R as S,C as p}from"./row-BLWjQswV.js";import{F as Y}from"./Table-BDJUlBpk.js";import{C as w}from"./index--tKxzihq.js";import"./responsiveObserver-ByjJDers.js";import"./index-Dx9mkNC7.js";import"./index-CoG_RFMp.js";const Z=(o,r,s)=>(console.log(o,r,s),async(i,l)=>{const n=new FormData;n.append("data",JSON.stringify(o));const g=l();if((await q.post("/app.php?a=saveQuestionPaperLog&db="+localStorage.getItem("dbname")+"&userid="+g.loginfo.userData.fregno+"&usermob="+g.loginfo.userData.fmobile+"&enttype="+r+"&univcode="+g.loginfo.userData.funivcode,n)).data.error_code===0)r==="VIEW QUESTION PAPER"||r==="VIEW ANSWER PAPER"||r==="VIEW MOD PAPER"?window.open("https://universitysolutions.in/univadmin/"+s):(r==="VIEW MOD SELECT QP PAPER"||r==="VIEW MOD SELECT ANS PAPER"||r==="VIEW MOD SELECT FORM PAPER"||r==="VIEW MOD FINAL PAPER"||r==="VIEW MOD ANS FINAL PAPER"||r==="VIEW MOD MOD FINAL PAPER"||r==="VIEW FQP FINAL PAPER"||r==="VIEW FANS FINAL PAPER")&&window.open("https://moderator-upd.s3.ap-south-1.amazonaws.com/"+s);else{E("error","Something went wrong. Contact Administrator");return}});class ee extends L.Component{constructor(){super(...arguments);d(this,"state",{deggrp:"",exam:"",board:"All",qpcode:"All",degree:"All",sem:"All",status:"All",data:[],search:"",loading:!1,type:"current",formSubmit:!1});d(this,"componentDidMount",()=>{this.props.getQpDeggrp()});d(this,"handleChange",async(s,i)=>{console.log(s,i),i==="deggrp"&&(this.setState({deggrp:s}),await this.props.getExamname(s),this.setState({exam:this.props.examnames[0].value}),await this.props.getQpBoard(s),await this.props.getAvailableSubjects(s,"All"),await this.props.getQpDegree(s)),i==="exam"&&this.setState({exam:s}),i==="board"&&(this.setState({board:s}),this.props.getAvailableSubjects(this.state.deggrp,s)),i==="qpcode"&&this.setState({qpcode:s}),i==="degree"&&this.setState({degree:s}),i==="sem"&&this.setState({sem:s}),i==="status"&&this.setState({status:s})});d(this,"submitHandler",async()=>{if(this.state.deggrp===""){E("warning","Please Select Degree Group");return}const s={deggrp:this.state.deggrp,exam:this.state.exam,board:this.state.board,qpcode:this.state.qpcode,degree:this.state.degree,sem:this.state.sem,status:this.state.status};await this.props.getSelectFinalQP(s),this.setState({data:this.props.selectFinalQP,formSubmit:!0})});d(this,"checkHandler",(s,i,l)=>{const n=this.state.data;n[i.key][l]=s.target.checked?"T":"F",n[i.key].fcheckStatus="T",this.setState({data:n})});d(this,"saveHandler",async()=>{const s=this.state.data.filter(n=>n.fcheckStatus==="T"),i={deggrp:this.state.deggrp,exam:this.state.exam,board:this.state.board,qpcode:this.state.qpcode,degree:this.state.degree,sem:this.state.sem,status:this.state.status},l=new FormData;l.append("finaldata",JSON.stringify(s)),l.append("data",JSON.stringify(i)),await this.props.saveSelectFinalQP(l)});d(this,"getReport",s=>{console.log(s),window.open(T+"/app.php?a=getOmrQpReport&db="+localStorage.getItem("dbname")+"&univcode="+this.props.user.funivcode+"&qpcode="+s.fqpcode+"&year="+s.fyear+"&mode="+s.fexamtype+"&teachcode="+s.fteachcode+"&noqp="+s.fset+"&type="+s.ftype+"&teachtype=M")})}render(){const{deggrp:s,exam:i,board:l,qpcode:n,degree:g,sem:b,status:P}=this.state,j=this.props.deggrp.map(t=>({key:t.fdeggrp,label:t.fdescpn,value:t.fdeggrp})),C=this.props.board.map(t=>({key:t.fboardcode,label:t.fboardname,value:t.fboardcode})),A=[...m,...C],y=this.props.qpcode.map(t=>({key:t.fqpcode,label:t.fsubname,value:t.fqpcode})),v=[...m,...y],D=this.props.degree.map(t=>({key:t.fdegree,label:t.fdescpn,value:t.fdegree})),F=[...m,...D],I=[...m,...G],O=[{title:"Sl. No",dataIndex:"fslno",width:"4%",align:"center"},{title:"Exam Date",dataIndex:"fexamdate",...x("fexamdate","Exam Date"),sorter:(t,a)=>f(t,a,"fexamdate"),sortDirections:["descend","ascend"],width:"10%"},{title:"Qp Code",dataIndex:"fqpcode",...x("fqpcode","QP Code"),sorter:(t,a)=>f(t,a,"fqpcode"),sortDirections:["descend","ascend"],width:"10%",align:"center"},{title:"Subject Name",dataIndex:"fsubname",...x("fsubname","Subject Name"),sorter:(t,a)=>f(t,a,"fsubname"),sortDirections:["descend","ascend"],width:"15%"},{title:"Set",dataIndex:"fset",width:"5%",align:"center"},{title:"Teacher Name",render:(t,a)=>e.jsx("span",{children:a.fteachcode+"-"+a.fteachname}),...x("fteachcode","Teacher Code"),sorter:(t,a)=>f(t,a,"fteachcode"),sortDirections:["descend","ascend"],width:"15%"},{title:"View QP",render:(t,a)=>e.jsx(h,{size:"small",type:"primary",onClick:()=>a.fpretype=="online"?this.getReport(a):this.props.saveErrorLog(a,"VIEW MOD SELECT QP PAPER",a.fmodqpupd),children:"View"}),width:"5%",align:"center"},{title:"View Ans Key",render:(t,a)=>e.jsx(h,{size:"small",type:"primary",onClick:()=>this.props.saveErrorLog(a,"VIEW MOD SELECT ANS PAPER",a.fmodanskey),children:"View"}),width:"5%",align:"center"},{title:"View Mod. Form",render:(t,a)=>e.jsx(h,{size:"small",type:"primary",onClick:()=>this.props.saveErrorLog(a,"VIEW MOD SELECT FORM PAPER",a.fmodform),children:"View"}),width:"5%",align:"center"},{title:"Final Paper Date Time",dataIndex:"ffinalpaperdate",width:"9%",align:"center"},{title:"Select Final Qp",render:(t,a)=>e.jsxs("div",{children:[e.jsx(w,{disabled:a.ffinalqpstatus==="T",checked:a.ffinalpaper==="T",onChange:u=>this.checkHandler(u,a,"ffinalpaper")}),e.jsx("br",{}),e.jsx("span",{children:a.ffinalqpstatus==="T"&&"used("+a.ffinalpaperdate+")"})]}),width:"12%",align:"center"},{title:"Del.?",render:(t,a)=>e.jsx(w,{disabled:a.ffinalqpstatus==="T",checked:a.fdeleted==="T",onChange:u=>this.checkHandler(u,a,"fdeleted")}),width:"5%",align:"center"}];return e.jsxs(V,{style:{margin:"6rem 10px 10px"},title:e.jsx("h6",{children:"Select Final Question Paper"}),extra:e.jsxs(K,{children:[e.jsxs(h,{type:"primary",onClick:()=>this.saveHandler(),children:[e.jsx(U,{})," Save"]}),e.jsx(N,{to:"/",children:e.jsxs(h,{type:"primary",danger:!0,children:[e.jsx(X,{})," Exit"]})})]}),children:[e.jsxs(S,{gutter:10,children:[e.jsxs(p,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[e.jsx("label",{children:"Degree Group"}),e.jsx(c,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:s,options:j,onChange:t=>this.handleChange(t,"deggrp")})]}),e.jsxs(p,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[e.jsx("label",{children:"Exam"}),e.jsx(c,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:i,options:this.props.examnames,onChange:t=>this.handleChange(t,"exam")})]}),e.jsxs(p,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[e.jsx("label",{children:"Board"}),e.jsx(c,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:l,options:A,onChange:t=>this.handleChange(t,"board")})]}),e.jsxs(p,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[e.jsx("label",{children:"QP Code"}),e.jsx(c,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:n,options:v,onChange:t=>this.handleChange(t,"qpcode")})]})]}),e.jsxs(S,{gutter:10,children:[e.jsxs(p,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[e.jsx("label",{children:"Degree"}),e.jsx(c,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:g,options:F,onChange:t=>this.handleChange(t,"degree")})]}),e.jsxs(p,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[e.jsx("label",{children:"Sem"}),e.jsx(c,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:b,options:I,onChange:t=>this.handleChange(t,"sem")})]}),e.jsxs(p,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[e.jsx("label",{children:"Status"}),e.jsx(c,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:P,options:_,onChange:t=>this.handleChange(t,"status")})]}),e.jsxs(p,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[e.jsx("p",{style:{marginTop:"20px"}}),e.jsx(h,{type:"primary",style:{marginBottom:"10px"},loading:this.props.btnLoading,onClick:()=>this.submitHandler(),children:"Submit"})]})]}),this.state.formSubmit&&e.jsx(Y,{scroll:{x:1300,y:300},dataSource:this.state.data,columns:O})]})}}const te=o=>(console.log(o.qpcode,"sdsddsmsd,"),{deggrp:o.deggrp,examnames:o.examnames,board:o.board,qpcode:o.availableSubjects,degree:o.degree,btnLoading:o.loader.btnLoading,selectFinalQP:o.getSelectFinalQP,user:o.loginfo.userData}),ue=k(te,{getQpDeggrp:M,getExamname:W,getQpBoard:B,getAvailableSubjects:H,getQpDegree:z,getSelectFinalQP:J,saveSelectFinalQP:$,saveErrorLog:Z})(ee);export{ue as default};