PageSourceSearch

https://oabto.org.br/_nuxt/BRTnsMwD.js

js oabto.org.br collected 2026-10-05 07:57:20 UTC 8,652 bytes, 1 lines download raw bytes

1import{f as W,g as X,u as Y,c as i,a as t,b as k,w as P,G as Z,i as F,D as E,n as U,h as B,F as ee,E as te,m as R,r as a,e as se,B as A,o as u,t as D,j as le,k as j,z as ae}from"./xePx0y2Q.js";import{_ as ne}from"./BPKOcVuf.js";const oe={class:"min-h-[50svh] px-[5%] py-8 lg:px-[10%] 2xl:min-h-[70svh]"},re={class:"flex w-full flex-col gap-6 lg:flex-row"},ie={class:"flex max-h-[240px] w-full flex-col rounded-xl border border-neutral-200 bg-white lg:w-[25%]"},ue={key:0,class:"flex w-full flex-col rounded-xl border border-neutral-200 bg-white"},ce={class:"mt-4 w-full overflow-x-auto rounded-xl"},de={class:"mb-2 flex flex-wrap items-center gap-4 px-4"},pe={class:"flex flex-grow flex-col gap-2 sm:flex-row sm:items-center"},xe={class:"flex flex-grow flex-col gap-2 sm:flex-row sm:items-center"},fe={class:"flex w-full flex-col gap-2 sm:flex-row"},me={class:"mb-2 flex w-full flex-col items-stretch justify-end gap-2 px-4 sm:flex-row sm:items-end md:w-auto"},ve={class:"min-w-[720px] table-fixed overflow-visible bg-white text-center text-sm"},ge={class:"py-2 text-left text-[12px] md:pl-4"},be={class:"py-2 text-[12px]"},we={class:"py-2 text-[12px]"},ye={class:"py-2 text-center align-middle"},_e={class:"flex items-center justify-center gap-2"},he={class:"my-0 text-[12px]"},ke={key:0,class:"flex justify-center py-2 text-center align-middle text-[12px] md:pl-6"},De={key:1,class:"flex justify-center py-2 text-center align-middle text-[12px] md:pl-6"},Ce={class:"py-2 text-[12px]"},Se={class:"ml-6 flex w-full justify-center md:ml-0"},Pe=["onClick"],Fe={key:1},Ee={key:1,class:"flex w-full items-center justify-center"},Te={__name:"inscricoes",setup(je){const p=W(),L=A(()=>`color: ${p.buttonStyles?.backgroundColor}`),$=a(null),H=a(null),f=a([]),m=a(!1),N=a({}),M=a(""),C=a(!1),w=a(""),y=a(""),_=a(""),h=a(""),v=a(""),g=a(""),T=A(()=>{let l=f.value;if(h.value){const e=h.value.toLowerCase();l=l.filter(o=>o.event?.name&&o.event.name.toLowerCase().includes(e))}return(v.value||g.value)&&(l=l.filter(e=>{const o=e.event?.start_date,r=e.event?.end_date;if(!o||!r)return!1;const s=new Date(o);s.setUTCHours(0,0,0,0);const c=new Date(r);c.setUTCHours(0,0,0,0);let d=!0;if(v.value){const b=new Date(v.value);b.setUTCHours(0,0,0,0),d=d&&c.getTime()>=b.getTime()}if(g.value){const b=new Date(g.value);b.setUTCHours(0,0,0,0),d=d&&s.getTime()<=b.getTime()}return d})),l}),V=()=>{h.value=w.value,v.value=y.value,g.value=_.value,n.value=1,x(n.value)},z=()=>{w.value="",y.value="",_.value="",h.value="",v.value="",g.value="",n.value=1,x(n.value)},n=a(1),S=a(1),x=async(l=1)=>{m.value=!0,M.value=localStorage.getItem("people_id");try{const e=await R.get(`/registrations?page=${l}`);f.value=e.data.data||[],n.value=e.data.current_page,S.value=e.data.last_page,f.value.sort((r,s)=>{const c=new Date(r.created_at).getTime();return new Date(s.created_at).getTime()-c});const o=f.value.map(r=>R.get(`/certification/check-generate/${r.id}`));await Promise.all(o).then(r=>{r.forEach((s,c)=>{N.value[f.value[c].id]=s.data})})}catch(e){console.error("Erro ao carregar informações:",e)}finally{m.value=!1}},q=()=>{n.value>1&&(n.value--,x(n.value))},G=()=>{n.value<S.value&&(n.value++,x(n.value))},O=l=>{n.value=l,x(n.value)},J=ae(),K=async l=>{try{const e=J.public.pdfUrl;m.value=!0;const o=`${e}${l}`;console.log("chamou aqui",o),window.open(`${e}${l}`,"_blank"),console.log("chamou aqui 2",o)}catch(e){console.error("Erro ao obter certificado:",e)}finally{m.value=!1}},I=l=>l?new Date(l).toLocaleDateString("pt-BR"):"",Q=l=>({A:"Inscrito",R:"Reserva",C:"Cancelado",P:"Pendente"})[l]||"Desconhecido";return X(()=>{x(1),$.value=p.infos.home,H.value=$.value.filter(l=>l.name==="Eventos")[0],Y({title:`${p.infos.sites.site_name} - Inscrições`,meta:[{hid:"og:title",property:"og:title",content:`${p.infos.sites.site_name} - Inscrições`}]})}),(l,e)=>{const o=se,r=ne;return u(),i("section",oe,[t("div",re,[t("div",ie,[k(o,{to:"/login/Perfil",class:"flex px-6 py-[18px]"},{default:P(()=>[...e[5]||(e[5]=[t("i",{class:"bi bi-person pr-1"},null,-1),t("p",{class:"text-[14px]"},"Meu perfil",-1)])]),_:1}),k(o,{to:"/login/CompletarCadastro",class:"flex px-6 py-[18px]"},{default:P(()=>[...e[6]||(e[6]=[t("i",{class:"bi bi-stack pr-1"},null,-1),t("p",{class:"text-[14px]"},"Editar perfil",-1)])]),_:1}),e[8]||(e[8]=t("div",{class:"flex items-start justify-start border-l-2 border-[#003370] bg-[#003370] bg-opacity-10 px-6 py-[18px]"},[t("i",{class:"bi bi-shop-window pr-1"}),t("p",{class:"text-[14px]"},"Inscrições")],-1)),k(o,{to:"/login/AlterarSenha",class:"flex px-6 py-[18px]"},{default:P(()=>[...e[7]||(e[7]=[t("i",{class:"bi bi-lock pr-1"},null,-1),t("p",{class:"text-[14px]"},"Alterar senha",-1)])]),_:1}
1)]),m.value?(u(),i("div",Ee,[t("span",{style:U(L.value),class:"loading loading-dots loading-lg"},null,4)])):(u(),i("div",ue,[t("div",ce,[e[15]||(e[15]=Z('<div class="mb-4 flex w-full flex-wrap items-center gap-4 bg-white px-4"><span class="flex items-center gap-2 font-semibold">Status:</span><span class="mr-2 flex items-center gap-2 text-[12px]"><span class="inline-block h-3 w-3 rounded-full bg-green-500"></span> Inscrito </span><span class="mr-2 flex items-center gap-2 text-[12px]"><span class="inline-block h-3 w-3 rounded-full bg-red-500"></span> Reserva </span><span class="mr-2 flex items-center gap-2 text-[12px]"><span class="inline-block h-3 w-3 rounded-full bg-black"></span> Cancelado </span></div>',1)),t("div",de,[t("div",pe,[e[9]||(e[9]=t("label",{for:"eventNameFilter",class:"mb-1 whitespace-nowrap text-[14px]"},"Nome do Evento",-1)),F(t("input",{id:"eventNameFilter",type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>w.value=s),placeholder:"Buscar evento",class:"t-form-input 2x:w-full h-4 w-full rounded-[5px] border bg-[#fff] px-4 py-4 text-justify text-black"},null,512),[[E,w.value]])]),t("div",xe,[e[11]||(e[11]=t("label",{class:"mb-1 whitespace-nowrap text-[14px]"},"Período",-1)),t("div",fe,[F(t("input",{id:"startDateFilter",type:"date","onUpdate:modelValue":e[1]||(e[1]=s=>y.value=s),placeholder:"Data início",class:"t-form-input h-4 w-full rounded-[5px] border bg-[#fff] px-4 py-4 text-justify text-black"},null,512),[[E,y.value]]),e[10]||(e[10]=t("span",{class:"flex items-center text-[14px]"},"até",-1)),F(t("input",{id:"endDateFilter",type:"date","onUpdate:modelValue":e[2]||(e[2]=s=>_.value=s),placeholder:"Data fim",class:"t-form-input h-4 w-full rounded-[5px] border bg-[#fff] px-4 py-4 text-justify text-black"},null,512),[[E,_.value]])])])]),t("div",me,[t("button",{onClick:V,style:U([B(p).buttonStyles,C.value?B(p).buttonStylesHover:{}]),onMouseenter:e[3]||(e[3]=s=>C.value=!0),onMouseleave:e[4]||(e[4]=s=>C.value=!1),class:"w-full rounded-md px-4 py-1 sm:w-[100px]"}," Buscar ",36),t("button",{onClick:z,class:"w-full rounded-md bg-gray-500 px-4 py-1 text-[14px] font-semibold text-white hover:bg-gray-600 sm:w-[100px]"}," Limpar ")]),t("table",ve,[e[14]||(e[14]=t("thead",{class:"w-full bg-[#f6f6f6]"},[t("tr",{class:"w-full text-gray-600"},[t("th",{class:"w-[140px] py-2 text-[14px] font-medium text-black md:w-[200px]"}," Evento "),t("th",{class:"w-[100px] py-2 text-[14px] font-medium text-black md:w-auto"}," Data Início "),t("th",{class:"w-[100px] py-2 text-[14px] font-medium text-black md:w-auto"}," Data Fim "),t("th",{class:"w-[140px] py-2 text-[14px] font-medium text-black md:w-auto"}," Status "),t("th",{class:"md:w-autopy-2 w-[120px] text-[14px] font-medium text-black md:pl-6"}," Resultado "),t("th",{class:"py-2 text-[14px] font-medium text-black"}," Certificados ")])],-1)),t("tbody",null,[T.value.length>0?(u(!0),i(ee,{key:0},te(T.value,(s,c)=>(u(),i("tr",{class:"border-0 border-b border-slate-100",key:c},[t("td",ge,D(s.event.name),1),t("td",be,D(I(s.event?.start_date)),1),t("td",we,D(I(s.event?.end_date)),1),t("td",ye,[t("span",_e,[t("span",{class:le(["inline-block h-3 w-3 rounded-full",{"bg-green-500":s.status==="A","bg-red-500":s.status==="R","bg-black":s.status==="C","bg-gray-400":!["A","R","C"].includes(s.status)}])},null,2),t("p",he,D(Q(s.status)),1)])]),s.result==="P"?(u(),i("td",ke," Presente ")):j("",!0),s.result==="A"?(u(),i("td",De," Ausente ")):j("",!0),t("td",Ce,[t("div",Se,[N.value[s.id]?(u(),i("a",{key:0,onClick:d=>K(s.id),class:"cursor-pointer"},[...e[12]||(e[12]=[t("i",{class:"bi bi-file-pdf text-[16px] text-blue-600"},null,-1)])],8,Pe)):j("",!0)])])]))),128)):(u(),i("tr",Fe,[...e[13]||(e[13]=[t("td",{colspan:"6",class:"py-4 text-center text-[14px] md:px-6"}," Não há Cursos/Palestras cadastrados ",-1)])]))])])]),k(r,{"current-page":n.value,"total-pages":S.value,onPrev:q,onNext:G,onGoto:O},null,8,["current-page","total-pages"])]))])])}}};export{Te 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.