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


Current Path : /var/www/qpms/assets/
Upload File :
Current File : /var/www/qpms/assets/ViewMcqFinalPaper-C4As6DhN.js

import{x as O,r as n,t,D as B,L as E,B as l,G as i,E as V,O as k}from"./index-C8M3lyNu.js";import{a as c,s as R}from"./sem-xL-Ac5nH.js";import{g as G,a as T,d as z,e as L}from"./UploadQpPattern-kidoxO1-.js";import{b as N,c as H}from"./PrepareQp-CPEkJNV0.js";import{S as Y}from"./index-Bhb34QNg.js";import{R as m,C as r}from"./row-B_crsxDb.js";import{F as _}from"./Table-CCr-bhsx.js";import"./responsiveObserver-iG098kB7.js";import"./index-C1EEZ13m.js";const $=a=>{const[d,f]=n.useState(""),[p,h]=n.useState("All"),[g,u]=n.useState("All"),[x,b]=n.useState("All"),[j,y]=n.useState([]),[S,w]=n.useState(!1);n.useEffect(()=>{a.getQpDeggrp()},[]),n.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};console.log(e),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")},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,...R],A=[{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(Y,{children:t.jsx(E,{to:"/",children:t.jsx(l,{type:"primary",danger:!0,children:"Exit"})})}),children:[t.jsxs(m,{gutter:10,children:[t.jsxs(r,{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(r,{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(r,{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(r,{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(r,{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:A,scroll:{x:1300,y:300}})]})},J=a=>({deggrp:a.deggrp,board:a.board,qpcode:a.availableSubjects,degree:a.degree,user:a.loginfo.userData,selectedMcqData:a.selectedFinalMcq}),ne=O(J,{getQpDeggrp:G,getQpBoard:T,getAvailableSubjects:z,getQpDegree:L,getSelectedFinalMcq:N,generateMCQVersions:H})($);export{ne as default};