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.143.7.112
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/ModQpDetailsOffline-JktVpEQN.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-C8M3lyNu.js";import{a as Y,u as $,b as T}from"./ModQpDetails-Bt_VhI_2.js";import{U as k,R as y}from"./UploadOutlined-Cc55QJY4.js";import{F as Q}from"./Table-CCr-bhsx.js";import{S as B}from"./index-Bhb34QNg.js";import{R as K}from"./ArrowLeftOutlined-DFfMxdNg.js";import{R as H}from"./HomeOutlined-C5ZSuxRe.js";import"./index-C1EEZ13m.js";import"./DeleteOutlined-B0vOf_cF.js";import"./responsiveObserver-iG098kB7.js";const J=t=>{const[S,w]=l.useState([]),[r,p]=l.useState([]),[f,h]=l.useState([]),[u,x]=l.useState([]),[c,o]=l.useState([]),[U,b]=l.useState(""),[_,D]=l.useState(""),[C,M]=l.useState(""),[O,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",P="https://universitysolutions.in/univadmin/QP_Details/"+t.user.funivcode+"_QP_Setting_Remuneration_Format.docx";l.useEffect(()=>{const n={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(n)},[]),l.useEffect(()=>{w(t.modUpdData)},[t.modUpdData]);const j=async(n,a,i)=>{if(i==="anskey"){const d={...f};if(n.fileList.length>0){const s=n.fileList[0].name.split(".").pop();if(s!=="docx"&&s!=="doc"&&s!=="pdf"){F("info","Select word or pdf file only");return}d[a.key]=n.fileList,h(d),D("Yes")}else{const s={...f,[a.key]:[]};h(s),D("No")}}else if(i==="qp"){const d={...r};if(n.fileList.length>0){const s=n.fileList[0].name.split(".").pop();if(s!=="docx"&&s!=="doc"&&s!=="pdf"){F("info","Select word or pdf file only");return}d[a.key]=n.fileList,p(d),b("Yes")}else{const s={...d,[a.key]:[]};p(s),b("No")}}else if(i==="mod"){const d={...u};if(n.fileList.length>0){const s=n.fileList[0].name.split(".").pop();if(s!=="docx"&&s!=="doc"&&s!=="pdf"){F("info","Select word or pdf file only");return}d[a.key]=n.fileList,x(d),M("Yes")}else{const s={...d,[a.key]:[]};x(s),M("No")}}else if(i==="rem"){const d={...c};if(n.fileList.length>0){const s=n.fileList[0].name.split(".").pop();if(s!=="docx"&&s!=="doc"&&s!=="pdf"){F("info","Select word or pdf file only");return}d[a.key]=n.fileList,o(d),q("Yes")}else{const s={...d,[a.key]:[]};o(s),q("No")}}},v=async n=>{A.confirm({title:"Upload",content:"Are you sure ?",onOk(){I(n)}})},I=async n=>{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},i=new FormData;i.append("data",JSON.stringify(a)),i.append("ansstatus",_),i.append("qpstatus",U),i.append("modstatus",C),i.append("remstatus",O),u[n.key]&&u[n.key][0]&&i.append("modFromFile",u[n.key][0].originFileObj),r[n.key]&&r[n.key][0]&&i.append("qpfile",r[n.key][0].originFileObj),f[n.key]&&f[n.key][0]&&i.append("anskeyfile",f[n.key][0].originFileObj),c[n.key]&&c[n.key][0]&&i.append("remfile",c[n.key][0].originFileObj),await t.uploadModQpData(i,t.getModUpdData,a)},z=[{title:"Sl. No",dataIndex:"fslno",align:"center",width:"6%"},{title:"QP File",render:(n,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:i=>j(i,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:(n,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:i=>j(i,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:(n,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:i=>j(i,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:(n,a)=>e.jsxs("div",{children:[e.jsx("a",{href:P,target:"_blank",download:!0,children:"Download Rem. Form"}),e.jsx("br",{}),e.jsx(k,{onClick:()=>o([]),fileList:c[a.key]||[],onChange:i=>j(i,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:(n,a)=>e.jsxs(m,{size:"medium",style:{background:"green",color:"#fff"},onClick:()=>v(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}})]})},G=t=>({user:t.loginfo.userData,modUpdData:t.getModUpdData}),W=L(G,{getModUpdData:Y,uploadModQpData:$})(J),X=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:"Year / Mode",render:(c,o)=>e.jsx("span",{children:o.fyear+"/"+o.fexamtype}),width:"10%",align:"center"},{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,o)=>e.jsx("span",{style:{color:o.fmodqpdate==""?"#f00":"green"},children:o.fmodqpdate!=""?"Completed":"Pending"}),width:"10%",align:"center"},{title:"Syllabus",render:(c,o)=>e.jsx("a",{href:r+o.fqpsyllabus,target:"_blank",children:"View"}),width:"7%",align:"center"},{title:"Action",render:(c,o)=>e.jsxs(m,{size:"medium",onClick:()=>{f(!0),u(o)},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(B,{children:[p&&e.jsxs(m,{onClick:()=>f(!1),style:{color:"white",background:"green"},children:[e.jsx(K,{}),"Back"]}),e.jsx(N,{to:"/",children:e.jsxs(m,{type:"primary",danger:!0,children:[e.jsx(H,{})," Exit"]})})]}),children:p?e.jsx(W,{element:h,url:r}):e.jsx(Q,{dataSource:S,columns:x,scroll:{x:1300,y:500},pagination:!1})})},Z=t=>({user:t.loginfo.userData,getModDataOffline:t.getModQpOffile}),ce=L(Z,{getModQpDetailsOffline:T})(X);export{ce as default};
|