PageSourceSearch

https://treffenly.com/assets/events._eventId.settings.participants-ZJBPPBlM.js

js treffenly.com collected 2026-10-03 21:21:46 UTC 7,820 bytes, 21 lines download raw bytes

1import{j as e,r as v}from"./jsx-runtime-Dt5Dsy05.js";import{L as z}from"./spinner-BWsIDBeP.js";import{h as C,n as L,J as h}from"./useSession-B4Usa7T3.js";import{P as B,g as G,e as q}from"./react-icons.esm-C1W-MJoL.js";import{T as F,d as j,e as _,c as g}from"./tooltip-CKQ3YrKi.js";import{A as $,a as H,b as J}from"./avatar-DuxxibVT.js";import{D as V,a as O,b as W,d as Z,c as K}from"./dropdown-menu-BT_OATWt.js";import{T as Q,a as U,b as w,c as p,d as X,e as x}from"./table-DZ67yY3p.js";import{u as P}from"./useTranslation-DtthT6AV.js";import{I as Y}from"./image-CLzDlO2a.js";import{c as u}from"./createLucideIcon-MrRUhyB5.js";import{C as ee}from"./crown-CS1luhNh.js";import{B as T}from"./ban-DQyxS2L9.js";import{C as ae}from"./client-only-sd3ju73u.js";import{A as se,a as te,b as ne}from"./alert-BdDNZ5TH.js";import{c as r}from"./ui-BM_CldAA.js";import{b as ie}from"./button-XDLwOlfA.js";import{L as re,c as oe,u as ce}from"./components-CUrqUmw9.js";import"./index-B2aRE46b.js";import"./is-browser-DcltqI0c.js";import"./index-DY26Z4uG.js";import"./index-BNyWAJ1o.js";import"./index-CvJcFPCO.js";import"./index-BmitJwM_.js";import"./index-B3Yq2WdV.js";import"./index-drI1B2fF.js";import"./index-CdkpV5iW.js";import"./index-DwjDrkpL.js";import"./index-sdeDIfXJ.js";import"./index-rVnv04ze.js";import"./index-BM_oveth.js";import"./index-D_520Dub.js";import"./index-Bsep9hg2.js";import"./index-Dsmi0VzV.js";import"./Combination-BmLJRTJQ.js";import"./context-BMKpoCQ2.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const le=u("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
7 * @license lucide-react v0.453.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const me=u("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
12 * @license lucide-react v0.453.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const de=u("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
17 * @license lucide-react v0.453.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const pe=u("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function xe(s){const{t:a}=P(["events"]),{participants:n=[],onAction:i}=s,o=[{label:a("events__participants__ban_participant"),key:"ban"}];return e.jsxs(Q,{children:[e.jsx(U,{children:e.jsxs(w,{children:[e.jsx(p,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(B,{className:"h-5 font-light"}),a("events__participants__name")]})}),e.jsx(p,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Y,{className:"h-5 font-light"}),a("events__participants__upload_count")]})}),e.jsx(p,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(pe,{className:"h-5 font-light"}),a("events__participants__selfie_images_count")]})}),e.jsx(p,{})]})}),e.jsx(X,{children:e.jsx(F,{children:n.map(t=>{var l;return e.jsxs(w,{children:[e.jsxs(x,{className:"font-medium flex items-center gap-3",children:[e.jsxs($,{children:[e.jsx(H,{src:t.avatar}),e.jsx(J,{children:(l=t.first_name)==null?void 0:l[0]})]}),t.first_name.length>0?t.first_name:"No name"," ",t.last_name,t.role==="admin"&&e.jsxs(j,{children:[e.jsx(_,{children:e.jsx(ee,{className:"h-4 text-orange-500"})}),e.jsx(g,{children:a("admin")})]}),t.status==="waitlist"&&e.jsxs(j,{children:[e.jsx(_,{children:e.jsx(me,{className:"h-4 text-red-500"})}),e.jsx(g,{children:a("participant_in_waitlist")})]}),t.status==="banned"&&e.jsxs(j,{children:[e.jsx(_,{children:e.jsx(T,{className:"h-4 text-red-500"})}),e.jsx(g,{children:a("events__participants__banned")})]})]}),e.jsx(x,{className:"text-muted-foreground tabular-nums",children:t.uploads_count?t.uploads_count.toLocaleStr
21ing():null}),e.jsx(x,{className:"text-muted-foreground tabular-nums",children:t.selfie_images_count?t.selfie_images_count.toLocaleString():null}),e.jsx(x,{children:e.jsxs(V,{children:[e.jsx(O,{children:e.jsx(de,{})}),e.jsx(W,{children:e.jsx(Z,{children:o.map(m=>e.jsxs(K,{className:"flex gap-1",onClick:()=>i(m.key,t.id),children:[e.jsx(T,{size:14}),e.jsx("span",{children:a("events__participants__ban_participant")})]},m.key))})})]})})]},t.id)})})})]})}const A=({className:s,...a})=>e.jsx("nav",{role:"navigation","aria-label":"pagination",className:r("mx-auto flex w-full justify-center",s),...a});A.displayName="Pagination";const E=v.forwardRef(({className:s,...a},n)=>e.jsx("ul",{ref:n,className:r("flex flex-row items-center gap-1",s),...a}));E.displayName="PaginationContent";const f=v.forwardRef(({className:s,...a},n)=>e.jsx("li",{ref:n,className:r("",s),...a}));f.displayName="PaginationItem";const y=({className:s,isActive:a,size:n="icon",...i})=>e.jsx(re,{"aria-current":a?"page":void 0,className:r(ie({variant:a?"outline":"ghost",size:n}),s),...i});y.displayName="PaginationLink";const D=({className:s,...a})=>e.jsxs(y,{"aria-label":"Go to previous page",size:"default",className:r("gap-1 pl-2.5",s),...a,children:[e.jsx(G,{className:"h-4 w-4"}),e.jsx("span",{children:"Previous"})]});D.displayName="PaginationPrevious";const S=({className:s,...a})=>e.jsxs(y,{"aria-label":"Go to next page",size:"default",className:r("gap-1 pr-2.5",s),...a,children:[e.jsx("span",{children:"Next"}),e.jsx(q,{className:"h-4 w-4"})]});S.displayName="PaginationNext";const ue=100;function he(s){const a=s.currentPage-1,n=s.currentPage+1,i=Math.ceil(s.totalItems/ue);return e.jsx(A,{children:e.jsxs(E,{children:[a>0&&e.jsx(f,{children:e.jsx(D,{to:`?page=${a}`})}),n<=i&&e.jsx(f,{children:e.jsx(S,{to:`?page=${n}`})})]})})}const je=s=>(L({eventId:s.eventId,participantPagination:{page:s.nextPage}}),null);function _e(s){var N,b,I;const[a]=oe(),n=C(),{t:i}=P(["events"]),o=v.useMemo(()=>parseInt(a.get("page")||"1"),[a]),{participants:t,banParticipant:l}=L({eventId:s.eventId,participantPagination:{page:o}});if(t.isLoading)return e.jsx(z,{});const m=d=>{var k;const c=(k=t==null?void 0:t.data)==null?void 0:k.participants.find(R=>R.id===d);if(c){if(c.role==="admin"){h.error(i("events__participants__cant_remove_admin"));return}if(c.status==="banned"){h.error(i("events__participants__already_banned"));return}h.promise(l.mutateAsync({participantId:d}),{success:i("events__participants__removed")})}},M=(N=n==null?void 0:n.data)==null?void 0:N.is_full;return e.jsxs("div",{children:[M&&e.jsxs(se,{variant:"destructive",children:[e.jsx(le,{className:"h-4 w-4"}),e.jsx(te,{children:i("events__participants__event_is_full")}),e.jsx(ne,{children:i("events__participants__event_is_full_description")}),e.jsx("div",{className:"mt-3"})]}),e.jsx(xe,{onAction:(d,c)=>{switch(d){case"ban":m(c);return}},participants:((b=t.data)==null?void 0:b.participants)||[]}),e.jsx(he,{currentPage:o,totalItems:((I=t.data)==null?void 0:I.totalCount)||0}),e.jsx(ae,{children:()=>e.jsx(je,{nextPage:o+1,eventId:s.eventId})})]})}const ea={noPadding:!0},aa=()=>{var n,i;const{t:s}=P(["events"]),a=ce("routes/events.$eventId");return[{title:s("events__participants__page_title",{interpolation:{escapeValue:!1},name:(i=(n=a==null?void 0:a.data)==null?void 0:n.event)==null?void 0:i.name})}]};function sa(){const s=C();return s?e.jsx(_e,{eventId:s.data.event.id}):null}export{sa as default,ea as handle,aa as meta};

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.