(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[51],{1829:function(e,r,a){Promise.resolve().then(a.bind(a,5196)),Promise.resolve().then(a.bind(a,8001))},7176:function(e,r,a){"use strict";var t=a(7437);a(2265),r.Z=e=>{let{column:r}=e,{filterValue:a,setFilter:o}=r;return(0,t.jsx)("div",{className:"w-full mt-2.5  ",children:(0,t.jsx)("input",{type:"text",value:a||"",onChange:e=>o(e.target.value),onClick:e=>e.stopPropagation(),className:"w-full px-3 py-1 border border-stroke focus:border-primary outline-none rounded-md "})})}},5196:function(e,r,a){"use strict";a.d(r,{default:function(){return g}});var t=a(7437),o=a(2265),s=a(3708),d=a(7176),n=a(9376),l=a(3464),i=a(3330),c=a(5740);let u=async(e,r,a,t,o,s,d)=>{let n=(0,c.B)();try{return(await l.Z.post("".concat(i.Q,"/api/v1/legacy601"),{legajo:e,especialidad:r,materia:t,plan:a,fecha:o,codigoTribunal:s,codigoHorario:d},{headers:{Authorization:"".concat(n)}})).data.registros}catch(e){throw Error(e.response.data.statussalida)}};var m=a(9317);let b=[{Header:"Legajo",accessor:"legajo"},{Header:"Estudiante",accessor:"estudiante"},{Header:"Nota",accessor:"nota"}],p={legajo:73761,especialidad:5,plan:2023,materia:106,anoacademico:2023,comision:1};var g=()=>{let e=(0,n.useSearchParams)(),[r,a]=(0,o.useState)([]),[l,i]=(0,o.useState)(!1),[c,g]=(0,o.useState)(!1),h=(0,o.useMemo)(()=>b,[]),x=(0,o.useMemo)(()=>Array.isArray(r)?r:[],[r]),k=(0,o.useMemo)(()=>({Filter:d.Z}),[]),{getTableProps:f,getTableBodyProps:N,headerGroups:j,page:y,prepareRow:w}=(0,s.useTable)({data:x,columns:h,defaultColumn:k},s.useFilters,s.useGlobalFilter,s.useSortBy,s.usePagination),v=Number(e.get("legajo")),E=Number(e.get("especialidad")),P=Number(e.get("plan")),S=Number(e.get("materia")),H=e.get("fecha"),_=H?new Date(H):null;_&&isNaN(_.getTime())&&console.error("Fecha inv\xe1lida:",H);let C=_?_.toISOString().split("T")[0]:null,T=Number(e.get("codigotribunal")),F=Number(e.get("codigohorario")),Z=async e=>{i(!0),a(await u(v,E,P,S,C,T,F)||[]),i(!1)};return((0,o.useEffect)(()=>{l||!p||c||(Z(p),g(!0))},[p,l,c]),l)?(0,t.jsx)(m.Z,{mensaje:"Cargando informaci\xf3n"}):(0,t.jsx)("div",{className:"rounded-sm border border-stroke bg-white px-5 pt-6 pb-2.5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1",children:(0,t.jsx)("div",{className:"max-w-full overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full table-auto",...f(),children:[(0,t.jsx)("thead",{children:j.map((e,r)=>(0,o.createElement)("tr",{...e.getHeaderGroupProps(),key:"headerGroup-".concat(r)},e.headers.map((e,r)=>(0,o.createElement)("th",{...e.getHeaderProps(e.getSortByToggleProps()),key:"column-".concat(r),className:"py-4 px-4 font-medium text-black dark:text-white"},e.render("Header")))))}),(0,t.jsx)("tbody",{...N(),children:r.map((e,r)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.legajo}),(0,t.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.nombre}),(0,t.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.nota})]},"row-".concat(r)))})]})})})}}},function(e){e.O(0,[3587,9070,4609,5947,8316,798,5640,1320,8001,2971,2117,1744],function(){return e(e.s=1829)}),_N_E=e.O()}]);