{"version":3,"sources":["webpack:///./src/views/Helexium/Postulantes/ListaDePostulantes.vue?5828","webpack:///./src/views/Helexium/Postulantes/ListaDePostulantes.vue","webpack:///src/views/Helexium/Postulantes/ListaDePostulantes.vue","webpack:///./src/views/Helexium/Postulantes/ListaDePostulantes.vue?ce74","webpack:///./src/views/Helexium/Postulantes/ListaDePostulantes.vue?5257"],"names":["render","_vm","this","_c","_self","attrs","staticClass","scopedSlots","_u","key","fn","close","staticStyle","_v","on","$event","preventDefault","evaluar","apply","arguments","opcionesDeEvaluacion","model","value","resultEvaluacion","callback","$$v","expression","loader","proxy","_l","listaDePostulantes","postulante","id","_s","nombres","apellidos","numeroDocumento","$store","getters","useMoment","fechaDePostulacion","$router","push","name","params","personaId","readOption","estadoEvaluacion","openModalEvaluar","staticRenderFns","data","postulanteDatos","description","mounted","getListaDeVacantes","methods","response","fetchGet","path","$route","vacanteId","vacantes","json","Array","$bvModal","show","fetchPut","then","ok","Error","Swal","fire","title","text","icon","confirmButtonText","hide","catch","finally","find","item","component"],"mappings":"kHAAA,W,yDCAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,cAAc,CAACE,MAAM,CAAC,MAAQ,KAAK,CAACF,EAAG,UAAU,CAACG,YAAY,WAAWD,MAAM,CAAC,GAAK,gBAAgB,KAAO,KAAK,SAAW,GAAG,cAAc,IAAIE,YAAYN,EAAIO,GAAG,CAAC,CAACC,IAAI,eAAeC,GAAG,UAAS,MAAEC,IAAS,MAAO,CAACR,EAAG,MAAM,CAACG,YAAY,iCAAiCM,YAAY,CAAC,MAAQ,SAAS,CAACT,EAAG,IAAI,CAACG,YAAY,WAAW,CAACH,EAAG,SAAS,CAACF,EAAIY,GAAG,+BAA+BV,EAAG,WAAW,CAACG,YAAY,aAAaD,MAAM,CAAC,QAAU,UAAUS,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOJ,OAAW,CAACR,EAAG,IAAI,CAACG,Y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CACA,CAAAY,GAAA,KAAAoB,YAAA,aACA,CAAApB,GAAA,EAAAoB,YAAA,YACA,CAAApB,GAAA,EAAAoB,YAAA,cAEAzB,QAAA,IAGA0B,UACA,KAAAC,sBAEAC,QAAA,CACA,2BAGA,MAAAC,QAAA,KAAAnB,OAAAC,QAAAmB,SAAA,CAAAC,KAAA,gCAAAC,OAAAf,OAAAgB,YACAC,QAAAL,EAAAM,OACA,KAAAhC,mBAAA,IAAAiC,SAAAF,IAIAb,iBAAAE,GACA,KAAAC,gBAAAD,EACA,KAAA3B,iBAAA2B,EAAAH,iBACA,KAAAiB,SAAAC,KAAA,kBAEAhD,UACA,KAAAU,QAAA,EACA,KAAAU,OAAAC,QAAA4B,SAAA,CAAAR,KAAA,qCAAAP,gBAAAnB,GAAAkB,KAAA,KAAA3B,mBACA4C,KAAAX,IACA,GAAAA,EAAAY,GACA,OAAAZ,EAAAM,OAEA,UAAAO,MAAA,2CAEAF,KAAA,KACAG,IAAAC,KAAA,CACAC,MAAA,SACAC,KAAA,4CACAC,KAAA,UACAC,kBAAA,YAEA,KAAAxB,gBAAAJ,iBAAA,KAAAxB,iBACA,KAAAyC,SAAAY,KAAA,iBACA,KAAArD,iBAAA,OAEAsD,MAAA,KACAP,IAAAC,KAAA,CACAC,MAAA,SACAC,KAAA,+CACAC,KAAA,QACAC,kBAAA,cAGAG,QAAA,KACA,KAAAnD,QAAA,KAIAmB,WAAAxB,GACA,YAAAF,qBAAA2D,KAAAC,KAAAhD,KAAAV,GAAA8B,eCxE4Z,I,wBCQxZ6B,EAAY,eACd,EACAjF,EACAiD,GACA,EACA,KACA,WACA,MAIa,aAAAgC,E","file":"js/chunk-1bf2a7bf.035472af7a1e890c2164.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ListaDePostulantes.vue?vue&type=style&index=0&id=73a50571&prod&scoped=true&lang=css\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('b-container',{attrs:{\"fluid\":\"\"}},[_c('b-modal',{staticClass:\"modal-sq\",attrs:{\"id\":\"modal-evaluar\",\"size\":\"lg\",\"centered\":\"\",\"hide-footer\":\"\"},scopedSlots:_vm._u([{key:\"modal-header\",fn:function({ close }){return [_c('div',{staticClass:\"d-flex justify-content-between\",staticStyle:{\"width\":\"100%\"}},[_c('p',{staticClass:\"mb-0 h4\"},[_c('strong',[_vm._v(\"Estado de la evaluación\")])]),_c('b-button',{staticClass:\"btn btn-pm\",attrs:{\"variant\":\"danger\"},on:{\"click\":function($event){return close()}}},[_c('i',{staticClass:\"fas fa-times\"})])],1)]}},{key:\"default\",fn:function(){return [_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.evaluar.apply(null, arguments)}}},[_c('b-form-select',{attrs:{\"text-field\":\"description\",\"value-field\":\"id\",\"options\":_vm.opcionesDeEvaluacion},model:{value:(_vm.resultEvaluacion),callback:function ($$v) {_vm.resultEvaluacion=$$v},expression:\"resultEvaluacion\"}}),_c('button',{staticClass:\"btn btn-primary mt-2 d-flex justify-content-center\",staticStyle:{\"min-width\":\"75px\"},attrs:{\"type\":\"submit\",\"disabled\":_vm.loader}},[(!_vm.loader)?_c('span',[_vm._v(\" Guardar \")]):_c('span',[_c('i',{staticClass:\"fas fa-spinner fa-spin\"})])])],1)]},proxy:true}])}),_c('b-row',[_c('b-col',{attrs:{\"sm\":\"12\"}},[_c('card',{scopedSlots:_vm._u([{key:\"headerTitle\",fn:function(){return [_c('h4',{staticClass:\"card-title\"},[_c('b',[_vm._v(\"Proceso de preselección\")])])]},proxy:true}])},[_c('div',{staticClass:\"table-responsive px-4 mt-3\"},[_c('table',{staticClass:\"table table-bordered table-responsive-md table-striped text-center\",attrs:{\"id\":\"datatable_cargos\"}},[_c('thead',[_c('tr',[_c('th',[_vm._v(\"Nombres y apellidos\")]),_c('th',[_vm._v(\"Identificación\")]),_c('th',[_vm._v(\"Fecha de postulación\")]),_c('th',[_vm._v(\"Ver postulación\")]),_c('th',[_vm._v(\"Es de talento interno\")]),_c('th',[_vm._v(\"Aprobado\")]),_c('th',[_vm._v(\"Opciones\")])])]),_c('tbody',_vm._l((_vm.listaDePostulantes),function(postulante){return _c('tr',{key:postulante.id},[_c('td',[_vm._v(_vm._s(postulante.nombres + ' ' + postulante.apellidos))]),_c('td',[_vm._v(_vm._s(postulante.numeroDocumento))]),_c('td',[_vm._v(_vm._s(_vm.$store.getters.useMoment(postulante.fechaDePostulacion)))]),_c('td',[_c('b-button',{attrs:{\"variant\":\"primary\",\"size\":\"sm\"},on:{\"click\":function($event){$event.preventDefault();return _vm.$router.push({ name: 'RegistroDePostulacion', params: { id: postulante.id } })}}},[_vm._v(\"Ver más\")])],1),_c('td',[_vm._v(\" \"+_vm._s(postulante.personaId ? 'si' : 'no')+\" \")]),_c('td',[_vm._v(\" \"+_vm._s(_vm.readOption(postulante.estadoEvaluacion))+\" \")]),_c('td',{staticClass:\"options\"},[_c('div',{staticClass:\"option-element\"},[_c('span',{on:{\"click\":function($event){return _vm.openModalEvaluar(postulante)}}},[_c('i',{staticClass:\"pointer fas fa-solid fa-clipboard px-1 text-success\",attrs:{\"data-toggle\":\"tooltip\",\"data-placement\":\"top\",\"title\":\"Evaluar\"}})])])])])}),0)])])])],1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!-- TODO: Cambiar esta ruta a preseleccion -->\n<!-- TODO: Cambiar la forma de evaluar por [PreseleccionEvaluacionId]-->\n<script>\nimport Swal from 'sweetalert2';\n\nexport default {\n    name: \"AdministradorDeVacantes\",\n    data() {\n        return {\n            listaDePostulantes: [],\n            postulanteDatos: {},\n            resultEvaluacion: null,\n            opcionesDeEvaluacion: [\n                { id: null, description: 'Pendiente' },\n                { id: 1, description: 'Aprobado' },\n                { id: 0, description: 'Rechazado' }\n            ],\n            loader: false\n        }\n    },\n    mounted() {\n        this.getListaDeVacantes();\n    },\n    methods: {\n        async getListaDeVacantes() {\n\n\n            const response = await this.$store.getters.fetchGet({ path: `Postulacion/postulantes/${this.$route.params.vacanteId}` })\n            const vacantes = await response.json();\n            this.listaDePostulantes = new Array(...vacantes)\n            console.log(this.listaDePostulantes);\n        },\n\n        openModalEvaluar(data) {\n            this.postulanteDatos = data;\n            this.resultEvaluacion = data.estadoEvaluacion;\n            this.$bvModal.show('modal-evaluar');\n        },\n        evaluar() {\n            this.loader = true;\n            this.$store.getters.fetchPut({ path: `Postulacion/EstadoEvaluacion/${this.postulanteDatos.id}`, data: this.resultEvaluacion })\n            .then(response => {\n                if( response.ok ) {\n                    return response.json()\n                }\n                throw new Error('Error al guardar los datos personales')\n            })\n            .then( () => {\n                Swal.fire({\n                    title: 'Exito!',\n                    text: 'Se ha guardado el estado de la evaluación',\n                    icon: 'success',\n                    confirmButtonText: 'Aceptar'\n                })\n                this.postulanteDatos.estadoEvaluacion = this.resultEvaluacion;\n                this.$bvModal.hide('modal-evaluar');\n                this.resultEvaluacion = null;\n            })\n            .catch( () => {\n                Swal.fire({\n                    title: 'Error!',\n                    text: 'No se ha guardado el estado de la evaluación',\n                    icon: 'error',\n                    confirmButtonText: 'Aceptar'\n                })\n            })\n            .finally( () => {\n                this.loader = false;\n            })\n\n        },\n        readOption(value) {\n            return this.opcionesDeEvaluacion.find( item => item.id === value).description\n        }\n    }\n}\n\n\n</script>\n\n<template>\n    <b-container fluid>\n        <b-modal id=\"modal-evaluar\" class=\"modal-sq\" size=\"lg\" centered hide-footer>\n            <template #modal-header=\"{ close }\">\n                <div class=\"d-flex justify-content-between\" style=\"width: 100%;\">\n                    <p class=\"mb-0 h4\"><strong>Estado de la evaluación</strong></p>\n                    <b-button @click=\" close()\" class=\"btn btn-pm\" variant=\"danger\">\n                        <i class=\"fas fa-times\"></i>\n                    </b-button>\n                </div>\n            </template>\n            <template #default>\n                <form @submit.prevent=\"evaluar\">\n                    <b-form-select v-model=\"resultEvaluacion\" text-field=\"description\" value-field=\"id\"\n                        :options=\"opcionesDeEvaluacion\">\n                    </b-form-select>\n                    <button type=\"submit\" class=\"btn btn-primary mt-2 d-flex justify-content-center\" :disabled=\"loader\" style=\"min-width: 75px;\">\n                        <span v-if=\"!loader\">\n                            Guardar\n                        </span>\n                        <span v-else>\n                            <i class=\"fas fa-spinner fa-spin\"></i>\n                        </span>\n                    </button>\n                </form>\n            </template>\n        </b-modal>\n        <b-row>\n            <b-col sm=\"12\">\n                <card>\n                    <template v-slot:headerTitle>\n                        <h4 class=\"card-title\"><b>Proceso de preselección</b></h4>\n                    </template>\n                    <!-- <div class=\"text-right px-4 mt-3\">\n                        <button class=\"mx-1 btn btn-success\" @click=\"$router.push({ name: 'NuevaVacante' })\"><i\n                                class=\"fas fa-plus\"></i>Crear vacante</button>\n                    </div> -->\n                    <div class=\"table-responsive px-4 mt-3\">\n                        <table id=\"datatable_cargos\"\n                            class=\"table table-bordered table-responsive-md table-striped text-center\">\n                            <thead>\n                                <tr>\n                                    <th>Nombres y apellidos</th>\n                                    <th>Identificación</th>\n                                    <th>Fecha de postulación</th>\n                                    <th>Ver postulación</th>\n                                    <th>Es de talento interno</th>\n                                    <th>Aprobado</th>\n                                    <th>Opciones</th>\n                                </tr>\n                            </thead>\n                            <tbody>\n                                <tr v-for=\"postulante in listaDePostulantes\" :key=\"postulante.id\">\n                                    <td>{{ postulante.nombres + ' ' + postulante.apellidos }}</td>\n                                    <td>{{ postulante.numeroDocumento }}</td>\n                                    <td>{{ $store.getters.useMoment(postulante.fechaDePostulacion) }}</td>\n                                    <td>\n                                        <b-button variant=\"primary\" size=\"sm\" @click.prevent=\"\n                                            $router.push({ name: 'RegistroDePostulacion', params: { id: postulante.id } })\n                                            \">Ver más</b-button>\n                                    </td>\n                                    <td> {{ postulante.personaId ? 'si' : 'no' }} </td>\n                                    <td>\n                                        {{ readOption(postulante.estadoEvaluacion) }}\n                                    </td>\n                                    <td class=\"options\">\n                                        <div class=\"option-element\">\n                                            <span @click=\"openModalEvaluar(postulante)\">\n                                                <!-- Evaluar -->\n                                                <i data-toggle=\"tooltip\" data-placement=\"top\" title=\"Evaluar\"\n                                                    class=\"pointer fas fa-solid fa-clipboard px-1 text-success\"></i>\n                                            </span>\n                                        </div>\n\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </div>\n                </card>\n            </b-col>\n        </b-row>\n    </b-container>\n</template>\n\n<style scoped>\n.options {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n}\n\n.option-element {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    min-width: 30px;\n}\n</style>","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ListaDePostulantes.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ListaDePostulantes.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ListaDePostulantes.vue?vue&type=template&id=73a50571&scoped=true\"\nimport script from \"./ListaDePostulantes.vue?vue&type=script&lang=js\"\nexport * from \"./ListaDePostulantes.vue?vue&type=script&lang=js\"\nimport style0 from \"./ListaDePostulantes.vue?vue&type=style&index=0&id=73a50571&prod&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  \"73a50571\",\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}