(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[938],{7716:function(e,r,a){Promise.resolve().then(a.bind(a,7729)),Promise.resolve().then(a.bind(a,8001))},7176:function(e,r,a){"use strict";var o=a(7437);a(2265),r.Z=e=>{let{column:r}=e,{filterValue:a,setFilter:s}=r;return(0,o.jsx)("div",{className:"w-full mt-2.5  ",children:(0,o.jsx)("input",{type:"text",value:a||"",onChange:e=>s(e.target.value),onClick:e=>e.stopPropagation(),className:"w-full px-3 py-1 border border-stroke focus:border-primary outline-none rounded-md "})})}},7729:function(e,r,a){"use strict";a.d(r,{default:function(){return h}});var o=a(7437),s=a(2265),d=a(3708),t=a(7648),c=a(7176),l=a(3464),n=a(3330),i=a(5740);let b=async e=>{try{return(await l.Z.post("".concat(n.Q,"/api/v1/legacy602"),{legajo:e},{headers:{Authorization:"".concat((0,i.B)())}})).data.registros}catch(e){throw Error(e.response.data.statussalida)}};var u=a(3014),p=a(9317);let m=[{Header:"Especialidad",accessor:"especialidad"},{Header:"Materia",accessor:"materia"},{Header:"Cargo",accessor:"cargo"},{Header:"Tribunal",accessor:"tribunal"},{Header:"Plan",accessor:"plan"},{Header:"Aula",accessor:"aula"},{Header:"Fecha",accessor:"fecha"},{Header:"H.P.",accessor:"horasPractico"},{Header:"H.T.",accessor:"horasTeorico"},{Header:"Insc.",accessor:"inscriptos"}];var h=()=>{let[e,r]=(0,s.useState)([]),[a,l]=(0,s.useState)(!1),[n,i]=(0,s.useState)(!1),{user:h}=(0,u.a)(),k=(0,s.useMemo)(()=>m,[]),x=(0,s.useMemo)(()=>Array.isArray(e)?e:[],[e]),g=(0,s.useMemo)(()=>({Filter:c.Z}),[]),{getTableProps:f,getTableBodyProps:y,headerGroups:j,page:N,prepareRow:v}=(0,d.useTable)({data:x,columns:k,defaultColumn:g},d.useFilters,d.useGlobalFilter,d.useSortBy,d.usePagination),H=async e=>{l(!0),r(await b(e.currentUser.legajo)||[]),l(!1)};return((0,s.useEffect)(()=>{a||!h||n||(H(h),i(!0))},[h,a,n]),a)?(0,o.jsx)(p.Z,{mensaje:"Cargando informaci\xf3n"}):(0,o.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,o.jsx)("div",{className:"max-w-full overflow-x-auto",children:(0,o.jsxs)("table",{className:"w-full table-auto",...f(),children:[(0,o.jsx)("thead",{children:j.map((e,r)=>(0,s.createElement)("tr",{...e.getHeaderGroupProps(),key:"headerGroup-".concat(r)},e.headers.map(e=>(0,s.createElement)("th",{...e.getHeaderProps(e.getSortByToggleProps()),key:"column-".concat(e.id),className:"py-4 px-4 font-medium text-black dark:text-white"},e.render("Header")))))}),(0,o.jsx)("tbody",{...y(),children:e.map((e,r)=>(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.abreviaturaespecialidad}),(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.nombre}),(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.cargo}),(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.tribunal}),(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.plan}),(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.aula}),(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.fecha}),(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.horariopractico}),(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.horarioteorico}),(0,o.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.alumnos>0&&(0,o.jsx)(t.default,{href:"/docente/inscriptos-por-mesa?legajo=".concat(h.legajo,"&especialidad=").concat(e.especialidad,"&materia=").concat(e.materia,"&plan=").concat(e.plan,"&fecha=").concat(e.fecha,"&codigotribunal=").concat(e.codigotribunal,"&codigohorario=").concat(e.codigohorario),className:"text-white bg-black hover:bg-primary focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center me-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",children:(0,o.jsx)("span",{className:"text-xs px-2",children:e.alumnos})})})]},r))})]})})})}}},function(e){e.O(0,[3587,9070,4609,5947,8316,798,5640,1320,8001,2971,2117,1744],function(){return e(e.s=7716)}),_N_E=e.O()}]);