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