PageSourceSearch

https://lobbyradio-site.vercel.app/_next/static/chunks/pages/admin…/[id]/members-039838af73cd8718.js

js lobbyradio-site.vercel.app collected 2026-10-03 07:15:32 UTC 11,669 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1716],{50262:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/organizations/[id]/members",function(){return s(37956)}])},53119:function(e,n,s){"use strict";var i=s(85893),t=s(11163),r=s(75362),a=s(12009),l=s(19016),o=s(3340);n.Z=function(e){let{userId:n,displayName:s,children:c}=e;const{trigger:d,isMutating:u}=function(e){const n=`/api/admin/users/${e}/disable`,s=(0,o.G)(),i=(0,t.useRouter)();return(0,r.Z)(n,(e=>s({path:e,method:"POST"})),{onSuccess:()=>{i.reload()}})}(n);return(0,i.jsx)(l.Z,{heading:"Disable User",Trigger:c,children:(0,i.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,i.jsxs)("div",{className:"flex flex-col space-y-2 text-sm",children:[(0,i.jsxs)("p",{children:["You are about to disable ",(0,i.jsx)("b",{children:s}),"."]}),(0,i.jsx)("p",{children:"You can reactivate them later, but they will not be able to log in or use their account until you do."}),(0,i.jsx)("p",{children:"Are you sure you want to do this?"})]}),(0,i.jsx)("div",{className:"flex space-x-2.5 justify-end",children:(0,i.jsx)(a.Z,{type:"button",onClick:()=>d(),loading:u,variant:"default",children:"Yes, disable user"})})]})})}},93433:function(e,n,s){"use strict";var i=s(85893),t=s(75362),r=s(24367),a=s(1762),l=s(12009),o=s(19016),c=s(3340),d=s(79843);n.Z=function(e){let{userId:n,displayName:s,children:u}=e;const{isMutating:m,trigger:h}=function(e){const n=`/api/admin/users/${e}/impersonate`,s=(0,c.G)(),i=(0,a.aC)(),{trigger:l}=(0,d.K)();return(0,t.Z)(n,(async e=>{const{customToken:n}=await s({path:e,method:"POST"}),t=await(0,r.signInWithCustomToken)(i,n),a=await t.user.getIdToken();return l({idToken:a})}),{onSuccess:async()=>{window.location.assign("/dashboard")}})}(n);return(0,i.jsx)(o.Z,{heading:"Impersonate User",Trigger:u,children:(0,i.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,i.jsxs)("div",{className:"flex flex-col space-y-2 text-sm",children:[(0,i.jsxs)("p",{children:["You are about to impersonate the account belonging to"," ",(0,i.jsx)("b",{children:s})," with ID ",(0,i.jsx)("b",{children:n}),"."]}),(0,i.jsx)("p",{children:"You will be able to log in as them, see and do everything they can. To return to your own account, simply log out."}),(0,i.jsx)("p",{children:"Like Uncle Ben said, with great power comes great responsibility. Use this power wisely."})]}),(0,i.jsx)("div",{className:"flex space-x-2.5 justify-end",children:(0,i.jsx)(l.Z,{onClick:()=>h(),loading:m,variant:"default",children:"Yes, let's do it"})})]})})}},41469:function(e,n,s){"use strict";var i=s(85893),t=s(75362),r=s(11163),a=s(12009),l=s(19016),o=s(3340);n.Z=function(e){let{userId:n,displayName:s,children:c}=e;const{trigger:d,isMutating:u}=function(e){const n=`/api/admin/users/${e}/reactivate`,s=(0,o.G)(),i=(0,r.useRouter)();return(0,t.Z)(n,(e=>s({path:e,method:"POST"})),{onSuccess:()=>{i.reload()}})}(n);return(0,i.jsx)(l.Z,{heading:"Reactivate User",Trigger:c,children:(0,i.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,i.jsxs)("div",{className:"flex flex-col space-y-2 text-sm",children:[(0,i.jsxs)("p",{children:["You are about to reactivate the account belonging to"," ",(0,i.jsx)("b",{children:s}),"."]}),(0,i.jsx)("p",{children:"Are you sure you want to do this?"})]}),(0,i.jsx)("div",{className:"flex space-x-2.5 justify-end",children:(0,i.jsx)(a.Z,{type:"button",onClick:()=>d(),loading:u,children:"Yes, reactivate user"})})]})})}},71369:function(e,n,s){"use strict";var i=s(85893),t=s(61798),r=s(43006),a=s(46750),l=s(82200),o=s(37987);const c=(0,r.j)("font-medium",{variants:{role:{[a.n.Owner]:"bg-orange-100 dark:bg-orange-500/10 text-orange-700 dark:text-orange-500",[a.n.Admin]:"bg-blue-50 dark:bg-blue-500/10 text-blue-500",[a.n.Member]:"bg-sky-50 dark:bg-sky-500/10 text-sky-500"}}});n.Z=e=>{let{role:n}=e;const s=o.Z.find((e=>e.value===n)),r=c({role:n});return(0,i.jsx)(l.Z,{color:"custom",size:"small",className:r,children:(0,i.jsx)("span",{className:"font-semibold","data-cy":"member-role-badge",children:(0,i.jsx)(t.cC,{i18nKey:s?.label})})})}},79843:function(e,n,s){"use strict";s.d(n,{K:function(){return r}});var i=s(3340),t=s(75362);function r(){const e=(0,i.G)();return(0,t.Z)("/api/session/sign-in",((n,s)=>{let{arg:i}=s;return e({path:n,body:i})}))}},48656:function(e,n,s){"use strict";var i=s(85893),t=s(67294),r=s(74094),a=s(27060),l=s(90512),o=s(7613),c=s(91994),d=s(58923),u=s(80649),m=s(86150),h=s(57629),x=s(12395);function g(e){let{table:n}=e;return(0,i.jsxs)("div",{className:"flex items-center gap-2 w-full",children:[(0,i.jsx)(o.Z,{onClick:()=>n.setPageIndex(0),disabled:!n.getCanPreviousPage(),children:(0,i.jsx)(c.Z,{className:"h-4"})}),(0,i.jsx)(o.Z,{onClick:()=>n.previousPage(),disabled:!n.getCanPreviousPage(),children:(0,i.jsx)(d.Z,{className:"h-4"})}),(0,i.jsx)(o.Z,{onClick:()=>n.nextPage(),disabled:!n.getCanNextPage(),children:(0,i.jsx)(u.Z,{className:"h-4"})}),(0,i.jsx)(o.Z,{onClick:()=>n.setPageIndex(n.getPageCount()-1),disabled:!n.getCanNextPage(),children:(0,i.jsx)(m.Z,{className:"h-4"})}),(0,i.jsxs)("span",{className:"flex items-center gap-1 text-sm",children:[(0,i.jsx)("div",{children:"Page"}),(0,i.jsxs)("div",{children:[n.getState().pagination.pageIndex+1," of ",n.getPageCount()]})]})]})}n.Z=function(e){let{data:n,columns:s,renderSubComponent:o,pageIndex:c,pageSnapshot:d,pageSize:u,pageCount:m,onPaginationChange:p,tableProps:j}=e;const[f,b]=(0,t.useState)({pageIndex:c??0,pageSize:u??15}),[v,w]=(0,t.useState)(d),[y,N]=(0,t.useState)([]),[Z,C]=(0,t.useState)([]),[S,k]=(0,t.useState)({}),[P,I]=(0,t.useState)({}),M=(0,r.b7)({data:n,columns:s,getCoreRowModel:(0,a.sC)(),manualPagination:!0,onSortingChange:N,onColumnFiltersChange:C,onColumnVisibilityChange:k,onRowSelectionChange:I,pageCount:m,state:{pagination:f,sorting:y,columnFilters:Z,columnVisibility:S,rowSelection:P},onPaginationChange:b});return(0,t.useEffect)((()=>{d!==v&&w(d)}),[d,v]),(0,t.useEffect)((()=>{f.pageIndex!==c&&p&&p(f)}),[p,c,f]),(0,i.jsx)("div",{className:"border border-gray-50 dark:border-dark-800 rounded-md p-1",children:(0,i.jsxs)(h.iA,{...j,children:[(0,i.jsx)(h.xD,{children:M.getHeaderGroups().map((e=>(0,i.jsx)(h.SC,{children:e.headers.map((e=>(0,i.jsx)(h.ss,{colSpan:e.colSpan,style:{width:e.column.getSize()},children:e.isPlaceholder?null:(0,r.ie)(e.column.columnDef.header,e.getContext())},e.id)))},e.id)))}),(0,i.jsx)(h.RM,{children:M.getRowModel().rows.map((e=>(0,i.jsxs)(t.Fragment,{children:[(0,i.jsx)(h.SC,{className:(0,l.Z)({"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted":e.getIsExpanded()}),children:e.getVisibleCells().map((e=>(0,i.jsx)(h.pj,{style:{width:e.column.getSize()},children:(0,r.ie)(e.column.columnDef.cell,e.getContext())},e.id)))}),o?(0,i.jsx)(h.SC,{children:(0,i.jsx)(h.pj,{colSpan:s.length,children:o({row:e})})},e.id+"-expanded"):null]},e.id)))}),(0,i.jsx)(x.Z,{condition:void 0!==m,children:(0,i.jsx)(h.yt,{children:(0,i.jsx)(h.SC,{children:(0,i.jsx)(h.pj,{colSpan:5,children:(0,i.jsx)(g,{table:M})})})})})]})})}},37987:function(e,n,s){"use strict";var i=s(46750);const t=[{label:"common:roles.owner.label",description:"common:roles.owner.description",value:i.n.Owner},{label:"common:roles.admin.label",description:"common:roles.admin.description",value:i.n.Admin},{label:"common:roles.member.label",description:"common:roles.member.description",value:i.n.Member}];n.Z=t},46750:function(e,n,s){"use strict";var i;s.d(n,{n:function(){return i}}),function(e){e[e.Member=0]="Member",e[e.Admin=1]="Admin",e[e.Owner=2]="Owner"}(i||(i={}))},37956:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return C},default:function(){return S}});var i=s(85893),t=s(41664),r=s.n(t),a=s(9008),l=s.n(a),o=s(80649),c=s(63760),d=s(48656),u=s(64066),m=s(7613),h=s(82200),x=s(12395),g=s(71369),p=s(93433),j=s(53119),f=s(41469);const b=[{header:"User ID",id:"user-id",cell:e=>{let{row:n}=e;const s=n.original.id;return(0,i.jsx)(r(),{className:"hover:underline",href:`/admin/users/${s}`,children:s})}},{header:"Email",id:"email",accessorKey:"email"},{header:"Email Verified",id:"email-verified",accessorKey:"emailVerified"},{header:"Phone Number",id:"phone-number",accessorKey:"phoneNumber"},{header:"Name",id:"name",accessorKey:"displayName"},{header:"Role",cell:e=>{let{row:n}=e;return(0,i.jsx)("div",{className:"inline-flex",children:(0,i.jsx)(g.Z,{role:n.original.role})})}},{header:"Status",id:"status",cell:e=>{let{row:n}=e;const{disabled:s}=n.original,t=s?"error":"success",r=s?"Disabled":"Active";return(0,i.jsx)("div",{className:"inline-flex",children:(0,i.jsx)(h.Z,{size:"small",color:t,children:r})})}},{header:"Actions",cell:e=>{let{row:n}=e;const s=n.original,t=s.id,a=s.disabled,l=s.displayName||s.email||s.phoneNumber||s.id;return(0,i.jsx)("div",{className:"flex",children:(0,i.jsxs)(u.h_,{children:[(0,i.jsx)(u.$F,{asChild:!0,children:(0,i.jsxs)(m.Z,{children:[(0,i.jsx)("span",{className:"sr-only",children:"Open menu"}),(0,i.jsx)(c.Z,{className:"h-4 w-4"})]})}),(0,i.jsxs)(u.AW,{align:"end",children:[(0,i.jsx)(u.Xi,{asChild:!0,children:(0,i.jsx)(r(),{href:`/admin/users/${t}`,children:"View User"})}),(0,i.jsxs)(x.Z,{condition:!a,children:[(0,i.jsx)(u.Xi,{onSelect:e=>e.preventDefault(),children:(0,i.jsx)(p.Z,{userId:t,displayName:l,children:"Impersonate"})}),(0,i.jsx)(u.Xi,{onSelect:e=>e.preventDefault(),children:(0,i.jsx)(j.Z,{userId:t,displayName:l,children:(0,i.jsx)("span",{className:"text-red-500",children:"Disable"})})})]}),(0,i.jsx)(x.Z,{condition:a,children:(0,i.jsx)(u.Xi,{onSelect:e=>e.preventDefault(),children:(0,i.jsx)(f.Z,{userId:t,displayName:l,children:"Reactivate"})})})]})]})})}}];var v=function(e){let{members:n}=e;return(0,i.jsx)(d.Z,{columns:b,data:n,tableProps:{"data-cy":"admin-organization-members-table"}})},w=s(71116),y=s(50283),N=s(55023),Z=s(47124);var C=!0,S=function(e){let{members:n}=e;return(0,i.jsxs)(y.Z,{children:[(0,i.jsx)(l(),{children:(0,i.jsx)("title",{children:`Manage Members | ${N.default.site.siteName}`})}),(0,i.jsx)(w.Z,{children:"Manage Members"}),(0,i.jsxs)(Z.xV,{className:"space-y-4",children:[(0,i.jsx)(k,{}),(0,i.jsx)(v,{members:n})]})]})};function k(){return(0,i.jsxs)("div",{className:"flex space-x-2 items-center p-2 text-xs",children:[(0,i.jsx)("div",{className:"flex space-x-1.5 items-center",children:(0,i.jsx)(r(),{href:"/admin",children:"Admin"})}),(0,i.jsx)(o.Z,{className:"w-3"}),(0,i.jsx)(r(),{href:"/admin/organizations",children:"Organizations"}),(0,i.jsx)(o.Z,{className:"w-3"}),(0,i.jsx)("span",{children:"Members"})]})}},19308:function(e,n,s){"use strict";var i=s(67294);function t(e,n){let{title:s,titleId:t,...r}=e;return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const r=i.forwardRef(t);n.Z=r},69005:function(e,n,s){"use strict";var i=s(67294);function t(e,n){let{title:s,titleId:t,...r}=e;return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 
118 6M6 6l12 12"}))}const r=i.forwardRef(t);n.Z=r}},function(e){e.O(0,[3610,1664,2794,5675,5076,2196,4712,9332,5780,761,5310,2888,9774,179],(function(){return n=50262,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.