(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9751],{1861:(e,s,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/su/users",function(){return l(4856)}])},5175:(e,s,l)=>{"use strict";l.d(s,{A:()=>n});var t=l(4848),a=l(3430),r=l(6540);function n(e){let{userObject:s,userPage:l}=e,n=r.useContext(a.AppContext).user,c=Object.keys(s),[i,d]=r.useState(!1),[u,o]=r.useState(0),[h,m]=r.useState(!l);return(0,t.jsxs)("div",{className:"card col green w-full overflow-hidden"+(h?l?" h-[100px]":" h-[85px]":" "),children:[(0,t.jsxs)("div",{className:"items-center w-full",children:[(0,t.jsx)("img",{src:s.image_thumbnail,alt:"",className:"rounded-full object-cover"+(l?" w-16 h-16":" w-12 h-12")}),!l&&(0,t.jsxs)("h3",{className:"m-0 text-xl",children:[s.first_name," ",s.last_name," "]}),(0,t.jsxs)("div",{className:"ml-auto",children:[(0,t.jsx)("button",{className:"outlined gray small-text",onClick:e=>{h?m(!1):m(!0)},children:h?"More Details":"Collapse"}),!l&&(0,t.jsx)("a",{href:"/admin/".concat(null==n?void 0:n.id,"/users/").concat(s.id),className:"button outlined gray small-text",children:"View User"})]})]}),(0,t.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:c.map((e,l)=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)("div",{children:(0,t.jsxs)("span",{style:{wordBreak:"break-all"},children:[e,":"," ",(0,t.jsx)("b",{children:s[e]})]})}),l<c.length-1&&(0,t.jsx)("hr",{})]},l+1))}),(0,t.jsx)("button",{className:"outlined gray small-text w-full",onClick:e=>{m(!0)},children:"Collapse"})]})}},4856:(e,s,l)=>{"use strict";l.r(s),l.d(s,{__N_SSP:()=>i,default:()=>d});var t=l(4848),a=l(6540),r=l(5175);function n(e){let{data:s}=e;return(0,t.jsx)(a.Fragment,{children:(0,t.jsxs)("section",{className:"items-start justify-start p-6",children:[(0,t.jsxs)("div",{className:"flex flex-row items-center w-full gap-20 mb-6 justify-between",children:[(0,t.jsx)("h2",{className:"text-xl m-0",children:"Users"}),(0,t.jsx)("a",{href:"/su/users/new",className:"button",children:"Add User"})]}),(0,t.jsx)("div",{className:"flex-col items-stretch gap-10 w-full",children:s.users.map((e,s)=>(0,t.jsx)(r.A,{userObject:e},s+1))})]})})}var c=l(4725),i=!0;function d(e){let{user:s,data:l}=e,a=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,t.jsx)(c.A,{head:a,children:(0,t.jsx)(n,{data:l})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[1335,3348,4725,636,6593,8792],()=>s(1861)),_N_E=e.O()}]);