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.216.167.229


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

var Q=Object.defineProperty;var R=(o,r,a)=>r in o?Q(o,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[r]=a;var d=(o,r,a)=>R(o,typeof r!="symbol"?r+"":r,a);import{v as q,E,x as k,r as L,O as T,t as e,D as V,B as c,L as N,G as h}from"./index-DuuJ_BVy.js";import{g as M,f as W,a as B,d as H,e as z}from"./UploadQpPattern-CiLofBzr.js";import{a as m,c as _,s as G}from"./sem-BK69X1ab.js";import{g as J,s as $}from"./SelectFinalQP-ZjKCqEVp.js";import{g as x,s as f}from"./datatable-ZhxhX0N2.js";import{S as K}from"./index-BjlpPnds.js";import{R as U}from"./SaveOutlined-Bja7yXOQ.js";import{R as X}from"./HomeOutlined-COaObuiP.js";import{R as S,C as p}from"./row-Dz_eTgRG.js";import{F as Y}from"./Table-CaI-VRgw.js";import{C as w}from"./index-DFKGOmqH.js";import"./responsiveObserver-P-7D2JNj.js";import"./index-BbnbYn0r.js";import"./index-Cfr0AqBF.js";const Z=(o,r,a)=>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/"+a):(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/"+a);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(a,i)=>{i==="deggrp"&&(this.setState({deggrp:a}),await this.props.getExamname(a),this.setState({exam:this.props.examnames[0].value}),await this.props.getQpBoard(a),await this.props.getAvailableSubjects(a,"All"),await this.props.getQpDegree(a)),i==="exam"&&this.setState({exam:a}),i==="board"&&(this.setState({board:a}),this.props.getAvailableSubjects(this.state.deggrp,a)),i==="qpcode"&&this.setState({qpcode:a}),i==="degree"&&this.setState({degree:a}),i==="sem"&&this.setState({sem:a}),i==="status"&&this.setState({status:a})});d(this,"submitHandler",async()=>{if(this.state.deggrp===""){E("warning","Please Select Degree Group");return}const a={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(a),this.setState({data:this.props.selectFinalQP,formSubmit:!0})});d(this,"checkHandler",(a,i,l)=>{const n=this.state.data;n[i.key][l]=a.target.checked?"T":"F",n[i.key].fcheckStatus="T",this.setState({data:n})});d(this,"saveHandler",async()=>{const a=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(a)),l.append("data",JSON.stringify(i)),await this.props.saveSelectFinalQP(l)});d(this,"getReport",a=>{window.open(T+"/app.php?a=getOmrQpReport&db="+localStorage.getItem("dbname")+"&univcode="+this.props.user.funivcode+"&qpcode="+a.fqpcode+"&year="+a.fyear+"&mode="+a.fexamtype+"&teachcode="+a.fteachcode+"&noqp="+a.fset+"&type="+a.ftype+"&teachtype=M")})}render(){const{deggrp:a,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,s)=>f(t,s,"fexamdate"),sortDirections:["descend","ascend"],width:"10%"},{title:"Qp Code",dataIndex:"fqpcode",...x("fqpcode","QP Code"),sorter:(t,s)=>f(t,s,"fqpcode"),sortDirections:["descend","ascend"],width:"10%",align:"center"},{title:"Subject Name",dataIndex:"fsubname",...x("fsubname","Subject Name"),sorter:(t,s)=>f(t,s,"fsubname"),sortDirections:["descend","ascend"],width:"15%"},{title:"Set",dataIndex:"fset",width:"5%",align:"center"},{title:"Teacher Name",render:(t,s)=>e.jsx("span",{children:s.fteachcode+"-"+s.fteachname}),...x("fteachcode","Teacher Code"),sorter:(t,s)=>f(t,s,"fteachcode"),sortDirections:["descend","ascend"],width:"15%"},{title:"View QP",render:(t,s)=>e.jsx(c,{size:"small",type:"primary",onClick:()=>s.fpretype=="online"?this.getReport(s):this.props.saveErrorLog(s,"VIEW MOD SELECT QP PAPER",s.fmodqpupd),children:"View"}),width:"5%",align:"center"},{title:"View Ans Key",render:(t,s)=>e.jsx(c,{size:"small",type:"primary",onClick:()=>this.props.saveErrorLog(s,"VIEW MOD SELECT ANS PAPER",s.fmodanskey),children:"View"}),width:"5%",align:"center"},{title:"View Mod Form",render:(t,s)=>e.jsx(c,{size:"small",type:"primary",onClick:()=>this.props.saveErrorLog(s,"VIEW MOD SELECT FORM PAPER",s.fmodform),children:"View"}),width:"5%",align:"center"},{title:"Final Paper Date Time",dataIndex:"ffinalpaperdate",width:"9%",align:"center"},{title:"Select Final Qp",render:(t,s)=>e.jsxs("div",{children:[e.jsx(w,{disabled:s.ffinalqpstatus==="T",checked:s.ffinalpaper==="T",onChange:u=>this.checkHandler(u,s,"ffinalpaper")}),e.jsx("br",{}),e.jsx("span",{children:s.ffinalqpstatus==="T"&&"used("+s.ffinalpaperdate+")"})]}),width:"12%",align:"center"},{title:"Del.?",render:(t,s)=>e.jsx(w,{disabled:s.ffinalqpstatus==="T",checked:s.fdeleted==="T",onChange:u=>this.checkHandler(u,s,"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(c,{type:"primary",onClick:()=>this.saveHandler(),children:[e.jsx(U,{})," Save"]}),e.jsx(N,{to:"/",children:e.jsxs(c,{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(h,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:a,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(h,{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(h,{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(h,{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(h,{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(h,{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(h,{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(c,{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=>({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};