{"version":3,"sources":["webpack:///./src/models/TuEstadoCuenta/TuEstadoCuentaModel.ts","webpack:///./src/views/certificado-beneficios/CertificadoBeneficios.vue?b44c","webpack:///./src/services/CertificadoBeneficiosService.ts","webpack:///./src/models/CertificadoBeneficios/CertificadoResponse.ts","webpack:///./src/views/certificado-beneficios/CertificadoBeneficios.vue?9d95","webpack:///./src/views/certificado-beneficios/CertificadoBeneficios.vue?800a","webpack:///./src/views/certificado-beneficios/CertificadoBeneficios.vue?524a","webpack:///./src/views/certificado-beneficios/CertificadoBeneficios.vue?c4e3"],"names":["EstadoDeCuentaModel","render","_vm","this","_h","$createElement","_c","_self","staticClass","style","umbracoBaseUrl","labelData","_v","_s","title","certificateResponse","header","code","staticStyle","attrs","data","on","$event","downloadFilePDF","_e","returnHome","detail","GoActualziarDatos","staticRenderFns","cedula","get","BaseService","msjPagina","isLoading","tipoFondo","wsdlService","WsdlService","umbracoService","UmbracoApiService","CertificadoBeneficiosService","userId","$store","state","user","showResult","GlobalConfig","UMBRACO_BASE_URL","afiliado","saldos","conceptos","movimientos","eDC","iniDate","FinDate","Base64","getCertificado","getLabelData","getCertificadoBeneficios","date","year","getFullYear","month","getMonth","toString","length","day","getDate","window","location","href","PORTAL_BASE_URL","$router","push","showLoadingAlert","GetCertificado","then","resp","entity","close","fileName","uri","dataURI","blob","dataURIToBlob","url","URL","createObjectURL","blobAnchor","document","createElement","dataURIAnchor","download","className","body","appendChild","onclick","requestAnimationFrame","revokeObjectURL","setTimeout","remove","click","binStr","atob","len","arr","Uint8Array","mimeString","i","charCodeAt","Blob","type","message","fire","text","icon","timerProgressBar","onBeforeOpen","showLoading","allowOutsideClick","components","TuEstadoCuentaForm","TuEstadoCuentaResult","component"],"mappings":"oKAAqBA,E,wGCArB,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,UAAU,CAACA,EAAG,MAAM,CAACE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AAM,CACnBM,KAAMJ,MA1FtB,8BA8FU,SAAiBK,GACnB,IAAKC,KAAK,CACNC,KAAMF,EACNG,KAAM,OACNC,kBAAkB,EAClBC,aAAc,WACV,IAAKC,eAETC,mBAAmB,QAtG/B,GAAmD,QAmBlC,gBAAf,eAAO,S,2BAnBY,EAAqB,gBANzC,eAAU,CACVC,WAAY,CACXC,qBAAA,KACAC,uBAAA,SAGmB,WC7D6Y,I,wBCQ9ZC,EAAY,eACd,EACAzH,EACA2B,GACA,EACA,KACA,WACA,MAIa,aAAA8F,E,2CCnBf","file":"js/chunk-6e95f43f.a02e5061.js","sourcesContent":["export default class EstadoDeCuentaModel {\r\n image: string;\r\n title: string;\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('div',{staticClass:\"bannersecundario manos\",style:({'background-image': (\"url(\" + _vm.umbracoBaseUrl + (_vm.labelData.image) + \")\")})}),_c('div',{staticClass:\"bnrline\"}),_c('div',{staticClass:\"section-title\"},[_c('p',[_vm._v(_vm._s(_vm.labelData.title))])]),(_vm.certificateResponse != null && _vm.certificateResponse.header)?_c('div',{staticClass:\"form-content\"},[_c('div',{staticClass:\"content-wraper main-container\"},[_c('div',{staticClass:\"container-afp\"},[_c('div',{staticClass:\"container\"},[(_vm.certificateResponse != null && _vm.certificateResponse.header && _vm.certificateResponse.header.code == 200)?_c('div',{staticStyle:{\"padding\":\"8px\"}},[_c('embed',{attrs:{\"src\":'data:application/pdf;base64,'+_vm.certificateResponse.data+'#toolbar=0',\"type\":\"application/pdf\",\"width\":\"100%\",\"height\":\"600px\"}}),_c('div',{staticClass:\"buttons\"},[_c('button',{staticClass:\"btn\",on:{\"click\":function($event){return _vm.downloadFilePDF('Certificado beneficios', _vm.certificateResponse.data)}}},[_vm._v(\"Descargar PDF \"),(false)?_c('b-spinner',{attrs:{\"small\":\"\",\"label\":\"Spinning\"}}):_vm._e()],1),_c('button',{on:{\"click\":_vm.returnHome}},[_vm._v(\"Volver al menĂº\")])])]):_vm._e(),(_vm.certificateResponse != null && _vm.certificateResponse.header && _vm.certificateResponse.header.code != 200)?_c('div',{staticStyle:{\"padding\":\"8px\"}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.certificateResponse.header.detail)+\"\\n\\t\\t\\t\\t\\t\\t\\t\"),_c('div',{staticClass:\"buttons\",staticStyle:{\"margin-top\":\"25px\"}},[(_vm.certificateResponse != null && _vm.certificateResponse.header && _vm.certificateResponse.header.code == 405)?_c('button',{staticClass:\"btn\",on:{\"click\":_vm.GoActualziarDatos}},[_vm._v(\"Actualizar Datos \"),(false)?_c('b-spinner',{attrs:{\"small\":\"\",\"label\":\"Spinning\"}}):_vm._e()],1):_vm._e(),_c('button',{on:{\"click\":_vm.returnHome}},[_vm._v(\"Volver al menĂº\")])])]):_vm._e()])])])]):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { AxiosResponse } from 'axios';\r\nimport BaseService from \"@/services/BaseService\";\r\nimport ServiceResponseEntity from './response-models/ServiceResponseEntity';\r\nimport ServiceResponseEntities from './response-models/ServiceResponseEntities';\r\nimport { CertificadoResponse } from '@/models/CertificadoBeneficios/CertificadoResponse';\r\n\r\nexport default class CertificadoBeneficiosService extends BaseService {\r\n public constructor() {\r\n super(\"CertificadoBeneficios\");\r\n }\r\n\r\n public async GetCertificado(cedula: string): \r\n Promise>> {\r\n debugger\r\n return this.get('GetCertificado/'+ cedula);\r\n }\r\n}","\r\n\r\nexport default class CertificadoResponse {\r\n constructor(\r\n public header?: header,\r\n public data?: string,\r\n public msjPagina?: string\r\n ) {}\r\n} \r\n\r\nclass header {\r\n constructor(\r\n public code?: number,\r\n public lambdaVersion?: string,\r\n public lambdaAlias?: string,\r\n public lambdaName?: string,\r\n public message?: string,\r\n public detail?: string,\r\n public success?: boolean,\r\n ) {}\r\n}\r\nexport { header ,CertificadoResponse}","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport axios, { AxiosResponse } from \"axios\";\r\nimport { Component, Vue } from \"vue-property-decorator\";\r\nimport GlobalConfig from \"@/GlobalConfig\";\r\nimport UmbracoApiService from \"@/services/UmbracoApiService\";\r\nimport CertificadoBeneficiosService from \"@/services/CertificadoBeneficiosService\";\r\nimport TuEstadoCuentaForm from \"@/components/Tu_Estado_Cuenta/TuEstadoCuentaForm.vue\";\r\nimport FundTypeObj from \"@/models/WsdlResponses/FundTypeObj\";\r\nimport WsdlService from \"@/services/WsdlService\";\r\nimport TuEstadoCuentaResult from \"@/components/Tu_Estado_Cuenta/TuEstadoCuentaResult.vue\";\r\nimport Swal from \"sweetalert2\";\r\nimport EstadoDeCuentaModel from \"@/models/TuEstadoCuenta/TuEstadoCuentaModel\";\r\nimport FundType from \"@/models/WsdlResponses/FundType\";\r\nimport Axios from \"axios\";\r\nimport User from \"@/models/User\";\r\nimport { Getter } from \"vuex-class\";\r\nimport { CertificadoResponse } from '@/models/CertificadoBeneficios/CertificadoResponse';\r\n\r\n\r\n@Component({\r\n\tcomponents: {\r\n\t\tTuEstadoCuentaForm,\r\n\t\tTuEstadoCuentaResult\r\n\t}\r\n})\r\nexport default class CertificadoBeneficios extends Vue {\r\n\tpublic isLoading: boolean = false;\r\n\tpublic tipoFondo: Array = [];\r\n public wsdlService: WsdlService = new WsdlService();\r\n public umbracoService = new UmbracoApiService();\r\n\tpublic CertificadoBeneficiosService = new CertificadoBeneficiosService();\r\n public userId: string = this.$store.state.user.cedula;\r\n public showResult: boolean = false;\r\n\tpublic umbracoBaseUrl: string = GlobalConfig.UMBRACO_BASE_URL;\r\n public labelData = new EstadoDeCuentaModel();\r\n\tpublic afiliado: any = {}\r\n\tpublic saldos: any = {};\r\n\tpublic conceptos: any = {};\r\n\tpublic movimientos: any = {};\r\n\tpublic eDC: any = {};\r\n\tpublic iniDate: string = \"\";\r\n\tpublic FinDate: string = \"\";\r\n\tpublic Base64 : string = \"\";\r\n\tpublic certificateResponse : CertificadoResponse = new CertificadoResponse();\r\n\t@Getter(\"user\") user: User;\r\n\r\n\r\n constructor() {\r\n super();\r\n }\r\n mounted() {\r\n\t\t this.getCertificado()\r\n }\r\n\t async created(){\r\n\t\t await this.getLabelData();\r\n\t}\r\n\tpublic async getLabelData(){\r\n\t\tthis.labelData = await this.umbracoService.getCertificadoBeneficios()\r\n\t}\r\n\r\n\t \r\n \r\n\tpublic getFormattedDate(date: Date) : string {\r\n\t\tlet year = date.getFullYear();\r\n\r\n\t\tlet month = (1 + date.getMonth()).toString();\r\n\t\tmonth = month.length > 1 ? month : '0' + month;\r\n\r\n\t\tlet day = date.getDate().toString();\r\n\t\tday = day.length > 1 ? day : '0' + day;\r\n\t\t\r\n\t\treturn day + '/' + month + '/' + year;\r\n\t}\r\n\treturnHome(){\r\n\t\twindow.location.href = GlobalConfig.PORTAL_BASE_URL\r\n\t}\r\n\tGoActualziarDatos(){\r\n\t\tthis.$router.push(\"/actualizacion-de-datos\");\r\n\t}\r\n\tpublic async getCertificado(){\r\n\t\tthis.showLoadingAlert(\"Generando certificado\");\r\n\t\tvar certificate = await this.CertificadoBeneficiosService.GetCertificado(this.user.cedula).then(resp=>{\r\n\t\t\tthis.certificateResponse = resp.data.entity;\r\n\t\t\tSwal.close();\r\n\t\t}); \r\n\t}\r\n\r\n\tpublic downloadFilePDF(fileName, uri) {\r\n const dataURI = uri;\r\n const blob = this.dataURIToBlob(dataURI);\r\n const url = URL.createObjectURL(blob);\r\n const blobAnchor = document.createElement('a');\r\n const dataURIAnchor = document.createElement('a');\r\n blobAnchor.download = dataURIAnchor.download = fileName;\r\n blobAnchor.className = 'hidden';\r\n blobAnchor.href = url;\r\n dataURIAnchor.href = dataURI;\r\n document.body.appendChild(blobAnchor);\r\n blobAnchor.onclick = function () {\r\n requestAnimationFrame(function () {\r\n URL.revokeObjectURL(url);\r\n setTimeout(() => blobAnchor.remove(), 300);\r\n });\r\n };\r\n blobAnchor.click();\r\n }\r\n\t\tpublic dataURIToBlob(dataURI) {\r\n const binStr = atob(dataURI),\r\n len = binStr.length,\r\n arr = new Uint8Array(len),\r\n mimeString = 'application/pdf';\r\n for (let i = 0; i < len; i++) {\r\n arr[i] = binStr.charCodeAt(i);\r\n }\r\n return new Blob([arr], {\r\n type: mimeString\r\n });\r\n }\r\n\r\n\t public showLoadingAlert(message: string): void {\r\n Swal.fire({\r\n text: message,\r\n icon: \"info\",\r\n timerProgressBar: true,\r\n onBeforeOpen: () => {\r\n Swal.showLoading();\r\n },\r\n allowOutsideClick: false,\r\n });\r\n }\r\n\r\n \r\n\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CertificadoBeneficios.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CertificadoBeneficios.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CertificadoBeneficios.vue?vue&type=template&id=67d28a14&scoped=true&\"\nimport script from \"./CertificadoBeneficios.vue?vue&type=script&lang=ts&\"\nexport * from \"./CertificadoBeneficios.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./CertificadoBeneficios.vue?vue&type=style&index=0&id=67d28a14&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"67d28a14\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CertificadoBeneficios.vue?vue&type=style&index=0&id=67d28a14&scoped=true&lang=css&\""],"sourceRoot":""}