PageSourceSearch

https://spitzpomer.com.br/assets/PortalLayout-BRHRLNBk.js

js spitzpomer.com.br collected 2026-10-07 15:54:16 UTC 7,513 bytes, 1 lines download raw bytes

1import{c as y,a as k,r as f,b as d,j as e,s as g,O as S}from"./index-D_5GXWiy.js";import{g as L,u as D,X as _,Z as A,aV as M,aT as T,s as I,a2 as O,ao as R,C as F}from"./AppAutenticado-CzKydVy9.js";import{c as u}from"./button-D5VvoyW8.js";import{P as E}from"./PortalDadosContext-CNLAIMnV.js";import{D as H,a as B,b as q,c as G}from"./dropdown-menu-DMv1FgOi.js";import{T as U}from"./tree-palm-B2uQQkV3.js";import{F as W}from"./file-text-B7Zpugr4.js";import{F as V}from"./folder-open-BgEwHSce.js";import{G as $}from"./gift-CGsa9LJ_.js";import{S as z}from"./shield-check-BT7mc5fv.js";import{C as X}from"./clock-3-D-wsav_n.js";import{M as Z}from"./messages-square-CPY78naH.js";import{H as J}from"./heart-y7yL-tuO.js";import{M as K}from"./message-square-heart-CvPW4LT3.js";import{M as Q}from"./message-square-warning-4tZZiD7M.js";import{U as Y}from"./users-DOraMMs-.js";import{G as ee}from"./graduation-cap-BbKZagS_.js";import{C as oe}from"./hard-hat-DAPX46rr.js";import{B as te}from"./book-text-Du9Lex9l.js";import{S as ae}from"./sparkles-DtUUiOxO.js";import{C as re}from"./chevron-down-CTM8Latz.js";import{L as se}from"./lock-Dh6eYyey.js";import"./x-Bsb3cIeH.js";import"./createLucideIcon-ogc1J6M_.js";import"./sonner-vjI3kQlA.js";import"./arrow-left-D-86lV6V.js";import"./index-hNFnHP_X.js";import"./input-DWiZAcMh.js";import"./loader-circle-0V_wP9ca.js";import"./car-PLjUkRnC.js";import"./check-nqbqeLRK.js";import"./star-JGD-cnc6.js";import"./zap-CHGKr2qI.js";import"./circle-check-CtcpgmJO.js";import"./circle-alert-C3i67_w1.js";import"./send-BYQv5nqu.js";import"./chevron-left-uDT_QjWY.js";import"./index-DI6JeiCF.js";import"./index-DwZogk-F.js";import"./index-CUmbRvXY.js";import"./index-ByJTUtas.js";import"./chevron-right-BoR3Ueg8.js";import"./circle-DCUq486C.js";const n={label:"Início",icon:_,to:"/portal/inicio"},j=[{label:"Trabalho",icon:O,itens:[{label:"Minha Escala",icon:I,to:"/portal/minha-escala"},{label:"Férias",icon:U,to:"/portal/ferias"},{label:"Folha",icon:W,to:"/portal/folha"},{label:"Documentos",icon:V,to:"/portal/documentos"},{label:"Benefícios",icon:$,to:"/portal/beneficios"},{label:"Minha Pontuação",icon:z,to:"/portal/minha-pontuacao"},{label:"Banco de Horas",icon:X,to:"/portal/banco-horas"}]},{label:"Comunidade",icon:Y,itens:[{label:"Mural",icon:Z,to:"/portal/mural"},{label:"Desafios",icon:R,to:"/portal/gamificacao"},{label:"Feedback",icon:J,to:"/portal/feedback"},{label:"Pesquisas",icon:K,to:"/portal/pesquisas"},{label:"Fale com RH",icon:Q,to:"/portal/canal"}]},{label:"Desenvolvimento",icon:ae,itens:[{label:"Cursos",icon:ee,to:"/portal/cursos"},{label:"Provas",icon:oe,to:"/portal/provas"},{label:"Avaliação",icon:F,to:"/portal/avaliacao"},{label:"Políticas",icon:te,to:"/portal/politicas"}]}],ie=[n,...j.flatMap(a=>a.itens)];function le(){return e.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-center px-6 py-20",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl bg-muted flex items-center justify-center",children:e.jsx(se,{className:"w-8 h-8 text-muted-foreground"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Acesso Restrito"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Este é o Portal do Colaborador.",e.jsx("br",{}),"Peça ao RH para liberar o seu acesso."]})]})]})}function Ke(){var h,b;const{nomeAtivo:a,perfil:c,emailAtivo:i}=L(),{podeVer:w,loadingPermissoes:v}=D(),{user:s}=y(),m=k(),p=f.useRef({path:"",t:0});f.useEffect(()=>{const o=(i||"").toLowerCase();if(!o)return;const r=m.pathname,t=Date.now();if(p.current.path===r&&t-p.current.t<4e3)return;p.current={path:r,t};const l=ie.find(P=>r.startsWith(P.to));d.entities.LogAcessoPortal.create({funcionario_email:o,funcionario_nome:a||"",evento:"pagina",pagina:r,titulo:(l==null?void 0:l.label)||"Portal",data:new Date().toISOString()}).catch(()=>{})},[m.pathname,i,a]),f.useEffect(()=>{const o=(i||"").toLowerCase();if(o){try{const r=`portal_login_${o}`,t=Number(sessionStorage.getItem(r)||0);if(Date.now()-t<1800*1e3)return;sessionStorage.setItem(r,String(Date.now()))}catch{}d.entities.LogAcessoPortal.create({funcionario_email:o,funcionario_nome:a||"",evento:"login",titulo:"Entrou no portal",data:new Date().toISOString()}).catch(()=>{})}},[i,a]);const N=async()=>{const o=(i||"").toLowerCase();if(o){try{await d.entities.LogAcessoPortal.create({funcionario_email:o,funcionario_nome:a||"",evento:"logout",titulo:"Saiu do portal",data:new Date().toISOString()})}catch{}try{sessionStorage.removeItem(`portal_login_${o}`)}catch{}}
1d.auth.logout("/")},C=w("area_colaborador"),x=o=>u("flex items-center gap-1.5 px-3 py-3 text-xs sm:text-sm font-medium border-b-2 transition-all whitespace-nowrap",o?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground");return e.jsxs("div",{className:"flex flex-col h-screen bg-background overflow-hidden",children:[e.jsxs("header",{className:"flex items-center gap-3 px-4 sm:px-6 py-3 border-b border-border bg-card flex-shrink-0",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center flex-shrink-0",children:e.jsx(A,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground leading-tight truncate",children:"Spitz Pomer"}),e.jsx("p",{className:"text-[11px] text-muted-foreground leading-tight",children:"Portal do Colaborador"})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-2 sm:gap-3",children:[e.jsx(M,{}),e.jsxs("div",{className:"hidden sm:flex items-center gap-2 pl-2 border-l border-border",children:[e.jsx("div",{className:"w-8 h-8 rounded-full overflow-hidden bg-primary flex items-center justify-center text-xs font-semibold text-white flex-shrink-0",children:c!=null&&c.foto_url?e.jsx("img",{src:c.foto_url,alt:a,className:"w-full h-full object-cover"}):((b=(h=a||(s==null?void 0:s.full_name))==null?void 0:h[0])==null?void 0:b.toUpperCase())||"U"}),e.jsx("span",{className:"text-xs font-medium text-foreground max-w-[120px] truncate",children:a||(s==null?void 0:s.full_name)})]}),e.jsx("button",{onClick:N,title:"Sair",className:"text-muted-foreground hover:text-foreground transition-colors p-1.5 rounded-lg hover:bg-accent",children:e.jsx(T,{className:"w-4 h-4"})})]})]}),e.jsxs("nav",{className:"flex items-stretch gap-1 px-2 sm:px-4 border-b border-border bg-card/60 overflow-x-auto scrollbar-hide flex-shrink-0",children:[e.jsxs(g,{to:n.to,className:x(m.pathname.startsWith(n.to)),children:[e.jsx(n.icon,{className:"w-4 h-4 flex-shrink-0"}),n.label]}),j.map(o=>{const r=o.itens.some(t=>m.pathname.startsWith(t.to));return e.jsxs(H,{children:[e.jsxs(B,{className:u(x(r),"outline-none"),children:[e.jsx(o.icon,{className:"w-4 h-4 flex-shrink-0"}),o.label,e.jsx(re,{className:"w-3.5 h-3.5 flex-shrink-0 opacity-60"})]}),e.jsx(q,{align:"start",className:"min-w-[190px]",children:o.itens.map(t=>e.jsx(G,{asChild:!0,children:e.jsxs(g,{to:t.to,className:({isActive:l})=>u("flex items-center gap-2 cursor-pointer w-full",l&&"text-primary font-medium"),children:[e.jsx(t.icon,{className:"w-4 h-4 flex-shrink-0"}),t.label]})},t.to))})]},o.label)})]}),e.jsx("main",{className:"flex-1 overflow-auto",children:v?e.jsx("div",{className:"h-full flex items-center justify-center",children:e.jsx("div",{className:"w-6 h-6 border-2 border-border border-t-primary rounded-full animate-spin"})}):C?e.jsx(E,{children:e.jsx(S,{})}):e.jsx(le,{})})]})}export{Ke 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.