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.221.248.140
import{v as Y,E as g,x as z,r as o,t,D as G,B as f,L as W,G as p,N as J}from"./index-ChT0xYiY.js";import{g as K,a as V,d as X,e as Z}from"./UploadQpPattern-D3NTHJAy.js";import{a as x,p as ee,b as te}from"./sem-DLpF_ddZ.js";import{g as y,s as w}from"./datatable-Pmr3nCys.js";import{S as ae}from"./index-CCqRUA_e.js";import{R as se}from"./StopOutlined-r47AxIUf.js";import{R as oe}from"./FilePdfOutlined-CxBg6VEx.js";import{R as re}from"./HomeOutlined-C_Cn3B9w.js";import{R as B,C as n}from"./row-BiiVUFlR.js";import{F as le}from"./Table-74BLe3me.js";import"./responsiveObserver-CMjrehYy.js";import"./index-G2j282sA.js";import"./index-cEGmOHHy.js";import"./index-BDLcy6G-.js";const ne=s=>async(r,b)=>{try{let l=localStorage.getItem("dbname");r({type:"SET_LOADER"});const c=await Y.post("app.php?a=getRecoredQpSummary&db="+l,s);if(r({type:"UNSET_LOADER"}),c.data.error_code===0){const i=c.data.data.map((u,m)=>({...u,key:m,fslno:m+1}));r({type:"QP_SUMMARY",payload:i})}else r({type:"CLEAR_QP_SUMMARY",payload:[]}),g("info",c.data.data.msg)}catch(l){g("error",l.message)}},de=s=>{const[r,b]=o.useState(""),[l,c]=o.useState("All"),[i,u]=o.useState("All"),[m,A]=o.useState("All"),[S,C]=o.useState("All"),[j,Q]=o.useState("All"),[h,D]=o.useState("All"),[k,P]=o.useState(!1),[T,q]=o.useState([]);o.useEffect(()=>{s.getQpDeggrp()},[]),o.useEffect(()=>{q(s.qpsummary)},[s.qpsummary]);const E=s.deggrp.map(e=>({key:e.fdeggrp,label:e.fdescpn,value:e.fdeggrp})),O=s.board.map(e=>({key:e.fboardcode,label:e.fboardname,value:e.fboardcode})),I=[...x,...O],v=s.qpcode.map(e=>({key:e.fqpcode,label:e.fsubname,value:e.fqpcode})),F=[...x,...v],M=[...x,...te],R=[...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,..._],d=(e,a)=>{e=="deggrp"&&(b(a),s.getQpBoard(a),s.getAvailableSubjects(a,"All"),s.getQpDegree(a)),e=="board"&&(c(a),s.getAvailableSubjects(r,a)),e=="qpcode"&&u(a),e=="sem"&&A(a),e=="Tstatus"&&C(a),e=="Mstatus"&&Q(a),e=="degree"&&D(a)},L=async()=>{if(r==="")return g("info","Please Select Exam"),!1;if(l==="")return g("info","Please Select Board"),!1;if(i==="")return g("info","Please Select QP Code"),!1;if(h==="")return g("info","Please Select Degre"),!1;const e=new FormData;e.append("deggrp",r),e.append("board",l),e.append("qpcode",i),e.append("degree",h),e.append("sem",m),e.append("status",S),e.append("mstatus",j),await s.postToDatabase(e),P(!0)},N=[{title:"Sl. No",dataIndex:"fslno",align:"center",width:"3%"},{title:"Qp Code",dataIndex:"fqpcode",...y("fqpcode","Qp code"),sorter:(e,a)=>w(e,a,"fqpcode"),sortDirections:["descend","ascend"],align:"center",width:"7%"},{title:"Subject",dataIndex:"fsubname",...y("fsubname","Sub. name"),sorter:(e,a)=>w(e,a,"fsubname"),sortDirections:["descend","ascend"],width:"24%"},{title:"Teacher Code",render:(e,a)=>t.jsx("span",{children:a.fteachcode+" - "+a.fteachname}),...y("fteachcode","Teach. code"),sorter:(e,a)=>w(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"}],$=()=>{let e=localStorage.getItem("dbname");window.open(J+"/app.php?a=getQpSummaryReport&db="+e+"°grp="+r+"&board="+l+"&qpcode="+i+"°ree="+h+"&sem="+m+"&teachStatus="+S+"&modStatus="+j)},H=()=>{b(""),c("All"),u("All"),A("All"),C("All"),Q("All"),D("All"),P(!1),q([])};return t.jsxs(G,{style:{margin:"6rem 10px 10px"},title:t.jsx("h6",{children:"QP Summary"}),extra:t.jsxs(ae,{children:[t.jsxs(f,{style:{background:"black",color:"white"},onClick:()=>H(),children:[t.jsx(se,{})," Clear"]}),t.jsxs(f,{onClick:()=>{$()},style:{background:"green",color:"white"},children:[t.jsx(oe,{})," Report"]}),t.jsx(W,{to:"/",children:t.jsxs(f,{type:"primary",danger:!0,children:[t.jsx(re,{})," Exit"]})})]}),children:[t.jsxs(B,{gutter:10,children:[t.jsxs(n,{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=>d("deggrp",e)})]}),t.jsxs(n,{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:I,onChange:e=>d("board",e)})]}),t.jsxs(n,{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:F,onChange:e=>d("qpcode",e)})]}),t.jsxs(n,{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:h,options:U,onChange:e=>d("degree",e)})]})]}),t.jsxs(B,{gutter:10,children:[t.jsxs(n,{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:m,onChange:e=>d("sem",e)})]}),t.jsxs(n,{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:S,options:R,onChange:e=>d("Tstatus",e)})]}),t.jsxs(n,{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:j,options:R,onChange:e=>d("Mstatus",e)})]}),t.jsxs(n,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("p",{style:{marginTop:"20px"}}),t.jsx(f,{type:"primary",style:{marginBottom:"10px"},onClick:()=>L(),children:"Submit"})]})]}),k&&t.jsx(le,{style:{marginTop:"20px"},dataSource:T,scroll:{y:300,x:1300},bordered:!0,columns:N,size:"small",pagination:ee})]})},pe=s=>({deggrp:s.deggrp,board:s.board,qpcode:s.availableSubjects,degree:s.degree,univcode:s.loginfo.userData.funivcode,qpsummary:s.qpsummary}),Ce=z(pe,{getQpDeggrp:K,getQpBoard:V,getAvailableSubjects:X,getQpDegree:Z,postToDatabase:ne})(de);export{Ce as default};
|