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