1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DataTable.CsBUv7QK.css"])))=>i.map(i=>d[i]); 2import{ag as L,r as p,k as V,at as f,an as x,aC as $,ac as a,aT as B,aB as R,ai as h,aw as b,ax as w,av as t,aE as m,ar as T,g as O,ay as U,bd as z,ab as j,as as l,az as F,_ as M}from"./sentry.C166FaKx.js";import{createClientOnly as q}from"./client-only.BDoF9plW.js";import{_ as Z}from"./ProgressBar.DvQUviKd.js";import{u as G,a as H}from"./entry.CASL9l9J.js";import{w as J}from"./firebase.D973B9Ub.js";import{u as K,h as Q,k as E,l as W,U as P,s as X}from"./cloud.8lCcO6ur.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v=new s.Error().stack;v&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[v]="5f941f8c-c190-437f-a567-e21a7ff94b15",s._sentryDebugIdIdentifier="sentry-dbid-5f941f8c-c190-437f-a567-e21a7ff94b15")}catch{}})();const Y=j(()=>M(()=>import("./DataTable.client.BE-RPZUJ.js"),__vite__mapDeps([0]),import.meta.url).then(s=>s.default||s).then(s=>q(s))),ee={class:"p-2"},te=["value"],le=L({__name:"users",setup(s){const v=p(),o=K(),g=o.probe&&G(),y=Q(g?E(g,"users"):null,{maxRefDepth:0,wait:!0,once:!1,onError(r){v.value=r}}),I=y.pending,C=V(()=>{const r=[];if(y.data.value)for(const e of y.data.value){const i=e.signature?.[o.selectedEvent]||e.signatureId?.[o.selectedEvent]||"",c=[e.photoURL??"",[e.email??e.id,e.id],e.name??"",i,new Date(e.lastLogin).toLocaleString(),o.feedback.online?.[i]?.toString()??"Nikdy",e.permissions?.superAdmin===!0?P.SuperAdmin:e.permissions?.[o.selectedEvent]??P.Nothing,e.id];r.push(c)}return r}),u=p(),k=p(!1),d=p(),_=p(!1);function D(){if(u.value){const r=u.value.dt.rows({selected:!0}).data().length>0;o.resolvedPermissions.editEvent?_.value=r:r&&(u.value.dt.rows().deselect(),_.value=!1)}}function N(){const r=u.value?.dt.rows({selected:!0}).data();r?.length&&g&&r.each(async e=>{const i=e[7],c=J(E(g,"users"),i);await X(c,{permissions:d.value===P.SuperAdmin?{superAdmin:!0}:{[o.selectedEvent]:parseInt(d.value?.toString()??"0"),superAdmin:!1}},{merge:!0})})}return(r,e)=>{const i=Y,c=Z,A=H;return l(),f("div",ee,[x(i,{ref_key:"table",ref:u,data:a(C),options:{order:[[1,"asc"]],select:!0,responsive:!0},columns:[{searchable:!1,orderable:!1,render:n=>n?`<img class='noinvert' width='24px' referrerPolicy='no-referrer' src='${n}' />`:null},{render:n=>`<span tabindex='0' title='${n[1]}'>${n[0]}</span>`},{},{},{},{},{render:n=>n?`<span tabindex='0' title='${a(o).permissionNames[n]}' class='icon' style='--icon: url(https://api.iconify.design/mdi/${a(W)[n]}.svg);'></span>`:""}],onSelect:D,onDeselect:D},{default:$(()=>e[3]||(e[3]=[t("thead",null,[t("tr",null,[t("th"),t("th",null,"ID"),t("th",null,"ÃÄet"),t("th",null,"Podpis"),t("th",null,"Posednà pÅihlášenÃ"),t("th",null,"Poslednà feedback"),t("th",null,"OprávnÄnÃ")])],-1)])),_:1},8,["data","columns"]),a(I)?(l(),B(c,{key:0})):R("",!0),a(o).resolvedPermissions.editEvent?(l(),f(h,{key:1},[b(t("div",null,[e[6]||(e[6]=m(" Akce:â ")),t("button",{onClick:e[0]||(e[0]=n=>k.value=!0)},[x(A,{name:"mdi:shield-edit"}),e[4]||(e[4]=m(" ZmÄnit oprávnÄnà "))]),b(t("form",{onSubmit:e[2]||(e[2]=T(n=>{N(),k.value=!1},["prevent"]))},[b(t("select",{"onUpdate:modelValue":e[1]||(e[1]=n=>O(d)?d.value=n:null),required:""},[(l(!0),f(h,null,U(a(o).permissionNames,(n,S)=>(l(),f("option",{key:S,value:S},F(n),9,te))),128))],512),[[z,a(d)]]),e[5]||(e[5]=t("input",{type:"submit",value:"Potvrdit"},null,-1))],544),[[w,a(k)]])],512),[[w,a(_)]]),b(t("div",null,e[7]||(e[7]=[m(" Pro editaci uživatelských oprávnÄnà nejdÅÃve vyberte uživatele. OprávnÄnà se nastavujà "),t("strong",null,"pro každou akci separátnÄ",-1),m(". ")]),512),[[w,!a(_)]])],64)):(l(),f(h,{key:2},[m(" Nemáte oprávnÄnà na úpravu uživatelských oprávnÄnà u této události. ")],64))])}}});export{le as default}; 3//# sourceMappingURL=users.BoECeFSU.js.map
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.