(window.webpackJsonp=window.webpackJsonp||[]).push([[319,325,819],{1331:function(t,e,r){"use strict";r.r(e);var n={props:{items:{type:Array,default:function(){return[]},required:!0},editCell:{type:Function,default:function(){return!1},required:!0}},data:function(){return{fields:[{key:"sigla",label:"Sigla"},{key:"razaoSocial",label:"Razão Social"},{key:"nomeFantasia",label:"Nome"},{key:"datInicioContrato",label:"Inicio Contrato"},{key:"datTerminoContrato",label:"Término Contrato"}],hover:!0,headVariant:"light",noCollapse:!0,totalRows:1,currentPage:1,perPage:10}},computed:{rows:function(){return this.items.length}},mounted:function(){this.totalRows=this.items.length}},o=r(42),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("b-row",[r("b-col",{attrs:{cols:"12"}},[r("b-card",{staticClass:"mt-3"},[r("b-table",{staticClass:"mt-3",staticStyle:{"overflow-x":"scroll"},attrs:{hover:t.hover,"no-border-collapse":t.noCollapse,items:t.items,fields:t.fields,"head-variant":t.headVariant,responsive:"sm",selectable:"","empty-text":"Não há dados disponíveis.","show-empty":"","current-page":t.currentPage,"per-page":t.perPage,busy:!(t.items.length>0)},on:{"row-clicked":t.editCell},scopedSlots:t._u([{key:"table-busy",fn:function(){return[r("div",{staticClass:"text-center text-primary my-2"},[r("b-spinner",{staticClass:"align-middle"}),t._v(" "),r("strong",[t._v("Carregando...")])],1)]},proxy:!0},{key:"cell(datInicioContrato)",fn:function(e){return[t._v("\n          "+t._s(t._f("formatDate")(e.item.datInicioContrato))+"\n        ")]}},{key:"cell(datTerminoContrato)",fn:function(e){return[t._v("\n          "+t._s(t._f("formatDate")(e.item.datTerminoContrato))+"\n        ")]}}])}),t._v(" "),t.items.length>0?r("b-row",[r("b-col",{attrs:{"align-self":"end"}},[r("div",{staticClass:"text-right"},[r("b",[t._v("Itens:")]),t._v(" "+t._s(t.items.length))])])],1):t._e(),t._v(" "),t.items.length>5?r("b-pagination",{attrs:{"total-rows":t.rows,"per-page":t.perPage,align:"center",pills:""},model:{value:t.currentPage,callback:function(e){t.currentPage=e},expression:"currentPage"}}):t._e()],1)],1)],1)}),[],!1,null,null,null);e.default=component.exports},1879:function(t,e,r){"use strict";r.r(e);var n=r(1331),o=r(852),l={components:{Tabela:n.default,Localizar:o.default},data:function(){return{empresas:[],empresa:{}}},mounted:function(){this.findAllEmpresas()},methods:{adicionarEmpresa:function(){this.$nuxt.$options.router.push("/cadastros/empresas/_empresa")},editEmpresa:function(t){this.$nuxt.$options.router.push("/cadastros/empresas/".concat(t.sigla))},findAllEmpresas:function(t){var e=this;this.$empresaService.findAll(t).then((function(t){e.empresas=t.data}))}}},c=r(42),component=Object(c.a)(l,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"main-content"},[r("form",{attrs:{id:"empresasForm"}},[r("Localizar",{attrs:{title:"Empresas",add:t.adicionarEmpresa,search:t.findAllEmpresas}}),t._v(" "),r("Tabela",{attrs:{items:t.empresas,"edit-cell":t.editEmpresa}})],1)])}),[],!1,null,null,null);e.default=component.exports},852:function(t,e,r){"use strict";r.r(e);var n={props:{title:{type:String,default:function(){return""},required:!0},add:{type:Function,default:function(){return!1},required:!1},search:{type:Function,default:function(){return!1},required:!1}},data:function(){return{searchText:""}}},o=r(42),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("b-row",[r("b-col",{attrs:{cols:"12"}},[r("b-card",[r("div",{staticClass:"mt-4 mx-2",attrs:{slot:"header"},slot:"header"},[r("b-row",[r("b-col",{attrs:{cols:"10"}},[r("h2",{staticClass:"primary"},[t._v(t._s(t.title))])]),t._v(" "),r("b-col",{attrs:{cols:"2"}},[r("div",{staticClass:"d-flex justify-content-end"},[r("b-button",{staticClass:"rounded",attrs:{id:"btnAdicionar",size:"sm",variant:"primary"},on:{click:t.add}},[r("FaIcon",{staticClass:"mr-1",attrs:{icon:"plus"}}),t._v(" "),r("span",[t._v("Adicionar")])],1)],1)])],1)],1),t._v(" "),r("b-row",[r("b-col",[r("b-form",{on:{submit:function(e){return e.preventDefault(),t.search(t.searchText)}}},[r("b-row",[r("b-col",{attrs:{cols:"6"}},[r("b-form-group",{attrs:{label:"Localizar:"}},[r("b-form-input",{attrs:{id:"pesquisa",placeholder:"Digite sua pesquisa...",autofocus:"","aria-autocomplete":"true"},model:{value:t.searchText,callback:function(e){t.searchText=e},expression:"searchText"}})],1)],1)],1),t._v(" "),r("b-row",[r("b-col",{attrs:{cols:"3"}},[r("b-button",{staticClass:"mt-4 rounded",attrs:{id:"btnPesquisar",variant:"primary",size:"sm"},on:{click:function(e){return t.search(t.searchText)}}},[r("FaIcon",{staticClass:"mr-1",attrs:{icon:"search"}}),t._v(" "),r("span",[t._v("Pesquisar")])],1)],1),t._v(" "),r("b-col",{attrs:{cols:"3"}},[t._t("export")],2)],1)],1)],1)],1),t._v(" "),r("div")],1)],1)],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=22e252c-1.2.11.js.map