(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2789],{4233:function(e,a,s){Promise.resolve().then(s.bind(s,6805)),Promise.resolve().then(s.bind(s,8001))},7176:function(e,a,s){"use strict";var r=s(7437);s(2265),a.Z=e=>{let{column:a}=e,{filterValue:s,setFilter:t}=a;return(0,r.jsx)("div",{className:"w-full mt-2.5  ",children:(0,r.jsx)("input",{type:"text",value:s||"",onChange:e=>t(e.target.value),onClick:e=>e.stopPropagation(),className:"w-full px-3 py-1 border border-stroke focus:border-primary outline-none rounded-md "})})}},6805:function(e,a,s){"use strict";s.d(a,{default:function(){return p}});var r=s(7437),t=s(2265),l=s(3708),d=s(7176),o=s(3014),n=s(3464),c=s(3330),i=s(5740);let x=async(e,a)=>{let s=(0,i.B)();try{return(await n.Z.post("".concat(c.Q,"/api/v1/legacy402"),{legajo:e,facultad:a},{headers:{Authorization:"".concat(s)}})).data.registros}catch(e){throw Error(e.response.data.statussalida)}};var m=s(9317);let u=[{Header:"Fecha",accessor:"fecha"},{Header:"Materia",accessor:"materia"},{Header:"Nota",accessor:"nota"},{Header:"Especialidad",accessor:"especialidad"},{Header:"Plan",accessor:"plan"}];var p=()=>{let{user:e}=(0,o.a)(),[a,s]=(0,t.useState)([]),[n,c]=(0,t.useState)(!1),i=(0,t.useMemo)(()=>u,[]),p=(0,t.useMemo)(()=>a,[a]),b=(0,t.useMemo)(()=>({Filter:d.Z}),[]),{getTableProps:h,getTableBodyProps:f,headerGroups:j,page:k,prepareRow:w,state:N,setGlobalFilter:v,nextPage:g,previousPage:y,canNextPage:E,canPreviousPage:S,pageOptions:P,setPageSize:_,gotoPage:C}=(0,l.useTable)({data:p,columns:i,defaultColumn:b},l.useFilters,l.useGlobalFilter,l.useSortBy,l.usePagination),H=async e=>{c(!0),s(await x(e.currentUser.legajo,e.currentUser.facultad)),c(!1)};(0,t.useEffect)(()=>{n||(null==a?void 0:a.length)||!e||H(e)},[n,a,e]);let{globalFilter:M,pageIndex:F,pageSize:Z}=N;return n?(0,r.jsx)(m.Z,{mensaje:"Cargando informaci\xf3n"}):(0,r.jsxs)("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,r.jsx)("div",{className:"flex justify-between pb-4",children:(0,r.jsx)("div",{className:"w-100 relative"})}),(0,r.jsxs)("div",{className:"max-w-full overflow-x-auto",children:[(0,r.jsxs)("table",{className:"w-full table-auto",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"bg-gray-2 text-left dark:bg-meta-4",children:[(0,r.jsx)("th",{colSpan:1,className:"sm:max-w-[100px] lg:min-w-[250px] py-4 px-4 font-medium text-black dark:text-white xl:pl-11",children:"Materia"}),(0,r.jsx)("th",{colSpan:2,className:"py-4 px-4 font-medium text-black dark:text-white",children:"Estado"})]})}),(0,r.jsx)("tbody",{children:null==a?void 0:a.map((e,a)=>(0,r.jsxs)("tr",{children:[(0,r.jsxs)("td",{colSpan:1,className:"sm:max-w-[100px] lg:min-w-[250px] border-b border-[#eee] py-5 px-4 pl-9 dark:border-strokedark xl:pl-11",children:[(0,r.jsx)("h5",{className:"font-medium text-black dark:text-white",children:e.nombre}),(0,r.jsxs)("p",{className:"text-sm",children:["A\xf1o: ",e.año," - Plan: ",e.plan]})]}),(0,r.jsx)("td",{colSpan:1,className:"sm:max-w-[100px] lg:min-w-[250px] border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:(0,r.jsx)("p",{className:"text-sm font-medium dark:text-white",children:e.estado})}),(0,r.jsx)("td",{})]},a))})]}),(0,r.jsxs)("div",{className:"flex justify-between px-6 pt-5 pb-5 border-t border-stroke",children:[(0,r.jsx)("div",{className:"flex"}),(0,r.jsx)("p",{className:"font-medium"})]})]})]})}}},function(e){e.O(0,[3587,9070,4609,5947,8316,798,5640,1320,8001,2971,2117,1744],function(){return e(e.s=4233)}),_N_E=e.O()}]);