From 6453675e89c15a5dc30e29761d253cc6d9c4e75e Mon Sep 17 00:00:00 2001 From: Lemuel Marquez Date: Mon, 11 Jan 2021 10:49:15 -0600 Subject: [PATCH] cambio de rutas get programas --- dist/200.html | 4 +- dist/_nuxt/{5c9b7d5.js => 844f394.js} | 2 +- dist/_nuxt/be63851.js | 1 - dist/_nuxt/ca3ebfc.js | 1 + dist/_nuxt/{75f0293.js => e7e353b.js} | 2 +- dist/admin/index.html | 4 +- dist/admin/programa/index.html | 4 +- .../admin/programa/infoResponsable/index.html | 4 +- .../infoResponsable/modificar/index.html | 4 +- dist/admin/servicio/index.html | 4 +- dist/admin/servicio/modificar/index.html | 4 +- dist/alumno/cuestionario/index.html | 4 +- dist/alumno/index.html | 4 +- dist/index.html | 4 +- dist/responsable/cartaTermino/index.html | 4 +- dist/responsable/carta_aceptacion/index.html | 4 +- dist/responsable/carta_termino/index.html | 4 +- dist/responsable/cuestionario/index.html | 4 +- dist/responsable/index.html | 4 +- dist/responsable/modificar/index.html | 4 +- dist/responsable/nuevo/index.html | 4 +- .../admin/programa/infoResponsable/index.vue | 2 +- pages/responsable/nuevo/index.vue | 127 +++++++++--------- 23 files changed, 103 insertions(+), 100 deletions(-) rename dist/_nuxt/{5c9b7d5.js => 844f394.js} (71%) delete mode 100644 dist/_nuxt/be63851.js create mode 100644 dist/_nuxt/ca3ebfc.js rename dist/_nuxt/{75f0293.js => e7e353b.js} (94%) diff --git a/dist/200.html b/dist/200.html index 20267a8..b4226d9 100644 --- a/dist/200.html +++ b/dist/200.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/_nuxt/5c9b7d5.js b/dist/_nuxt/844f394.js similarity index 71% rename from dist/_nuxt/5c9b7d5.js rename to dist/_nuxt/844f394.js index fbdf684..aea78e8 100644 --- a/dist/_nuxt/5c9b7d5.js +++ b/dist/_nuxt/844f394.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{242:function(e,t,o){"use strict";o.r(t);var n={props:{path:String,deleteFromLocalStorage:Array},methods:{regresar:function(){if(this.deleteFromLocalStorage)for(var i=0;i2)if(43===(t=(m=C(m)).charCodeAt(0))||45===t){if(88===(o=m.charCodeAt(2))||120===o)return NaN}else if(48===t){switch(m.charCodeAt(1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+m}for(l=(c=m.slice(2)).length,d=0;dr)return NaN;return parseInt(c,n)}return+m};if(c("Number",!x(" 0o1")||!x("0b1")||x("+0x1"))){for(var N,z=function(e){var t=arguments.length<1?0:e,o=this;return o instanceof z&&(I?v((function(){y.valueOf.call(o)})):"Number"!=m(o))?h(new x(F(t)),o,z):F(t)},A=n?_(x):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;A.length>w;w++)d(x,N=A[w])&&!d(z,N)&&S(z,N,k(x,N));z.prototype=y,y.constructor=z,l(r,"Number",z)}},383:function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},384:function(e,t,o){"use strict";o.r(t);o(109),o(32),o(61);var n=o(44),r=o.n(n),c=o(240),l=o.n(c),d=o(381),m=o.n(d),h={components:{botonRegresar:o(242).default},data:function(){return{idServicio:localStorage.getItem("idServicio"),viejo:{},nuevo:{correo:"",fechaInicioFinal:"",fechaFinFinal:null,direccion:null,telefono:null,fechaNacimientoFinal:null,cartaAceptacion:{},cartaTermino:{},informeGlobal:{}},fechaNacimiento:[],fechaInicio:[],fechaFin:[],token:{headers:{token:window.localStorage.getItem("token")}},minDate1:new Date("2020-01-01"),isLoading:!1}},methods:{obtenerRegistro:function(){var e=this;return this.isLoading=!0,r.a.get("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/servicio/admin?idServicio=").concat(this.idServicio),this.token).then((function(t){e.isLoading=!1,e.viejo=t.data})).catch((function(t){e.isLoading=!1,console.log(t.response.data.message)}))},dangerToast:function(){this.$buefy.toast.open({message:"Asegurate de ingresar un PDF",type:"is-danger"})},toast:function(){this.$buefy.toast.open({message:"Se han actualizado los datos",type:"is-success"})},mostrar:function(){if(m.a.isEmail(this.nuevo.correo)||this.nuevo.direccion||this.nuevo.telefono||this.nuevo.fechaNacimientoFinal||this.nuevo.fechaInicioFinal&&this.nuevo.fechaFinFinal||this.nuevo.cartaTermino.name||this.nuevo.cartaAceptacion.name||this.nuevo.informeGlobal.name)return!this.nuevo.correo||!!m.a.isEmail(this.nuevo.correo)},validarExt:function(a){var e=/(.pdf)$/i;switch(a){case 1:e.exec(this.nuevo.cartaAceptacion.name)||(this.dangerToast(),this.nuevo.cartaAceptacion={});break;case 2:e.exec(this.nuevo.cartaTermino.name)||(this.dangerToast(),this.nuevo.cartaTermino={});break;case 3:e.exec(this.nuevo.informeGlobal.name)||(this.dangerToast(),this.nuevo.informeGlobal={})}},actualizar:function(){var e=this,t=new FormData,data={idServicio:this.idServicio};this.isLoading=!0,this.nuevo.direccion&&(data.direccion=this.nuevo.direccion),this.nuevo.correo&&(data.correo=this.nuevo.correo),this.nuevo.telefono&&(data.telefono=this.nuevo.telefono),this.nuevo.fechaInicioFinal&&(data.fechaInicio=this.nuevo.fechaInicioFinal),this.nuevo.fechaFinFinal&&(data.fechaFin=this.nuevo.fechaFinFinal),this.nuevo.fechaNacimientoFinal&&(data.fechaNacimiento=this.nuevo.fechaNacimientoFinal),t.append("data",JSON.stringify(data)),this.nuevo.cartaAceptacion&&t.append("cartaAceptacion",this.nuevo.cartaAceptacion),this.nuevo.cartaTermino&&t.append("cartaTermino",this.nuevo.cartaTermino),this.nuevo.informeGlobal&&t.append("informeGlobal",this.nuevo.informeGlobal),r.a.put("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/servicio/update"),t,{headers:{"Content-Type":"multipart/form-data",token:this.token.headers.token}}).then((function(t){e.isLoading=!1,e.toast(),e.$router.push("/admin/servicio")})).catch((function(t){e.isLoading=!1,e.error(t.response.data.message),console.log(t.response.data.message)}))},actualizarDialog:function(){var e=this;this.$buefy.dialog.confirm({title:"Actualizar datos",message:"¿Seguro(a) que quiere actualizar estos datos?",confirmText:"Confirmar",cancelText:"Cancelar",type:"is-success",hasIcon:!0,onConfirm:function(){return e.actualizar()}})},error:function(e){var t=!1;switch(e){case"invalid signature":e="Tu token no es valido, inicia sesión de nuevo.",t=!0;break;case"jwt expired":e="Tu sesión ha expirado, inicia sesión de nuevo.",t=!0;break;case"jwt malformed":e="No se encontro tu token, inicia sesión de nuevo.",t=!0;break;case"No hay token":e="Ocurrio un error al enviar tu token, inicia sesión de nuevo.",t=!0}this.$buefy.dialog.alert({title:"Error",message:e,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),1==t&&(localStorage.clear(),this.$router.push("/"))},fecha:function(e){if(e){var t=l()(e.substr(0,10));return"".concat(t.year(),"/").concat(t.month()+1,"/").concat(t.date())}}},computed:{minDate2:function(){var e=new Date(this.fechaInicio);return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())}},watch:{fechaInicio:function(){this.nuevo.fechaInicioFinal=l()(this.fechaInicio[0]),this.fechaFin[0]=null},fechaFin:function(){this.nuevo.fechaFinFinal=l()(this.fechaFin[0])},fechaNacimiento:function(){this.nuevo.fechaNacimientoFinal=l()(this.fechaNacimiento[0])}},created:function(){this.obtenerRegistro()}},f=(o(386),o(8)),component=Object(f.a)(h,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"container"},[o("BotonRegresar",{attrs:{path:"/admin/servicio"}}),e._v(" "),o("br"),o("br"),e._v(" "),o("p",{staticClass:"is-size-2"},[e._v("Editar información del alumno")]),e._v(" "),o("br"),e._v(" "),o("div",{staticClass:"formulario"},[o("b-field",{attrs:{label:"Correo eletrónico alumno"}},[o("b-input",{attrs:{type:"email",placeholder:e.viejo.correo},model:{value:e.nuevo.correo,callback:function(t){e.$set(e.nuevo,"correo",t)},expression:"nuevo.correo"}})],1),e._v(" "),o("b-field",{attrs:{label:"Fecha de inicio"}},[o("b-datepicker",{attrs:{placeholder:e.fecha(e.viejo.fechaInicio),icon:"calendar-today","min-date":e.minDate1},model:{value:e.fechaInicio[0],callback:function(t){e.$set(e.fechaInicio,0,t)},expression:"fechaInicio[0]"}})],1),e._v(" "),o("transition",{attrs:{name:"fade"}},[e.fechaInicio[0]?o("b-field",{attrs:{label:"Fecha de fin"}},[o("b-datepicker",{attrs:{placeholder:e.fecha(e.viejo.fechaInicio),"min-date":e.minDate2,icon:"calendar-today"},model:{value:e.fechaFin[0],callback:function(t){e.$set(e.fechaFin,0,t)},expression:"fechaFin[0]"}})],1):e._e()],1),e._v(" "),o("b-field",{attrs:{label:"Dirección"}},[o("b-input",{attrs:{type:"text",placeholder:e.viejo.direccion},model:{value:e.nuevo.direccion,callback:function(t){e.$set(e.nuevo,"direccion",t)},expression:"nuevo.direccion"}})],1),e._v(" "),o("b-field",{attrs:{label:"Teléfono"}},[o("b-input",{attrs:{type:"number",placeholder:e.viejo.telefono,maxlength:"10"},model:{value:e.nuevo.telefono,callback:function(t){e.$set(e.nuevo,"telefono",t)},expression:"nuevo.telefono"}})],1),e._v(" "),o("b-field",{attrs:{label:"Fecha de nacimiento"}},[o("b-datepicker",{attrs:{placeholder:e.fecha(e.viejo.fechaNacimiento),icon:"calendar-today"},model:{value:e.fechaNacimiento[0],callback:function(t){e.$set(e.fechaNacimiento,0,t)},expression:"fechaNacimiento[0]"}})],1),e._v(" "),e.viejo.cartaAceptacion?o("p",{staticClass:"is-size-5"},[e._v("Carta de aceptación")]):e._e(),e._v(" "),o("br"),e._v(" "),e.viejo.cartaAceptacion?o("b-field",[o("b-upload",{attrs:{type:"is-black",accept:"application/pdf","drag-drop":"",expanded:""},on:{input:function(t){return e.validarExt(1)}},model:{value:e.nuevo.cartaAceptacion,callback:function(t){e.$set(e.nuevo,"cartaAceptacion",t)},expression:"nuevo.cartaAceptacion"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.nuevo.cartaAceptacion.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")])])])])],1):e._e(),e._v(" "),e.viejo.cartaTermino?o("p",{staticClass:"is-size-5"},[e._v("Carta de término")]):e._e(),e._v(" "),o("br"),e._v(" "),e.viejo.cartaTermino?o("b-field",[o("b-upload",{attrs:{type:"is-black",accept:"application/pdf","drag-drop":"",expanded:""},on:{input:function(t){return e.validarExt(2)}},model:{value:e.nuevo.cartaTermino,callback:function(t){e.$set(e.nuevo,"cartaTermino",t)},expression:"nuevo.cartaTermino"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.nuevo.cartaTermino.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")])])])])],1):e._e(),e._v(" "),e.viejo.informeGlobal?o("p",{staticClass:"is-size-5"},[e._v("Informe global")]):e._e(),e._v(" "),o("br"),e._v(" "),e.viejo.informeGlobal?o("b-field",[o("b-upload",{attrs:{type:"is-black",accept:"application/pdf","drag-drop":"",expanded:""},on:{input:function(t){return e.validarExt(3)}},model:{value:e.nuevo.informeGlobal,callback:function(t){e.$set(e.nuevo,"informeGlobal",t)},expression:"nuevo.informeGlobal"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.nuevo.informeGlobal.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")])])])])],1):e._e(),e._v(" "),o("br"),e._v(" "),e.mostrar()?o("b-button",{staticClass:"is-info",on:{click:function(t){return e.actualizarDialog()}}},[e._v("Actualizar Datos")]):o("b-button",{staticClass:"is-info",attrs:{disabled:""}},[e._v("Actualizar Datos")]),e._v(" "),o("b-loading",{attrs:{"is-full-page":!0,"can-cancel":!1},model:{value:e.isLoading,callback:function(t){e.isLoading=t},expression:"isLoading"}})],1)],1)}),[],!1,null,"65a5870d",null);t.default=component.exports;installComponents(component,{BotonRegresar:o(242).default})},386:function(e,t,o){"use strict";o(379)},387:function(e,t,o){(t=o(26)(!1)).push([e.i,".fade-enter-active[data-v-65a5870d],.fade-leave-active[data-v-65a5870d]{transition:opacity .5s}.fade-enter[data-v-65a5870d],.fade-leave-to[data-v-65a5870d]{opacity:0}",""]),e.exports=t},388:function(e,t,o){var n=o(15),r="["+o(383)+"]",c=RegExp("^"+r+r+"*"),l=RegExp(r+r+"*$"),d=function(e){return function(t){var o=String(n(t));return 1&e&&(o=o.replace(c,"")),2&e&&(o=o.replace(l,"")),o}};e.exports={start:d(1),end:d(2),trim:d(3)}},420:function(e,t,o){var content=o(525);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(27).default)("9542f534",content,!0,{sourceMap:!1})},524:function(e,t,o){"use strict";o(420)},525:function(e,t,o){(t=o(26)(!1)).push([e.i,".titleAnadir[data-v-629aac86],pre[data-v-629aac86]{margin:4rem 0 0}.derecha[data-v-629aac86]{text-align:center}.file-cta[data-v-629aac86]{background-color:#167df0!important}.disabled[data-v-629aac86]{cursor:help!important;pointer-events:all!important}.columns[data-v-629aac86]{margin:0}.border-info[data-v-629aac86]{border:1px solid #167df0}@media (min-width:600px){.derecha[data-v-629aac86]{padding-right:120px}}",""]),e.exports=t},543:function(e,t,o){"use strict";o.r(t);o(109),o(382),o(16),o(34),o(168);var n=o(381),r=o.n(n),c=o(44),l=o.n(c),d=o(240),m=o.n(d),h={data:function(){return{token:{headers:{token:window.localStorage.getItem("token")}},isLoading:!1,noCuenta:"",sizeOk:"",searched:!1,minDate:new Date("2020-12-20"),programaSelectedID:"",file:[],programas:[],programaSelected:{idPrograma:null,institucion:"",dependencia:"",programa:"",clavePrograma:"",acatlan:"",activo:"",idUsuario:"",programaInterno:"",profesor:""},alumno:{cuenta:"",nombre:"",carrera:"",creditos:"",idAlumno:"",idCarrera:"",inicio:[],fin:[],correo:""}}},methods:{reset:function(){this.programaSelected.idPrograma="",this.programaSelected.institucion="",this.programaSelected.dependencia="",this.programaSelected.programa="",this.programaSelected.clavePrograma="",this.programaSelected.acatlan="",this.programaSelected.activo="",this.programaSelected.idUsuario="",this.programaSelected.programaInterno="",this.programaSelected.profesor="",this.alumno.cuenta="",this.alumno.nombre="",this.alumno.creditos="",this.alumno.carrera="",this.alumno.idAlumno="",this.alumno.idCarrera="",this.alumno.correo="",this.alumno.inicio=[],this.alumno.fin=[],this.noCuenta="",this.file=[],this.programaSelectedID=""},disabled:function(){return 0==this.programaSelected.acatlan?""==this.file||""==this.noCuenta||""==this.alumno.correo||""==this.alumno.inicio||""==this.alumno.fin||""==this.programaSelectedID:""==this.file||""==this.noCuenta||""==this.alumno.correo||""==this.alumno.inicio||""==this.alumno.fin||""==this.programaSelectedID||""==this.programaSelected.programaInterno||""==this.programaSelected.profesor},esNumero:function(e){var t=e.length-1;return e&&!r.a.isNumeric(e[t])?e.substr(0,t):e},maxLength:function(e,t){return e.length>t?e.substr(0,t):e},correoValidado:function(){if(r.a.isEmail(this.alumno.correo))return console.log("es correo"),""},error:function(e){var t=!1;switch(e){case"invalid signature":e="Tu token no es valido, inicia sesión de nuevo.",t=!0;break;case"jwt expired":e="Tu sesión ha expirado, inicia sesión de nuevo.",t=!0;break;case"jwt malformed":e="No se encontro tu token, inicia sesión de nuevo.",t=!0;break;case"No hay token":e="Ocurrio un error al enviar tu token, inicia sesión de nuevo.",t=!0}this.$buefy.dialog.alert({title:"Error",message:e,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),1==t&&(localStorage.clear(),this.$router.push("/"))},buscarAlumno:function(){var e=this;this.isLoading=!0,l.a.get("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/usuario/escolares?numeroCuenta=").concat(this.noCuenta),this.token).then((function(t){console.log(t.data),e.alumno.cuenta=e.noCuenta,e.alumno.nombre=t.data.nombre,e.alumno.carrera=t.data.carrera,e.alumno.creditos=parseInt(t.data.creditos,10),e.alumno.idCarrera=t.data.idCarrera,e.alumno.idAlumno=t.data.idUsuario,e.searched=!0})).catch((function(t){e.error(t.response.data.message)})).finally((function(){e.isLoading=!1}))},Enviar:function(){var e=this;this.isLoading=!0;var data={idUsuario:this.alumno.idAlumno,idPrograma:this.programaSelected.idPrograma,idCarrera:this.alumno.idCarrera,numeroCuenta:this.alumno.cuenta,creditos:this.alumno.creditos.toString(),correo:this.alumno.correo,programaInterno:this.programaSelected.programaInterno,profesor:this.programaSelected.profesor,fechaInicio:m()(this.alumno.inicio),fechaFin:m()(this.alumno.fin)},t=new FormData;console.log(data),t.append("alumno",JSON.stringify(data)),t.append("cartaAceptacion",this.file),l.a.post("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/servicio/nuevo"),t,{headers:{"Content-Type":"multipart/form-data",token:this.token.headers.token}}).then((function(t){e.$buefy.dialog.alert({title:"Success",message:"Se enviaron los datos correctamente",type:"is-success",hasIcon:!0,icon:"checkbox-marked-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),e.reset()})).catch((function(t){e.error(t.response.data.message)})).finally((function(){e.isLoading=!1}))}},watch:{noCuenta:function(){!1===this.searched?(this.noCuenta=Number(this.noCuenta)<0?"":this.noCuenta,this.noCuenta=this.esNumero(this.noCuenta),this.noCuenta=this.maxLength(this.noCuenta,9)):(this.noCuenta="",this.searched=!1,this.reset())},programaSelectedID:function(){if(this.programaSelectedID)for(var i=0;i=2e7&&(this.$buefy.dialog.alert({title:"Error",message:"El tamaño del archivo exede los 20MB",type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),this.file=[])},"alumno.inicio":function(){this.alumno.fin=[]}},mounted:function(){var e=this;console.log(localStorage.getItem("idUsuario")),l.a.get("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/programa?idUsuario=").concat(localStorage.getItem("idUsuario")),this.token).then((function(t){console.log(t.data),e.programas=t.data,console.log(e.programas)})).catch((function(t){e.error(t.response.data.message)}))},computed:{minDate2:function(){var e=new Date(this.alumno.inicio);return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())}}},f=(o(524),o(8)),component=Object(f.a)(h,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"container"},[o("div",{staticClass:"columns is-mobile"},[o("div",{staticClass:"column "},[o("b-button",{staticClass:"border-info my-5",attrs:{tag:"router-link",to:"/responsable",type:"is-info is-light ","icon-left":"arrow-left-box",size:"is-medium"}},[e._v("\n regresar\n ")]),e._v(" "),e._m(0),e._v(" "),o("section",[o("h1",{staticClass:"title is-1 titleAnadir"},[e._v("\n Añadir Servicio Social\n ")]),e._v(" "),o("div",{staticClass:"columns is-variable is-1-mobile is-0-tablet is-3-desktop is-8-widescreen is-2-fullhd pl-0"},[o("div",{staticClass:"column pl-0"},[o("form",[o("b-field",{staticClass:"column p-0 my-5 is-full"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.noCuenta,expression:"noCuenta"}],staticClass:"input column ",attrs:{message:"Solo numeros",required:"required",maxlength:"9",type:"number",placeholder:"Cuenta",min:"0"},domProps:{value:e.noCuenta},on:{input:function(t){t.target.composing||(e.noCuenta=t.target.value)}}}),e._v(" "),o("p",{staticClass:"control"},[o("b-button",{staticClass:"button is-info",on:{click:function(t){return e.buscarAlumno()}}},[e._v("Buscar")])],1)]),e._v(" "),o("b-field",{attrs:{label:"Nombre"}},[o("div",{staticClass:"input"},[e._v(e._s(e.alumno.nombre))])]),e._v(" "),o("b-field",{attrs:{label:"Carrera"}},[o("div",{staticClass:"input"},[e._v(e._s(e.alumno.carrera))])]),e._v(" "),o("b-field",{attrs:{label:"Créditos"}},[o("div",{staticClass:"input"},[e._v("\n "+e._s(e.alumno.creditos)),e.alumno.creditos?o("span",[e._v("%")]):e._e()])]),e._v(" "),o("b-field",{attrs:{label:"Seleccione programa"}},[o("b-select",{attrs:{placeholder:"Seleccionar",expanded:""},model:{value:e.programaSelectedID,callback:function(t){e.programaSelectedID=t},expression:"programaSelectedID"}},[o("option",{attrs:{value:""}},[e._v("Seleccionar")]),e._v(" "),e._l(e.programas,(function(t){return o("option",{key:t.idPrograma,domProps:{value:t.idPrograma}},[e._v(e._s(t.programa))])}))],2)],1),e._v(" "),o("b-field",{attrs:{label:"Institución"}},[o("div",{staticClass:"input"},[e._v(e._s(e.programaSelected.institucion))])]),e._v(" "),o("b-field",{attrs:{label:"Dependencia"}},[o("div",{staticClass:"input"},[e._v(e._s(e.programaSelected.dependencia))])]),e._v(" "),o("b-field",{attrs:{label:"Clave del programa"}},[o("div",{staticClass:"input"},[e._v(e._s(e.programaSelected.clavePrograma))])]),e._v(" "),1==e.programaSelected.acatlan?o("div",[o("b-field",{attrs:{label:"Programa interno"}},[o("b-input",{attrs:{placeholder:"Programa interno"},model:{value:e.programaSelected.programaInterno,callback:function(t){e.$set(e.programaSelected,"programaInterno",t)},expression:"programaSelected.programaInterno"}})],1),e._v(" "),o("b-field",{attrs:{label:"Profesor"}},[o("b-input",{attrs:{placeholder:"Profesor"},model:{value:e.programaSelected.profesor,callback:function(t){e.$set(e.programaSelected,"profesor",t)},expression:"programaSelected.profesor"}})],1)],1):e._e(),e._v(" "),o("b-field",{attrs:{label:"Fecha de inicio"}},[o("b-datepicker",{attrs:{placeholder:"Inicio",icon:"calendar-today","min-date":e.minDate},model:{value:e.alumno.inicio,callback:function(t){e.$set(e.alumno,"inicio",t)},expression:"alumno.inicio"}})],1),e._v(" "),e.alumno.inicio?o("b-field",{attrs:{label:"Fecha de fin"}},[o("b-datepicker",{attrs:{placeholder:"Fin","min-date":e.minDate2,icon:"calendar-today"},model:{value:e.alumno.fin,callback:function(t){e.$set(e.alumno,"fin",t)},expression:"alumno.fin"}})],1):e._e(),e._v(" "),o("b-field",{attrs:{label:"Correo"}},[o("b-input",{attrs:{placeholder:"Email",type:"email"},model:{value:e.alumno.correo,callback:function(t){e.$set(e.alumno,"correo",t)},expression:"alumno.correo"}})],1),e._v(" "),o("h3",{staticClass:"title is-4 mt-6"},[e._v("\n Carta de aceptación (en formato .PDF. No se aceptan fotos).\n ")]),e._v(" "),o("b-field",[o("b-upload",{attrs:{"drag-drop":"",type:"is-black",expanded:"",accept:"application/pdf"},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.file.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")]),e._v(" "),o("p",[e._v("Tamaño máximo 20MB")])])])])],1)],1),e._v(" "),o("div",{staticClass:"my-6"},[o("b-button",{staticClass:"border-info",staticStyle:{float:"left"},attrs:{tag:"router-link",to:"/responsable",type:"is-info is-light ","icon-left":"arrow-left-box",size:"is-medium"}},[e._v("\n regresar\n ")]),e._v(" "),o("b-field",{staticClass:"derecha"},[o("button",{staticClass:"button enviar is-success is-medium",attrs:{disabled:e.disabled()},on:{click:function(t){return e.Enviar()}}},[e._v("\n Enviar\n ")])])],1)])])])],1)]),e._v(" "),o("b-loading",{attrs:{"is-full-page":!0,"can-cancel":!1},model:{value:e.isLoading,callback:function(t){e.isLoading=t},expression:"isLoading"}})],1)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("section",{staticClass:"mensaje has-text-justified is-size-6 "},[t("p",{staticClass:"block is-size-5"},[this._v("\n Estimado(a) responsable de programa de servicio social:\n ")]),this._v(" "),t("p",{staticClass:"block "},[this._v("\n Te solicitamos llenar cuidadosamente los campos solicitados a\n continuación para iniciar el trámite de registro de servicio social\n de nuestro alumno(a), quien a su vez completará posteriormente el\n proceso en este mismo sistema con otros datos.\n ")]),this._v(" "),t("p",{staticClass:"block "},[this._v("\n Es muy importante escribir correctamente el correo del alumno para\n que el sistema pueda enviarle la notificación correspondiente de que\n ya puede ingresar a completar su registro. También debes tomar en\n cuenta que la fecha de inicio NO se podrá modificar, sólo la fecha\n de término en caso de que el alumno no cumpla las 480 horas en el\n periodo mínimo de 6 meses. Al siguiente día de la fecha de término\n programada, se activará la opción de cargar la carta de término y\n llenar el cuestionario de desempeño del alumno. En caso de que\n exista algún error en los datos o cartas emitidas se les notificará\n en este panel en cuanto el Departamento de Servicio Social y Bolsa\n de Trabajo revise su solicitud, para que realicen la corrección\n correspondiente.\n ")])])}],!1,null,"629aac86",null);t.default=component.exports;installComponents(component,{Form:o(384).default})}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{242:function(e,t,o){"use strict";o.r(t);var n={props:{path:String,deleteFromLocalStorage:Array},methods:{regresar:function(){if(this.deleteFromLocalStorage)for(var i=0;i2)if(43===(t=(m=C(m)).charCodeAt(0))||45===t){if(88===(o=m.charCodeAt(2))||120===o)return NaN}else if(48===t){switch(m.charCodeAt(1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+m}for(l=(c=m.slice(2)).length,d=0;dr)return NaN;return parseInt(c,n)}return+m};if(c("Number",!x(" 0o1")||!x("0b1")||x("+0x1"))){for(var N,z=function(e){var t=arguments.length<1?0:e,o=this;return o instanceof z&&(I?v((function(){y.valueOf.call(o)})):"Number"!=m(o))?f(new x(F(t)),o,z):F(t)},A=n?_(x):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;A.length>w;w++)d(x,N=A[w])&&!d(z,N)&&S(z,N,k(x,N));z.prototype=y,y.constructor=z,l(r,"Number",z)}},383:function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},384:function(e,t,o){"use strict";o.r(t);o(109),o(32),o(61);var n=o(44),r=o.n(n),c=o(240),l=o.n(c),d=o(381),m=o.n(d),f={components:{botonRegresar:o(242).default},data:function(){return{idServicio:localStorage.getItem("idServicio"),viejo:{},nuevo:{correo:"",fechaInicioFinal:"",fechaFinFinal:null,direccion:null,telefono:null,fechaNacimientoFinal:null,cartaAceptacion:{},cartaTermino:{},informeGlobal:{}},fechaNacimiento:[],fechaInicio:[],fechaFin:[],token:{headers:{token:window.localStorage.getItem("token")}},minDate1:new Date("2020-01-01"),isLoading:!1}},methods:{obtenerRegistro:function(){var e=this;return this.isLoading=!0,r.a.get("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/servicio/admin?idServicio=").concat(this.idServicio),this.token).then((function(t){e.isLoading=!1,e.viejo=t.data})).catch((function(t){e.isLoading=!1,console.log(t.response.data.message)}))},dangerToast:function(){this.$buefy.toast.open({message:"Asegurate de ingresar un PDF",type:"is-danger"})},toast:function(){this.$buefy.toast.open({message:"Se han actualizado los datos",type:"is-success"})},mostrar:function(){if(m.a.isEmail(this.nuevo.correo)||this.nuevo.direccion||this.nuevo.telefono||this.nuevo.fechaNacimientoFinal||this.nuevo.fechaInicioFinal&&this.nuevo.fechaFinFinal||this.nuevo.cartaTermino.name||this.nuevo.cartaAceptacion.name||this.nuevo.informeGlobal.name)return!this.nuevo.correo||!!m.a.isEmail(this.nuevo.correo)},validarExt:function(a){var e=/(.pdf)$/i;switch(a){case 1:e.exec(this.nuevo.cartaAceptacion.name)||(this.dangerToast(),this.nuevo.cartaAceptacion={});break;case 2:e.exec(this.nuevo.cartaTermino.name)||(this.dangerToast(),this.nuevo.cartaTermino={});break;case 3:e.exec(this.nuevo.informeGlobal.name)||(this.dangerToast(),this.nuevo.informeGlobal={})}},actualizar:function(){var e=this,t=new FormData,data={idServicio:this.idServicio};this.isLoading=!0,this.nuevo.direccion&&(data.direccion=this.nuevo.direccion),this.nuevo.correo&&(data.correo=this.nuevo.correo),this.nuevo.telefono&&(data.telefono=this.nuevo.telefono),this.nuevo.fechaInicioFinal&&(data.fechaInicio=this.nuevo.fechaInicioFinal),this.nuevo.fechaFinFinal&&(data.fechaFin=this.nuevo.fechaFinFinal),this.nuevo.fechaNacimientoFinal&&(data.fechaNacimiento=this.nuevo.fechaNacimientoFinal),t.append("data",JSON.stringify(data)),this.nuevo.cartaAceptacion&&t.append("cartaAceptacion",this.nuevo.cartaAceptacion),this.nuevo.cartaTermino&&t.append("cartaTermino",this.nuevo.cartaTermino),this.nuevo.informeGlobal&&t.append("informeGlobal",this.nuevo.informeGlobal),r.a.put("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/servicio/update"),t,{headers:{"Content-Type":"multipart/form-data",token:this.token.headers.token}}).then((function(t){e.isLoading=!1,e.toast(),e.$router.push("/admin/servicio")})).catch((function(t){e.isLoading=!1,e.error(t.response.data.message),console.log(t.response.data.message)}))},actualizarDialog:function(){var e=this;this.$buefy.dialog.confirm({title:"Actualizar datos",message:"¿Seguro(a) que quiere actualizar estos datos?",confirmText:"Confirmar",cancelText:"Cancelar",type:"is-success",hasIcon:!0,onConfirm:function(){return e.actualizar()}})},error:function(e){var t=!1;switch(e){case"invalid signature":e="Tu token no es valido, inicia sesión de nuevo.",t=!0;break;case"jwt expired":e="Tu sesión ha expirado, inicia sesión de nuevo.",t=!0;break;case"jwt malformed":e="No se encontro tu token, inicia sesión de nuevo.",t=!0;break;case"No hay token":e="Ocurrio un error al enviar tu token, inicia sesión de nuevo.",t=!0}this.$buefy.dialog.alert({title:"Error",message:e,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),1==t&&(localStorage.clear(),this.$router.push("/"))},fecha:function(e){if(e){var t=l()(e.substr(0,10));return"".concat(t.year(),"/").concat(t.month()+1,"/").concat(t.date())}}},computed:{minDate2:function(){var e=new Date(this.fechaInicio);return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())}},watch:{fechaInicio:function(){this.nuevo.fechaInicioFinal=l()(this.fechaInicio[0]),this.fechaFin[0]=null},fechaFin:function(){this.nuevo.fechaFinFinal=l()(this.fechaFin[0])},fechaNacimiento:function(){this.nuevo.fechaNacimientoFinal=l()(this.fechaNacimiento[0])}},created:function(){this.obtenerRegistro()}},h=(o(386),o(8)),component=Object(h.a)(f,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"container"},[o("BotonRegresar",{attrs:{path:"/admin/servicio"}}),e._v(" "),o("br"),o("br"),e._v(" "),o("p",{staticClass:"is-size-2"},[e._v("Editar información del alumno")]),e._v(" "),o("br"),e._v(" "),o("div",{staticClass:"formulario"},[o("b-field",{attrs:{label:"Correo eletrónico alumno"}},[o("b-input",{attrs:{type:"email",placeholder:e.viejo.correo},model:{value:e.nuevo.correo,callback:function(t){e.$set(e.nuevo,"correo",t)},expression:"nuevo.correo"}})],1),e._v(" "),o("b-field",{attrs:{label:"Fecha de inicio"}},[o("b-datepicker",{attrs:{placeholder:e.fecha(e.viejo.fechaInicio),icon:"calendar-today","min-date":e.minDate1},model:{value:e.fechaInicio[0],callback:function(t){e.$set(e.fechaInicio,0,t)},expression:"fechaInicio[0]"}})],1),e._v(" "),o("transition",{attrs:{name:"fade"}},[e.fechaInicio[0]?o("b-field",{attrs:{label:"Fecha de fin"}},[o("b-datepicker",{attrs:{placeholder:e.fecha(e.viejo.fechaInicio),"min-date":e.minDate2,icon:"calendar-today"},model:{value:e.fechaFin[0],callback:function(t){e.$set(e.fechaFin,0,t)},expression:"fechaFin[0]"}})],1):e._e()],1),e._v(" "),o("b-field",{attrs:{label:"Dirección"}},[o("b-input",{attrs:{type:"text",placeholder:e.viejo.direccion},model:{value:e.nuevo.direccion,callback:function(t){e.$set(e.nuevo,"direccion",t)},expression:"nuevo.direccion"}})],1),e._v(" "),o("b-field",{attrs:{label:"Teléfono"}},[o("b-input",{attrs:{type:"number",placeholder:e.viejo.telefono,maxlength:"10"},model:{value:e.nuevo.telefono,callback:function(t){e.$set(e.nuevo,"telefono",t)},expression:"nuevo.telefono"}})],1),e._v(" "),o("b-field",{attrs:{label:"Fecha de nacimiento"}},[o("b-datepicker",{attrs:{placeholder:e.fecha(e.viejo.fechaNacimiento),icon:"calendar-today"},model:{value:e.fechaNacimiento[0],callback:function(t){e.$set(e.fechaNacimiento,0,t)},expression:"fechaNacimiento[0]"}})],1),e._v(" "),e.viejo.cartaAceptacion?o("p",{staticClass:"is-size-5"},[e._v("Carta de aceptación")]):e._e(),e._v(" "),o("br"),e._v(" "),e.viejo.cartaAceptacion?o("b-field",[o("b-upload",{attrs:{type:"is-black",accept:"application/pdf","drag-drop":"",expanded:""},on:{input:function(t){return e.validarExt(1)}},model:{value:e.nuevo.cartaAceptacion,callback:function(t){e.$set(e.nuevo,"cartaAceptacion",t)},expression:"nuevo.cartaAceptacion"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.nuevo.cartaAceptacion.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")])])])])],1):e._e(),e._v(" "),e.viejo.cartaTermino?o("p",{staticClass:"is-size-5"},[e._v("Carta de término")]):e._e(),e._v(" "),o("br"),e._v(" "),e.viejo.cartaTermino?o("b-field",[o("b-upload",{attrs:{type:"is-black",accept:"application/pdf","drag-drop":"",expanded:""},on:{input:function(t){return e.validarExt(2)}},model:{value:e.nuevo.cartaTermino,callback:function(t){e.$set(e.nuevo,"cartaTermino",t)},expression:"nuevo.cartaTermino"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.nuevo.cartaTermino.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")])])])])],1):e._e(),e._v(" "),e.viejo.informeGlobal?o("p",{staticClass:"is-size-5"},[e._v("Informe global")]):e._e(),e._v(" "),o("br"),e._v(" "),e.viejo.informeGlobal?o("b-field",[o("b-upload",{attrs:{type:"is-black",accept:"application/pdf","drag-drop":"",expanded:""},on:{input:function(t){return e.validarExt(3)}},model:{value:e.nuevo.informeGlobal,callback:function(t){e.$set(e.nuevo,"informeGlobal",t)},expression:"nuevo.informeGlobal"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.nuevo.informeGlobal.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")])])])])],1):e._e(),e._v(" "),o("br"),e._v(" "),e.mostrar()?o("b-button",{staticClass:"is-info",on:{click:function(t){return e.actualizarDialog()}}},[e._v("Actualizar Datos")]):o("b-button",{staticClass:"is-info",attrs:{disabled:""}},[e._v("Actualizar Datos")]),e._v(" "),o("b-loading",{attrs:{"is-full-page":!0,"can-cancel":!1},model:{value:e.isLoading,callback:function(t){e.isLoading=t},expression:"isLoading"}})],1)],1)}),[],!1,null,"65a5870d",null);t.default=component.exports;installComponents(component,{BotonRegresar:o(242).default})},386:function(e,t,o){"use strict";o(379)},387:function(e,t,o){(t=o(26)(!1)).push([e.i,".fade-enter-active[data-v-65a5870d],.fade-leave-active[data-v-65a5870d]{transition:opacity .5s}.fade-enter[data-v-65a5870d],.fade-leave-to[data-v-65a5870d]{opacity:0}",""]),e.exports=t},388:function(e,t,o){var n=o(15),r="["+o(383)+"]",c=RegExp("^"+r+r+"*"),l=RegExp(r+r+"*$"),d=function(e){return function(t){var o=String(n(t));return 1&e&&(o=o.replace(c,"")),2&e&&(o=o.replace(l,"")),o}};e.exports={start:d(1),end:d(2),trim:d(3)}},420:function(e,t,o){var content=o(525);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(27).default)("147e7224",content,!0,{sourceMap:!1})},524:function(e,t,o){"use strict";o(420)},525:function(e,t,o){(t=o(26)(!1)).push([e.i,".titleAnadir[data-v-f8ff20ea],pre[data-v-f8ff20ea]{margin:4rem 0 0}.derecha[data-v-f8ff20ea]{text-align:center}.file-cta[data-v-f8ff20ea]{background-color:#167df0!important}.disabled[data-v-f8ff20ea]{cursor:help!important;pointer-events:all!important}.columns[data-v-f8ff20ea]{margin:0}.border-info[data-v-f8ff20ea]{border:1px solid #167df0}@media (min-width:600px){.derecha[data-v-f8ff20ea]{padding-right:120px}}",""]),e.exports=t},543:function(e,t,o){"use strict";o.r(t);o(109),o(382),o(16),o(34),o(168);var n=o(381),r=o.n(n),c=o(44),l=o.n(c),d=o(240),m=o.n(d),f={data:function(){return{token:{headers:{token:window.localStorage.getItem("token")}},isLoading:!1,noCuenta:"",sizeOk:"",searched:!1,minDate:new Date("2020-12-20"),programaSelectedID:"",file:[],programas:[],programaSelected:{idPrograma:null,institucion:"",dependencia:"",programa:"",clavePrograma:"",acatlan:"",activo:"",idUsuario:"",programaInterno:"",profesor:""},alumno:{cuenta:"",nombre:"",carrera:"",creditos:"",idAlumno:"",idCarrera:"",inicio:[],fin:[],correo:""}}},methods:{reset:function(){this.programaSelected.idPrograma="",this.programaSelected.institucion="",this.programaSelected.dependencia="",this.programaSelected.programa="",this.programaSelected.clavePrograma="",this.programaSelected.acatlan="",this.programaSelected.activo="",this.programaSelected.idUsuario="",this.programaSelected.programaInterno="",this.programaSelected.profesor="",this.alumno.cuenta="",this.alumno.nombre="",this.alumno.creditos="",this.alumno.carrera="",this.alumno.idAlumno="",this.alumno.idCarrera="",this.alumno.correo="",this.alumno.inicio=[],this.alumno.fin=[],this.noCuenta="",this.file=[],this.programaSelectedID=""},disabled:function(){return 0==this.programaSelected.acatlan?""==this.file||""==this.noCuenta||""==this.alumno.correo||""==this.alumno.inicio||""==this.alumno.fin||""==this.programaSelectedID:""==this.file||""==this.noCuenta||""==this.alumno.correo||""==this.alumno.inicio||""==this.alumno.fin||""==this.programaSelectedID||""==this.programaSelected.programaInterno||""==this.programaSelected.profesor},esNumero:function(e){var t=e.length-1;return e&&!r.a.isNumeric(e[t])?e.substr(0,t):e},maxLength:function(e,t){return e.length>t?e.substr(0,t):e},correoValidado:function(){if(r.a.isEmail(this.alumno.correo))return console.log("es correo"),""},error:function(e){var t=!1;switch(e){case"invalid signature":e="Tu token no es valido, inicia sesión de nuevo.",t=!0;break;case"jwt expired":e="Tu sesión ha expirado, inicia sesión de nuevo.",t=!0;break;case"jwt malformed":e="No se encontro tu token, inicia sesión de nuevo.",t=!0;break;case"No hay token":e="Ocurrio un error al enviar tu token, inicia sesión de nuevo.",t=!0}this.$buefy.dialog.alert({title:"Error",message:e,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),1==t&&(localStorage.clear(),this.$router.push("/"))},buscarAlumno:function(){var e=this;this.isLoading=!0,l.a.get("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/usuario/escolares?numeroCuenta=").concat(this.noCuenta),this.token).then((function(t){console.log(t.data),e.alumno.cuenta=e.noCuenta,e.alumno.nombre=t.data.nombre,e.alumno.carrera=t.data.carrera,e.alumno.creditos=parseInt(t.data.creditos,10),e.alumno.idCarrera=t.data.idCarrera,e.alumno.idAlumno=t.data.idUsuario,e.searched=!0})).catch((function(t){e.error(t.response.data.message)})).finally((function(){e.isLoading=!1}))},Enviar:function(){var e=this;this.isLoading=!0;var data={idUsuario:this.alumno.idAlumno,idPrograma:this.programaSelected.idPrograma,idCarrera:this.alumno.idCarrera,numeroCuenta:this.alumno.cuenta,creditos:this.alumno.creditos.toString(),correo:this.alumno.correo,programaInterno:this.programaSelected.programaInterno,profesor:this.programaSelected.profesor,fechaInicio:m()(this.alumno.inicio),fechaFin:m()(this.alumno.fin)},t=new FormData;console.log(data),t.append("alumno",JSON.stringify(data)),t.append("cartaAceptacion",this.file),l.a.post("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/servicio/nuevo"),t,{headers:{"Content-Type":"multipart/form-data",token:this.token.headers.token}}).then((function(t){e.$buefy.dialog.alert({title:"Success",message:"Se enviaron los datos correctamente",type:"is-success",hasIcon:!0,icon:"checkbox-marked-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),e.reset()})).catch((function(t){e.error(t.response.data.message)})).finally((function(){e.isLoading=!1}))}},watch:{noCuenta:function(){!1===this.searched?(this.noCuenta=Number(this.noCuenta)<0?"":this.noCuenta,this.noCuenta=this.esNumero(this.noCuenta),this.noCuenta=this.maxLength(this.noCuenta,9)):(this.noCuenta="",this.searched=!1,this.reset())},programaSelectedID:function(){if(this.programaSelectedID)for(var i=0;i=2e7&&(this.$buefy.dialog.alert({title:"Error",message:"El tamaño del archivo exede los 20MB",type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),this.file=[])},"alumno.inicio":function(){this.alumno.fin=[]}},mounted:function(){var e=this;console.log(localStorage.getItem("idUsuario")),l.a.get("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/programa/programas_admin?idUsuario=").concat(localStorage.getItem("idUsuario")),this.token).then((function(t){console.log(t.data),e.programas=t.data,console.log(e.programas)})).catch((function(t){e.error(t.response.data.message)}))},computed:{minDate2:function(){var e=new Date(this.alumno.inicio);return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())}}},h=(o(524),o(8)),component=Object(h.a)(f,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"container"},[o("div",{staticClass:"columns is-mobile"},[o("div",{staticClass:"column "},[o("b-button",{staticClass:"border-info my-5",attrs:{tag:"router-link",to:"/responsable",type:"is-info is-light ","icon-left":"arrow-left-box",size:"is-medium"}},[e._v("\n regresar\n ")]),e._v(" "),e._m(0),e._v(" "),o("section",[o("h1",{staticClass:"title is-1 titleAnadir"},[e._v("\n Añadir Servicio Social\n ")]),e._v(" "),o("div",{staticClass:"columns is-variable is-1-mobile is-0-tablet is-3-desktop is-8-widescreen is-2-fullhd pl-0"},[o("div",{staticClass:"column pl-0"},[o("form",[o("b-field",{staticClass:"column p-0 my-5 is-full"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.noCuenta,expression:"noCuenta"}],staticClass:"input column ",attrs:{message:"Solo numeros",required:"required",maxlength:"9",type:"number",placeholder:"Cuenta",min:"0"},domProps:{value:e.noCuenta},on:{input:function(t){t.target.composing||(e.noCuenta=t.target.value)}}}),e._v(" "),o("p",{staticClass:"control"},[o("b-button",{staticClass:"button is-info",on:{click:function(t){return e.buscarAlumno()}}},[e._v("Buscar")])],1)]),e._v(" "),o("b-field",{attrs:{label:"Nombre"}},[o("div",{staticClass:"input"},[e._v(e._s(e.alumno.nombre))])]),e._v(" "),o("b-field",{attrs:{label:"Carrera"}},[o("div",{staticClass:"input"},[e._v(e._s(e.alumno.carrera))])]),e._v(" "),o("b-field",{attrs:{label:"Créditos"}},[o("div",{staticClass:"input"},[e._v("\n "+e._s(e.alumno.creditos)),e.alumno.creditos?o("span",[e._v("%")]):e._e()])]),e._v(" "),o("b-field",{attrs:{label:"Seleccione programa"}},[o("b-select",{attrs:{placeholder:"Seleccionar",expanded:""},model:{value:e.programaSelectedID,callback:function(t){e.programaSelectedID=t},expression:"programaSelectedID"}},[o("option",{attrs:{value:""}},[e._v("Seleccionar")]),e._v(" "),e._l(e.programas,(function(t){return o("option",{key:t.idPrograma,domProps:{value:t.idPrograma}},[e._v(e._s(t.programa))])}))],2)],1),e._v(" "),o("b-field",{attrs:{label:"Institución"}},[o("div",{staticClass:"input"},[e._v(e._s(e.programaSelected.institucion))])]),e._v(" "),o("b-field",{attrs:{label:"Dependencia"}},[o("div",{staticClass:"input"},[e._v(e._s(e.programaSelected.dependencia))])]),e._v(" "),o("b-field",{attrs:{label:"Clave del programa"}},[o("div",{staticClass:"input"},[e._v(e._s(e.programaSelected.clavePrograma))])]),e._v(" "),1==e.programaSelected.acatlan?o("div",[o("b-field",{attrs:{label:"Programa interno"}},[o("b-input",{attrs:{placeholder:"Programa interno"},model:{value:e.programaSelected.programaInterno,callback:function(t){e.$set(e.programaSelected,"programaInterno",t)},expression:"programaSelected.programaInterno"}})],1),e._v(" "),o("b-field",{attrs:{label:"Profesor"}},[o("b-input",{attrs:{placeholder:"Profesor"},model:{value:e.programaSelected.profesor,callback:function(t){e.$set(e.programaSelected,"profesor",t)},expression:"programaSelected.profesor"}})],1)],1):e._e(),e._v(" "),o("b-field",{attrs:{label:"Fecha de inicio"}},[o("b-datepicker",{attrs:{placeholder:"Inicio",icon:"calendar-today","min-date":e.minDate},model:{value:e.alumno.inicio,callback:function(t){e.$set(e.alumno,"inicio",t)},expression:"alumno.inicio"}})],1),e._v(" "),e.alumno.inicio?o("b-field",{attrs:{label:"Fecha de fin"}},[o("b-datepicker",{attrs:{placeholder:"Fin","min-date":e.minDate2,icon:"calendar-today"},model:{value:e.alumno.fin,callback:function(t){e.$set(e.alumno,"fin",t)},expression:"alumno.fin"}})],1):e._e(),e._v(" "),o("b-field",{attrs:{label:"Correo"}},[o("b-input",{attrs:{placeholder:"Email",type:"email"},model:{value:e.alumno.correo,callback:function(t){e.$set(e.alumno,"correo",t)},expression:"alumno.correo"}})],1),e._v(" "),o("h3",{staticClass:"title is-4 mt-6"},[e._v("\n Carta de aceptación (en formato .PDF. No se aceptan fotos).\n ")]),e._v(" "),o("b-field",[o("b-upload",{attrs:{"drag-drop":"",type:"is-black",expanded:"",accept:"application/pdf"},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.file.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")]),e._v(" "),o("p",[e._v("Tamaño máximo 20MB")])])])])],1)],1),e._v(" "),o("div",{staticClass:"my-6"},[o("b-button",{staticClass:"border-info",staticStyle:{float:"left"},attrs:{tag:"router-link",to:"/responsable",type:"is-info is-light ","icon-left":"arrow-left-box",size:"is-medium"}},[e._v("\n regresar\n ")]),e._v(" "),o("b-field",{staticClass:"derecha"},[o("button",{staticClass:"button enviar is-success is-medium",attrs:{disabled:e.disabled()},on:{click:function(t){return e.Enviar()}}},[e._v("\n Enviar\n ")])])],1)])])])],1)]),e._v(" "),o("b-loading",{attrs:{"is-full-page":!0,"can-cancel":!1},model:{value:e.isLoading,callback:function(t){e.isLoading=t},expression:"isLoading"}})],1)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("section",{staticClass:"mensaje has-text-justified is-size-6 "},[t("p",{staticClass:"block is-size-5"},[this._v("\n Estimado(a) responsable de programa de servicio social:\n ")]),this._v(" "),t("p",{staticClass:"block "},[this._v("\n Te solicitamos llenar cuidadosamente los campos solicitados a\n continuación para iniciar el trámite de registro de servicio social\n de nuestro alumno(a), quien a su vez completará posteriormente el\n proceso en este mismo sistema con otros datos.\n ")]),this._v(" "),t("p",{staticClass:"block "},[this._v("\n Es muy importante escribir correctamente el correo del alumno para\n que el sistema pueda enviarle la notificación correspondiente de que\n ya puede ingresar a completar su registro. También debes tomar en\n cuenta que la fecha de inicio NO se podrá modificar, sólo la fecha\n de término en caso de que el alumno no cumpla las 480 horas en el\n periodo mínimo de 6 meses. Al siguiente día de la fecha de término\n programada, se activará la opción de cargar la carta de término y\n llenar el cuestionario de desempeño del alumno. En caso de que\n exista algún error en los datos o cartas emitidas se les notificará\n en este panel en cuanto el Departamento de Servicio Social y Bolsa\n de Trabajo revise su solicitud, para que realicen la corrección\n correspondiente.\n ")])])}],!1,null,"f8ff20ea",null);t.default=component.exports;installComponents(component,{Form:o(384).default})}}]); \ No newline at end of file diff --git a/dist/_nuxt/be63851.js b/dist/_nuxt/be63851.js deleted file mode 100644 index 822d64c..0000000 --- a/dist/_nuxt/be63851.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{242:function(e,t,o){"use strict";o.r(t);var r={props:{path:String,deleteFromLocalStorage:Array},methods:{regresar:function(){if(this.deleteFromLocalStorage)for(var i=0;i - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/admin/programa/index.html b/dist/admin/programa/index.html index 20267a8..b4226d9 100644 --- a/dist/admin/programa/index.html +++ b/dist/admin/programa/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/admin/programa/infoResponsable/index.html b/dist/admin/programa/infoResponsable/index.html index 20267a8..b4226d9 100644 --- a/dist/admin/programa/infoResponsable/index.html +++ b/dist/admin/programa/infoResponsable/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/admin/programa/infoResponsable/modificar/index.html b/dist/admin/programa/infoResponsable/modificar/index.html index 20267a8..b4226d9 100644 --- a/dist/admin/programa/infoResponsable/modificar/index.html +++ b/dist/admin/programa/infoResponsable/modificar/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/admin/servicio/index.html b/dist/admin/servicio/index.html index 20267a8..b4226d9 100644 --- a/dist/admin/servicio/index.html +++ b/dist/admin/servicio/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/admin/servicio/modificar/index.html b/dist/admin/servicio/modificar/index.html index 20267a8..b4226d9 100644 --- a/dist/admin/servicio/modificar/index.html +++ b/dist/admin/servicio/modificar/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/alumno/cuestionario/index.html b/dist/alumno/cuestionario/index.html index 20267a8..b4226d9 100644 --- a/dist/alumno/cuestionario/index.html +++ b/dist/alumno/cuestionario/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/alumno/index.html b/dist/alumno/index.html index 20267a8..b4226d9 100644 --- a/dist/alumno/index.html +++ b/dist/alumno/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/index.html b/dist/index.html index 20267a8..b4226d9 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/responsable/cartaTermino/index.html b/dist/responsable/cartaTermino/index.html index 20267a8..b4226d9 100644 --- a/dist/responsable/cartaTermino/index.html +++ b/dist/responsable/cartaTermino/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/responsable/carta_aceptacion/index.html b/dist/responsable/carta_aceptacion/index.html index 20267a8..b4226d9 100644 --- a/dist/responsable/carta_aceptacion/index.html +++ b/dist/responsable/carta_aceptacion/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/responsable/carta_termino/index.html b/dist/responsable/carta_termino/index.html index 20267a8..b4226d9 100644 --- a/dist/responsable/carta_termino/index.html +++ b/dist/responsable/carta_termino/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/responsable/cuestionario/index.html b/dist/responsable/cuestionario/index.html index 20267a8..b4226d9 100644 --- a/dist/responsable/cuestionario/index.html +++ b/dist/responsable/cuestionario/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/responsable/index.html b/dist/responsable/index.html index 20267a8..b4226d9 100644 --- a/dist/responsable/index.html +++ b/dist/responsable/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/responsable/modificar/index.html b/dist/responsable/modificar/index.html index 20267a8..b4226d9 100644 --- a/dist/responsable/modificar/index.html +++ b/dist/responsable/modificar/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/dist/responsable/nuevo/index.html b/dist/responsable/nuevo/index.html index 20267a8..b4226d9 100644 --- a/dist/responsable/nuevo/index.html +++ b/dist/responsable/nuevo/index.html @@ -1,9 +1,9 @@ - servicio_social_front + servicio_social_front
Loading...
- + diff --git a/pages/admin/programa/infoResponsable/index.vue b/pages/admin/programa/infoResponsable/index.vue index 999160f..79e171b 100644 --- a/pages/admin/programa/infoResponsable/index.vue +++ b/pages/admin/programa/infoResponsable/index.vue @@ -76,7 +76,7 @@ export default { obtenerProgramas() { return axios .get( - `${process.env.api}/programa?idUsuario=${this.idResponsable}`, + `${process.env.api}/programa/programas_responsable?idUsuario=${this.idResponsable}`, this.token ) .then((res) => { diff --git a/pages/responsable/nuevo/index.vue b/pages/responsable/nuevo/index.vue index bcc7136..f63ac8c 100644 --- a/pages/responsable/nuevo/index.vue +++ b/pages/responsable/nuevo/index.vue @@ -213,7 +213,7 @@ - + @@ -227,11 +227,11 @@ export default { data() { return { token: { - headers:{ - token: window.localStorage.getItem('token') - } + headers: { + token: window.localStorage.getItem("token"), + }, }, - isLoading:false, + isLoading: false, noCuenta: "", sizeOk: "", searched: false, @@ -336,26 +336,26 @@ export default { return ""; } }, - error(msj){ - let salir =false; - switch(msj){ - case 'invalid signature': - msj= "Tu token no es valido, inicia sesión de nuevo." - salir=true - break; - case 'jwt expired': - msj= "Tu sesión ha expirado, inicia sesión de nuevo." - salir=true - break; - case 'jwt malformed': - msj= "No se encontro tu token, inicia sesión de nuevo." - salir=true - break; - case 'No hay token': - msj= "Ocurrio un error al enviar tu token, inicia sesión de nuevo." - salir=true - break; - } + error(msj) { + let salir = false; + switch (msj) { + case "invalid signature": + msj = "Tu token no es valido, inicia sesión de nuevo."; + salir = true; + break; + case "jwt expired": + msj = "Tu sesión ha expirado, inicia sesión de nuevo."; + salir = true; + break; + case "jwt malformed": + msj = "No se encontro tu token, inicia sesión de nuevo."; + salir = true; + break; + case "No hay token": + msj = "Ocurrio un error al enviar tu token, inicia sesión de nuevo."; + salir = true; + break; + } this.$buefy.dialog.alert({ title: "Error", @@ -366,17 +366,19 @@ export default { iconPack: "mdi", ariaRole: "alertdialog", ariaModal: true, - }); - if (salir == true) { - localStorage.clear() - this.$router.push(`/`) - } - + }); + if (salir == true) { + localStorage.clear(); + this.$router.push(`/`); + } }, buscarAlumno() { - this.isLoading=true + this.isLoading = true; axios - .get(`${process.env.api}/usuario/escolares?numeroCuenta=${this.noCuenta}`,this.token) + .get( + `${process.env.api}/usuario/escolares?numeroCuenta=${this.noCuenta}`, + this.token + ) .then((resp) => { console.log(resp.data); this.alumno.cuenta = this.noCuenta; @@ -388,14 +390,14 @@ export default { this.searched = true; }) .catch((error) => { - this.error(error.response.data.message) + this.error(error.response.data.message); }) - .finally(()=>{ - this.isLoading = false + .finally(() => { + this.isLoading = false; }); }, Enviar() { - this.isLoading=true + this.isLoading = true; const data = { idUsuario: this.alumno.idAlumno, idPrograma: this.programaSelected.idPrograma, @@ -407,17 +409,17 @@ export default { profesor: this.programaSelected.profesor, fechaInicio: moment(this.alumno.inicio), fechaFin: moment(this.alumno.fin), - }; - const formData = new FormData(); - console.log(data); - formData.append("alumno", JSON.stringify(data)); - formData.append("cartaAceptacion", this.file); + }; + const formData = new FormData(); + console.log(data); + formData.append("alumno", JSON.stringify(data)); + formData.append("cartaAceptacion", this.file); axios .post(`${process.env.api}/servicio/nuevo`, formData, { headers: { "Content-Type": "multipart/form-data", - token:this.token.headers.token + token: this.token.headers.token, }, }) .then((res) => { @@ -434,10 +436,10 @@ export default { this.reset(); }) .catch((error) => { - this.error(error.response.data.message) + this.error(error.response.data.message); }) - .finally(()=>{ - this.isLoading = false + .finally(() => { + this.isLoading = false; }); }, }, @@ -468,20 +470,16 @@ export default { this.programaSelected.activo = this.programas[i].activo; } } - } - else{ - - this.programaSelected.institucion = ""; - this.programaSelected.dependencia = ""; - this.programaSelected.programa = ""; - this.programaSelected.clavePrograma = ""; - this.programaSelected.acatlan = ""; - this.programaSelected.activo = ""; - //this.programaSelected.idUsuario = ""; - this.programaSelected.programaInterno = ""; - this.programaSelected.profesor = ""; - - + } else { + this.programaSelected.institucion = ""; + this.programaSelected.dependencia = ""; + this.programaSelected.programa = ""; + this.programaSelected.clavePrograma = ""; + this.programaSelected.acatlan = ""; + this.programaSelected.activo = ""; + //this.programaSelected.idUsuario = ""; + this.programaSelected.programaInterno = ""; + this.programaSelected.profesor = ""; } }, file() { @@ -507,14 +505,19 @@ export default { mounted() { console.log(localStorage.getItem("idUsuario")); axios - .get(`${process.env.api}/programa?idUsuario=${localStorage.getItem("idUsuario")}`, this.token) + .get( + `${process.env.api}/programa/programas_admin?idUsuario=${localStorage.getItem( + "idUsuario" + )}`, + this.token + ) .then((resp) => { console.log(resp.data); this.programas = resp.data; console.log(this.programas); }) .catch((error) => { - this.error(error.response.data.message) + this.error(error.response.data.message); }); }, computed: {