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.15.202.169
import{x as A,r,t,D as B,L as E,B as l,G as i,E as V,O as k}from"./index-CDn4Wprz.js";import{a as c,p as R,b as G}from"./sem-DLpF_ddZ.js";import{g as T,a as z,d as L,e as N}from"./UploadQpPattern-Cp3SiMtl.js";import{b as H,c as Y}from"./PrepareQp-BBUswMov.js";import{S as _}from"./index-BzpRcNiH.js";import{R as m,C as n}from"./row-Njx8fj0K.js";import{F as $}from"./Table-UiRZYFRj.js";import"./responsiveObserver-TKOKauOe.js";import"./index-iIYbe4vH.js";import"./index-bKPvE33f.js";import"./index-DKSJlvhU.js";const J=a=>{const[d,f]=r.useState(""),[p,h]=r.useState("All"),[g,u]=r.useState("All"),[x,b]=r.useState("All"),[j,y]=r.useState([]),[S,w]=r.useState(!1);r.useEffect(()=>{a.getQpDeggrp()},[]),r.useEffect(()=>{y(a.selectedMcqData)},[a.selectedMcqData]);const o=(e,s)=>{e==="deggrp"&&(f(s),a.getAvailableSubjects(s,"All"),a.getQpDegree(s)),e==="qpcode"&&h(s),e==="sem"&&b(s),e==="degree"&&u(s)},q=async()=>{if(d===""){V("Info","Please select degree group");return}const e={deggrp:d,qpcode:p,degree:g,sem:x};await a.getSelectedFinalMcq(e),w(!0)},C=async e=>{let s={fqpcode:e.fqpcode,fyear:e.fyear,fexamtype:e.fexamtype,fteachcode:e.fteachcode,fnoqp:e.fnoqp,fversions:e.fversions};await a.generateMCQVersions(s)},D=e=>{const s=localStorage.getItem("dbname");window.open(k+"/app.php?a=getOmrQpReport&db="+s+"&univcode="+a.user.funivcode+"&qpcode="+e.fqpcode+"&year="+e.fyear+"&mode="+e.fexamtype+"&teachcode="+e.fteachcode+"&noqp="+e.fnoqp+"&type=MCQ&verion=All&teachtype="+a.user.fusertype)},Q=a.deggrp.map(e=>({key:e.fdeggrp,label:e.fdescpn,value:e.fdeggrp})),F=a.qpcode.map(e=>({key:e.fqpcode,label:e.fsubname,value:e.fqpcode})),M=[...c,...F],v=a.degree.map(e=>({key:e.fdegree,label:e.fdescpn,value:e.fdegree})),P=[...c,...v],I=[...c,...G],O=[{title:"Sl. No",dataIndex:"fslno",align:"center",width:"10%"},{title:"QP Code",dataIndex:"fqpcode",align:"center",width:"10%"},{title:"Subject Name",dataIndex:"fsubname",width:"20%"},{title:"Year/Mode",render:(e,s)=>t.jsx("span",{children:s.fyear+"/"+s.fexamtype}),align:"center",width:"10%"},{title:"Set",dataIndex:"fnoqp",align:"center",width:"10%"},{title:"Exam Date",dataIndex:"fexamdate",align:"center",width:"15%"},{title:"Versions",dataIndex:"fversions",align:"center",width:"10%"},{title:"Selected Date",dataIndex:"ffinaldate",align:"center",width:"10%"},{title:"Generate Versions",render:(e,s)=>t.jsx(l,{type:"primary",size:"medium",onClick:()=>C(s),children:"Generate Versions"}),align:"center",width:"15%"},{title:"Report",render:(e,s)=>t.jsx(l,{size:"medium",onClick:()=>D(s),children:"Report"}),align:"center",width:"10%"}];return t.jsxs(B,{style:{margin:"6rem 10px 10px"},title:t.jsx("h6",{children:"MCQ Final Question Papers"}),extra:t.jsx(_,{children:t.jsx(E,{to:"/",children:t.jsx(l,{type:"primary",danger:!0,children:"Exit"})})}),children:[t.jsxs(m,{gutter:10,children:[t.jsxs(n,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[t.jsx("label",{children:"Exam"}),t.jsx(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},options:Q,value:d,onChange:e=>o("deggrp",e)})]}),t.jsxs(n,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[t.jsx("label",{children:"Qp Code"}),t.jsx(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:p,options:M,onChange:e=>o("qpcode",e)})]}),t.jsxs(n,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[t.jsx("label",{children:"Degree"}),t.jsx(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:g,options:P,onChange:e=>o("degree",e)})]})]}),t.jsxs(m,{gutter:10,children:[t.jsxs(n,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[t.jsx("label",{children:"Sem"}),t.jsx(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:x,options:I,onChange:e=>o("sem",e)})]}),t.jsxs(n,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("p",{style:{marginTop:"20px"}}),t.jsx(l,{type:"primary",style:{marginBottom:"10px"},onClick:()=>q(),children:"Submit"})]})]}),S&&t.jsx($,{style:{width:"100%"},dataSource:j,columns:O,scroll:{x:1300,y:300},pagination:R})]})},K=a=>({deggrp:a.deggrp,board:a.board,qpcode:a.availableSubjects,degree:a.degree,user:a.loginfo.userData,selectedMcqData:a.selectedFinalMcq}),le=A(K,{getQpDeggrp:T,getQpBoard:z,getAvailableSubjects:L,getQpDegree:N,getSelectedFinalMcq:H,generateMCQVersions:Y})(J);export{le as default};
|