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