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.146.37.242
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/TeacherEntry-KQMKHZ4g.js |
import{v as n,E as s}from"./index-CXvb2HGZ.js";const y=c=>async(a,r)=>{try{const e=r();let o=localStorage.getItem("dbname");a({type:"SET_LOADER"});const t=await n.post("app.php?a=saveTeacherDetails&db="+o+"&univcode="+e.loginfo.userData.funivcode+"&usertype="+e.loginfo.userData.fusertype+"&collcode="+e.loginfo.userData.fcollcode,c);if(a({type:"UNSET_LOADER"}),t.data.error_code===0)s("success",t.data.data.msg);else{s("info",t.data.data.msg);return}}catch(e){s("error",e.message)}},u=c=>async(a,r)=>{try{const e=r();let o=localStorage.getItem("dbname");a({type:"SET_LOADER"});const t=await n.get("app.php?a=getCollegeDetails&db="+o+"&univcode="+e.loginfo.userData.funivcode+"&usertype="+e.loginfo.userData.fusertype+"&collcode="+e.loginfo.userData.fcollcode);if(a({type:"UNSET_LOADER"}),t.data.error_code===0){const l=t.data.data.map((g,d)=>({...g,key:d}));a({type:"COLLEGE_DETAILS",payload:l})}else{a({type:"COLLEGE_DETAILS",payload:[]}),s("info",t.data.data.msg);return}}catch(e){s("error",e.message)}},f=c=>async(a,r)=>{try{const e=r();let o=localStorage.getItem("dbname");a({type:"SET_LOADER"});const t=await n.get("app.php?a=getTeacherDetails&db="+o+"&univcode="+e.loginfo.userData.funivcode+"&usertype="+e.loginfo.userData.fusertype+"&collcode="+e.loginfo.userData.fcollcode);if(t.data.error_code===0){const l=t.data.data.map((g,d)=>({...g,key:d,fslno:d+1}));a({type:"TEACHER_DETAILS",payload:l})}else a({type:"TEACHER_DETAILS",payload:[]});a({type:"UNSET_LOADER"})}catch(e){s("error",e.message)}},D=c=>async(a,r)=>{try{const e=r();let o=localStorage.getItem("dbname");a({type:"SET_LOADER"});const t=await n.get("app.php?a=getTeachdet&db="+o+"&univcode="+e.loginfo.userData.funivcode+"&usertype="+e.loginfo.userData.fusertype+"&collcode="+e.loginfo.userData.fcollcode+"&teachcode="+c);t.data.error_code===0?a({type:"TEACH_DET",payload:t.data.data}):a({type:"TEACH_DET",payload:{}}),a({type:"UNSET_LOADER"})}catch(e){s("error",e.message)}},E=(c,a)=>async(r,e)=>{try{const o=e();let t=localStorage.getItem("dbname");r({type:"SET_LOADER"});const l=await n.get("app.php?a=checkTeachcode&db="+t+"&univcode="+o.loginfo.userData.funivcode+"&usertype="+o.loginfo.userData.fusertype+"&collcode="+o.loginfo.userData.fcollcode+"&teachcode="+c+"&field="+a);l.data.error_code===-1&&s("info",l.data.data.msg),r({type:"UNSET_LOADER"})}catch(o){s("error",o.message)}};export{D as a,f as b,E as c,u as g,y as s};
|