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.226.214.1
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/SubjectCreation-n8vHwpzu.js |
import{v as n,E as r}from"./index-OBlfExy4.js";const E=()=>async(a,o)=>{try{let t=localStorage.getItem("dbname");a({type:"SET_LOADER"});const e=await n.get("/app.php?a=getdeggrpsubject&db="+t);a({type:"UNSET_LOADER"}),e.data.error_code===0?a({type:"DEGGRP",payload:e.data.data}):(a({type:"CLEAR_DEGGRP",payload:[]}),r("info",e.data.data.msg))}catch(t){r("error",t.message)}},b=()=>async(a,o)=>{try{let t=localStorage.getItem("dbname");const e=await n.get("/app.php?a=getboardTosubject&db="+t);console.log(e,"anu"),e.data.error_code===0?a({type:"BOARD",payload:e.data.data}):(a({type:"CLEAR_BOARD",payload:[]}),r("info",e.data.data.msg))}catch(t){r("error",t.message)}},S=()=>async(a,o)=>{try{let t=localStorage.getItem("dbname");const e=await n.get("/app.php?a=getDegreesTosubject&db="+t);e.data.error_code===0?a({type:"DEGREE",payload:e.data.data}):(a({type:"CLEAR_DEGREE",payload:[]}),r("info",e.data.data.msg))}catch(t){r("error",t.message)}},D=a=>async(o,t)=>{try{const e=new FormData;e.append("data",JSON.stringify(a));let s=localStorage.getItem("dbname");o({type:"SET_LOADER"});const g=await n.post("app.php?a=saveSubjectCreation&db="+s,e);o({type:"UNSET_LOADER"}),g.data.error_code===0?r("info",g.data.data.msg):r("info",g.data.data.msg)}catch(e){r("error",e.message)}},l=()=>async(a,o)=>{try{let t=localStorage.getItem("dbname");a({type:"SET_LOADER"});const e=await n.get("/app.php?a=getSubjectDetails&db="+t);e.data.error_code===0?a({type:"VIEW_SUBJECT",payload:e.data.data}):(a({type:"CLEAR_SUBJECT",payload:[]}),r("info",e.data.data.msg)),a({type:"UNSET_LOADER"})}catch(t){r("error",t.message)}},_=(a,o,t,e,s,g)=>async(d,y)=>{try{let p=localStorage.getItem("dbname");d({type:"SET_LOADER"});const c=await n.get("/app.php?a=deleteSubjectData&db="+p+"&examno="+a+"&qpcode="+o+"&board="+t+"°grp="+e+"&subcode="+s+"°ree="+g);d({type:"UNSET_LOADER"}),c.data.error_code===0?(r("info",c.data.data.msg),d(l())):r("info",c.data.data.msg)}catch(p){r("error",p.message)}},R=(a,o,t)=>async(e,s)=>{s();let g=localStorage.getItem("dbname");e({type:"SET_LOADER"}),await n.get("/app.php?a=updateSubjectCreationData&db="+g+"&qpcode="+a+"&examno="+o+"°ree="+t).then(d=>{console.log(d,"anita"),d.data.error_code===0?e({type:"UPDATE_SUBJECT",payload:d.data.data}):r("info",d.data.data.msg),e({type:"UNSET_LOADER"})}).catch(d=>{e({type:"UNSET_LOADER"}),r("error",d)})};export{S as a,b,l as c,R as d,_ as e,E as g,D as p};
|