(window.webpackJsonp=window.webpackJsonp||[]).push([[183],{1958:function(t,e,o){"use strict";o.r(e);o(6),o(5),o(7),o(4),o(12),o(8),o(13);var r=o(2),n=(o(25),o(38),o(78));function l(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}function c(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var d={name:"BoasPraticasFiltro",props:{colFilter:{type:String,required:!0},updateFilter:{type:Function,required:!0},boasPraticas:{type:Array,required:!1,default:function(){return[]}}},data:function(){return{filtro:{titulo:void 0,datCriacaoIni:void 0,datCriacaoFim:void 0,idEixoEstrategico:void 0,idLinhaNegocio:void 0},optionsLinhasNegocio:[],optionsEixoEstrategico:[]}},computed:c({},Object(n.c)({getFiltro:"filtro/getFiltro",getPagina:"filtro/getPagina"})),mounted:function(){this.findEixosEstrategicos(),this.findLinhasNegocio(),this.getPagina===this.$route.name&&void 0!==this.getFiltro&&(this.filtro=c(c({},this.filtro),this.getFiltro))},methods:c(c({},Object(n.b)({setFiltro:"filtro/setFiltro",clearFiltro:"filtro/clearFiltro",setPagina:"filtro/setPagina",clearPagina:"filtro/clearPagina"})),{},{handleFind:function(){this.setFiltro(Object.assign({},this.filtro)),this.setPagina(this.$route.name),this.updateFilter(this.filtro),this.$root.$emit("bv::refresh::table","tableBoasPraticas")},findEixosEstrategicos:function(){var t=this;this.$eixoEstrategicoService.findEixos().then((function(e){var o=e.data||[];t.optionsEixoEstrategico=o.map((function(t){return{value:t.id,text:t.descricao}}))}))},findLinhasNegocio:function(){var t=this;this.$linhasNegocioService.findLinhas().then((function(e){var o=e.data||[];t.optionsLinhasNegocio=o.map((function(t){return{value:t.id,text:t.descricao}}))}))},handleClearFiltro:function(){this.clearFiltro(),this.clearPagina(),this.filtro={}}})},f=o(42),component=Object(f.a)(d,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("b-row",{staticClass:"mt-5"},[o("b-col",{attrs:{md:t.colFilter}},[o("b-form-group",{attrs:{label:"Titulo"}},[o("b-form-input",{staticClass:"my-2",attrs:{type:"text",placeholder:"Descriçao"},model:{value:t.filtro.titulo,callback:function(e){t.$set(t.filtro,"titulo",e)},expression:"filtro.titulo"}})],1)],1),t._v(" "),o("b-col",{attrs:{md:t.colFilter}},[o("b-form-group",{attrs:{label:"Data de Criação ínicio"}},[o("b-form-input",{staticClass:"my-2",attrs:{type:"date",placeholder:"Insira a data de criação"},model:{value:t.filtro.datCriacaoIni,callback:function(e){t.$set(t.filtro,"datCriacaoIni",e)},expression:"filtro.datCriacaoIni"}})],1)],1),t._v(" "),o("b-col",{attrs:{md:t.colFilter}},[o("b-form-group",{attrs:{label:"Data de Criação Fim"}},[o("b-form-input",{staticClass:"my-2",attrs:{type:"date"},model:{value:t.filtro.datCriacaoFim,callback:function(e){t.$set(t.filtro,"datCriacaoFim",e)},expression:"filtro.datCriacaoFim"}})],1)],1),t._v(" "),o("b-col",{attrs:{md:t.colFilter}},[o("b-form-group",{attrs:{label:"Eixo Estratégico"}},[o("InputAutocomplete",{staticClass:"my-2",attrs:{placeholder:"Selecione...","return-key":"value",items:t.optionsEixoEstrategico,render:function(t){return t.text}},model:{value:t.filtro.idEixoEstrategico,callback:function(e){t.$set(t.filtro,"idEixoEstrategico",e)},expression:"filtro.idEixoEstrategico"}})],1)],1),t._v(" "),o("b-col",{attrs:{md:t.colFilter}},[o("b-form-group",{attrs:{label:"Linha de Negócio"}},[o("InputAutocomplete",{attrs:{placeholder:"Selecione...","return-key":"value",items:t.optionsLinhasNegocio,render:function(t){return t.text}},model:{value:t.filtro.idLinhaNegocio,callback:function(e){t.$set(t.filtro,"idLinhaNegocio",e)},expression:"filtro.idLinhaNegocio"}})],1)],1),t._v(" "),o("b-col",{staticClass:"d-flex justify-content-end my-3",attrs:{md:"12"}},[o("b-button",{staticClass:"rounded mt-4",attrs:{size:"sm",variant:"outline-secondary"},on:{click:t.handleClearFiltro}},[o("fa-icon",{attrs:{icon:"eraser"}}),t._v(" Limpar\n    ")],1),t._v(" "),o("b-button",{staticClass:"rounded mt-4 ml-2",attrs:{size:"md",variant:"outline-success"},on:{click:function(e){return t.handleFind()}}},[o("fa-icon",{attrs:{icon:"search"}}),t._v(" Pesquisar\n    ")],1)],1)],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{InputAutocomplete:o(399).default})}}]);
//# sourceMappingURL=cd7f0b3-1.2.11.js.map