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


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

import{x as L,r as l,t as e,B as m,E as F,M as A,D as E,L as N,R as V}from"./index-DytKDlFb.js";import{a as $,u as T,b as Y}from"./ModQpDetails-BYUuKi6C.js";import{p as B}from"./sem-CXAFzSxe.js";import{U as k,R as y}from"./UploadOutlined-CzH2z_5M.js";import{F as Q}from"./Table-D4ygnYDx.js";import{S as K}from"./index-BiskNudf.js";import{R as H}from"./ArrowLeftOutlined-CWZ6f2bp.js";import{R as J}from"./HomeOutlined-L6aAnT1z.js";import"./index-BVGRjGJp.js";import"./index-CyEJXvy_.js";import"./DeleteOutlined-BSidZClR.js";import"./index-D46HYd8a.js";import"./responsiveObserver-DUNCLVnN.js";const G=t=>{const[S,w]=l.useState([]),[r,p]=l.useState([]),[f,h]=l.useState([]),[u,x]=l.useState([]),[c,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={...r};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={...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,d(o),q("Yes")}else{const s={...o,[a.key]:[]};d(s),q("No")}}},P=async i=>{A.confirm({title:"Upload",content:"Are you sure ?",onOk(){I(i)}})},I=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),r[i.key]&&r[i.key][0]&&n.append("qpfile",r[i.key][0].originFileObj),f[i.key]&&f[i.key][0]&&n.append("anskeyfile",f[i.key][0].originFileObj),c[i.key]&&c[i.key][0]&&n.append("remfile",c[i.key][0].originFileObj),await t.uploadModQpData(n,t.getModUpdData,a)},z=[{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:r[a.key]||[],onChange:n=>j(n,a,"qp"),beforeUpload:()=>!1,children:e.jsx(m,{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(m,{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(m,{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:c[a.key]||[],onChange:n=>j(n,a,"rem"),beforeUpload:()=>!1,children:e.jsx(m,{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(m,{size:"medium",style:{background:"green",color:"#fff"},onClick:()=>P(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:z,dataSource:S,scroll:{x:1300,y:500},pagination:B})]})},W=t=>({user:t.loginfo.userData,modUpdData:t.getModUpdData}),X=L(W,{getModUpdData:$,uploadModQpData:T})(G),Z=t=>{const[S,w]=l.useState([]),r="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:(c,d)=>e.jsx("span",{style:{color:d.fmodqpdate==""?"#f00":"green"},children:d.fmodqpdate!=""?"Completed":"Pending"}),width:"10%",align:"center"},{title:"Syllabus",render:(c,d)=>e.jsx("a",{href:r+d.fqpsyllabus,target:"_blank",children:"View"}),width:"7%",align:"center"},{title:"Action",render:(c,d)=>e.jsx("div",{children:e.jsxs(m,{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(m,{onClick:()=>f(!1),style:{color:"white",background:"green"},children:[e.jsx(H,{}),"Back"]}),e.jsx(N,{to:"/",children:e.jsxs(m,{type:"primary",danger:!0,children:[e.jsx(J,{})," Exit"]})})]}),children:p?e.jsx(X,{element:h,url:r}):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};