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.119.117.77
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/ViewMcqFinalPaper-O1RZI52T.js |
import{x as A,r as n,t,D as B,L as E,B as l,G as i,E as V,O as k}from"./index-l9BlVL9_.js";import{a as c,p as R,s as G}from"./sem-CXAFzSxe.js";import{g as T,a as z,d as L,e as N}from"./UploadQpPattern-BVY-WMq9.js";import{b as H,c as Y}from"./PrepareQp-Ci4a8w0W.js";import{S as _}from"./index-DiS7jJlX.js";import{R as m,C as r}from"./row-1uk0xOVV.js";import{F as $}from"./Table-BaP0VuQt.js";import"./responsiveObserver-BAGE_Nah.js";import"./index-B2Ue35_i.js";import"./index-CyhlUxjb.js";import"./index-9TGzzKT-.js";const J=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,...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(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: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};
|