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.164.100
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/ModQpDetails-CTmcn97Y.js |
import{v as l,E as p}from"./index-C5nTC1sr.js";const y=()=>async(a,r)=>{try{let e=localStorage.getItem("dbname");const s=r();a({type:"SET_LOADER"});const t=await l.get("app.php?a=getModQPOnline&db="+e+"&teachcode="+s.loginfo.userData.fregno);if(a({type:"UNSET_LOADER"}),t.data.error_code===0){const o=t.data.data.map((d,n)=>({...d,key:n,fslno:n+1}));a({type:"MOD_QP_ONLINE",payload:o})}else a({type:"MOD_QP_ONLINE",payload:[]})}catch(e){p("error",e.message)}},m=()=>async(a,r)=>{try{let e=localStorage.getItem("dbname");const s=r();a({type:"SET_LOADER"});const t=await l.get("app.php?a=getModQpDetails&db="+e+"&teachcode="+s.loginfo.userData.fregno);if(a({type:"UNSET_LOADER"}),t.data.error_code===0){const o=t.data.data.map((d,n)=>({...d,key:n,fslno:n+1}));a({type:"MOD_QP_OFFLINE",payload:o})}else a({type:"MOD_QP_OFFLINE",payload:[]})}catch(e){p("error",e.message)}},D=a=>async(r,e)=>{try{let s=localStorage.getItem("dbname");const t=e();r({type:"SET_LOADER"});const o=await l.get("app.php?a=getModUpdData&db="+s+"&userid="+t.loginfo.userData.fregno+"&univcode="+t.loginfo.userData.funivcode+"&data="+JSON.stringify(a));if(r({type:"UNSET_LOADER"}),o.data.error_code===0){const d=o.data.data.map((n,c)=>({...n,key:c,fslno:c+1}));r({type:"MOD_QP_DATA",payload:d})}else{r({type:"MOD_QP_DATA",payload:[]}),p("info",o.data.data.msg);return}}catch(s){p("error",s.message)}},f=(a,r,e)=>async(s,t)=>{try{let o=localStorage.getItem("dbname");const d=t();s({type:"SET_LOADER"});const n=await l.post("app.php?a=uploadModQpData&db="+o,a);s({type:"UNSET_LOADER"}),console.log(n),n.data.error_code===0?(p("success",n.data.data.msg),r(e)):p("info",n.data.data.msg)}catch(o){p("error",o.message)}},_=(a,r)=>async(e,s)=>{try{const t=s();e({type:"SET_LOADER"});let o=localStorage.getItem("dbname");const d=await l.post("/app.php?a=saveModConfirm&db="+o+"&univcode="+t.loginfo.userData.funivcode,a);e({type:"UNSET_LOADER"}),typeof d.data!="object"?p("error","something went wrong try later"):d.data.error_code===0?(p("success",d.data.data.msg),r()):p("info",d.data.data.msg)}catch(t){p("error",t.message)}};export{D as a,m as b,y as g,_ as s,f as u};
|