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


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

import{v as $,E as m,x as z,r as o,t,D as G,B as S,L as H,G as p,O as W}from"./index-BnV6LRk1.js";import{g as J,a as K,d as V,e as X}from"./UploadQpPattern-B6zAsHeR.js";import{a as x,p as Z,s as ee}from"./sem-D-kovgiG.js";import{g as j,s as y}from"./datatable-CHGkRfN_.js";import{S as te}from"./index-Bm30U5Iv.js";import{R as ae}from"./FilePdfOutlined-Bgn2I4e6.js";import{R as se}from"./HomeOutlined-BaCbmQl_.js";import{R as C,C as d}from"./row-BF3oSYmo.js";import{F as oe}from"./Table-Ba9ECeid.js";import"./responsiveObserver-BFnokbxg.js";import"./index-ZKM9bSaz.js";import"./index-DDJhgKXs.js";import"./index-BoWG-kFi.js";const re=s=>async(r,w)=>{try{let l=localStorage.getItem("dbname");r({type:"SET_LOADER"});const g=await $.post("app.php?a=getRecoredQpSummary&db="+l,s);if(r({type:"UNSET_LOADER"}),g.data.error_code===0){const i=g.data.data.map((h,c)=>({...h,key:c,fslno:c+1}));r({type:"QP_SUMMARY",payload:i})}else r({type:"CLEAR_QP_SUMMARY",payload:[]}),m("info",g.data.data.msg)}catch(l){m("error",l.message)}},le=s=>{const[r,w]=o.useState(""),[l,g]=o.useState("All"),[i,h]=o.useState("All"),[c,D]=o.useState("All"),[f,P]=o.useState("All"),[b,q]=o.useState("All"),[u,A]=o.useState("All"),[B,R]=o.useState(!1),[O,T]=o.useState([]);o.useEffect(()=>{s.getQpDeggrp()},[]),o.useEffect(()=>{T(s.qpsummary)},[s.qpsummary]);const E=s.deggrp.map(e=>({key:e.fdeggrp,label:e.fdescpn,value:e.fdeggrp})),k=s.board.map(e=>({key:e.fboardcode,label:e.fboardname,value:e.fboardcode})),v=[...x,...k],F=s.qpcode.map(e=>({key:e.fqpcode,label:e.fsubname,value:e.fqpcode})),I=[...x,...F],M=[...x,...ee],Q=[...x,{key:"uploaded",label:"Uploaded",value:"uploaded"},{key:"notuploaded",label:" Not Uploaded",value:"notuploaded"}],_=s.degree.map(e=>({key:e.fdegree,label:e.fdescpn,value:e.fdegree})),U=[...x,..._],n=(e,a)=>{e=="deggrp"&&(w(a),s.getQpBoard(a),s.getAvailableSubjects(a,"All"),s.getQpDegree(a)),e=="board"&&(g(a),s.getAvailableSubjects(r,a)),e=="qpcode"&&h(a),e=="sem"&&D(a),e=="Tstatus"&&P(a),e=="Mstatus"&&q(a),e=="degree"&&A(a)},L=async()=>{if(r==="")return m("info","Please Select Exam"),!1;if(l==="")return m("info","Please Select Board"),!1;if(i==="")return m("info","Please Select QP Code"),!1;if(u==="")return m("info","Please Select Degre"),!1;const e=new FormData;e.append("deggrp",r),e.append("board",l),e.append("qpcode",i),e.append("degree",u),e.append("sem",c),e.append("status",f),e.append("mstatus",b),await s.postToDatabase(e),R(!0)},N=[{title:"Sl. No",dataIndex:"fslno",align:"center",width:"3%"},{title:"Qp Code",dataIndex:"fqpcode",...j("fqpcode","Qp code"),sorter:(e,a)=>y(e,a,"fqpcode"),sortDirections:["descend","ascend"],align:"center",width:"7%"},{title:"Subject",dataIndex:"fsubname",...j("fsubname","Sub. name"),sorter:(e,a)=>y(e,a,"fsubname"),sortDirections:["descend","ascend"],width:"24%"},{title:"Teacher Code",render:(e,a)=>t.jsx("span",{children:a.fteachcode+" - "+a.fteachname}),...j("fteachcode","Teach. code"),sorter:(e,a)=>y(e,a,"fteachcode"),sortDirections:["descend","ascend"],width:"21%"},{title:"Status",dataIndex:"status",align:"center",width:"10%"},{title:"QP Upload Status",render:(e,a)=>t.jsx("span",{children:a.fstatus}),align:"center",width:"17%"},{title:"Moderator Status",dataIndex:"fmodstatus",width:"17%",align:"center"}],Y=()=>{let e=localStorage.getItem("dbname");window.open(W+"/app.php?a=getQpSummaryReport&db="+e+"&deggrp="+r+"&board="+l+"&qpcode="+i+"&degree="+u+"&sem="+c+"&teachStatus="+f+"&modStatus="+b)};return t.jsxs(G,{style:{margin:"6rem 10px 10px"},title:t.jsx("h6",{children:"QP Summary"}),extra:t.jsxs(te,{children:[t.jsxs(S,{onClick:()=>{Y()},children:[t.jsx(ae,{})," Report"]}),t.jsx(H,{to:"/",children:t.jsxs(S,{type:"primary",danger:!0,children:[t.jsx(se,{})," Exit"]})})]}),children:[t.jsxs(C,{gutter:10,children:[t.jsxs(d,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Exam"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},options:E,value:r,onChange:e=>n("deggrp",e)})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Board"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:l,options:v,onChange:e=>n("board",e)})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Qp Code"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:i,options:I,onChange:e=>n("qpcode",e)})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Degree"}),t.jsx(p,{showSearch:!0,mode:"multiple",optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:u,options:U,onChange:e=>n("degree",e)})]})]}),t.jsxs(C,{gutter:10,children:[t.jsxs(d,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Sem"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},options:M,value:c,onChange:e=>n("sem",e)})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Teacher Status"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:f,options:Q,onChange:e=>n("Tstatus",e)})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Moderator Status"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:b,options:Q,onChange:e=>n("Mstatus",e)})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("p",{style:{marginTop:"20px"}}),t.jsx(S,{type:"primary",style:{marginBottom:"10px"},onClick:()=>L(),children:"Submit"})]})]}),B&&t.jsx(oe,{style:{marginTop:"20px"},dataSource:O,scroll:{y:300,x:1300},bordered:!0,columns:N,size:"small",pagination:Z})]})},de=s=>({deggrp:s.deggrp,board:s.board,qpcode:s.availableSubjects,degree:s.degree,univcode:s.loginfo.userData.funivcode,qpsummary:s.qpsummary}),ye=z(de,{getQpDeggrp:J,getQpBoard:K,getAvailableSubjects:V,getQpDegree:X,postToDatabase:re})(le);export{ye as default};