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


Current Path : /proc/thread-self/root/var/www/qpms/assets/
Upload File :
Current File : //proc/thread-self/root/var/www/qpms/assets/ViewPrepareQp-BoDE3La9.js

import{x,r as p,t,D as h,L as o,B as i,J as y,O as g,E as j}from"./index-DoOhtRM-.js";import{P as w,a as P,c as Q}from"./PrepareQuestionPaper-CWuncXqy.js";import{S as r}from"./index-DAtDV0BY.js";import{R as q}from"./HomeOutlined-RRy07SvX.js";import{F as I}from"./Table-Dzx3CwGy.js";import{T as s}from"./index-Dp7SaHdv.js";import{R as c}from"./EditOutlined-uDiHFlM3.js";import{R as T}from"./FilePdfOutlined-v1Mryy41.js";import"./index-BKpnzzI6.js";import"./index-Gneb6Krm.js";import"./responsiveObserver-BniLz5dQ.js";const D=n=>{const[l,d]=p.useState([]);p.useEffect(()=>{n.getViewPrepareQpDetails(n.user.fregno)},[]),p.useEffect(()=>{d(n.viewPrepareQpDetails)},[n.viewPrepareQpDetails]);const f=a=>{let e=localStorage.getItem("dbname");window.open(g+"/app.php?a=getOmrQpReport&univcode="+n.user.funivcode+"&db="+e+"&qpcode="+a.fqpcode+"&year="+a.fyear+"&mode="+a.fexamtype+"&teachcode="+a.fteachcode+"&noqp="+a.fset+"&type="+a.ftype+"&teachtype="+n.user.fusertype)},m=async a=>{if(a.qpcnt!==a.totcnt){j("warning","please complete all the questions");return}const e=new FormData;e.append("qpcode",a.fqpcode),e.append("year",a.fyear),e.append("mode",a.fexamtype),e.append("teachcode",a.fteachcode),e.append("set",a.fset),e.append("ftype",a.ftype),e.append("modetype",n.user.fusertype),e.append("userid",n.user.fregno),await n.confirmTeachStatus(e,n.getViewPrepareQpDetails,n.user.fregno)},u=[{title:"Sl. No.",dataIndex:"fslno",align:"center"},{title:"QP Code",dataIndex:"fqpcode",align:"center"},{title:"Subject Name",dataIndex:"fsubname"},{title:"Qp. No.",dataIndex:"fset",align:"center"},{title:"Max. Qn.",dataIndex:"totcnt",align:"center"},{title:"Qn. Prepared",dataIndex:"qpcnt",align:"center"},{title:"Type",dataIndex:"ftype",align:"center"},{title:"Pre.Type",dataIndex:"fpretype",align:"center"},{title:"Action",render:(a,e)=>t.jsxs(r,{children:[e.fpretype==="online"?t.jsx(o,{to:{pathname:`/qpsettings/prepare-qn-paper/${e.fqpcode}/${e.fyear}/${e.fexamtype}/${e.fteachcode}/${e.fset}/${e.ftempcode}/${e.ftype}/${e.fteachstatus}`},children:t.jsx(s,{title:"Edit",children:t.jsx(i,{size:"medium",hidden:e.fteachstatus=="T"&&!0,style:{background:"green",color:"white",width:"30px"},icon:t.jsx(c,{})})})}):t.jsx(o,{to:"/qpsettings/upload-qp",children:t.jsx(s,{title:"Edit",children:t.jsx(i,{size:"medium",style:{background:"green",color:"white"},icon:t.jsx(c,{})})})}),t.jsx(s,{title:"Preview",children:t.jsx(i,{size:"medium",icon:t.jsx(T,{}),style:{background:"#38f",color:"#fff"},hidden:e.fteachstatus=="T"&&!0,onClick:()=>f(e)})}),e.fpretype==="online"&&t.jsx(w,{placement:"topRight",title:"Complete the task",description:t.jsxs("span",{children:["Are you sure you want to freez? ",t.jsx("br",{})," You cannot make any changes"]}),onConfirm:()=>{m(e)},onCancel:()=>console.log("CANCELLED"),okText:"Yes",cancelText:"No",children:t.jsx(s,{placement:"bottom",title:"Completed?",children:t.jsx(i,{size:"medium",type:"primary",icon:t.jsx(y,{}),hidden:e.fteachstatus=="T"&&!0})})})]}),align:"center"}];return t.jsx(h,{style:{margin:"6rem 10px 10px"},title:t.jsx("h6",{children:"Prepare Question Paper"}),extra:t.jsx(r,{children:t.jsx(o,{to:"/",children:t.jsxs(i,{type:"primary",danger:!0,children:[t.jsx(q,{})," Exit"]})})}),children:t.jsx(I,{dataSource:l,columns:u,scroll:{x:1200},size:"small",pagination:!1})})},$=n=>({user:n.loginfo.userData,viewPrepareQpDetails:n.getViewPrepareQpDetails}),L=x($,{getViewPrepareQpDetails:P,confirmTeachStatus:Q})(D);export{L as default};