1 line
5.2 KiB
JavaScript
1 line
5.2 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4959],{5337:function(e,t,r){Promise.resolve().then(r.bind(r,2983)),Promise.resolve().then(r.bind(r,2440))},325:function(e,t,r){"use strict";r.d(t,{z:function(){return d}});var a=JSON.parse('{"registros":[{"title":"Cursado","value":[{"cardContent":"Horarios y Aulas","cardUrl":"/estudiante/cursado-horarios"},{"cardContent":"Nota de Examenes Parciales","cardUrl":"/estudiante/cursado-examenes"},{"cardContent":"Inscripci\xf3n a Cursado","cardUrl":"/estudiante/cursado-inscripcion"}]},{"title":"Ex\xe1menes","value":[{"cardContent":"Ex\xe1menes Rendidos","cardUrl":"/estudiante/examenes-finales"},{"cardContent":"Inscripci\xf3n a Examen","cardUrl":"/estudiante/examenes-inscripcion"}]},{"title":"Estado Acad\xe9mico","value":[{"cardContent":"Estado Acad\xe9mico","cardUrl":"/estudiante/estado-academico-detalle"}]},{"title":"Plan de Estudio","value":[{"cardContent":"Materias del Plan","cardUrl":"/estudiante/plan-de-estudio"},{"cardContent":"Correlatividad para cursar","cardUrl":"/estudiante/correlativas-cursado"},{"cardContent":"Correlatividad para rendir","cardUrl":"/estudiante/correlativas-examenes"}]},{"title":"Boleto Especial Educativo","value":[{"cardContent":"Tr\xe1mite de Boleto Especial Educativo","cardUrl":"/estudiante/boleto-estudiantil"}]}]}'),n=JSON.parse('{"registros":[{"title":"Cursado","value":[{"cardContent":"Materias dictadas","cardUrl":"/docente/materias-que-dicta"}]},{"title":"Ex\xe1menes","value":[{"cardContent":"Tribunales que integra","cardUrl":"/docente/tribunales-que-integra"}]}]}'),s=r(2453);let i={[s.G7.Estudiante]:a,[s.G7.Docente]:n},d=async e=>{try{var t;return null===(t=i[e])||void 0===t?void 0:t.registros}catch(e){throw Error(e.response.data.statussalida)}}},2983:function(e,t,r){"use strict";var a=r(7437),n=r(2265),s=r(7648),i=r(325),d=r(9317),o=r(2453);t.default=e=>{let{cardTitle:t,cardContent:r,cardUrl:c}=e,[l,u]=(0,n.useState)([]),[p,m]=(0,n.useState)(!1),v=async()=>{m(!0),u(await (0,i.z)(o.G7.Docente)),m(!1)};return((0,n.useEffect)(()=>{p||l.length||v()},[p,l]),p)?(0,a.jsx)(d.Z,{mensaje:"Aguarde un momento. Cargando informaci\xf3n..."}):(0,a.jsx)("div",{className:"grid grid-cols-1 gap-7.5 sm:grid-cols-2 xl:grid-cols-3",children:l.map((e,t)=>{var r;return(0,a.jsxs)("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[(0,a.jsx)("div",{className:"border-b border-stroke p-5 px-7.5 dark:border-strokedark",children:(0,a.jsx)("h4",{className:"text-xl font-semibold text-black dark:text-white dark:hover:text-primary",children:e.title})}),(0,a.jsx)("div",{className:"py-5",children:null===(r=e.value)||void 0===r?void 0:r.map((e,t)=>(0,a.jsx)("div",{className:"px-7.5 py-1",children:(0,a.jsx)("p",{className:" hover:text-primary",children:(0,a.jsx)(s.default,{href:e.cardUrl,children:e.cardContent})})},"".concat(e.cardContent,"_").concat(t)))})]},"".concat(e.title,"_").concat(t))})})}},2440:function(e,t,r){"use strict";r.d(t,{default:function(){return u}});var a=r(7437);r(7960),r(2336),r(7337);var n=r(2265),s=r(798),i=r(4523),d=r(575),o=r(3014),c=r(9376),l=r(2453);function u(e){let{children:t}=e,[r,u]=(0,n.useState)(!1),{user:p,getUser:m,logout:v,setUser:h}=(0,o.a)(),[f,x]=(0,n.useState)("Active"),{push:b}=(0,c.useRouter)();return(0,s.Yp)({onIdle:()=>{x("Idle")},onActive:()=>{x("Active")},timeout:3e5,throttle:500}),(0,n.useEffect)(()=>{"Idle"===f&&p&&(v(),b("/"))},[p,v,f,b]),(0,n.useEffect)(()=>{m()||p||b("/")}),(0,n.useEffect)(()=>{p&&(p.currentUser.role!==l.G7.Estudiante&&window.location.pathname.includes("estudiante")?(0,c.redirect)("/docente/menu-principal"):p.currentUser.role!==l.G7.Docente&&window.location.pathname.includes(l.G7.Docente.toLowerCase())&&(0,c.redirect)("/estudiante/menu-principal"))},[b,p]),(0,a.jsx)(d.V.Provider,{value:{user:p,setUser:h},children:(0,a.jsx)("div",{className:"dark:bg-boxdark-2 dark:text-bodydark",children:(0,a.jsx)("div",{className:"h-screen",children:(0,a.jsxs)("div",{className:"relative flex flex-1 flex-col overflow-y-auto overflow-x-hidden",children:[(0,a.jsx)(i.Z,{sidebarOpen:r,setSidebarOpen:u}),(0,a.jsx)("main",{children:(0,a.jsx)("div",{className:"mx-auto max-w-screen-2xl p-4 md:p-6 2xl:p-10",children:t})})]})})})})}},4474:function(e,t,r){"use strict";r.d(t,{o:function(){return n}});class a extends Error{}function n(e,t){let r;if("string"!=typeof e)throw new a("Invalid token specified: must be a string");t||(t={});let n=!0===t.header?0:1,s=e.split(".")[n];if("string"!=typeof s)throw new a(`Invalid token specified: missing part #${n+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)}}(s)}catch(e){throw new a(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new a(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}a.prototype.name="InvalidTokenError"}},function(e){e.O(0,[3587,9070,4609,5947,8316,798,1320,2971,2117,1744],function(){return e(e.s=5337)}),_N_E=e.O()}]); |