dsql-admin/dsql-app/.local_dist/server/pages/admin/[user_id]/su.js

1 line
12 KiB
JavaScript
Raw Normal View History

2025-02-19 19:38:56 +00:00
"use strict";(()=>{var e={};e.id=7262,e.ids=[7262],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},38542:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>m,default:()=>p,getServerSideProps:()=>y,getStaticPaths:()=>h,getStaticProps:()=>u,reportWebVitals:()=>x,routeModule:()=>k,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>g,unstable_getStaticParams:()=>v,unstable_getStaticPaths:()=>_,unstable_getStaticProps:()=>A});var s=r(63865),l=r(9455),i=r(30671),n=r(5583),o=r(53881),d=r(21916),c=e([d]);d=(c.then?(await c)():c)[0];let p=(0,i.M)(d,"default"),u=(0,i.M)(d,"getStaticProps"),h=(0,i.M)(d,"getStaticPaths"),y=(0,i.M)(d,"getServerSideProps"),m=(0,i.M)(d,"config"),x=(0,i.M)(d,"reportWebVitals"),A=(0,i.M)(d,"unstable_getStaticProps"),_=(0,i.M)(d,"unstable_getStaticPaths"),v=(0,i.M)(d,"unstable_getStaticParams"),S=(0,i.M)(d,"unstable_getServerProps"),g=(0,i.M)(d,"unstable_getServerSideProps"),k=new s.PagesRouteModule({definition:{kind:l.A.PAGES,page:"/admin/[user_id]/su",pathname:"/admin/[user_id]/su",bundlePath:"",filename:""},components:{App:o.default,Document:n.default},userland:d});a()}catch(e){a(e)}})},50265:(e,t,r)=>{r.d(t,{A:()=>d});var a=r(8732),s=r(82015),l=r.n(s),i=r(46169),n=r(16757),o=r(1360);function d({data:e}){Object.keys(e.users[0]);let[t,r]=l().useState(null),[s,d]=l().useState(0),[c,p]=l().useState(!1);return console.log(typeof t),(0,a.jsx)(l().Fragment,{children:(0,a.jsxs)("div",{className:"items-stretch gap-10 w-full",children:[(0,a.jsxs)("section",{className:"paper w-full",children:[(0,a.jsx)("h2",{className:"text-xl m-0 mb-6",children:"Users"}),(0,a.jsx)("div",{className:"flex-col items-stretch gap-10",children:e.users.map((e,t)=>(0,a.jsx)(o.A,{userObject:e},t+1))})]}),(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsxs)("div",{className:"w-full justify-between",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,a.jsx)("div",{children:(0,a.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(p(!0),(0,i.A)("/api/admin/clearErrorLogs",{method:"POST"}).then(e=>{d(e=>e+1)}),setTimeout(()=>{p(!1)},2e3))},className:"outlined gray relative",children:[c&&(0,a.jsx)(n.A,{width:"20px"}),"Clear Error Log"]})})]}),t&&(0,a.jsx)("p",{dangerouslySetInnerHTML:{__html:t||"No Log"}}),"string"!=typeof t&&(0,a.jsx)(n.A,{position:"relative",width:"25px"})]})]})})}},1360:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(8732),s=r(53881),l=r(82015),i=r.n(l);function n({userObject:e,userPage:t}){let r=i().useContext(s.AppContext).user,l=Object.keys(e),[n,o]=i().useState(!1),[d,c]=i().useState(0),[p,u]=i().useState(!t);return(0,a.jsxs)("div",{className:"card col green w-full overflow-hidden"+(p?t?" h-[100px]":" h-[85px]":" "),children:[(0,a.jsxs)("div",{className:"items-center w-full",children:[(0,a.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(t?" w-16 h-16":" w-12 h-12")}),!t&&(0,a.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,a.jsxs)("div",{className:"ml-auto",children:[(0,a.jsx)("button",{className:"outlined gray small-text",onClick:e=>{p?u(!1):u(!0)},children:p?"More Details":"Collapse"}),!t&&(0,a.jsx)("a",{href:`/admin/${r?.id}/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,a.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:l.map((t,r)=>(0,a.jsxs)(i().Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsxs)("span",{style:{wordBreak:"break-all"},children:[t,":"," ",(0,a.jsx)("b",{children:e[t]})]})}),r<l.length-1&&(0,a.jsx)("hr",{})]},r+1))}),(0,a.jsx)("button",{className:"outlined gray small-text w-full",onClick:e=>{u(!0)},children:"Collapse"})]})}},23293:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},92441:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(82544).A)("Boo