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.142.198.108
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/SubjectCreation-CTNFM2ha.js |
import{v as s,E as r}from"./index-D_3WEyIX.js";const E=()=>async(a,o)=>{try{let t=localStorage.getItem("dbname");a({type:"SET_LOADER"});const e=await s.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 s.get("/app.php?a=getboardTosubject&db="+t);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 s.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 n=localStorage.getItem("dbname");o({type:"SET_LOADER"});const g=await s.post("app.php?a=saveSubjectCreation&db="+n,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 s.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,n,g)=>async(d,y)=>{try{let p=localStorage.getItem("dbname");d({type:"SET_LOADER"});const c=await s.get("/app.php?a=deleteSubjectData&db="+p+"&examno="+a+"&qpcode="+o+"&board="+t+"°grp="+e+"&subcode="+n+"°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,n)=>{n();let g=localStorage.getItem("dbname");e({type:"SET_LOADER"}),await s.get("/app.php?a=updateSubjectCreationData&db="+g+"&qpcode="+a+"&examno="+o+"°ree="+t).then(d=>{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};
|