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.227.52.111
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/ViewPrepareQp-xJNtPHII.js |
import{x as u,r as p,t,D as h,L as o,B as i,J as g,O as y,E as j}from"./index-Dk0xQmut.js";import{P as w,a as P,c as Q}from"./PrepareQuestionPaper-kiYfrxSR.js";import{S as r}from"./index-L1dIitE_.js";import{R as q}from"./HomeOutlined-S5KckINR.js";import{F as I}from"./Table-BiqHlSZi.js";import{T as s}from"./index-CdaQC3rv.js";import{R as c}from"./EditOutlined-DiY1BYRp.js";import{R as T}from"./FilePdfOutlined-CONkRtgo.js";import"./index-DQvMNxVd.js";import"./index-BlHPasXe.js";import"./responsiveObserver-C9YaTBgz.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(y+"/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)},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)},x=[{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(g,{}),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:x,scroll:{x:1200},size:"small",pagination:!1})})},$=n=>({user:n.loginfo.userData,viewPrepareQpDetails:n.getViewPrepareQpDetails}),L=u($,{getViewPrepareQpDetails:P,confirmTeachStatus:Q})(D);export{L as default};
|