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
/
8dfc6
/
..
/
assets
/
Queue-7jL-R0pz.js
/
/
import{r as o,C as c,ak as W,j as e,X as $,T as s,B as r,M as F,J as Y,y as M}from"./index-C50MwByD.js";import{a as q,u as y}from"./SettingData-DaA8YzRn.js";import{i as E}from"./image-Bvdr-O-Y.js";import{t as P}from"./today-D_vLUvRX.js";import{G as v}from"./grid-BCC7IeIL.js";import{F as O,I as B}from"./input-BS5AKlHW.js";import{S as G}from"./select-CE7kM0jz.js";import{L as H}from"./list-D99hU98N.js";import{T as J,a as K,b as A,c as u,d as Q,e as j}from"./tr-DxO73Jya.js";import"./split-CzYrjwZo.js";const U=async()=>(await Y(M.token,"get_doctor")).data,ie=()=>{const{settingsData:d}=q(),f=d==null?void 0:d.find(t=>t.id_name==="logo"),[T,I]=o.useState(c().format("MMMM D YYYY, h:mm:ss a")),[h,x]=o.useState(!1),[p,k]=o.useState(c().format("YYYY-MM-DD")),[L,b]=o.useState(!1),[_,g]=W(),i=_.get("doct"),l=_.get("name");o.useEffect(()=>{const t=setInterval(()=>{I(c().format("MMMM D YYYY, h:mm:ss a"))},1e3);return()=>clearInterval(t)},[]);const{isLoading:w,data:m}=y({queryKey:["doctors"],queryFn:U});o.useEffect(()=>{if(m){const t=m[0];(!i||!l)&&g({doct:t.user_id,name:`${t.f_name} ${t.l_name}`})}},[i,l,m,g]);const N=async()=>{var n;b(!0);const t=await Y((n=M)==null?void 0:n.token,`get_appointment_check_in_doct_date/${i}/${p}`);return b(!1),t.data},{data:R,error:z,isLoading:C}=y({queryKey:["appointments-queue",i,p],queryFn:N,refetchInterval:3e4,enabled:!!i});if(C||w||L)return e.jsx($,{});if(z)return e.jsx(s,{color:"red.500",children:"Failed to load appointments"});const S=R||[],a=S[0]||null,D=S.slice(1);return e.jsxs(r,{p:4,bg:"blackAlpha.800",minH:"100vh",color:"white",children:[e.jsxs(v,{templateColumns:"1fr 3fr 1fr",gap:6,bg:"#fff",p:3,borderRadius:5,alignContent:"center",alignItems:"center",children:[e.jsx(r,{children:e.jsx(F,{w:20,src:`${E}/${f==null?void 0:f.value}`,fallbackSrc:"/vite.svg"})}),e.jsxs(O,{textAlign:"center",w:"100%",justifyContent:"center",gap:4,alignItems:"center",children:[e.jsxs(s,{fontSize:"2xl",fontWeight:"bold",color:"blue.600",cursor:"pointer",onClick:()=>{x(!h)},children:["Doctor ",l]}),h&&e.jsxs(e.Fragment,{children:[" ",e.jsx(G,{placeholder:l||"Select option",w:60,color:"#000",value:h,onChange:t=>{const n=JSON.parse(t.target.value);g({doct:n.user_id,name:`${n.f_name} ${n.l_name}`}),x(!1)},children:m.map(t=>e.jsxs("option",{color:"#000",value:JSON.stringify(t),children:["Dr. ",t.f_name," ",t.l_name]},t.id))}),e.jsx(B,{placeholder:"Select Date",w:60,color:"#000",value:p,type:"date",max:P(),onChange:t=>{const n=c(t.target.value).format("YYYY-MM-DD");k(n),x(!1)}})]})]})]}),e.jsxs(v,{templateColumns:"1fr 2fr",gap:6,mt:6,minH:"87vh",children:[e.jsxs(r,{bg:"blackAlpha.900",p:4,borderRadius:"md",minH:"70vh",px:2,pt:2,borderRight:"sm",color:"#000",children:[e.jsx(s,{fontSize:"2xl",fontWeight:"bold",mb:4,textAlign:"center",bg:"#fff",children:"Next Patients"}),e.jsx(H,{spacing:3,children:D.length>0?e.jsxs(J,{variant:"simple",children:[e.jsx(K,{children:e.jsxs(A,{children:[" ",e.jsx(u,{color:"#fff",children:"S No."}),e.jsx(u,{color:"#fff",children:"ID"}),e.jsx(u,{color:"#fff",children:"Patient Name"})]})}),e.jsx(Q,{children:D.map((t,n)=>e.jsxs(A,{color:"#fff",fontWeight:600,children:[" ",e.jsxs(j,{children:["#",n+2]}),e.jsxs(j,{children:["#",t.appointment_id]}),e.jsxs(j,{fontWeight:"bold",children:[" ",t.patient_f_name," ",t.patient_l_name]})]},t.id))})]}):e.jsx(s,{color:"#fff",children:"No upcoming patients"})})]}),e.jsxs(r,{children:[" ",e.jsx(r,{textAlign:"center",bg:"#fff",p:4,borderRadius:"md",mb:5,children:e.jsx(s,{fontSize:"3xl",fontWeight:700,py:3,color:"blue.600",children:T})}),e.jsxs(r,{bg:"blackAlpha.900",borderRadius:"md",pb:4,p:2,children:[e.jsx(s,{fontSize:"2xl",fontWeight:"bold",mb:4,px:2,py:2,bg:"#fff",borderRadius:"sm",color:"#000",textAlign:"center",children:"Now"}),a?e.jsxs(r,{bg:"gray.900",height:"full",p:4,m:4,color:"white",borderRadius:"sm",children:[e.jsxs(s,{fontSize:"3xl",fontWeight:700,textAlign:"center",children:["Appointment ID: #",a.appointment_id]}),e.jsxs(s,{fontWeight:"bold",fontSize:"2xl",textAlign:"center",children:["Name - ",a.patient_f_name," ",a.patient_l_name]}),e.jsxs(s,{textAlign:"center",fontSize:"xl",children:["Time:"," ",c(a.time,"hh:mm:ss").format("hh:mm A")]}),e.jsxs(s,{textAlign:"center",fontSize:"xl",children:["Date: ",a.date]})]}):e.jsx(s,{children:"No patient is currently being seen"})]})]})]})]})};export{ie as default};
/home/users/unlimited/www/admin.medimeet.codeskitter.site/8dfc6/../assets/Queue-7jL-R0pz.js