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.217.242.39
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/ViewQPScr-BVRXvVF5.js |
import{x as L,r,t,D as U,B as b,L as X,G as m,E as $}from"./index-DoOhtRM-.js";import{g as K}from"./ViewQPScr-DEFtsu5I.js";import{g as D,s as P}from"./datatable-YrghQg_b.js";import{g as W,a as Y,d as Z,e as ee}from"./UploadQpPattern-M42KeA6O.js";import{p as te}from"./sem-DLpF_ddZ.js";import{S as le}from"./index-DAtDV0BY.js";import{R as ae}from"./StopOutlined-C9S41vGE.js";import{R as se}from"./HomeOutlined-RRy07SvX.js";import{R as C,C as d}from"./row-B8SdGvkB.js";import{F as re}from"./Table-Dzx3CwGy.js";import"./responsiveObserver-BniLz5dQ.js";import"./index-BKpnzzI6.js";import"./index-Gneb6Krm.js";import"./index-Dp7SaHdv.js";const oe=a=>{localStorage.getItem("dbname");const[u,y]=r.useState(""),[j,S]=r.useState("All"),[w,g]=r.useState("All"),[A,h]=r.useState("All"),[v,c]=r.useState("All"),[k,i]=r.useState("All"),[I,o]=r.useState([]),[Q,n]=r.useState(!1),O="https://qp-upd.s3.ap-south-1.amazonaws.com/",F="https://moderator-upd.s3.ap-south-1.amazonaws.com/";r.useEffect(()=>{a.getQpDeggrp()},[]),r.useEffect(()=>{o(a.viewQPData)},[a.viewQPData]);const p=(e,l)=>{l=="deggrp"&&(y(e),a.getQpBoard(e),a.getAvailableSubjects(e,"All"),a.getQpDegree(e),c("All"),i("All"),o([]),n(!1)),l=="board"&&(S(e),h("All"),g("All"),c("All"),i("All"),o([]),n(!1),a.getAvailableSubjects(u,e)),l=="fdegree"&&(h(e),g("All"),c("All"),i("All"),o([]),n(!1)),l=="qpcode"&&(g(e),c("All"),i("All"),o([]),n(!1)),l=="fexamno"&&(c(e),i("All"),o([]),n(!1)),l=="fstatus"&&(i(e),o([]),n(!1))},f=async(e,l)=>{window.open(l=="M"?F+e:O+e)},q=async()=>{if(u==""){$("error","Select Exam");return}const e=new FormData;e.append("fdeggrp",u),e.append("board",j),e.append("degree",A),e.append("qpcode",w),e.append("fexamno",v),e.append("fstatus",k),await a.getViewQPData(e),n(!0)},B=[{title:"Sl. No.",render:(e,l,s)=>s+1,align:"center",width:"4rem"},{title:t.jsx("div",{style:{textAlign:"center"},children:"Subject Name"}),dataIndex:"fsubname",...D("fsubname","subname"),sorter:(e,l)=>P(e,l,"fsubname"),sortDirections:["descend","ascend"],width:"16rem"},{title:"QP",dataIndex:"fset",align:"center",width:"4rem"},{title:"Year/Mode",render:(e,l)=>t.jsx("span",{children:l.fyear+"/"+l.fexamtype}),align:"center",width:"6rem"},{title:t.jsx("div",{style:{textAlign:"center"},children:"Teacher Code - Name"}),...D("fteachcode","fteachname"),sorter:(e,l)=>P(e,l,"fteachcode"),render:(e,l)=>t.jsx("span",{children:l.fteachcode+" - "+l.fteachname}),width:"16rem"},{title:"Status",render:(e,l)=>t.jsx("span",{children:l.status=="ACCEPTED"?"QP Accepted":l.status}),align:"center",width:"6rem"},{title:"View Q.P.",render:(e,l)=>t.jsxs("p",{style:{cursor:"pointer",color:"green"},onMouseOver:s=>s.target.style.textDecoration="underline",onMouseOut:s=>s.target.style.textDecoration="none",onClick:s=>f(l.fqpfilepath,"T"),children:[l.fqpfilepath!==""&&"File Submitted"," ",t.jsx("br",{}),l.fqpupddate]}),align:"center"},{title:"View Ans. Key",render:(e,l)=>t.jsxs("p",{style:{cursor:"pointer",color:"green"},onMouseOver:s=>s.target.style.textDecoration="underline",onMouseOut:s=>s.target.style.textDecoration="none",onClick:s=>f(l.fanskeypath,"T"),children:[l.fanskeypath!==""&&"File Submitted"," "]}),align:"center",width:"8rem"},{title:t.jsx("div",{style:{textAlign:"center"},children:"Moderator"}),render:(e,l)=>t.jsx("p",{children:l.fmodteach+" - "+l.fmodteachname})},{title:"View Moderator",render:(e,l)=>t.jsxs("p",{style:{cursor:"pointer",color:"green"},onMouseOver:s=>s.target.style.textDecoration="underline",onMouseOut:s=>s.target.style.textDecoration="none",onClick:s=>f(l.fmodqppath,"M"),children:[l.fmodqppath!==""&&"File Submitted"," "]}),align:"center",width:"6rem"}],x=[{key:"All",value:"All",label:"All"}],V=a.deggrp.map(e=>({key:e.fdeggrp,value:e.fdeggrp,label:e.fdescpn})),E=a.board.map(e=>({key:e.fboardcode,value:e.fboardcode,label:e.fboardname})),M=[...x,...E],T=a.degree.map(e=>({key:e.fdegree,value:e.fdegree,label:e.fdescpn})),R=[...x,...T],z=a.qpcode.map(e=>({key:e.fqpcode,value:e.fqpcode,label:e.fsubname})),N=[...x,...z],_=[{key:"A",value:"A",label:"I Semester"},{key:"B",value:"B",label:"II Semester"},{key:"C",value:"C",label:"III Semester"},{key:"D",value:"D",label:"IV Semester"},{key:"E",value:"E",label:"V Semester"},{key:"F",value:"F",label:"VI Semester"},{key:"G",value:"G",label:"VII Semester"},{key:"H",value:"H",label:"VIII Semester"},{key:"I",value:"I",label:"IX Semester"},{key:"J",value:"J",label:"X Semester"}],H=[...x,..._],G=[{key:"uploaded",label:"Uploaded",value:"uploaded"},{key:"notuploaded",label:"Not Uploaded",value:"not_uploaded"}],J=[...x,...G];return t.jsxs(U,{style:{margin:"6rem 10px 10px"},title:t.jsx("h6",{children:"View Question Paper"}),extra:t.jsxs(le,{children:[t.jsx(b,{type:"primary",icon:t.jsx(ae,{}),style:{backgroundColor:"#1b1c1d"},onClick:()=>{y(""),S("All"),h("All"),g("All"),c("All"),i("All"),o([]),n(!1)},size:"medium",children:"Clear"}),t.jsx(X,{to:"/",children:t.jsx(b,{type:"primary",icon:t.jsx(se,{}),danger:!0,size:"medium",children:"Exit"})})]}),children:[t.jsxs(C,{gutter:16,children:[t.jsxs(d,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[t.jsx("label",{children:"Exam"}),t.jsx(m,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:u,options:V,onChange:e=>p(e,"deggrp")})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[t.jsx("label",{children:"Board"}),t.jsx(m,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:j,options:M,onChange:e=>p(e,"board")})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[t.jsx("label",{children:"QP Code"}),t.jsx(m,{showSearch:!0,className:"ant-select-item-option-content",optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:w,options:N,onChange:e=>p(e,"qpcode")})]})]}),t.jsxs(C,{gutter:16,children:[t.jsxs(d,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[t.jsx("label",{children:"Degree"}),t.jsx(m,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:A,options:R,onChange:e=>p(e,"fdegree")})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:4,xl:4,xxl:4,children:[t.jsx("label",{children:"Sem"}),t.jsx(m,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:v,options:H,onChange:e=>p(e,"fexamno")})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:4,xl:4,xxl:4,children:[t.jsx("label",{children:"Status"}),t.jsx(m,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:k,options:J,onChange:e=>p(e,"fstatus")})]}),t.jsxs(d,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("p",{style:{marginTop:"20px"}}),t.jsx(b,{type:"primary",style:{marginBottom:"10px"},onClick:()=>q(),children:"Submit"})]})]}),Q==!0?t.jsx(re,{dataSource:I,columns:B,pagination:te,bordered:!0,size:"small",scroll:{x:1300,y:300}}):null]})},ne=a=>({user:a.loginfo.userData,deggrp:a.deggrp,board:a.board,qpcode:a.availableSubjects,degree:a.degree,viewQPData:a.viewQPData}),we=L(ne,{getViewQPData:K,getQpDeggrp:W,getQpBoard:Y,getAvailableSubjects:Z,getQpDegree:ee})(oe);export{we as default};
|