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


Current Path : /var/www/qpms/assets/
Upload File :
Current File : /var/www/qpms/assets/QpSummary-CY6SDcAv.js

import{v as $,E as m,x as z,r,t,D as G,B as S,L as H,G as i,O as W}from"./index-DuwC-VT_.js";import{g as J,a as K,d as V,e as X}from"./UploadQpPattern-CBNvv8i9.js";import{a as u,p as Z,s as ee}from"./sem-CXAFzSxe.js";import{g as j,s as y}from"./datatable-Bu74lMHu.js";import{S as te}from"./index-DKZf0FLW.js";import{R as ae}from"./FilePdfOutlined-Cug5PoCf.js";import{R as se}from"./HomeOutlined-BUGmPuRh.js";import{R as q,C as d}from"./row-DMe-QGJ3.js";import{F as oe}from"./Table-tc0v6HBF.js";import"./responsiveObserver-DYHRiOGe.js";import"./index-C9j93bW5.js";import"./index-DvnDc0pn.js";import"./index-BAl_nPpy.js";const re=a=>async(o,w)=>{try{let l=localStorage.getItem("dbname");o({type:"SET_LOADER"});const g=await $.post("app.php?a=getRecoredQpSummary&db="+l,a);if(o({type:"UNSET_LOADER"}),g.data.error_code===0){const n=g.data.data.map((b,p)=>({...b,key:p,fslno:p+1}));o({type:"QP_SUMMARY",payload:n})}else o({type:"CLEAR_QP_SUMMARY",payload:[]}),m("info",g.data.data.msg)}catch(l){m("error",l.message)}},le=a=>{const[o,w]=r.useState(""),[l,g]=r.useState("All"),[n,b]=r.useState("All"),[p,C]=r.useState("All"),[h,D]=r.useState("All"),[f,P]=r.useState("All"),[x,A]=r.useState("All"),[B,R]=r.useState(!1),[O,T]=r.useState([]);r.useEffect(()=>{a.getQpDeggrp()},[]),r.useEffect(()=>{T(a.qpsummary)},[a.qpsummary]);const E=a.deggrp.map(e=>({key:e.fdeggrp,label:e.fdescpn,value:e.fdeggrp})),k=a.board.map(e=>({key:e.fboardcode,label:e.fboardname,value:e.fboardcode})),v=[...u,...k],F=a.qpcode.map(e=>({key:e.fqpcode,label:e.fsubname,value:e.fqpcode})),I=[...u,...F],M=[...u,...ee],Q=[...u,{key:"uploaded",label:"Uploaded",value:"uploaded"},{key:"notuploaded",label:" Not Uploaded",value:"notuploaded"}],_=a.degree.map(e=>({key:e.fdegree,label:e.fdescpn,value:e.fdegree})),U=[...u,..._],c=(e,s)=>{e=="deggrp"&&(w(s),a.getQpBoard(s),a.getAvailableSubjects(s,"All"),a.getQpDegree(s)),e=="board"&&(g(s),a.getAvailableSubjects(o,s)),e=="qpcode"&&b(s),e=="sem"&&C(s),e=="Tstatus"&&D(s),e=="Mstatus"&&P(s),e=="degree"&&A(s)},L=async()=>{if(console.log(o,l,n,x,p,h,f,"rose"),o==="")return m("info","Please Select Exam"),!1;if(l==="")return m("info","Please Select Board"),!1;if(n==="")return m("info","Please Select QP Code"),!1;if(x==="")return m("info","Please Select Degre"),!1;const e=new FormData;e.append("deggrp",o),e.append("board",l),e.append("qpcode",n),e.append("degree",x),e.append("sem",p),e.append("status",h),e.append("mstatus",f),await a.postToDatabase(e),R(!0)},N=[{title:"Sl. No",dataIndex:"fslno",align:"center",width:"5%"},{title:"Qp Code",dataIndex:"fqpcode",...j("fqpcode","Qp code"),sorter:(e,s)=>y(e,s,"fqpcode"),sortDirections:["descend","ascend"],align:"center",width:"10%"},{title:"Subject",dataIndex:"fsubname",...j("fsubname","Sub. name"),sorter:(e,s)=>y(e,s,"fsubname"),sortDirections:["descend","ascend"],width:"27%"},{title:"Teacher Code",render:(e,s)=>t.jsx("span",{children:s.fteachcode+" - "+s.fteachname}),...j("fteachcode","Teach. code"),sorter:(e,s)=>y(e,s,"fteachcode"),sortDirections:["descend","ascend"],width:"23%"},{title:"Status",dataIndex:"status",align:"center",width:"10%"},{title:"QP Upload Status",render:(e,s)=>t.jsx("span",{children:s.fstatus}),align:"center",width:"12%"},{title:"Moderator Status",dataIndex:"fmodstatus",width:"12%",align:"center"}],Y=()=>{let e=localStorage.getItem("dbname");window.open(W+"/app.php?a=getQpSummaryReport&db="+e+"&deggrp="+o+"&board="+l+"&qpcode="+n+"&degree="+x+"&sem="+p+"&teachStatus="+h+"&modStatus="+f)};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(q,{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(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},options:E,value:o,onChange:e=>c("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(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:l,options:v,onChange:e=>c("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(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:n,options:I,onChange:e=>c("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(i,{showSearch:!0,mode:"multiple",optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:x,options:U,onChange:e=>c("degree",e)})]})]}),t.jsxs(q,{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(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},options:M,value:p,onChange:e=>c("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(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:h,options:Q,onChange:e=>c("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(i,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:f,options:Q,onChange:e=>c("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=a=>(console.log(a.qpsummary,"nwdjcbedbcefb"),{deggrp:a.deggrp,board:a.board,qpcode:a.availableSubjects,degree:a.degree,univcode:a.loginfo.userData.funivcode,qpsummary:a.qpsummary}),ye=z(de,{getQpDeggrp:J,getQpBoard:K,getAvailableSubjects:V,getQpDegree:X,postToDatabase:re})(le);export{ye as default};