{"version":3,"sources":["webpack:///./src/components/Lego/LegoDropzone.vue?e516","webpack:///./src/views/Helexium/HojaDeVidaVehiculo/secciones/MantenimentosRealizadosView.vue?a1b8","webpack:///./src/components/BVForm/RenderSchema.vue","webpack:///src/components/BVForm/RenderSchema.vue","webpack:///./src/components/BVForm/RenderSchema.vue?084a","webpack:///./src/components/BVForm/RenderSchema.vue?db31","webpack:///./src/components/Lego/LegoDropzone.vue","webpack:///src/components/Lego/LegoDropzone.vue","webpack:///./src/components/Lego/LegoDropzone.vue?88cb","webpack:///./src/components/Lego/LegoDropzone.vue?0b8f","webpack:///./src/views/Helexium/HojaDeVidaVehiculo/secciones/MantenimentosRealizadosView.vue","webpack:///src/views/Helexium/HojaDeVidaVehiculo/secciones/MantenimentosRealizadosView.vue","webpack:///./src/views/Helexium/HojaDeVidaVehiculo/secciones/MantenimentosRealizadosView.vue?3622","webpack:///./src/views/Helexium/HojaDeVidaVehiculo/secciones/MantenimentosRealizadosView.vue?5530","webpack:///./src/components/BVForm/RenderSchema.vue?3822"],"names":["render","_vm","this","_c","_self","staticClass","_t","_v","_s","title","_l","schema","item","index","key","staticStyle","attrs","label","class","renderValue","data","staticRenderFns","props","type","Array","default","Object","String","methods","result","name","Date","toLocaleDateString","includes","indexOf","length","replace","tipo","descripcion","nombres","apellidos","component","on","$event","preventDefault","onSubmit","apply","arguments","ref","handleFileChange","style","fileBackground","triggerFileInput","handleDrop","waitSmarter","fileName","hiddenFooter","_e","uploading","onCancel","remotePath","callbackBeforeSubmit","Function","callbackAfterSubmit","renameFile","Boolean","file","dotExtension","pathCleaned","isSaveFile","computed","backgroundColor","backgroundSize","backgroundPosition","backgroundRepeat","backgroundImage","pathAfterSaveInRemote","cleanText","sinTildes","lodash","deburr","sinEspacios","$refs","fileInput","click","event","selectedFile","target","files","validateAndProcessFile","dataTransfer","indexLastDot","lastIndexOf","substring","$emit","remoteFormatPath","split","join","url","fileModel","filename","$store","dispatch","saveInSmarter","alert","isVisibleNuevoRegistro","titleNuevoRegistro","model","value","callback","$$v","expression","waitImg","allData","callbackOnSubmit","setValuesDependiente","scopedSlots","_u","fn","pathNewAttachmentFile","fileInCache","proxy","ultimoRegistroActivo","cerrarRegistro","isVisibleHistorial","historial","registro","id","useMoment","fechaDeCreacion","imgFacturaDelMantenimiento","components","BVForm","renderSchema","LegoDropzone","vehiculo","required","proveedores","pathImgSmarter","JSON","parse","stringify","empresaId","getHistorial","ajustesDeLaVisata","responseProveedores","getters","fetchGet","path","json","indexNombreProveedor","findIndex","options","map","p","nombre","mapGetters","userLoggedIn","empresa","placa","response","reverse","last","reduce","prev","current","estaCerrado","forEach","Swal","fire","text","icon","showCancelButton","confirmButtonColor","cancelButtonColor","confirmButtonText","then","isConfirmed","fetchPut","ok","Error","catch","error","message","showConfirmButton","self","vehiculoId","loader","finally","fetchPost","context","indexItem","find","idx","numeroDeDocumento"],"mappings":"kHAAA,W,oFCAA,W,oCCAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,QAAQ,CAACJ,EAAIK,GAAG,SAAQ,WAAW,MAAO,CAACH,EAAG,KAAK,CAACE,YAAY,QAAQ,CAACJ,EAAIM,GAAGN,EAAIO,GAAGP,EAAIQ,cAAaN,EAAG,MAAM,CAACE,YAAY,qBAAqB,CAACJ,EAAIS,GAAIT,EAAIU,QAAQ,SAASC,EAAKC,GAAO,OAAOV,EAAG,MAAM,CAACW,IAAID,EAAMR,YAAY,iBAAiB,CAACF,EAAG,MAAM,CAACE,YAAY,kDAAkD,CAACF,EAAG,MAAM,CAACE,YAAY,eAAe,CAACF,EAAG,MAAM,CAACE,YAAY,kBAAkB,CAACF,EAAG,YAAY,CAACY,YAAY,CAAC,YAAY,mBAAmBC,MAAM,CAAC,KAAO,GAAG,KAAO,KAAK,MAClhB,QAAdJ,EAAKK,MAAkB,UACP,UAAdL,EAAKK,MAAoB,UACX,cAAdL,EAAKK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AAC,QACAC,mBAAA,MAGAI,QAAA,KACAH,EAAAE,QAAA,KAKAxE,qBAAA2E,GACA,MAAAC,EAAA,KAAAtD,YAAAuD,KAAAtC,KAAAC,QAAAmC,EAAAlF,OACA,KAAAK,QAAA6E,EAAAG,IAAA,GAAArF,MAAAmF,EAAAG,mBAEA,kBAAAT,GACA,KAAAzE,SAAA,QACAyE,EAAAlF,gBACA,KAAAS,SAAA,EACA,KAAA0B,eAAA+C,EAAA7G,yBC/Mob,I,wBCQhbnC,EAAY,eACd,EACAzC,EACAqB,GACA,EACA,KACA,WACA,MAIa,aAAAoB,E,2CCnBf","file":"js/chunk-90db90b0.b05ac740aa999c1d25ee.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!./LegoDropzone.vue?vue&type=style&index=0&id=68c683d4&prod&lang=css\"","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!./MantenimentosRealizadosView.vue?vue&type=style&index=0&id=2437894d&prod&scoped=true&lang=css\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"mb-1\"},[_vm._t(\"title\",function(){return [_c('h3',{staticClass:\"mb-0\"},[_vm._v(_vm._s(_vm.title))])]}),_c('div',{staticClass:\"list-item pl-md-3\"},[_vm._l((_vm.schema),function(item,index){return _c('div',{key:index,staticClass:\"row mb-0 pb-0\"},[_c('div',{staticClass:\"col-12 m-0 p-0 key card bg-dark key-background\"},[_c('div',{staticClass:\"row p-0 m-0\"},[_c('div',{staticClass:\"col-1 m-0 pl-0\"},[_c('vs-avatar',{staticStyle:{\"font-size\":\"10px !important\"},attrs:{\"icon\":\"\",\"size\":\"35\",\"color\":(\n item.label == `Tipo` ? `primary` \n : item.label == `Nombre` ? `success` \n : item.label == `Frecuencia` ? `primary`\n : item.label == `Persona que debe conocer el resultado` ? `danger`\n : item.label == `Fuente de la información` ? `success`\n : item.label == `Fórmula o método de cálculo` ? `primary`\n : item.label == `Meta o limite del indicador` ? `danger`\n : item.label == `Responsable de la medición` ? `success` : ``\n )}},[_c('i',{class:(\n item.label == `Tipo` ? `fas fa-list` \n : item.label == `Nombre` ? `fas fa-user` \n : item.label == `Frecuencia` ? `fas fa-calendar-days`\n : item.label == `Persona que debe conocer el resultado` ? `fas fa-user-tie`\n : item.label == `Fuente de la información` ? `fas fa-file-lines`\n : item.label == `Fórmula o método de cálculo` ? `fas fa-square-root-variable`\n : item.label == `Meta o limite del indicador` ? `fas fa-triangle-exclamation`\n : item.label == `Responsable de la medición` ? `fa-solid fa-address-book` : ``)})])],1),_c('span',{staticClass:\"col ml-0 px-0 mb-0 pr-2 py-2\"},[_vm._v(\" \"+_vm._s(item.label)+\": \")])])]),_c('span',{staticClass:\"value pl-3 pb-0 mb-0 card bg-dark value-background\"},[_vm._v(_vm._s(_vm.renderValue(_vm.data, item)))])])}),_vm._t(\"otherItem\")],2),_vm._t(\"footer\")],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"mb-1\">\r\n <slot class=\"\" name=\"title\">\r\n <h3 class=\"mb-0\">{{ title }}</h3>\r\n </slot>\r\n <div class=\"list-item pl-md-3\">\r\n <div class=\"row mb-0 pb-0\" v-for=\"(item, index) in schema\" :key=\"index\">\r\n <div class=\" col-12 m-0 p-0 key card bg-dark key-background\">\r\n <div class=\"row p-0 m-0\">\r\n\r\n <div class=\"col-1 m-0 pl-0\">\r\n <vs-avatar\r\n\t\t\t\t\t\t\ticon\r\n size=\"35\"\r\n\t\t\t\t\t\t\t:color=\"(\r\n item.label == `Tipo` ? `primary` \r\n : item.label == `Nombre` ? `success` \r\n : item.label == `Frecuencia` ? `primary`\r\n : item.label == `Persona que debe conocer el resultado` ? `danger`\r\n : item.label == `Fuente de la información` ? `success`\r\n : item.label == `Fórmula o método de cálculo` ? `primary`\r\n : item.label == `Meta o limite del indicador` ? `danger`\r\n : item.label == `Responsable de la medición` ? `success` : ``\r\n )\"\r\n class=\"\"\r\n style=\"font-size: 10px !important;\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<i :class=\"(\r\n item.label == `Tipo` ? `fas fa-list` \r\n : item.label == `Nombre` ? `fas fa-user` \r\n : item.label == `Frecuencia` ? `fas fa-calendar-days`\r\n : item.label == `Persona que debe conocer el resultado` ? `fas fa-user-tie`\r\n : item.label == `Fuente de la información` ? `fas fa-file-lines`\r\n : item.label == `Fórmula o método de cálculo` ? `fas fa-square-root-variable`\r\n : item.label == `Meta o limite del indicador` ? `fas fa-triangle-exclamation`\r\n : item.label == `Responsable de la medición` ? `fa-solid fa-address-book` : ``) \" ></i> \r\n \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</vs-avatar>\r\n </div>\r\n <span class=\"col ml-0 px-0 mb-0 pr-2 py-2\">\r\n {{ item.label }}:\r\n </span>\r\n </div>\r\n </div>\r\n\r\n \r\n <span class=\"value pl-3 pb-0 mb-0 card bg-dark value-background\">{{ renderValue(data, item) }}</span>\r\n </div>\r\n <slot name=\"otherItem\"></slot>\r\n </div>\r\n <slot name=\"footer\"></slot>\r\n \r\n </div>\r\n</template>\r\n\r\n<script>\r\n\r\nexport default {\r\n props: {\r\n \r\n schema: {\r\n type: Array,\r\n default: () => []\r\n },\r\n data: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n title: {\r\n type: String,\r\n default: \"\"\r\n }\r\n },\r\n methods: {\r\n \r\n renderValue(data, item) {\r\n\r\n let result = data[item.name];\r\n if (item.type === \"date\" && result) {\r\n return new Date(result).toLocaleDateString();\r\n }\r\n\r\n \r\n if (item.name.includes(\"Id\") && item.name.indexOf(\"Id\") === item.name.length - 2 && result) {\r\n const name = item.name.replace(\"Id\", \"\");\r\n if (data[name].tipo) {\r\n return data[name].tipo;\r\n }\r\n\r\n if (data[name].descripcion) {\r\n return data[name].descripcion;\r\n }\r\n\r\n if (data[name].nombres) {\r\n return data[name].nombres + \" \" + data[name].apellidos;\r\n }\r\n }\r\n\r\n return result ?? \"---\";\r\n }\r\n }\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.list-item {\r\n display: grid;\r\n grid-template-columns: 1fr; \r\n grid-row-gap: 0.5rem; \r\n}\r\n\r\n.row {\r\n display: grid;\r\n grid-template-columns: auto 1fr; \r\n grid-column-gap: 1rem; \r\n}\r\n\r\n.key-background {\r\n \r\n padding: 0.5rem;\r\n padding-bottom: 0% !important;\r\n width:30vw;\r\n}\r\n\r\n.value-background {\r\n background-color: blue;\r\n padding: 0.5rem;\r\n width: 37vw;\r\n\r\n}\r\n@media (max-width: 767px) {\r\n .list-item {\r\n display: grid;\r\n grid-template-columns: 1fr; \r\n grid-row-gap: 0.5rem; \r\n }\r\n\r\n .row {\r\n display: grid;\r\n display: flex;\r\n grid-template-columns: 1fr; \r\n grid-column-gap: 1rem; \r\n }\r\n\r\n .key-background {\r\n height: 50px;\r\n /* padding-top: 2rem; */\r\n padding-bottom: 0% !important;\r\n margin-bottom: 10px;\r\n width:100%;\r\n padding-top: 10px !important;\r\n\r\n }\r\n .value-background {\r\n /* background-color: blue; */\r\n /* padding: 1rem; */\r\n height: 50px;\r\n\r\n padding-top: 17px !important;\r\n margin-top: 10px;\r\n width: 100%;\r\n\r\n }\r\n}\r\n</style>\r\n<!-- <template>\r\n <div class=\"mb-4\">\r\n <slot name=\"title\">\r\n <h3 class=\"mb-2\">{{ title }}</h3>\r\n </slot>\r\n <div class=\"list-item\">\r\n <div class=\"item\" v-for=\"(item, index) in schema\" :key=\"index\">\r\n <span class=\"key\">{{ item.label }}:</span>\r\n <span class=\"value\">{{ renderValue( data, item) }}</span>\r\n </div>\r\n <slot name=\"otherItem\"></slot>\r\n </div>\r\n <slot name=\"footer\">\r\n\r\n </slot>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n\r\nexport default {\r\n props: {\r\n schema: {\r\n type: Array,\r\n default: () => []\r\n },\r\n data: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n title: {\r\n type: String,\r\n default: \"\"\r\n }\r\n },\r\n methods: {\r\n renderValue( data, item ) {\r\n let result = data[item.name]\r\n if( item.type === \"date\" && result ) {\r\n return new Date(result).toLocaleDateString()\r\n }\r\n\r\n // console.log('item', item.name ) \r\n //comprueba si el nombre del campo termina en Id y que sean los dos ultimos caracteres\r\n if( item.name.includes(\"Id\") && item.name.indexOf(\"Id\") === item.name.length - 2 && result ) {\r\n const name = item.name.replace(\"Id\", \"\")\r\n if ( data[name].tipo )\r\n {\r\n return data[name].tipo \r\n }\r\n\r\n if ( data[name].descripcion )\r\n {\r\n return data[name].descripcion\r\n }\r\n\r\n if ( data[name].nombres )\r\n {\r\n return data[name].nombres + \" \" + data[name].apellidos\r\n }\r\n }\r\n\r\n return result ?? \"---\"\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.list-item {\r\n /* background-color: aqua; */\r\n display: grid;\r\n row-gap: 1rem;\r\n column-gap: 1rem;\r\n grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));\r\n grid-auto-flow: dense;\r\n}\r\n\r\n.key {\r\n color: aliceblue;\r\n}\r\n.item {\r\n /* background-color: blue; */\r\n display: grid;\r\n grid-template-columns: 1fr 1fr;\r\n}\r\n\r\n</style> -->\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/@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!./RenderSchema.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!./RenderSchema.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./RenderSchema.vue?vue&type=template&id=0182f277&scoped=true\"\nimport script from \"./RenderSchema.vue?vue&type=script&lang=js\"\nexport * from \"./RenderSchema.vue?vue&type=script&lang=js\"\nimport style0 from \"./RenderSchema.vue?vue&type=style&index=0&id=0182f277&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 \"0182f277\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.onSubmit.apply(null, arguments)}}},[_c('input',{ref:\"fileInput\",staticStyle:{\"display\":\"none\"},attrs:{\"type\":\"file\"},on:{\"change\":_vm.handleFileChange}}),_vm._t(\"header\",function(){return [_c('div',{staticClass:\"header\"})]}),_c('div',{staticClass:\"body\"},[_vm._t(\"default\"),_vm._t(\"dropzone\",function(){return [_c('div',{staticClass:\"dropzone\",style:(_vm.fileBackground),on:{\"click\":_vm.triggerFileInput,\"drop\":function($event){$event.preventDefault();return _vm.handleDrop.apply(null, arguments)},\"dragover\":function($event){$event.preventDefault();},\"dragenter\":function($event){$event.preventDefault();}}},[(!_vm.waitSmarter)?_c('div',{staticClass:\"content-dropzone\"},[_c('i',{staticClass:\"fas fa-cloud-upload-alt fa-1x\"}),_c('span',[_vm._v(_vm._s(_vm.fileName || \"Cargar archivo\"))])]):_c('div',{staticClass:\"content-dropzone\"},[_c('i',{staticClass:\"fas fa-spinner fa-spin-pulse fa-2x text-dark\"})])])]},{\"fileBackground\":_vm.fileBackground,\"triggerFileInput\":_vm.triggerFileInput,\"handleDrop\":_vm.handleDrop})],2),_vm._t(\"footer\",function(){return [(!_vm.hiddenFooter)?_c('div',{staticClass:\"footer\"},[_c('vs-button',{staticClass:\"slot-button\",attrs:{\"type\":\"submit\",\"loading\":_vm.uploading}},[_vm._v(\"Guardar\")]),_vm._t(\"btn-cancel\",function(){return [_c('vs-button',{staticClass:\"slot-button\",attrs:{\"danger\":\"\"},on:{\"click\":function($event){$event.preventDefault();return _vm.onCancel.apply(null, arguments)}}},[_vm._v(\"Cancelar\")])]},{\"onCancel\":_vm.onCancel})],2):_vm._e()]})],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<script>\r\nimport lodash from \"lodash\";\r\n\r\nexport default {\r\n props: {\r\n remotePath: {\r\n type: String,\r\n default: \"\",\r\n },\r\n callbackBeforeSubmit: {\r\n type: Function,\r\n default: () => {},\r\n },\r\n callbackAfterSubmit: {\r\n type: Function,\r\n default: () => {},\r\n },\r\n renameFile: {\r\n type: String,\r\n },\r\n hiddenFooter: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n data() {\r\n return {\r\n file: null,\r\n fileName: null,\r\n dotExtension: null,\r\n pathCleaned: null,\r\n isSaveFile: false,\r\n uploading: false,\r\n waitSmarter: false,\r\n };\r\n },\r\n computed: {\r\n fileBackground() {\r\n if (this.file) {\r\n // Dependiendo del tipo de archivo, se puede cambiar el backgroundColor\r\n if (this.file.type.includes(\"image\")) {\r\n return {\r\n backgroundColor: \"#a29bfe\",\r\n backgroundSize: \"cover\",\r\n backgroundPosition: \"center\",\r\n backgroundRepeat: \"no-repeat\",\r\n };\r\n } else if (this.file.type.includes(\"pdf\")) {\r\n return {\r\n backgroundColor: \"#d63031\",\r\n };\r\n } else if (this.file.type.includes(\".document\")) {\r\n return {\r\n backgroundColor: \"#74b9ff\",\r\n };\r\n } else if (this.file.type.includes(\".sheet\")) {\r\n return {\r\n backgroundColor: \"#00b894\",\r\n };\r\n } else if (this.file.type.includes(\".presentation\")) {\r\n return {\r\n backgroundColor: \"#ff7675\",\r\n };\r\n } else {\r\n return {\r\n backgroundColor: \"#ffeaa7\",\r\n };\r\n }\r\n } else {\r\n return {\r\n backgroundImage: \"none\",\r\n backgroundColor: \"transparent\",\r\n };\r\n }\r\n },\r\n pathAfterSaveInRemote() {\r\n if (this.isSaveFile) {\r\n return (\r\n \"https://www.helexiumfiles.com/\" +\r\n this.pathCleaned +\r\n \"/\" +\r\n this.fileName +\r\n this.dotExtension\r\n );\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n },\r\n methods: {\r\n cleanText(fileName) {\r\n let sinTildes = lodash.deburr(fileName);\r\n let sinEspacios = sinTildes.replace(/\\s+/g, \"\");\r\n return sinEspacios;\r\n },\r\n\r\n triggerFileInput() {\r\n this.$refs.fileInput.click();\r\n },\r\n handleFileChange(event) {\r\n const selectedFile = event.target.files[0];\r\n if (selectedFile) {\r\n this.validateAndProcessFile(selectedFile);\r\n }\r\n },\r\n handleDrop(event) {\r\n const selectedFile = event.dataTransfer.files[0];\r\n if (selectedFile) {\r\n this.validateAndProcessFile(selectedFile);\r\n }\r\n },\r\n validateAndProcessFile(file) {\r\n // si pasa todas las validaciones\r\n this.file = file;\r\n const indexLastDot = file.name.lastIndexOf(\".\");\r\n this.fileName = file.name.substring(0, indexLastDot);\r\n this.dotExtension = file.name.substring(indexLastDot);\r\n this.$emit(\"rename\", this.fileName);\r\n\r\n this.$emit(\"fileInCache\", this);\r\n },\r\n\r\n async saveInSmarter() {\r\n if (this.renameFile) {\r\n this.fileName = this.renameFile;\r\n }\r\n\r\n this.waitSmarter = true;\r\n this.pathCleaned = this.cleanText(this.remotePath);\r\n const remoteFormatPath = this.pathCleaned.split(\"/\").join(\"|\");\r\n const url = \".|\" + remoteFormatPath;\r\n\r\n const fileModel = {\r\n filename: this.fileName + this.dotExtension,\r\n file: this.file,\r\n url: url,\r\n };\r\n\r\n this.isSaveFile = await this.$store.dispatch(\"onDropFile\", fileModel);\r\n this.waitSmarter = false;\r\n },\r\n\r\n async onSubmit() {\r\n if (!this.file) {\r\n alert(\"No se ha cargado un documento\");\r\n return;\r\n }\r\n\r\n this.uploading = true;\r\n\r\n await this.callbackBeforeSubmit(this);\r\n\r\n await this.saveInSmarter();\r\n\r\n await this.callbackAfterSubmit(this);\r\n this.uploading = false;\r\n this.onCancel();\r\n },\r\n onCancel() {\r\n this.file = null;\r\n this.fileName = null;\r\n this.dotExtension = null;\r\n this.pathCleaned = null;\r\n this.isSaveFile = false;\r\n this.$emit(\"rename\", this.fileName);\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<template>\r\n <form @submit.prevent=\"onSubmit\">\r\n <input\r\n @change=\"handleFileChange\"\r\n type=\"file\"\r\n ref=\"fileInput\"\r\n style=\"display: none\"\r\n />\r\n <slot name=\"header\">\r\n <div class=\"header\"></div>\r\n </slot>\r\n <div class=\"body\">\r\n <slot> </slot>\r\n <slot\r\n name=\"dropzone\"\r\n :fileBackground=\"fileBackground\"\r\n :triggerFileInput=\"triggerFileInput\"\r\n :handleDrop=\"handleDrop\"\r\n >\r\n <div\r\n class=\"dropzone\"\r\n :style=\"fileBackground\"\r\n @click=\"triggerFileInput\"\r\n @drop.prevent=\"handleDrop\"\r\n @dragover.prevent\r\n @dragenter.prevent\r\n >\r\n <div class=\"content-dropzone\" v-if=\"!waitSmarter\">\r\n <i class=\"fas fa-cloud-upload-alt fa-1x\"></i>\r\n <span>{{ fileName || \"Cargar archivo\" }}</span>\r\n </div>\r\n <div v-else class=\"content-dropzone\">\r\n <!-- Spinner grande -->\r\n <i class=\"fas fa-spinner fa-spin-pulse fa-2x text-dark\"></i>\r\n </div>\r\n </div>\r\n </slot>\r\n </div>\r\n <slot name=\"footer\">\r\n <div class=\"footer\" v-if=\"!hiddenFooter\">\r\n <vs-button class=\"slot-button\" type=\"submit\" :loading=\"uploading\"\r\n >Guardar</vs-button\r\n >\r\n <slot name=\"btn-cancel\" :onCancel=\"onCancel\">\r\n <vs-button class=\"slot-button\" @click.prevent=\"onCancel\" danger\r\n >Cancelar</vs-button\r\n >\r\n </slot>\r\n </div>\r\n </slot>\r\n </form>\r\n</template>\r\n\r\n<style>\r\n.dropzone {\r\n width: 150px;\r\n height: 150px;\r\n border: 1px dashed #ccc;\r\n /* .dark & {\r\n border: 2px dashed rgba(255, 255, 255, 0.1);\r\n } */\r\n border-radius: 5px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n cursor: pointer;\r\n background-size: cover;\r\n background-position: center;\r\n background-repeat: no-repeat;\r\n position: relative;\r\n}\r\n\r\n.dropzone:hover {\r\n background-color: rgba(0, 0, 0, 0.3);\r\n .dark & {\r\n background-color: rgba(255, 255, 255, 0.3);\r\n }\r\n}\r\n\r\n.content-dropzone {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n /* color: #fff; */\r\n padding-inline: 0.5rem;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n & span {\r\n /* color: #fff; */\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n }\r\n}\r\n\r\n.footer {\r\n display: flex;\r\n margin-top: 1rem;\r\n gap: 0.5rem;\r\n}\r\n\r\n.slot-button {\r\n margin: 0;\r\n}\r\n</style>\r\n","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!./LegoDropzone.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!./LegoDropzone.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./LegoDropzone.vue?vue&type=template&id=68c683d4\"\nimport script from \"./LegoDropzone.vue?vue&type=script&lang=js\"\nexport * from \"./LegoDropzone.vue?vue&type=script&lang=js\"\nimport style0 from \"./LegoDropzone.vue?vue&type=style&index=0&id=68c683d4&prod&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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('div',[_c('div',{staticClass:\"pointer\",on:{\"click\":function($event){_vm.isVisibleNuevoRegistro = !_vm.isVisibleNuevoRegistro}}},[_c('h3',{staticClass:\"py-2 border-collapse\"},[_vm._v(_vm._s(_vm.titleNuevoRegistro))])]),_c('b-collapse',{attrs:{\"id\":\"nuevoRegistro\"},model:{value:(_vm.isVisibleNuevoRegistro),callback:function ($$v) {_vm.isVisibleNuevoRegistro=$$v},expression:\"isVisibleNuevoRegistro\"}},[_c('BVForm',{attrs:{\"title\":\"Mantenimientos realizados\",\"disabled\":_vm.waitImg,\"observer\":['nombreProveedor'],\"schema\":_vm.allData,\"callBackSubmit\":_vm.callbackOnSubmit},on:{\"watcher\":_vm.setValuesDependiente},scopedSlots:_vm._u([{key:\"otherInputs\",fn:function(){return [_c('LegoDropzone',{attrs:{\"remotePath\":_vm.pathNewAttachmentFile,\"hiddenFooter\":\"\"},on:{\"fileInCache\":_vm.fileInCache}})]},proxy:true},{key:\"otherBtns\",fn:function(){return [(_vm.ultimoRegistroActivo)?_c('button',{staticClass:\"btn btn-outline-warning\",on:{\"click\":function($event){$event.preventDefault();return _vm.cerrarRegistro.apply(null, arguments)}}},[_vm._v(\" Cerrar registro \")]):_vm._e()]},proxy:true}])})],1)],1),_c('div',[_c('div',{staticClass:\"pointer\",on:{\"click\":function($event){_vm.isVisibleHistorial = !_vm.isVisibleHistorial}}},[_c('h3',{staticClass:\"py-2 border-collapse\"},[_vm._v(\"Historial\")])]),_c('div',[_c('b-collapse',{attrs:{\"id\":\"historial\"},model:{value:(_vm.isVisibleHistorial),callback:function ($$v) {_vm.isVisibleHistorial=$$v},expression:\"isVisibleHistorial\"}},_vm._l((_vm.historial),function(registro){return _c('renderSchema',{key:registro.id,staticClass:\"mb-5\",attrs:{\"schema\":_vm.allData,\"data\":registro},scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_c('h4',{staticClass:\"mt-4 mb-3\"},[_vm._v(\"Registro del \"+_vm._s(_vm.useMoment(registro.fechaDeCreacion)))])]},proxy:true},{key:\"otherItem\",fn:function(){return [_c('a',{staticClass:\"image-link\",attrs:{\"target\":\"_blank\",\"href\":registro.imgFacturaDelMantenimiento}},[_c('img',{attrs:{\"src\":registro.imgFacturaDelMantenimiento,\"alt\":registro.imgFacturaDelMantenimiento}})])]},proxy:true}],null,true)})}),1)],1)])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<script>\r\nimport BVForm from \"@/components/BVForm/BVForm.vue\";\r\nimport renderSchema from '@/components/BVForm/RenderSchema.vue'\r\nimport Swal from \"sweetalert2\";\r\nimport { mapGetters } from 'vuex'\r\nimport LegoDropzone from \"@/components/Lego/LegoDropzone\"\r\n\r\nexport default {\r\n components: {\r\n BVForm,\r\n renderSchema,\r\n LegoDropzone\r\n },\r\n props: {\r\n vehiculo: {\r\n type: Object,\r\n required: true\r\n }\r\n },\r\n data() {\r\n return {\r\n allData: null,\r\n isVisibleNuevoRegistro: false,\r\n titleNuevoRegistro: 'Nuevo registro',\r\n isVisibleHistorial: false,\r\n historial: [],\r\n ultimoRegistroActivo: null,\r\n proveedores: [],\r\n waitImg: false,\r\n pathImgSmarter: ''\r\n\r\n }\r\n },\r\n async mounted() {\r\n\r\n this.allData = JSON.parse(JSON.stringify(await this.$store.dispatch('getHojaDeVidaVehiculoMantenimientosRealizados', this.empresaId )))\r\n await this.getHistorial()\r\n this.ajustesDeLaVisata()\r\n\r\n const responseProveedores = await this.$store.getters.fetchGet({ path: `VehiculoProveedorMantenimientos/Proveedores/${this.empresaId}` })\r\n this.proveedores = await responseProveedores.json()\r\n\r\n const indexNombreProveedor = this.allData.findIndex( item => item.name == 'nombreProveedor' )\r\n this.allData[indexNombreProveedor].options = this.proveedores.map( p => p.nombre )\r\n this.allData = [...this.allData]\r\n\r\n },\r\n computed: {\r\n ...mapGetters(['useMoment']),\r\n empresaId() {\r\n return this.$store.getters.userLoggedIn.empresa.id\r\n },\r\n pathNewAttachmentFile() {\r\n return `empresa/${this.empresaId}/mantenimientos_realizados/${this.vehiculo.placa}`\r\n }\r\n },\r\n methods: {\r\n async getHistorial() {\r\n const response = await this.$store.getters.fetchGet({ path: `VehiculoMantenimientosRealizados/ListaPorVehiculo/${this.vehiculo.id}` })\r\n this.historial = await response.json()\r\n // reverse\r\n this.historial = this.historial.reverse()\r\n },\r\n ajustesDeLaVisata() {\r\n const last = this.historial.reduce((prev, current) => {\r\n return (prev.fechaDeCreacion > current.fechaDeCreacion) ? prev : current\r\n })\r\n if (last.estaCerrado == 0) {\r\n this.ultimoRegistroActivo = last\r\n this.titleNuevoRegistro = 'Editar registro'\r\n this.allData.forEach(item => {\r\n if (item.type == 'date' && last[item.name] != null) {\r\n last[item.name] = last[item.name].split('T')[0]\r\n }\r\n item.value = last[item.name]\r\n })\r\n this.isVisibleNuevoRegistro = true\r\n } else {\r\n this.isVisibleNuevoRegistro = !this.historial.length\r\n this.isVisibleHistorial = true\r\n }\r\n },\r\n cerrarRegistro() {\r\n // pregunta y advierte si desea cerrar el registro una vez realizado no se podra volver a editar\r\n Swal.fire({\r\n title: '¿Está seguro de cerrar el registro?',\r\n text: \"Una vez cerrado no se podrá volver a modificar\",\r\n icon: 'warning',\r\n showCancelButton: true,\r\n confirmButtonColor: '#3085d6',\r\n cancelButtonColor: '#d33',\r\n\r\n confirmButtonText: 'Cerrar registro'\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.$store.getters.fetchPut({ path: `VehiculoMantenimientosRealizados/cerrarRegistro/${this.ultimoRegistroActivo.id}` })\r\n .then(response => {\r\n if (response.ok) {\r\n return response.json()\r\n }\r\n throw new Error('Error al cerrar el registro')\r\n })\r\n .then(async () => {\r\n await this.getHistorial()\r\n\r\n this.ultimoRegistroActivo = null\r\n this.titleNuevoRegistro = 'Nuevo registro'\r\n this.allData.forEach(item => {\r\n item.value = null\r\n })\r\n\r\n Swal.fire(\r\n 'Registro cerrado',\r\n 'El registro ha sido cerrado',\r\n 'success'\r\n )\r\n })\r\n .catch(error => {\r\n Swal.fire({\r\n icon: 'error',\r\n title: 'Error al cerrar el registro',\r\n text: error.message,\r\n showConfirmButton: true,\r\n })\r\n })\r\n }\r\n })\r\n },\r\n\r\n callbackOnSubmit(self) {\r\n let data = { ...self.data }\r\n data.vehiculoId = this.vehiculo.id\r\n data.imgFacturaDelMantenimiento = this.pathImgSmarter\r\n\r\n if (this.ultimoRegistroActivo) {\r\n const { id } = this.ultimoRegistroActivo\r\n\r\n self.loader = true\r\n this.$store.getters.fetchPut({ path: `VehiculoMantenimientosRealizados/${id}`, data })\r\n .then(response => {\r\n if (response.ok) {\r\n return response.json()\r\n }\r\n throw new Error('Error al actualizar')\r\n })\r\n .then(async () => {\r\n await this.getHistorial()\r\n this.ajustesDeLaVisata()\r\n Swal.fire({\r\n icon: 'success',\r\n title: 'Registro actualizado',\r\n showConfirmButton: true,\r\n })\r\n })\r\n .catch(error => {\r\n Swal.fire({\r\n icon: 'error',\r\n title: 'Error al actualizar',\r\n text: error.message,\r\n showConfirmButton: true,\r\n })\r\n })\r\n .finally(() => {\r\n self.loader = false\r\n })\r\n\r\n }\r\n else {\r\n self.loader = true\r\n this.$store.getters.fetchPost({ path: `VehiculoMantenimientosRealizados`, data })\r\n .then(response => {\r\n if (response.ok) {\r\n return response.json()\r\n }\r\n throw new Error('Error al crear el registro')\r\n })\r\n .then(async () => {\r\n await this.getHistorial()\r\n this.ajustesDeLaVisata()\r\n Swal.fire({\r\n icon: 'success',\r\n title: 'Registro creado',\r\n showConfirmButton: true,\r\n })\r\n })\r\n .catch(error => {\r\n Swal.fire({\r\n icon: 'error',\r\n title: 'Error al crear el registro',\r\n text: error.message,\r\n showConfirmButton: true,\r\n })\r\n })\r\n .finally(() => {\r\n self.loader = false\r\n })\r\n }\r\n\r\n },\r\n setValuesDependiente(context) {\r\n const indexItem = this.proveedores.find( p => p.nombre == context.value )\r\n this.allData[context.idx + 1].value = indexItem.numeroDeDocumento\r\n },\r\n async fileInCache( self ) {\r\n this.waitImg = true\r\n await self.saveInSmarter()\r\n this.waitImg = false\r\n this.pathImgSmarter = self.pathAfterSaveInRemote\r\n }\r\n\r\n\r\n }\r\n}\r\n\r\n</script>\r\n\r\n<template>\r\n <div>\r\n <div>\r\n <div @click=\"isVisibleNuevoRegistro = !isVisibleNuevoRegistro\" class=\"pointer\">\r\n <h3 class=\"py-2 border-collapse\">{{ titleNuevoRegistro }}</h3>\r\n </div>\r\n <b-collapse id=\"nuevoRegistro\" v-model=\"isVisibleNuevoRegistro\">\r\n <BVForm title=\"Mantenimientos realizados\" :disabled=\"waitImg\"\r\n :observer=\"['nombreProveedor']\" @watcher=\"setValuesDependiente\"\r\n :schema=\"allData\" :callBackSubmit=\"callbackOnSubmit\">\r\n <template #otherInputs>\r\n <LegoDropzone :remotePath=\"pathNewAttachmentFile\" hiddenFooter @fileInCache=\"fileInCache\"></LegoDropzone>\r\n </template>\r\n \r\n <template #otherBtns>\r\n <button v-if=\"ultimoRegistroActivo\" @click.prevent=\"cerrarRegistro\" class=\"btn btn-outline-warning\">\r\n Cerrar registro\r\n </button>\r\n </template>\r\n\r\n </BVForm>\r\n </b-collapse>\r\n </div>\r\n <div>\r\n <div @click=\"isVisibleHistorial = !isVisibleHistorial\" class=\"pointer\">\r\n <h3 class=\"py-2 border-collapse\">Historial</h3>\r\n </div>\r\n <div>\r\n <b-collapse id=\"historial\" v-model=\"isVisibleHistorial\">\r\n <renderSchema class=\"mb-5\" v-for=\"registro in historial\" :key=\"registro.id\" :schema=\"allData\" :data=\"registro\">\r\n <template #title>\r\n <h4 class=\"mt-4 mb-3\">Registro del {{ useMoment(registro.fechaDeCreacion) }}</h4>\r\n </template>\r\n <template #otherItem>\r\n <a class=\"image-link\" target=\"_blank\" :href=\"registro.imgFacturaDelMantenimiento\">\r\n <img :src=\"registro.imgFacturaDelMantenimiento\" :alt=\"registro.imgFacturaDelMantenimiento\">\r\n </a>\r\n </template>\r\n </renderSchema>\r\n </b-collapse>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</template>\r\n\r\n<style scoped>\r\n.border-collapse {\r\n border-bottom: .5px solid #dee2e6;\r\n}\r\n\r\n.image-link {\r\n width: 250px;\r\n}\r\n.image-link img {\r\n width: 100%;\r\n object-fit: cover;\r\n}\r\n\r\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!./MantenimentosRealizadosView.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!./MantenimentosRealizadosView.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./MantenimentosRealizadosView.vue?vue&type=template&id=2437894d&scoped=true\"\nimport script from \"./MantenimentosRealizadosView.vue?vue&type=script&lang=js\"\nexport * from \"./MantenimentosRealizadosView.vue?vue&type=script&lang=js\"\nimport style0 from \"./MantenimentosRealizadosView.vue?vue&type=style&index=0&id=2437894d&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 \"2437894d\",\n null\n \n)\n\nexport default component.exports","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!./RenderSchema.vue?vue&type=style&index=0&id=0182f277&prod&scoped=true&lang=css\""],"sourceRoot":""}