(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8381],{9272:function(e,t,r){Promise.resolve().then(r.bind(r,7185)),Promise.resolve().then(r.bind(r,8001))},9956:function(e,t,r){"use strict";r.d(t,{_:function(){return n}});var a=r(3464),s=r(3330),d=r(5740);let n=async(e,t)=>{try{return(await a.Z.post("".concat(s.Q,"/api/v1/legacy402"),{legajo:e,facultad:t},{headers:{Authorization:"".concat((0,d.B)())}})).data.registros}catch(e){throw Error(e.response.data.statussalida)}}},7185:function(e,t,r){"use strict";var a=r(7437),s=r(2265),d=r(9956),n=r(3014),o=r(9317);t.default=()=>{let{user:e}=(0,n.a)(),[t,r]=(0,s.useState)([]),[i,c]=(0,s.useState)(!1),[l,h]=(0,s.useState)("");(0,s.useMemo)(()=>t,[t]);let u=async e=>{c(!0);let t=await (0,d._)(e.currentUser.legajo,e.currentUser.facultad);r(t),c(!1),h(t.length>0?"data":"no_data")};return((0,s.useEffect)(()=>{i||!e||l||u(e)},[i,t,e,l]),i)?(0,a.jsx)(o.Z,{mensaje:"Cargando informaci\xf3n"}):(0,a.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,a.jsx)("div",{className:"flex justify-between pb-4",children:(0,a.jsx)("div",{className:"w-100 relative"})}),(0,a.jsxs)("div",{className:"max-w-full overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"bg-gray-2 text-left dark:bg-meta-4",children:[(0,a.jsx)("th",{className:"py-4 px-4 font-medium text-center text-black dark:text-white",children:"A\xf1o"}),(0,a.jsx)("th",{className:"py-4 px-4 font-medium text-black dark:text-white",children:"Materia"}),(0,a.jsx)("th",{className:"py-4 px-4 font-medium text-black dark:text-white",children:"Correlatividad"})]})}),(0,a.jsx)("tbody",{children:t.map((e,t)=>(0,a.jsxs)("tr",{children:[""===e.estado&&(0,a.jsx)("td",{className:"text-sm text-center border-b border-[#eee] dark:border-strokedark",children:e.año}),""===e.estado&&(0,a.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 pl-5 dark:border-strokedark",children:(0,a.jsx)("h5",{className:"font-medium text-black dark:text-white",children:e.nombre})}),""===e.estado&&""===e.faltareg&&(0,a.jsx)("td",{className:"text-sm border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:"Puede cursar"}),""===e.estado&&(0,a.jsx)("td",{className:"text-sm border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:e.faltareg})]},t))})]}),(0,a.jsxs)("div",{className:"flex justify-between px-6 pt-5 pb-5 border-t border-stroke",children:[(0,a.jsx)("div",{className:"flex"}),(0,a.jsx)("p",{className:"font-medium"})]})]})]})}},4474:function(e,t,r){"use strict";r.d(t,{o:function(){return s}});class a extends Error{}function s(e,t){let r;if("string"!=typeof e)throw new a("Invalid token specified: must be a string");t||(t={});let s=!0===t.header?0:1,d=e.split(".")[s];if("string"!=typeof d)throw new a(`Invalid token specified: missing part #${s+1}`);try{r=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(d)}catch(e){throw new a(`Invalid token specified: invalid base64 for part #${s+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new a(`Invalid token specified: invalid json for part #${s+1} (${e.message})`)}}a.prototype.name="InvalidTokenError"}},function(e){e.O(0,[3587,9070,4609,5947,8316,798,1320,8001,2971,2117,1744],function(){return e(e.s=9272)}),_N_E=e.O()}]);