PageSourceSearch

https://pratiquemovimento.com.br/assets/RelatoriosPage-Bf4hKYpt.js

js pratiquemovimento.com.br collected 2026-10-08 02:17:42 UTC 23,792 bytes, 1 lines download raw bytes

1import{ah as e,r as t,j as n,ad as a,B as s,dD as r,dE as o,C as i,a as d,b as l,dA as c,d as h,h as u,bj as m,U as p,bK as v,z as x,b3 as _,bl as y,b4 as f,bn as b,$ as g}from"./index-DgSFfepF.js";import{I as j}from"./input-S9Ov6r2n.js";import{L as w}from"./label-BkIkjyb9.js";import{S as D,a as k,b as $,c as C,d as N}from"./select-NcL_uuac.js";import{T,a as M,b as P,c as F,d as H,e as E}from"./table-DogWZfTF.js";import{A as L}from"./AdminBadge-Dc6XacyD.js";import{u as S,e as R}from"./useRHReports-CBgUnang.js";import{u as z}from"./useTeachersRH-Bi3T760Z.js";import{f as A}from"./format-PQXJmjkA.js";import{p as I}from"./pt-BR-DXUfrdS2.js";import{K as G}from"./KPIDetailModal-D3VK1DoY.js";import{A as O}from"./AdminKpiCard-Ck1C7SLm.js";import{s as V}from"./startOfMonth-bKEv7yTZ.js";import{e as B}from"./endOfMonth-B7FHG27A.js";import"./index-jVOyRz7F.js";import"./index-CuzUyE2o.js";import"./en-US-2SrxSIMn.js";import"./getTimezoneOffsetInMilliseconds-CqjscKbI.js";import"./startOfWeek-DMNIzeNj.js";function q(e){return A(new Date(e+"T12:00:00"),"dd/MM/yyyy",{locale:I})}function U(e,t){return`${q(e)} a ${q(t)}`}function K(e){return e?e.substring(0,5):""}async function Y(){try{const e=await fetch("/assets/logo-Di9dH3k4.png"),t=await e.blob();return new Promise((e,n)=>{const a=new FileReader;a.onloadend=()=>e(a.result),a.onerror=n,a.readAsDataURL(t)})}catch(e){return console.error("Error loading logo:",e),""}}function W(e,t){return`\n    <!DOCTYPE html>\n    <html lang="pt-BR">\n    <head>\n      <meta charset="UTF-8">\n      <meta name="viewport" content="width=device-width, initial-scale=1.0">\n      <title>${t}</title>\n      <style>\n        * {\n          margin: 0;\n          padding: 0;\n          box-sizing: border-box;\n        }\n        \n        body {\n          font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n          font-size: 12px;\n          color: #333;\n          line-height: 1.4;\n        }\n        \n        .container {\n          max-width: 800px;\n          margin: 0 auto;\n          padding: 20px;\n        }\n        \n        .header {\n          text-align: center;\n          border-bottom: 2px solid #333;\n          padding-bottom: 15px;\n          margin-bottom: 20px;\n        }\n        \n        .header .logo {\n          max-height: 60px;\n          margin-bottom: 10px;\n        }\n        \n        .header h2 {\n          font-size: 16px;\n          font-weight: normal;\n          color: #666;\n          margin-top: 10px;\n        }\n        \n        .header .teacher-info {\n          font-size: 14px;\n          color: #444;\n          margin-top: 5px;\n        }\n        \n        .header .period {\n          font-size: 14px;\n          margin-top: 10px;\n          color: #444;\n        }\n        \n        .section {\n          margin-bottom: 25px;\n        }\n        \n        .section-title {\n          font-size: 14px;\n          font-weight: bold;\n          background: #f0f0f0;\n          padding: 8px 12px;\n          margin-bottom: 10px;\n          border-left: 4px solid #333;\n        }\n        \n        table {\n          width: 100%;\n          border-collapse: collapse;\n          margin-bottom: 15px;\n        }\n        \n        th, td {\n          padding: 8px 10px;\n          text-align: left;\n          border-bottom: 1px solid #ddd;\n        }\n        \n        th {\n          background: #f8f8f8;\n          font-weight: bold;\n          font-size: 11px;\n          text-transform: uppercase;\n        }\n        \n        td.number {\n          text-align: right;\n        }\n        \n        tr:nth-child(even) {\n          background: #fafafa;\n        }\n        \n        .summary-cards {\n          display: flex;\n          gap: 15px;\n          margin-bottom: 20px;\n        }\n        \n        .summary-card {\n          flex: 1;\n          background: #f8f8f8;\n          padding: 15px;\n          border-radius: 5px;\n          text-align: center;\n        }\n        \n        .summary-card .value {\n          font-size: 24px;\n          font-weight: bold;\n          color: #333;\n        }\n        \n        .summary-card .label {\n          font-size: 11px;\n          color: #666;\n          text-transform: uppercase;\n        }\n        \n        .footer {\n          margin-top: 30px;\n          padding-top: 15px;\n          border-top: 1px solid #ddd;\n          text-align: center;\n          font-size: 10px;\n          color: #999;\n        }\n        \n        .total-row {\n          font-weight: bold;\n          background: #f0f0f0 !important;\n        }\n        \n        @media print {\n          body {\n            print-color-adjust: exact;\n            -webkit-print-color-adjust: exact;\n          }\n          \n          .container {\n            padding: 0;\n          }\n          \n          .page-break {\n            page-break-before: always;\n          }\n        }\n      </style>\n    </head>\n    <body>\n      <div class="container">\n        ${e}\n      </div>\n    </body>\n    </html>\n  `}function J(e,t){const n=window.open("","_blank");n&&(n.document.write(e),n.document.close(),n.onload=()=>{setTimeout(()=>{n.print()},250)})}function Q(){const{hasRole:Q,loading:X}=e(),[Z,ee]=t.useState({startDate:A(V(new Date),"yyyy-MM-dd"),endDate:A(B(new Date),"yyyy-MM-dd"),teacherId:void 0}),{teachers:te}=z(),{checkins:ne,teacherSummary:ae,eventTypeSummary:se,isLoading:re}=S(Z),[oe,ie]=t.useState(null);if(X)return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx("p",{className:"text-muted-foreground",children:"Carregando..."})});if(!Q("admin")&&!Q("hr"))return n.jsx(a,{to:"/admin",replace:!0});const de=async e=>{const t=te.find(t=>
1t.id===e);if(!t)return;const{data:n,error:a}=await g.from("event_checkins").select("\n        id,\n        event_date,\n        hours_counted,\n        is_substitute,\n        status,\n        checked_in_at,\n        teacher:teachers!event_checkins_teacher_id_fkey(id, name),\n        event:schedule_events!event_checkins_event_id_fkey(\n          title,\n          start_time,\n          end_time,\n          event_type:event_types(name)\n        )\n      ").eq("teacher_id",e).gte("event_date",Z.startDate).lte("event_date",Z.endDate).eq("status","confirmed").order("event_date",{ascending:!1});if(a)return void console.error("Erro ao buscar check-ins:",a);const s=function(e,t,n,a,s){const r=e.filter(e=>e.teacher_id===t),o={};r.forEach(e=>{o[e.event_type]||(o[e.event_type]={event_type:e.event_type,total_hours:0,total_events:0}),o[e.event_type].total_hours+=e.hours_counted,o[e.event_type].total_events+=1});const i=r.reduce((e,t)=>e+t.hours_counted,0),d=r.length;return{teacher_id:t,teacher_name:n,teacher_cpf:a,period:s,checkins:r.sort((e,t)=>{const n=e.event_date.localeCompare(t.event_date);return 0!==n?n:(e.start_time||"").localeCompare(t.start_time||"")}),eventTypeSummary:Object.values(o).sort((e,t)=>t.total_hours-e.total_hours),totalHours:i,totalEvents:d}}((n||[]).map(t=>{var n,a,s,r,o,i;return{id:t.id,event_date:t.event_date,event_title:(null==(n=t.event)?void 0:n.title)||"Evento",teacher_name:(null==(a=t.teacher)?void 0:a.name)||"Professor",teacher_id:e,event_type:(null==(r=null==(s=t.event)?void 0:s.event_type)?void 0:r.name)||"Outro",hours_counted:Number(t.hours_counted)||0,is_substitute:t.is_substitute,status:t.status,checked_in_at:t.checked_in_at,start_time:(null==(o=t.event)?void 0:o.start_time)||"",end_time:(null==(i=t.event)?void 0:i.end_time)||""}}),e,t.name,t.cpf||void 0,{startDate:Z.startDate,endDate:Z.endDate});await async function(e){const t=await Y(),n=e.eventTypeSummary.map(e=>`\n      <tr>\n        <td>${e.event_type}</td>\n        <td class="number">${e.total_hours.toFixed(1)}h</td>\n        <td class="number">${e.total_events}</td>\n      </tr>\n    `).join(""),a=e.checkins.map(e=>{return`\n      <tr>\n        <td>${q(e.event_date)}</td>\n        <td>${t=e.start_time,n=e.end_time,t&&n?`${K(t)} - ${K(n)}`:"-"}</td>\n        <td>${e.event_title}</td>\n        <td>${e.event_type}</td>\n        <td class="number">${e.hours_counted.toFixed(1)}h</td>\n        <td>${e.is_substitute?"Sim":"Não"}</td>\n      </tr>\n    `;var t,n}).join("");J(W(`\n    <div class="header">\n      ${t?`<img src="${t}" alt="Logo" class="logo" />`:'<h1 style="font-size: 24px; font-weight: bold; margin-bottom: 5px;">Pratique Movimento</h1>'}\n      <h2>Relatório de Horas - ${e.teacher_name}</h2>\n      ${e.teacher_cpf?`<p class="teacher-info">CPF: ${e.teacher_cpf}</p>`:""}\n      <p class="period">Período: ${U(e.period.startDate,e.period.endDate)}</p>\n    </div>\n    \n    <div class="summary-cards">\n      <div class="summary-card">\n        <div class="value">${e.totalHours.toFixed(1)}h</div>\n        <div class="label">Total de Horas</div>\n      </div>\n      <div class="summary-card">\n        <div class="value">${e.totalEvents}</div>\n        <div class="label">Total de Eventos</div>\n      </div>\n    </div>\n    \n    <div class="section">\n      <div class="section-title">Resumo por Categoria</div>\n      <table>\n        <thead>\n          <tr>\n            <th>Tipo de Evento</th>\n            <th style="text-align: right;">Horas</th>\n            <th style="text-align: right;">Eventos</th>\n          </tr>\n        </thead>\n        <tbody>\n          ${n}\n          <tr class="total-row">\n            <td><strong>Total</strong></td>\n            <td class="number"><strong>${e.totalHours.toFixed(1)}h</strong></td>\n            <td class="number"><strong>${e.totalEvents}</strong></td>\n          </tr>\n        </tbody>\n      </table>\n    </div>\n    \n    <div class="section">\n      <div class="section-title">Detalhamento</div>\n      <table>\n        <thead>\n          <tr>\n            <th>Data</th>\n            <th>Horário</th>\n            <th>Evento</th>\n            <th>Tipo</th>\n            <th style="text-align: right;">Horas</th>\n            <th>Subst.</th>\n          </tr>\n        </thead>\n        <tbody>\n          ${a}\n        </tbody>\n      </table>\n    </div>\n    \n    <div class="footer">\n      Gerado em ${A(new Date,"dd/MM/yyyy 'às' HH:mm",{locale:I})}\n    </div>\n  `,`Relatório - ${e.teacher_name}`),e.teacher_name.toLowerCase().replace(/\s+/g,"-"))}(s)},le=ne.reduce((e,t)=>
1e+t.hours_counted,0),ce=ne.length,he=ne.filter(e=>e.is_substitute).length,ue=function(e){const t=new Map;return e.forEach(e=>{t.has(e.teacher_id)||t.set(e.teacher_id,{aula:0,reuniao:0,projeto:0,pratica:0});const n=t.get(e.teacher_id),a=e.event_type.toLowerCase();a.includes("aula")?n.aula+=e.hours_counted:a.includes("reunião")||a.includes("reuniao")?n.reuniao+=e.hours_counted:a.includes("projeto")?n.projeto+=e.hours_counted:(a.includes("prática")||a.includes("pratica"))&&(n.pratica+=e.hours_counted)}),t}(ne),me=new Map(te.map(e=>[e.id,e]));return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-4",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"admin-h1",children:"Relatórios"}),n.jsx("p",{className:"admin-subtitle",children:"Gerar relatórios de horas trabalhadas"})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsxs(s,{variant:"outline",onClick:async()=>{const e=te.filter(e=>e.is_active).map(e=>({id:e.id,name:e.name,cpf:e.cpf||void 0})),t=function(e,t,n){const a=new Set;e.forEach(e=>a.add(e.event_type));const s=Array.from(a).sort(),r=t.map(t=>{const n=e.filter(e=>e.teacher_id===t.id),a={};s.forEach(e=>{a[e]=0}),n.forEach(e=>{a[e.event_type]=(a[e.event_type]||0)+e.hours_counted});const r=n.reduce((e,t)=>e+t.hours_counted,0),o=n.length;return{teacher_id:t.id,teacher_name:t.name,teacher_cpf:t.cpf,total_hours:r,total_events:o,hours_by_type:a}}).filter(e=>e.total_hours>0).sort((e,t)=>e.teacher_name.localeCompare(t.teacher_name,"pt-BR")),o=r.reduce((e,t)=>e+t.total_hours,0);return{period:n,teachers:r,eventTypes:s,grandTotal:o}}(ne,e,{startDate:Z.startDate,endDate:Z.endDate});await async function(e){const t=await Y(),n=e.teachers.map(t=>{const n=e.eventTypes.map(e=>`<td class="number">${(t.hours_by_type[e]||0).toFixed(1)}h</td>`).join("");return`\n        <tr>\n          <td>${t.teacher_name}</td>\n          <td>${t.teacher_cpf||"-"}</td>\n          ${n}\n          <td class="number"><strong>${t.total_hours.toFixed(1)}h</strong></td>\n        </tr>\n      `}).join(""),a=e.eventTypes.map(e=>`<th style="text-align: right;">${e}</th>`).join(""),s=e.eventTypes.map(t=>e.teachers.reduce((e,n)=>e+(n.hours_by_type[t]||0),0)).map(e=>`<td class="number"><strong>${e.toFixed(1)}h</strong></td>`).join("");J(W(`\n    <div class="header">\n      ${t?`<img src="${t}" alt="Logo" class="logo" />`:'<h1 style="font-size: 24px; font-weight: bold; margin-bottom: 5px;">Pratique Movimento</h1>'}\n      <h2>Relatório Geral de Horas - Contabilidade</h2>\n      <p class="period">Período: ${U(e.period.startDate,e.period.endDate)}</p>\n    </div>\n    \n    <div class="summary-cards">\n      <div class="summary-card">\n        <div class="value">${e.grandTotal.toFixed(1)}h</div>\n        <div class="label">Total Geral de Horas</div>\n      </div>\n      <div class="summary-card">\n        <div class="value">${e.teachers.length}</div>\n        <div class="label">Professores</div>\n      </div>\n    </div>\n    \n    <div class="section">\n      <div class="section-title">Horas por Professor</div>\n      <table>\n        <thead>\n          <tr>\n            <th>Professor</th>\n            <th>CPF</th>\n            ${a}\n            <th style="text-align: right;">Total</th>\n          </tr>\n        </thead>\n        <tbody>\n          ${n}\n          <tr class="total-row">\n            <td colspan="2"><strong>TOTAL</strong></td>\n            ${s}\n            <td class="number"><strong>${e.grandTotal.toFixed(1)}h</strong></td>\n          </tr>\n        </tbody>\n      </table>\n    </div>\n    \n    <div class="footer">\n      Gerado em ${A(new Date,"dd/MM/yyyy 'às' HH:mm",{locale:I})}\n    </div>\n  `,"Relatório Geral - Contabilidade"))}(t)},disabled:0===ne.length,children:[n.jsx(r,{className:"h-4 w-4 mr-2"}),"PDF Contabilidade"]}),n.jsxs(s,{onClick:()=>{const e=`relatorio-horas-${A(new Date,"yyyy-MM-dd")}`;R(ne,e)},disabled:0===ne.length,children:[n.jsx(o,{className:"h-4 w-4 mr-2"}),"Exportar CSV"]})]})]}),n.jsxs(i,{children:[n.jsx(d,{children:n.jsxs(l,{className:"flex items-center gap-2",children:[n.jsx(c,{className:"h-5 w-5"}),"Filtros"]})}),n.jsx(h,{children:n.jsxs("div",{className:"grid gap-4 md:grid-cols-4",children:[n.jsxs("div",{children:[n.jsx(w,{children:"Data Início"}),n.jsx(j,{type:"date",value:Z.startDate,onChange:e=>ee({...Z,startDate:e.target.value})})]}),n.jsxs("div",{children:[n.jsx(w,{children:"Data Fim"}),n.jsx(j,{type:"date",value:Z.endDate,onChange:e=>ee({...Z,endDate:e.target.value})})]}),n.jsxs("div",{children:[n.jsx(w,{children:"Professor"}),n.jsxs(D,{value:Z.teacherId||"all",onValueChange:e=>ee({...Z,teacherId:"all"===e?void 0:e}),children:[n.jsx(k,{children:n.jsx($,{placeholder:"Todos"})}),n.jsxs(C,{children:[n.jsx(N,{value:"all",children:"Todos os professores"}),te.filter(e=>e.is_active).map(e=>n.jsx(N,{value:e.id,children:e.name},e.id))]})]})]}),n.jsx("div",{className:"flex items-end",children:n.jsx(s,{variant:"outline",className:"w-full",onClick:()=>
1ee({startDate:A(V(new Date),"yyyy-MM-dd"),endDate:A(B(new Date),"yyyy-MM-dd"),teacherId:void 0}),children:"Limpar Filtros"})})]})})]}),n.jsxs("div",{className:"grid gap-4 md:grid-cols-4",children:[n.jsx(O,{label:"Total de Horas",value:`${le.toFixed(1)}h`,icon:u,onClick:()=>ie("hours")}),n.jsx(O,{label:"Total de Eventos",value:ce,icon:m,onClick:()=>ie("events")}),n.jsx(O,{label:"Substituições",value:he,icon:p,onClick:()=>ie("substitutions")}),n.jsx(O,{label:"Professores",value:te.filter(e=>e.is_active).length,icon:v,onClick:()=>ie("teachers")})]}),(()=>{const e=se.find(e=>e.event_type.toLowerCase().includes("aula"))||{event_type:"Aula",total_hours:0,total_events:0},t=se.find(e=>e.event_type.toLowerCase().includes("reunião")||e.event_type.toLowerCase().includes("reuniao"))||{event_type:"Reunião",total_hours:0,total_events:0},a=se.find(e=>e.event_type.toLowerCase().includes("projeto"))||{event_type:"Projeto",total_hours:0,total_events:0},s=se.find(e=>e.event_type.toLowerCase().includes("prática")||e.event_type.toLowerCase().includes("pratica"))||{event_type:"Prática Pessoal",total_hours:0,total_events:0};return n.jsxs("div",{className:"grid gap-4 md:grid-cols-4",children:[n.jsx(O,{label:"Aula",value:`${e.total_hours.toFixed(1)}h`,icon:x,onClick:()=>ie("aula"),ctaLabel:`${e.total_events} eventos · Ver detalhes →`}),n.jsx(O,{label:"Reunião",value:`${t.total_hours.toFixed(1)}h`,icon:_,onClick:()=>ie("reuniao"),ctaLabel:`${t.total_events} eventos · Ver detalhes →`}),n.jsx(O,{label:"Projeto",value:`${a.total_hours.toFixed(1)}h`,icon:y,onClick:()=>ie("projeto"),ctaLabel:`${a.total_events} eventos · Ver detalhes →`}),n.jsx(O,{label:"Prática Pessoal",value:`${s.total_hours.toFixed(1)}h`,icon:f,onClick:()=>ie("pratica"),ctaLabel:`${s.total_events} eventos · Ver detalhes →`})]})})(),n.jsxs(i,{children:[n.jsx(d,{children:n.jsx(l,{children:"Por Professor"})}),n.jsx(h,{children:0===ae.length?n.jsx("p",{className:"text-muted-foreground",children:"Nenhum dado encontrado"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs(T,{children:[n.jsx(M,{children:n.jsxs(P,{children:[n.jsx(F,{children:"Professor"}),n.jsx(F,{children:"CPF"}),n.jsx(F,{className:"text-right",children:"H. Aula"}),n.jsx(F,{className:"text-right",children:"H. Reunião"}),n.jsx(F,{className:"text-right",children:"H. Projeto"}),n.jsx(F,{className:"text-right",children:"H. Prática"}),n.jsx(F,{className:"text-right",children:"Total"}),n.jsx(F,{className:"text-right",children:"Subst."}),n.jsx(F,{className:"text-right",children:"PDF"})]})}),n.jsx(H,{children:ae.map(e=>{const t=me.get(e.teacher_id),a=ue.get(e.teacher_id)||{aula:0,reuniao:0,projeto:0,pratica:0};return n.jsxs(P,{children:[n.jsx(E,{className:"font-medium",children:e.teacher_name}),n.jsx(E,{className:"text-muted-foreground",children:(null==t?void 0:t.cpf)||"-"}),n.jsxs(E,{className:"text-right",children:[a.aula.toFixed(1),"h"]}),n.jsxs(E,{className:"text-right",children:[a.reuniao.toFixed(1),"h"]}),n.jsxs(E,{className:"text-right",children:[a.projeto.toFixed(1),"h"]}),n.jsxs(E,{className:"text-right",children:[a.pratica.toFixed(1),"h"]}),n.jsxs(E,{className:"text-right font-semibold",children:[e.total_hours.toFixed(1),"h"]}),n.jsx(E,{className:"text-right",children:e.substitutions}),n.jsx(E,{className:"text-right",children:n.jsx(s,{variant:"ghost",size:"sm",onClick:()=>de(e.teacher_id),title:"Gerar PDF individual",children:n.jsx(b,{className:"h-4 w-4"})})})]},e.teacher_id)})})]})})})]}),n.jsxs(i,{children:[n.jsx(d,{children:n.jsx(l,{children:"Detalhamento"})}),n.jsx(h,{children:re?n.jsx("p",{className:"text-muted-foreground",children:"Carregando..."}):0===ne.length?n.jsx("p",{className:"text-muted-foreground",children:"Nenhum check-in encontrado no período"}):n.jsxs("div",{className:"overflow-x-auto",children:[n.jsxs(T,{children:[n.jsx(M,{children:n.jsxs(P,{children:[n.jsx(F,{children:"Data"}),n.jsx(F,{children:"Horário"}),n.jsx(F,{children:"Evento"}),n.jsx(F,{children:"Professor"}),n.jsx(F,{children:"Tipo"}),n.jsx(F,{className:"text-right",children:"Horas"}),n.jsx(F,{children:"Status"})]})}),n.jsx(H,{children:ne.slice(0,50).map(e=>n.jsxs(P,{children:[n.jsx(E,{children:A(new Date(e.event_date+"T12:00:00"),"dd/MM/yyyy",{locale:I})}),n.jsx(E,{className:"text-muted-foreground",children:e.start_time&&e.end_time?`${e.start_time.substring(0,5)} - ${e.end_time.substring(0,5)}`:"-"}),n.jsx(E,{className:"font-medium",children:e.event_title}),n.jsx(E,{children:e.teacher_name}),n.jsx(E,{children:n.jsx(L,{variant:"info",children:e.event_type})}),n.jsxs(E,{className:"text-right",children:[e.hours_counted.toFixed(1),"h"]}),n.jsx(E,{children:n.jsxs("div",{className:"flex gap-1",children:[e.is_substitute&&n.jsx(L,{variant:"info",children:"Substituto"}),n.jsx(L,{variant:"confirmed"===e.status?"active":"inactive",children:"confirmed"===e.status?"Confirmado":e.status})]})})]},e.id))})]}),ne.length>50&&n.jsxs("p",{className:"text-muted-foreground text-sm mt-4 text-center",children:["Mostrando 50 de ",ne.length," registros. Exporte o CSV para ver todos."]})]})})]}),n.jsx(G,{open:null!==oe,onClose:()=>ie(null),title:(e=>{switch(e){case"hours":return"Detalhamento de Horas";case"events":return"Detalhamento de Eventos";
1case"substitutions":return"Detalhamento de Substituições";case"teachers":return"Detalhamento por Professor";case"aula":return"Detalhamento - Aulas";case"reuniao":return"Detalhamento - Reuniões";case"projeto":return"Detalhamento - Projetos";case"pratica":return"Detalhamento - Práticas Pessoais";default:return""}})(oe),data:(e=>{switch(e){case"hours":return ne.map(e=>({id:e.id,data:A(new Date(e.event_date+"T12:00:00"),"dd/MM/yyyy",{locale:I}),evento:e.event_title,professor:e.teacher_name,tipo:e.event_type,horas:e.hours_counted.toFixed(1)+"h"}));case"events":return ne.map(e=>({id:e.id,data:A(new Date(e.event_date+"T12:00:00"),"dd/MM/yyyy",{locale:I}),evento:e.event_title,professor:e.teacher_name,tipo:e.event_type}));case"substitutions":return ne.filter(e=>e.is_substitute).map(e=>({id:e.id,data:A(new Date(e.event_date+"T12:00:00"),"dd/MM/yyyy",{locale:I}),evento:e.event_title,substituto:e.teacher_name,horas:e.hours_counted.toFixed(1)+"h"}));case"teachers":return ae.map(e=>{var t;return{id:e.teacher_id,nome:e.teacher_name,cpf:(null==(t=me.get(e.teacher_id))?void 0:t.cpf)||"-",horas:e.total_hours.toFixed(1)+"h",eventos:e.total_events,substituicoes:e.substitutions}});case"aula":return ne.filter(e=>e.event_type.toLowerCase().includes("aula")).map(e=>({id:e.id,data:A(new Date(e.event_date+"T12:00:00"),"dd/MM/yyyy",{locale:I}),evento:e.event_title,professor:e.teacher_name,horas:e.hours_counted.toFixed(1)+"h"}));case"reuniao":return ne.filter(e=>e.event_type.toLowerCase().includes("reunião")||e.event_type.toLowerCase().includes("reuniao")).map(e=>({id:e.id,data:A(new Date(e.event_date+"T12:00:00"),"dd/MM/yyyy",{locale:I}),evento:e.event_title,professor:e.teacher_name,horas:e.hours_counted.toFixed(1)+"h"}));case"projeto":return ne.filter(e=>e.event_type.toLowerCase().includes("projeto")).map(e=>({id:e.id,data:A(new Date(e.event_date+"T12:00:00"),"dd/MM/yyyy",{locale:I}),evento:e.event_title,professor:e.teacher_name,horas:e.hours_counted.toFixed(1)+"h"}));case"pratica":return ne.filter(e=>e.event_type.toLowerCase().includes("prática")||e.event_type.toLowerCase().includes("pratica")).map(e=>({id:e.id,data:A(new Date(e.event_date+"T12:00:00"),"dd/MM/yyyy",{locale:I}),evento:e.event_title,professor:e.teacher_name,horas:e.hours_counted.toFixed(1)+"h"}));default:return[]}})(oe),columns:(e=>{switch(e){case"hours":return[{key:"data",label:"Data"},{key:"evento",label:"Evento"},{key:"professor",label:"Professor"},{key:"tipo",label:"Tipo"},{key:"horas",label:"Horas"}];case"events":return[{key:"data",label:"Data"},{key:"evento",label:"Evento"},{key:"professor",label:"Professor"},{key:"tipo",label:"Tipo"}];case"substitutions":return[{key:"data",label:"Data"},{key:"evento",label:"Evento"},{key:"substituto",label:"Professor Substituto"},{key:"horas",label:"Horas"}];case"teachers":return[{key:"nome",label:"Nome"},{key:"cpf",label:"CPF"},{key:"horas",label:"Horas"},{key:"eventos",label:"Eventos"},{key:"substituicoes",label:"Substituições"}];case"aula":case"reuniao":case"projeto":case"pratica":return[{key:"data",label:"Data"},{key:"evento",label:"Evento"},{key:"professor",label:"Professor"},{key:"horas",label:"Horas"}];default:return[]}})(oe)})]})}export{Q 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.