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 : 3.145.41.108


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

import{x as L,r,t,D as U,B as b,L as X,G as m,E as $}from"./index-Jbxgsbch.js";import{g as K}from"./ViewQPScr-BAkNL0Kt.js";import{g as D,s as P}from"./datatable-Dq1m3JZQ.js";import{g as W,a as Y,d as Z,e as ee}from"./UploadQpPattern-BcGlko6f.js";import{S as te}from"./index-DwgAlq5Y.js";import{R as le}from"./StopOutlined-CaDfZqq0.js";import{R as ae}from"./HomeOutlined-1VMqqu16.js";import{R as C,C as d}from"./row-CeTgqFyn.js";import{F as se}from"./Table-BB0NuayW.js";import"./responsiveObserver-BWYsXt8l.js";import"./index-CeT9a47l.js";import"./index-D3Z4RIQ3.js";import"./index-BzXn-Cj6.js";const re=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),F="https://qp-upd.s3.ap-south-1.amazonaws.com/",O="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"?O+e:F+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(te,{children:[t.jsx(b,{type:"primary",icon:t.jsx(le,{}),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(ae,{}),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(se,{dataSource:I,columns:B,pagination:!0,bordered:!0,size:"small",scroll:{x:1300,y:300}}):null]})},oe=a=>({user:a.loginfo.userData,deggrp:a.deggrp,board:a.board,qpcode:a.availableSubjects,degree:a.degree,viewQPData:a.viewQPData}),je=L(oe,{getViewQPData:K,getQpDeggrp:W,getQpBoard:Y,getAvailableSubjects:Z,getQpDegree:ee})(re);export{je as default};