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


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

var k=Object.defineProperty;var L=(o,r,s)=>r in o?k(o,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[r]=s;var d=(o,r,s)=>L(o,typeof r!="symbol"?r+"":r,s);import{v as T,E as j,x as V,r as N,O as M,t as e,D as W,B as h,L as B,G as c}from"./index-CDn4Wprz.js";import{g as H,f as z,a as _,d as G,e as J}from"./UploadQpPattern-Cp3SiMtl.js";import{s as $,a as f,d as K,p as U,b as X}from"./sem-DLpF_ddZ.js";import{g as Y,s as Z}from"./SelectFinalQP-CVJ4JwP6.js";import{f as m,g as u,s as b}from"./datatable-BFORwMBu.js";import{S as ee}from"./index-BzpRcNiH.js";import{R as te}from"./StopOutlined-DG0Cn3rr.js";import{R as se}from"./SaveOutlined-BNB9FTdd.js";import{R as ae}from"./HomeOutlined-lu-wn02m.js";import{R as w,C as p}from"./row-Njx8fj0K.js";import{F as re}from"./Table-UiRZYFRj.js";import{C as P}from"./index-iIYbe4vH.js";import"./responsiveObserver-TKOKauOe.js";import"./index-DKSJlvhU.js";import"./index-bKPvE33f.js";const oe=(o,r,s)=>async(i,l)=>{const n=new FormData;n.append("data",JSON.stringify(o));const g=l();if((await T.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"?o.fmodqpupd!==""?window.open("https://moderator-upd.s3.ap-south-1.amazonaws.com/"+s):window.open("https://qp-upd.s3.ap-south-1.amazonaws.com/"+s):(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{j("error","Something went wrong. Contact Administrator");return}};class ie extends N.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)=>{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===""){j("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=>{window.open(M+"/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:S,status:E}=this.state,A=this.props.deggrp.map(t=>({key:t.fdeggrp,label:t.fdescpn,value:t.fdeggrp})),C=[...$,...A],y=this.props.board.map(t=>({key:t.fboardcode,label:t.fboardname,value:t.fboardcode})),v=[...f,...y],D=this.props.qpcode.map(t=>({key:t.fqpcode,label:t.fsubname,value:t.fqpcode})),F=[...f,...D],I=this.props.degree.map(t=>({key:t.fdegree,label:t.fdescpn,value:t.fdegree})),q=[...f,...I],O=[...f,...X],R=[{title:"Sl. No",dataIndex:"fslno",width:"4%",align:"center"},{title:"Exam Date",dataIndex:"fexamdate",...u("fexamdate","Exam Date"),sorter:(t,a)=>b(t,a,"fexamdate"),sortDirections:["descend","ascend"],width:"10%"},{title:"Qp Code",dataIndex:"fqpcode",...u("fqpcode","QP Code"),sorter:(t,a)=>b(t,a,"fqpcode"),sortDirections:["descend","ascend"],width:"10%",align:"center"},{title:"Subject Name",dataIndex:"fsubname",...u("fsubname","Subject Name"),sorter:(t,a)=>b(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}),...u("fteachcode","Teacher Code"),sorter:(t,a)=>b(t,a,"fteachcode"),sortDirections:["descend","ascend"],width:"15%"},{title:"Mod. Status",render:(t,a)=>e.jsx("div",{children:e.jsx("p",{children:a.fmodqpupd!=""?"Completed":"Pending"})}),width:"10%"},{title:"View QP",render:(t,a)=>e.jsx(h,{size:"small",type:"primary",onClick:()=>{let x=a.fmodqpupd==""?a.fqpfilepath:a.fmodqpupd;a.fpretype=="online"?this.getReport(a):this.props.saveErrorLog(a,"VIEW MOD SELECT QP PAPER",x)},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(P,{disabled:a.ffinalqpstatus==="T",checked:a.ffinalpaper==="T",onChange:x=>this.checkHandler(x,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(P,{disabled:a.ffinalqpstatus==="T",checked:a.fdeleted==="T",onChange:x=>this.checkHandler(x,a,"fdeleted")}),width:"5%",align:"center"}],Q=()=>{this.setState({deggrp:"",exam:"",board:"All",qpcode:"All",degree:"All",sem:"All",status:"All",data:[],search:"",loading:!1,type:"current",formSubmit:!1})};return e.jsxs(W,{style:{margin:"6rem 10px 10px"},title:e.jsx("h6",{children:"Select Final Question Paper"}),extra:e.jsxs(ee,{children:[e.jsxs(h,{style:{background:"black",color:"white"},onClick:()=>Q(),children:[e.jsx(te,{})," Clear"]}),e.jsxs(h,{type:"primary",onClick:()=>this.saveHandler(),children:[e.jsx(se,{})," Save"]}),e.jsx(B,{to:"/",children:e.jsxs(h,{type:"primary",danger:!0,children:[e.jsx(ae,{})," Exit"]})})]}),children:[e.jsxs(w,{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,{filterOption:m,showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:s,options:C,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,{filterOption:m,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,{filterOption:m,showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:l,options:v,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,{filterOption:m,showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:n,options:F,onChange:t=>this.handleChange(t,"qpcode")})]})]}),e.jsxs(w,{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,{filterOption:m,showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:g,options:q,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,{filterOption:m,showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:S,options:O,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,{filterOption:m,showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:E,options:K,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(re,{scroll:{x:1300,y:300},dataSource:this.state.data,columns:R,size:"small",pagination:U})]})}}const ne=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}),Ae=V(ne,{getQpDeggrp:H,getExamname:z,getQpBoard:_,getAvailableSubjects:G,getQpDegree:J,getSelectFinalQP:Y,saveSelectFinalQP:Z,saveErrorLog:oe})(ie);export{Ae as default};