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.119.255.170
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/TemplateCode-CCDbhDhJ.js |
import{v as c,E as n}from"./index-CBbt9NTc.js";const g=()=>async(t,o)=>{try{let s=localStorage.getItem("dbname");const a=o();t({type:"SET_LOADER"});const r=await c.get("app.php?a=getQpTemplateDet&db="+s+"&univcode="+a.loginfo.userData.funivcode);if(typeof r.data!="object")n("Error","Something went wrong, Please try again later");else if(r.data.error_code===0){let e=r.data.data.map((d,l)=>({...d,key:l,fslno:l+1}));t({type:"TEMP_DETAILS",payload:e})}else t({type:"CLEAR_TEMP_DETAILS",payload:[]});t({type:"UNSET_LOADER"})}catch(s){console.log(s.message)}},m=t=>async(o,s)=>{try{let a=localStorage.getItem("dbname");const r=s();o({type:"SET_LOADER"});const e=await c.post("app.php?a=save_tempcode&db="+a+"&univcode="+r.loginfo.userData.funivcode,t);typeof e.data!="object"?n("Error","Something went wrong, Please try again later"):e.data.error_code===0?n("success",e.data.data.msg):n("success",e.data.data.msg),o({type:"UNSET_LOADER"})}catch(a){console.log(a.message)}},y=t=>async(o,s)=>{try{let a=localStorage.getItem("dbname");const r=s();o({type:"SET_LOADER"});const e=await c.post("app.php?a=saveTempPartDet&db="+a+"&univcode="+r.loginfo.userData.funivcode,t);typeof e.data!="object"?n("Error","Something went wrong, Please try again later"):e.data.error_code===0?n("success",e.data.data.msg):n("success",e.data.data.msg),o({type:"UNSET_LOADER"})}catch(a){console.log(a.message)}};export{m as a,g,y as s};
|