(window.webpackJsonp=window.webpackJsonp||[]).push([[379],{1379:function(e,t,o){"use strict";o.r(t);o(6),o(5),o(7),o(4),o(12),o(8),o(13);var r=o(2),n=o(78);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,o)}return t}var c={props:{dados:{type:Object,default:function(){}}},data:function(){return{fields:[{key:"ordem",label:"Ordem"},{key:"tipo",label:"Tipo"},{key:"descricao",label:"Nome/Descrição"},{key:"cargo",label:"Cargo"},{key:"vertical",label:"Posição Vertical"},{key:"horizontal",label:"Posição Horizontal"}],optionsOrientacao:[{text:"Selecione",value:null},{text:"Horizontal",value:"H"},{text:"Vertical",value:"V"}],payload:{descricao:"",orientacao:null}}},computed:function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(t){Object(r.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({},Object(n.c)({empresa:"empresa/empresaAtual"})),mounted:function(){this.setPayload()},methods:{setPayload:function(){this.payload=this.dados},closeModal:function(){this.$bvModal.hide("editModeloAssinaturaModal")},saveModelosAssinatura:function(){var e=this;void 0===this.payload.idEmpresa&&(this.payload.idEmpresa=this.empresa.id),this.$correspondenciaService.saveModelosAssinatura(this.empresa.sigla,this.payload).then((function(){e.payload.id,e.$notify({title:"Confirmação",text:"",type:"success"}),e.$bvModal.hide("editModeloAssinaturaModal"),e.findModelosAssinatura()})).catch((function(t){e.$notify({title:"Erro",text:t.response?t.response.data.message:t,type:"error"})}))}}},d=c,y=o(42),component=Object(y.a)(d,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("b-modal",{attrs:{id:"editModeloAssinaturaModal",size:"lg",centered:"","hide-header-close":"","hide-footer":""},on:{shown:e.setPayload},scopedSlots:e._u([{key:"modal-header",fn:function(){return[o("h4",{staticClass:"mt-3"},[e._v("Adicionar")])]},proxy:!0}])},[e._v(" "),o("b-form",[o("b-row",[o("b-col",{attrs:{cols:"6"}},[o("b-form-group",{attrs:{label:"Descrição:"}},[o("b-form-input",{model:{value:e.payload.descricao,callback:function(t){e.$set(e.payload,"descricao",t)},expression:"payload.descricao"}})],1)],1),e._v(" "),o("b-col",{attrs:{cols:"6"}},[o("b-form-group",{attrs:{label:"Orientação:"}},[o("b-form-select",{attrs:{options:e.optionsOrientacao},model:{value:e.payload.orientacao,callback:function(t){e.$set(e.payload,"orientacao",t)},expression:"payload.orientacao"}})],1)],1),e._v(" "),o("b-col",{attrs:{cols:"12"}},[o("b-button",{staticClass:"rounded",attrs:{id:"btnAdicionar",size:"sm",variant:"primary"}},[o("FaIcon",{staticClass:"mr-1",attrs:{icon:"plus"}}),e._v(" "),o("span",[e._v("Adicionar")])],1)],1),e._v(" "),o("b-col",[o("b-table",{attrs:{fields:e.fields,"empty-text":"Não há dados disponíveis.",hover:"","show-empty":""}})],1)],1),e._v(" "),o("b-row",[o("b-col",[o("b-btn",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"primary",type:"submit"},on:{click:e.saveModelosAssinatura}},[o("fa-icon",{attrs:{icon:"save"}}),e._v(" "),o("span",{staticClass:"ml-1"},[e._v("Salvar")])],1),e._v(" "),o("b-btn",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"outline-secondary"},on:{click:e.closeModal}},[o("fa-icon",{attrs:{icon:"times"}}),e._v(" "),o("span",{staticClass:"ml-1"},[e._v("Cancelar")])],1)],1)],1)],1)],1)}),[],!1,null,null,null);t.default=component.exports}}]);
//# sourceMappingURL=f290029-1.2.11.js.map