PageSourceSearch

https://maestro.pontua.com.br/assets/PPGestaoPodio-CICByBga.js

js pontua.com.br collected 2026-10-01 14:15:49 UTC 8,108 bytes, 1 lines download raw bytes

1import{r as u,j as e}from"./vendor-react-DIA7vK4g.js";import{dX as K,bi as c,aO as U,bI as d,bJ as m,bK as x,af as B,Q as M,bF as O,aX as Q,cs as E}from"./index-DtUVjOr4.js";import{a as H,u as V}from"./useGamificationCampaign-Bs2ICU4J.js";import{T as W}from"./trophy-BCwqMM8W.js";import"./vendor-docs-BA9xu9ak.js";import"./vendor-utils-DWHjTIse.js";import"./vendor-supabase-_bOAMmkC.js";function re(){var j,p,b,N,w,v,y,k,C,_,F,R,A,D,P;K("Pódio - Ranking");const{activeCampaign:n,isLoading:z,daysRemaining:G}=H(),{topThree:l,remainingRanking:h,isLoading:X,refetch:f}=V(n==null?void 0:n.id),[g,q]=u.useState(!1);u.useEffect(()=>{const s=setInterval(()=>{f()},3e5);return()=>clearInterval(s)},[f]),u.useEffect(()=>{if(l.length>0&&!g){q(!0);const s=3*1e3,i=Date.now()+s,o=()=>{E({particleCount:3,angle:60,spread:55,origin:{x:0},colors:["#ff0500","#ffd700","#c0c0c0"]}),E({particleCount:3,angle:120,spread:55,origin:{x:1},colors:["#ff0500","#ffd700","#c0c0c0"]}),Date.now()<i&&requestAnimationFrame(o)};o()}},[l,g]);const J=s=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:0,maximumFractionDigits:0}).format(s);if(X||z)return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-primary/5 flex items-center justify-center",children:e.jsxs("div",{className:"space-y-8 text-center",children:[e.jsx(c,{className:"h-16 w-64 mx-auto"}),e.jsxs("div",{className:"flex justify-center gap-8",children:[e.jsx(c,{className:"h-48 w-40"}),e.jsx(c,{className:"h-64 w-48"}),e.jsx(c,{className:"h-48 w-40"})]})]})});if(!n)return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-primary/5 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(W,{className:"h-24 w-24 mx-auto text-muted-foreground mb-6"}),e.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Nenhuma campanha ativa"}),e.jsx("p",{className:"text-muted-foreground",children:"Aguarde a configuração de uma nova campanha."})]})});const[a,t,r]=[l[1]||null,l[0]||null,l[2]||null];return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-primary/5 p-8 overflow-hidden",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[e.jsx(U,{className:"h-8 w-8 text-primary animate-pulse"}),e.jsx("h1",{className:"text-4xl font-bold bg-gradient-to-r from-primary to-primary/60 bg-clip-text text-transparent",children:n.nome}),e.jsx(U,{className:"h-8 w-8 text-primary animate-pulse"})]}),e.jsxs("p",{className:"text-xl text-muted-foreground",children:[e.jsx("span",{className:"font-bold text-foreground",children:G})," dias restantes"]})]}),e.jsxs("div",{className:"flex items-end justify-center gap-6 mb-16 h-[400px]",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[a&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative mb-4",children:[e.jsxs(d,{className:"h-24 w-24 border-4 border-border shadow-xl",children:[e.jsx(m,{src:((j=a.consultant)==null?void 0:j.avatar)||""}),e.jsx(x,{className:"text-2xl font-bold text-white",style:{backgroundColor:((p=a.consultant)==null?void 0:p.cor)||"#9ca3af"},children:((N=(b=a.consultant)==null?void 0:b.user_name)==null?void 0:N.slice(0,2).toUpperCase())||"??"})]}),e.jsx("div",{className:"absolute -top-3 -right-3 bg-muted-foreground rounded-full p-2",children:e.jsx(B,{className:"h-5 w-5 text-white"})})]}),e.jsx("h3",{className:"text-lg font-bold mb-1",children:(w=a.consultant)==null?void 0:w.user_name}),e.jsx("p",{className:"text-3xl font-bold text-muted-foreground",children:a.pontos_total}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"pontos"})]}),e.jsx("div",{className:"w-32 h-48 bg-gradient-to-t from-muted-foreground to-muted-foreground rounded-t-xl flex items-center justify-center mt-4",children:e.jsx("span",{className:"text-6xl font-bold text-white/80",children:"2"})})]}),e.jsxs("div",{className:"flex flex-col items-center",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"relative mb-4 animate-bounce",children:e.jsx(M,{className:"h-12 w-12 text-warning mx-auto mb-2 drop-shadow-lg"})}),e.jsx("div",{className:"relative mb-4",children:e.jsxs(d,{className:"h-32 w-32 border-4 border-warning shadow-2xl ring-4 ring-warning/30",children:[e.jsx(m,{src:((v=t.consultant)==null?void 0:v.avatar)||""}),e.jsx(x,{className:"text-3xl font-bold text-white",style:{backgroundColor:((y=t.consultant)==null?void 0:y.cor)||"#eab308"},children:((C=(k=t.consultant)==null?void 0:k.user_name)==null?void 0:C.slice(0,2).toUpperCase())||"??"})]})}),e.jsx("h3",{className:"text-2xl font-bold mb-1",children:(_=t.consultant)==null?void 0:_.user_name}),e.jsx("p",{className:"text-4xl font-bold text-warning",children:t.pontos_total}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"pontos"}),e.jsxs(O,{className:"mt-2 bg-warning/10 text-warning border-warning",children:[J(t.total_realizado)," realizado"]})]}),e.jsx("div",{className:"w-40 h-64 bg-gradient-to-t from-warning to-warning rounded-t-xl flex items-center justify-center mt-4",children:e.jsx("span",{className:"text-8xl font-bold text-white/80",children:"1"})})]}),e.jsxs("div",{className:"flex flex-col items-center",children:[r&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative mb-4",children:[e.jsxs(d,{className:"h-20 w-20 border-4 border-warning shadow-xl",children:[e.jsx(m,{src:((F=r.consultant)==null?void 0:F.avatar)||""}),e.jsx(x,{className:"text-xl font-bold text-white",style:{backgroundColor:((R=r.consultant)==null?void 0:R.cor)||"#d97706"},children:((D=(A=r.consultant)==null?void 0:A.user_name)==null?void 0:D.slice(0,2).toUpperCase())||"??"})]}),e.jsx("div",{className:"absolute -top-2 -right-2 bg-warning rounded-full p-1.5",children:e.jsx(B,{className:"h-4 w-4 text-white"})})]}),e.jsx("h3",{className:"text-base font-bold mb-1",children:(P=r.consultant)==null?void 0:P.user_name}),e.jsx("p",{className:"text-2xl font-bold text-warning",children:r.pontos_total}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"pontos"})]}),e.jsx("div",{className:"w-28 h-40 bg-gradient-to-t from-warning to-warning rounded-t-xl flex items-center justify-center mt-4",children:e.jsx("span",{className:"text-5xl font-bold text-white/80",children:"3"})})]})]}),h.length>0&&e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h2",{className:"text-xl font-semibold mb-4 text-center text-muted-foreground",children:"Demais Posições"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:h.map(s=>{var i,o,T,I,L,S;return e.jsxs("div",{className:"bg-card rounded-xl p-4 border shadow-sm flex items-center gap-3",children:[e.jsx("span",{className:"text-2xl font-bold text-muted-foreground w-8",children:s.posicao}),e.jsxs(d,{className:"h-10 w-10 border-2",style:{borderColor:((i=s.consultant)==null?void 0:i.cor)||"#6366f1"},children:[e.jsx(m,{src:((o=s.consultant)==null?void 0:o.avatar)||""}),e.jsx(x,{className:"text-sm font-semibold text-white",style:{backgroundColor:((T=s.consultant)==null?void 0:T.cor)||"#6366f1"},children:((L=(I=s.consultant)==null?void 0:I.user_name)==null?void 0:L.slice(0,2).toUpperCase())||"??"})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate text-sm",children:(S=s.consultant)==null?void 0:S.user_name}),e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(Q,{className:"h-3 w-3"}),e.jsxs("span",{children:[s.semanas_acima," sem."]})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"font-bold text-primary",children:s.pontos_total}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"pts"})]})]},s.id)})})]}),e.jsx("div",{className:"fixed bottom-4 left-0 right-0 text-center",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Atualização automática a cada 5 minutos • Última sync:"," ",new Date().toLocaleTimeString("pt-BR")]})})]})}export{re as default};

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.