Files
dtic-DIIAA/servicios/sysacad/.next/static/chunks/app/estudiante/examenes-inscripcion/page-13d9f0067fc76769.js
T

1 line
16 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3440],{9446:function(e,t,r){Promise.resolve().then(r.bind(r,1979)),Promise.resolve().then(r.bind(r,8001))},471:function(e,t,r){"use strict";r.d(t,{M:function(){return i},W:function(){return l}});var a=r(3464),s=r(3330),n=r(5740);let i=async e=>{let t=(0,n.B)();try{return(await a.Z.post("".concat(s.Q,"/api/v1/legacy501"),e,{headers:{Authorization:"".concat(t)}})).data.registros}catch(e){throw Error(e.response.data.statussalida)}},l=async e=>{let t=(0,n.B)();try{return(await a.Z.post("".concat(s.Q,"/api/v1/legacy201"),e,{headers:{Authorization:"".concat(t)}})).data.registros}catch(e){throw Error(e.response.data.statussalida)}}},4422:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var a=r(7437),s=r(166),n=r(5738);(0,s.default)(()=>Promise.resolve().then(r.bind(r,5738)).then(e=>e.PDFViewer),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),(0,s.default)(()=>Promise.resolve().then(r.bind(r,5738)).then(e=>e.PDFDownloadLink),{loadableGenerated:{webpack:()=>[null]},ssr:!1});let i=n.StyleSheet.create({page:{flexDirection:"row",backgroundColor:"#FFFFFF",width:"100%",height:"100%",margin:30,padding:30,textAlign:"left"},section:{margin:10,padding:30,flexGrow:1},container:{flex:1,flexDirection:"column",alignContent:"flex-start",justifyContent:"center"},headSection:{width:"100%",flexDirection:"column",flexWrap:"nowrap",alignContent:"flex-start",justifyContent:"flex-start",alignItems:"center",fontSize:2},imageLogo:{width:"150px",height:"auto",alignSelf:"center",alignItems:"center",marginLeft:"-5px",marginBottom:"15px"},docTitle:{textAlign:"center",fontSize:"14px",paddingBottom:"15px"},userData:{width:"17cm",fontSize:12,marginTop:"12px",marginBottom:"15px",borderBottom:1,borderBottomColor:"#757575",borderBottomWidth:"2px"},lineData:{marginBottom:"10px"},subjectRow:{width:"17cm",fontSize:12,marginTop:"8px",marginBottom:"10px",borderBottom:1,borderBottomColor:"#757575",borderBottomWidth:"2px"}});function l(e){var t;let{data:r=[],estudiante:s={}}=e;return(0,a.jsx)(n.Document,{children:(0,a.jsx)(n.Page,{size:"A4",style:i.page,children:(0,a.jsxs)(n.View,{children:[(0,a.jsxs)(n.View,{style:i.headSection,children:[(0,a.jsx)(n.Image,{src:"/images/logo/logo_pdf.png",style:i.imageLogo}),(0,a.jsx)(n.Text,{style:i.docTitle,children:"COMPROBANTE DE INSCRIPCI\xd3N A EX\xc1MEN FINAL"})]}),(0,a.jsxs)(n.View,{style:i.userData,children:[(0,a.jsxs)(n.Text,{style:i.lineData,children:["Nombre del Estudiante: ",null==s?void 0:null===(t=s.kermetPayload)||void 0===t?void 0:t.nombre]}),(0,a.jsxs)(n.Text,{style:i.lineData,children:["Legajo: ",null==s?void 0:s.currentUser.legajo]})]}),r.map((e,t)=>(0,a.jsxs)(n.View,{style:i.subjectRow,children:[(0,a.jsxs)(n.Text,{style:i.lineData,children:["Materia: ",e.nombrelargo]}),(0,a.jsxs)(n.Text,{style:i.lineData,children:["Tribunal: ",e.nombretribunal]}),(0,a.jsxs)(n.Text,{style:i.lineData,children:["Fecha y hora: ",e.fecha," - ",e.horariopractico," Hs"]}),(0,a.jsxs)(n.Text,{style:i.lineData,children:["Codigo de validacion: ",e.checksum]})]},"".concat(t,"-insc")))]})})})}},1979:function(e,t,r){"use strict";r.d(t,{default:function(){return j}});var a=r(7437),s=r(2265),n=r(7648),i=r(3014),l=r(3464),o=r(3330),c=r(5740);let d=async(e,t)=>{let r=(0,c.B)();try{let a=await l.Z.post("".concat(o.Q,"/api/v1/legacy202"),{legajo:e,facultad:t},{headers:{Authorization:"".concat(r)}});return localStorage.setItem("materiasExamenes",JSON.stringify(a.data.registros)),a.data.registros}catch(e){throw Error(e.response.data.statussalida)}};var u=r(9317),x=r(4422),m=r(471);let h=async(e,t)=>{try{return(await l.Z.post("".concat(o.Q,"/api/v1/legacy204"),{legajo:e,facultad:t},{headers:{Authorization:"".concat((0,c.B)())}})).data.registros}catch(e){throw Error(e.response.data.statussalida)}};var p=r(9376),f=e=>{let{modalOpen:t,setModalOpen:r,dataInscripcion:n,selectedTribunal:i}=e,l=(0,p.useRouter)(),[o,c]=(0,s.useState)(!1),d=(0,s.useRef)(null),u=(0,s.useRef)(null),x=()=>{i&&(i.impreso="1"),r(!1),c(!0)};return((0,s.useEffect)(()=>{let e=e=>{let{target:a}=e;u.current&&(!t||u.current.contains(a)||d.current.contains(a)||(i&&(i.impreso="1"),r(!1),l.refresh(),c(!0)))};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)}),(0,s.useEffect)(()=>{t&&(i&&(i.impreso="1"),n&&(n.impreso="1"))},[t,n,i]),(0,s.useEffect)(()=>{let e=e=>{let{keyCode:a}=e;t&&27===a&&(i&&(i.impreso="1"),r(!1),l.refresh())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),o)?(0,p.redirect)("/estudiante/examenes-inscripcion"):(0,a.jsx)("div",{className:"fixed top-0 left-0 z-999999 flex h-full min-h-screen w-full items-center justify-center bg-black/90 px-4 py-5 ".concat(t?"block":"hidden"),children:(0,a.jsxs)("div",{ref:u,onFocus:()=>r(!0),onBlur:()=>r(!1),className:"w-full max-w-142.5 rounded-lg bg-white py-12 px-8 text-center dark:bg-boxdark md:py-15 md:px-17.5",children:[(0,a.jsx)("h3",{className:"pb-2 text-xl font-bold text-black dark:text-white sm:text-2xl",children:"Su inscripci\xf3n se ha eliminado exitosamente!"}),(0,a.jsx)("span",{className:"mx-auto mb-6 inline-block h-1 w-22.5 rounded bg-primary"}),(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)("p",{className:"mb-4 text-left",children:["Se ha eliminado la inscripci\xf3n exitosamente! ",(0,a.jsx)("br",{}),"Haz clic en el bot\xf3n debajo para volver a la p\xe1gina de Inscripci\xf3n a Ex\xe1menes."]})}),(0,a.jsx)("div",{className:"-mx-3 flex justify-items-center flex-wrap gap-y-4 flex-col items-center",children:(0,a.jsx)("div",{className:"w-full px-3",children:(0,a.jsx)("button",{onClick:()=>x(),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:"VOLVER"})})})]})})},g=r(5738);let b=[{Header:"Plan",accessor:"plan"},{Header:"Materia",accessor:"materia"}];var j=()=>{let{user:e}=(0,i.a)(),[t,r]=(0,s.useState)([]),[l,o]=(0,s.useState)(!1),[c,p]=(0,s.useState)(null),[j,C]=(0,s.useState)(null),[w,k]=(0,s.useState)(!1);(0,s.useMemo)(()=>b,[]),(0,s.useMemo)(()=>t,[t]);let v=async e=>{k(!0),r(await d(e.currentUser.legajo,e.currentUser.facultad)),k(!1)},y=async t=>{let{materia:a,especialidad:s,plan:n,turno:i,fecha:l}=t;t.impreso="1",r(e=>e.map(e=>e.materia===a&&e.especialidad===s&&e.plan===n&&e.turno===i&&e.fecha===l?{...e,impreso:"1"}:e)),C(t),k(!0);let[c]=await (0,m.W)({legajo:e.currentUser.legajo,especialidad:s,plan:n,materia:a,turno:i,fecha:l,facultad:e.currentUser.facultad,impreso:t.impreso});p(c),o(!0),k(!1)};if((0,s.useEffect)(()=>{w||t.length||!e||v(e)},[w,t,e]),w)return(0,a.jsx)(u.Z,{mensaje:"Cargando informaci\xf3n"});let N=async t=>{await h(e.currentUser.legajo,e.currentUser.facultad),v(e)},L="comprobante_inscripcion_examen_".concat(null==e?void 0:e.currentUser.legajo,".pdf");return(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)(f,{modalOpen:l,setModalOpen:o,dataInscripcion:c,selectedTribunal:j}),(0,a.jsx)("div",{className:"flex justify-end pb-4",children:(0,a.jsx)("div",{className:"flex items-center space-x-3.5",children:(0,a.jsx)(g.PDFDownloadLink,{className:"text-white bg-primary 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",document:(0,a.jsx)(x.Z,{data:t.filter(e=>e.inscripto),estudiante:e}),fileName:L,onClick:N,children:e=>{let{blob:t,url:r,loading:s,error:n}=e;return s?"Loading document...":(0,a.jsxs)("div",{className:"flex items-center",children:[" ",(0,a.jsxs)("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M16.8749 7.44902C16.5374 7.44902 16.228 7.73027 16.228 8.0959V13.3834C16.228 14.4803 15.4124 15.3521 14.3999 15.3521H3.5999C2.55928 15.3521 1.77178 14.4803 1.77178 13.3834V8.06777C1.77178 7.73027 1.49053 7.4209 1.1249 7.4209C0.759277 7.4209 0.478027 7.70215 0.478027 8.06777V13.3553C0.478027 15.1271 1.85615 16.5896 3.57178 16.5896H14.3999C16.1155 16.5896 17.4937 15.1553 17.4937 13.3553V8.06777C17.5218 7.73027 17.2124 7.44902 16.8749 7.44902Z",fill:""}),(0,a.jsx)("path",{d:"M8.5498 11.6396C8.6623 11.7521 8.83105 11.8365 8.9998 11.8365C9.16855 11.8365 9.30918 11.7803 9.4498 11.6396L12.8811 8.23652C13.1342 7.9834 13.1342 7.58965 12.8811 7.33652C12.6279 7.0834 12.2342 7.0834 11.9811 7.33652L9.64668 9.64277V2.16152C9.64668 1.82402 9.36543 1.51465 8.9998 1.51465C8.6623 1.51465 8.35293 1.7959 8.35293 2.16152V9.69902L6.01855 7.36465C5.76543 7.11152 5.37168 7.11152 5.11855 7.36465C4.86543 7.61777 4.86543 8.01152 5.11855 8.26465L8.5498 11.6396Z",fill:""})]}),(0,a.jsx)("span",{className:"text-xs px-2",children:" DESCARGAR COMPROBANTE"})]})}})})}),(0,a.jsxs)("div",{className:"max-w-full overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full table-auto",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:"min-w-[150px] 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:"Acciones"})]})}),(0,a.jsx)("tbody",{children:t.map((e,t)=>(0,a.jsxs)("tr",{children:[(0,a.jsxs)("td",{className:"border-b border-[#eee] py-5 px-4 pl-9 dark:border-strokedark xl:pl-6",children:[(0,a.jsx)("h5",{className:"font-medium text-black dark:text-white",children:e.nombre}),(0,a.jsxs)("p",{className:"text-sm",children:["Plan ",e.plan]})]}),(0,a.jsx)("td",{className:"border-b border-[#eee] py-5 px-4 dark:border-strokedark",children:(0,a.jsxs)("div",{className:"flex items-center space-x-3.5",children:[""===e.checksum&&(0,a.jsxs)(n.default,{href:"/estudiante/examenes-inscripcion-tribunales?especialidad=".concat(e.especialidad,"&plan=").concat(e.plan,"&materia=").concat(e.materia),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,a.jsxs)("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("g",{"clip-path":"url(#clip0_62_9787)",children:(0,a.jsx)("path",{d:"M15.55 2.97499C15.55 2.77499 15.475 2.57499 15.325 2.42499C15.025 2.12499 14.725 1.82499 14.45 1.52499C14.175 1.24999 13.925 0.974987 13.65 0.724987C13.525 0.574987 13.375 0.474986 13.175 0.449986C12.95 0.424986 12.75 0.474986 12.575 0.624987L10.875 2.32499H2.02495C1.17495 2.32499 0.449951 3.02499 0.449951 3.89999V14C0.449951 14.85 1.14995 15.575 2.02495 15.575H12.15C13 15.575 13.725 14.875 13.725 14V5.12499L15.35 3.49999C15.475 3.34999 15.55 3.17499 15.55 2.97499ZM8.19995 8.99999C8.17495 9.02499 8.17495 9.02499 8.14995 9.02499L6.34995 9.62499L6.94995 7.82499C6.94995 7.79999 6.97495 7.79999 6.97495 7.77499L11.475 3.27499L12.725 4.49999L8.19995 8.99999ZM12.575 14C12.575 14.25 12.375 14.45 12.125 14.45H2.02495C1.77495 14.45 1.57495 14.25 1.57495 14V3.87499C1.57495 3.62499 1.77495 3.42499 2.02495 3.42499H9.72495L6.17495 6.99999C6.04995 7.12499 5.92495 7.29999 5.87495 7.49999L4.94995 10.3C4.87495 10.5 4.92495 10.675 5.02495 10.85C5.09995 10.95 5.24995 11.1 5.52495 11.1H5.62495L8.49995 10.15C8.67495 10.1 8.84995 9.97499 8.97495 9.84999L12.575 6.24999V14ZM13.5 3.72499L12.25 2.49999L13.025 1.72499C13.225 1.92499 14.05 2.74999 14.25 2.97499L13.5 3.72499Z",fill:""})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_62_9787",children:(0,a.jsx)("rect",{width:"18",height:"18",fill:"white"})})})]}),(0,a.jsx)("span",{className:"text-xs px-2",children:" VER TRIBUNALES DISPONIBLES"})]}),(0,a.jsxs)("div",{className:"w-100 text-black",children:[e.checksum&&(0,a.jsx)("div",{className:"mb-2",children:e.inscripto}),e.checksum&&""===e.impreso&&(0,a.jsx)("div",{children:(0,a.jsxs)(n.default,{href:"#",onClick:()=>y(e),className:"text-white bg-primary 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,a.jsxs)("svg",{className:"mx-auto fill-current",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M16.8094 3.02498H14.1625V2.4406C14.1625 1.40935 13.3375 0.584351 12.3062 0.584351H9.65935C8.6281 0.584351 7.8031 1.40935 7.8031 2.4406V3.02498H5.15623C4.15935 3.02498 3.33435 3.84998 3.33435 4.84685V5.8781C3.33435 6.63435 3.78123 7.2531 4.43435 7.5281L4.98435 18.9062C5.0531 20.3156 6.22185 21.4156 7.63123 21.4156H14.3C15.7093 21.4156 16.8781 20.3156 16.9469 18.9062L17.5312 7.49372C18.1844 7.21872 18.6312 6.5656 18.6312 5.84373V4.81248C18.6312 3.84998 17.8062 3.02498 16.8094 3.02498ZM9.38435 2.4406C9.38435 2.26873 9.52185 2.13123 9.69373 2.13123H12.3406C12.5125 2.13123 12.65 2.26873 12.65 2.4406V3.02498H9.41873V2.4406H9.38435ZM4.9156 4.84685C4.9156 4.70935 5.01873 4.57185 5.1906 4.57185H16.8094C16.9469 4.57185 17.0844 4.67498 17.0844 4.84685V5.8781C17.0844 6.0156 16.9812 6.1531 16.8094 6.1531H5.1906C5.0531 6.1531 4.9156 6.04998 4.9156 5.8781V4.84685V4.84685ZM14.3344 19.8687H7.6656C7.08123 19.8687 6.59998 19.4218 6.5656 18.8031L6.04998 7.6656H15.9844L15.4687 18.8031C15.4 19.3875 14.9187 19.8687 14.3344 19.8687Z",fill:""}),(0,a.jsx)("path",{d:"M11 11.1375C10.5875 11.1375 10.2094 11.4812 10.2094 11.9281V16.2937C10.2094 16.7062 10.5531 17.0843 11 17.0843C11.4125 17.0843 11.7906 16.7406 11.7906 16.2937V11.9281C11.7906 11.4812 11.4125 11.1375 11 11.1375Z",fill:""}),(0,a.jsx)("path",{d:"M13.7499 11.825C13.303 11.7906 12.9593 12.1 12.9249 12.5469L12.7187 15.5719C12.6843 15.9844 12.9937 16.3625 13.4405 16.3969C13.4749 16.3969 13.4749 16.3969 13.5093 16.3969C13.9218 16.3969 14.2655 16.0875 14.2655 15.675L14.4718 12.65C14.4718 12.2031 14.1624 11.8594 13.7499 11.825Z",fill:""}),(0,a.jsx)("path",{d:"M8.21558 11.825C7.80308 11.8594 7.45933 12.2375 7.49371 12.65L7.73433 15.675C7.76871 16.0875 8.11246 16.3969 8.49058 16.3969C8.52496 16.3969 8.52496 16.3969 8.55933 16.3969C8.97183 16.3625 9.31558 15.9844 9.28121 15.5719L9.04058 12.5469C9.04058 12.1 8.66246 11.7906 8.21558 11.825Z",fill:""})]}),(0,a.jsx)("span",{className:"text-xs px-2",children:" ELIMINAR INSCRIPCI\xd3N"})]})})]})]})})]},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,n=e.split(".")[s];if("string"!=typeof n)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)}}(n)}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,249,7448,7282,4609,5947,8316,798,7419,1320,8001,2971,2117,1744],function(){return e(e.s=9446)}),_N_E=e.O()}]);