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
/
.
/
admin.medimeet.codeskitter.site
/
assets
/
Add-BuM4Bj-a.js
/
/
import{Q,r as l,w as $,j as e,B as U,T as q,x as h,E as x,M as V,N as J,P as K,y as j,J as S}from"./index-C50MwByD.js";import{u as W,g as H}from"./index-Ntz7vSIm.js";import{h as X,u as Z,F as r,f as d}from"./index.esm-BgKkBPdO.js";import{u as b}from"./SettingData-DaA8YzRn.js";import{C as ee,M as re}from"./MultiTaginput-E1FVrP37.js";import{I as se,a as te}from"./IsdModal-BNRdNyRJ.js";import{t as ie}from"./today-D_vLUvRX.js";import{F as n,d as s,I as a}from"./input-BS5AKlHW.js";import{C,a as F}from"./card-body-BPIBi6l2.js";import{I as ae}from"./input-group-CydZNcsv.js";import{S as oe}from"./select-CE7kM0jz.js";import{D as ne}from"./use-clickable-BAx6nmpu.js";import{T as ce}from"./index-DHZdk_rm.js";import{V as le}from"./v-stack-CTgEkihf.js";import"./button-Dq0pEB9k.js";import"./popover-BIUulaFx.js";import"./Dashboard-BGHL639E.js";import"./HasPermission-BP0YFq1v.js";import"./image-Bvdr-O-Y.js";import"./tr-DxO73Jya.js";import"./visually-hidden.style-C5P7rhbc.js";import"./split-CzYrjwZo.js";function Le(){const f=Q(),[P,u]=l.useState(),{register:t,handleSubmit:R,reset:z}=X(),v=$(),c=Z(),[p,g]=l.useState(null),[y,I]=l.useState(),[w,L]=l.useState([]),[k,A]=l.useState("+91"),{isOpen:O,onOpen:E,onClose:M}=W(),D=l.useRef(),N=i=>{const m=i.target.files[0];g(m)},_=async i=>{if(i.password!=i.cnfPassword)return d(c,"error","password does not match");if(!y)return d(c,"error","select department");if(!w)return d(c,"error","select specialization");let m={image:p,department:y,specialization:w.join(", "),active:0,...i};try{u(!0);const o=await K(j.token,"add_doctor",m);u(!1),o.response===200?(d(c,"success","Doctor Added!"),v.invalidateQueries("doctors"),z(),f(`/doctor/update/${o.id}`)):(console.log(o),d(c,"error",`${o.message} - ${o.response}`))}catch(o){console.log(o),u(!1),d(c,"error",JSON.stringify(o))}},B=async()=>(await S(j.token,"get_department_active")).data,{data:T}=b({queryKey:["department-active"],queryFn:B}),Y=async()=>(await S(j.token,"get_specialization")).data,{data:G}=b({queryKey:["specialization"],queryFn:Y});return e.jsxs(U,{children:[e.jsxs(n,{justify:"space-between",alignItems:"center",children:[e.jsx(q,{fontSize:20,fontWeight:500,children:"Add Doctor"}),e.jsx(h,{w:120,size:"sm",variant:x("blackButton","gray"),onClick:()=>{f(-1)},children:"Back"})]}),e.jsxs(n,{gap:10,children:[e.jsx(C,{mt:5,bg:x("white","gray.700"),w:"70%",children:e.jsxs(F,{p:3,as:"form",onSubmit:R(_),children:[e.jsxs(n,{gap:10,children:[e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Email"}),e.jsx(a,{w:250,type:"email",placeholder:"Email",...t("email",{required:!0})})]}),e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Password"}),e.jsx(a,{type:"password",placeholder:"Password",...t("password",{required:!0})})]}),e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Password"}),e.jsx(a,{type:"password",placeholder:"Password",...t("cnfPassword",{required:!0})})]})]}),e.jsxs(n,{gap:10,mt:5,children:[e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"First Name"}),e.jsx(a,{placeholder:"First Name",...t("f_name",{required:!0})})]}),e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Last Name"}),e.jsx(a,{placeholder:"Last Name",...t("l_name",{required:!0})})]})]}),e.jsxs(n,{gap:10,mt:5,children:[e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Phone"}),e.jsxs(ae,{children:[e.jsxs(se,{cursor:"pointer",onClick:i=>{i.stopPropagation(),E()},children:[k," ",e.jsx(H,{style:{marginLeft:"10px"}})]}),e.jsx(a,{type:"tel",placeholder:"phone Number",...t("phone",{required:!0,pattern:/^[0-9]+$/})})]})]}),e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Date Of Birth (MM/DD/YYYY)"}),e.jsx(a,{max:ie(),placeholder:"Select Date",size:"md",type:"date",...t("dob",{required:!0})})]})]}),e.jsxs(n,{gap:10,mt:5,children:[e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Gender"}),e.jsxs(oe,{placeholder:"Select Gender",...t("gender",{required:!0}),children:[e.jsx("option",{value:"Female",children:"Female"})," ",e.jsx("option",{value:"Male",children:"Male"})]})]}),e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Years OF Experience"}),e.jsx(a,{type:"number",placeholder:"Years OF Experience",...t("ex_year",{required:!0})})]})]}),e.jsxs(n,{gap:10,mt:5,children:[e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Department"}),e.jsx(ee,{name:"Department",data:T,setState:I})]}),e.jsxs(s,{isRequired:!0,children:[e.jsx(r,{children:"Specialization"}),e.jsx(re,{data:G,setState:L,name:"Specialization"})]})]}),e.jsx(h,{w:"100%",mt:10,type:"submit",colorScheme:"green",size:"sm",isLoading:P,children:"Add"})]})}),e.jsx(C,{mt:5,bg:x("white","gray.700"),w:"25%",h:"fit-content",pb:10,children:e.jsxs(F,{p:2,children:[e.jsx(q,{textAlign:"center",children:"Profile Picture"}),e.jsx(ne,{}),e.jsxs(n,{p:2,justify:"center",mt:5,position:"relative",children:[e.jsx(V,{borderRadius:"50%",h:200,objectFit:"cover",w:200,src:p?URL.createObjectURL(p):"/admin/profilePicturePlaceholder.png"}),p&&e.jsx(ce,{label:"Clear",fontSize:"md",children:e.jsx(J,{colorScheme:"red",variant:"solid",position:"absolute",right:2,onClick:()=>{g(null)}})})]}),e.jsxs(le,{spacing:4,align:"stretch",mt:10,children:[e.jsx(a,{type:"file",display:"none",ref:D,onChange:N,accept:".jpeg, .svg, .png , .jpg"}),e.jsx(h,{size:"sm",onClick:()=>{D.current.click()},colorScheme:"blue",children:"Upload Profile Picture"})]})]})})]}),e.jsx(te,{isOpen:O,onClose:M,setisd_code:A})]})}export{Le as default};
/home/users/unlimited/www/./admin.medimeet.codeskitter.site/assets/Add-BuM4Bj-a.js