uawdijnntqw1x1x1
IP : 216.73.216.93
Hostname : panel.codeskitter.com
Kernel : Linux panel.codeskitter.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
Disable Function : apache_child_terminate, apache_note, apache_setenv, define_syslog_variables, dl, link, opcache_get_status, openlog, pcntl_exec, pcntl_fork, pcntl_setpriority, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid
OS : Linux
PATH:
/
home
/
users
/
unlimited
/
www
/
uploads
/
..
/
admin.medimeet.codeskitter.site
/
assets
/
AddUser-mKYdxXPq.js
/
/
import{Q as B,r as d,w as E,j as e,B as O,T as y,x as u,E as x,M as U,N as M,P as T,y as z}from"./index-C50MwByD.js";import{u as _,g as q}from"./index-Ntz7vSIm.js";import{h as Y,u as G,F as r,f as p}from"./index.esm-BgKkBPdO.js";import{I as Q,a as V}from"./IsdModal-BNRdNyRJ.js";import{t as H}from"./today-D_vLUvRX.js";import{u as J}from"./HasPermission-BP0YFq1v.js";import{N as W}from"./Dashboard-BGHL639E.js";import{F as a,d as t,I as i}from"./input-BS5AKlHW.js";import{C as P,a as S}from"./card-body-BPIBi6l2.js";import{I as $}from"./input-group-CydZNcsv.js";import{S as K}from"./select-CE7kM0jz.js";import{D as X}from"./use-clickable-BAx6nmpu.js";import{T as Z}from"./index-DHZdk_rm.js";import{V as ee}from"./v-stack-CTgEkihf.js";import"./SettingData-DaA8YzRn.js";import"./image-Bvdr-O-Y.js";import"./tr-DxO73Jya.js";import"./visually-hidden.style-C5P7rhbc.js";import"./split-CzYrjwZo.js";function ye(){const j=B(),[C,m]=d.useState(),{register:s,handleSubmit:b,reset:D}=Y(),F=E(),n=G(),[l,f]=d.useState(null),[g,A]=d.useState("+91"),{isOpen:v,onOpen:N,onClose:L}=_(),w=d.useRef(),k=o=>{const h=o.target.files[0];f(h)},I=async o=>{if(o.password!=o.cnfPassword)return p(n,"error","password does not match");let h={image:l,isd_code:g,...o};try{m(!0);const c=await T(z.token,"add_user",h);m(!1),c.response===200?(p(n,"success","User Added!"),F.invalidateQueries("users"),D(),j("/users")):p(n,"error",c.message)}catch(c){m(!1),p(n,"error",JSON.stringify(c))}},{hasPermission:R}=J();return R("USER_UPDATE")?e.jsxs(O,{children:[e.jsxs(a,{justify:"space-between",alignItems:"center",children:[e.jsx(y,{fontSize:20,fontWeight:500,children:"Add User"}),e.jsx(u,{w:120,size:"sm",variant:x("blackButton","gray"),onClick:()=>{j(-1)},children:"Back"})]}),e.jsxs(a,{gap:10,children:[e.jsx(P,{mt:5,bg:x("white","gray.700"),w:"70%",children:e.jsxs(S,{p:3,as:"form",onSubmit:b(I),children:[e.jsxs(a,{gap:10,children:[e.jsxs(t,{children:[e.jsx(r,{children:"Email"}),e.jsx(i,{w:250,type:"email",placeholder:"Email",...s("email")})]}),e.jsxs(t,{children:[e.jsx(r,{children:"Password"}),e.jsx(i,{type:"password",placeholder:"Password",...s("password")})]}),e.jsxs(t,{children:[e.jsx(r,{children:"Cnf Password"}),e.jsx(i,{type:"password",placeholder:"Password",...s("cnfPassword")})]})]}),e.jsxs(a,{gap:10,mt:5,children:[e.jsxs(t,{isRequired:!0,children:[e.jsx(r,{children:"First Name"}),e.jsx(i,{placeholder:"First Name",...s("f_name",{required:!0})})]}),e.jsxs(t,{isRequired:!0,children:[e.jsx(r,{children:"Last Name"}),e.jsx(i,{placeholder:"Last Name",...s("l_name",{required:!0})})]})]}),e.jsxs(a,{gap:10,mt:5,children:[e.jsxs(t,{children:[e.jsx(r,{children:"Phone"}),e.jsxs($,{children:[e.jsxs(Q,{cursor:"pointer",onClick:o=>{o.stopPropagation(),N()},children:[g," ",e.jsx(q,{style:{marginLeft:"10px"}})]}),e.jsx(i,{type:"tel",placeholder:"phone Number",...s("phone",{pattern:/^[0-9]+$/})})]})]}),e.jsxs(t,{children:[e.jsx(r,{children:"Date Of Birth (MM/DD/YYYY)"}),e.jsx(i,{max:H(),placeholder:"Select Date",size:"md",type:"date",...s("dob")})]}),e.jsxs(t,{children:[e.jsx(r,{children:"Gender"}),e.jsxs(K,{placeholder:"Select Gender",...s("gender"),children:[e.jsx("option",{value:"Female",children:"Female"})," ",e.jsx("option",{value:"Male",children:"Male"})]})]})]}),e.jsx(u,{w:"100%",mt:10,type:"submit",colorScheme:"green",size:"sm",isLoading:C,children:"Add"})]})}),e.jsx(P,{mt:5,bg:x("white","gray.700"),w:"25%",h:"fit-content",pb:10,children:e.jsxs(S,{p:2,children:[e.jsx(y,{textAlign:"center",children:"Profile Picture"}),e.jsx(X,{}),e.jsxs(a,{p:2,justify:"center",mt:5,position:"relative",children:[e.jsx(U,{borderRadius:"50%",h:200,objectFit:"cover",w:200,src:l?URL.createObjectURL(l):"/admin/profilePicturePlaceholder.png"}),l&&e.jsx(Z,{label:"Clear",fontSize:"md",children:e.jsx(M,{colorScheme:"red",variant:"solid",position:"absolute",right:2,onClick:()=>{f(null)}})})]}),e.jsxs(ee,{spacing:4,align:"stretch",mt:10,children:[e.jsx(i,{type:"file",display:"none",ref:w,onChange:k,accept:".jpeg, .svg, .png , .jpg"}),e.jsx(u,{size:"sm",onClick:()=>{w.current.click()},colorScheme:"blue",children:"Upload Profile Picture"})]})]})})]}),e.jsx(V,{isOpen:v,onClose:L,setisd_code:A})]}):e.jsx(W,{})}export{ye as default};
/home/users/unlimited/www/uploads/../admin.medimeet.codeskitter.site/assets/AddUser-mKYdxXPq.js