(window.webpackJsonp=window.webpackJsonp||[]).push([[276],{1487:function(t,o,e){"use strict";e.r(o);e(6),e(5),e(7),e(4),e(12),e(8),e(13);var n=e(2),r=e(78),d=e(207),c=e.n(d);function l(object,t){var o=Object.keys(object);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(object);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),o.push.apply(o,e)}return o}function m(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(o){Object(n.a)(t,o,source[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(source,o))}))}return t}var f={props:{findInfos:{type:Function,default:function(){},required:!0},infoAdd:{type:Object,default:function(){},required:!0},licenca:{type:Object,default:function(){},required:!0}},data:function(){return{data:c()().format("YYYY-MM-DD")}},computed:m(m({},Object(r.c)({empresa:"empresa/empresaAtual",usuarioAux:"usuario/usuario"})),{},{dadosComputados:{get:function(){return this.infoAdd},set:function(t){this.$emit("update:infoAdd",t)}},busy:{get:function(){return this.busyInfo},set:function(t){this.$emit("update:busyInfo",t)}}}),mounted:function(){},methods:{cancelModal:function(){this.item={},this.$bvModal.hide("modalInfoAdd")},saveInfoAdd:function(){var t=this;this.dadosComputados.data=this.data,this.dadosComputados.idEmpresa=this.empresa.id,this.dadosComputados.idResponsavel=this.usuarioAux.refId,this.dadosComputados.idLicenca=this.licenca.id,this.$licencaService.saveInfo(this.empresa.sigla,this.$route.params.licenca,this.dadosComputados).then((function(){t.$notify({title:"Informação adicional",text:"Informação salva com sucesso.",type:"success"}),t.findInfos(),t.cancelModal()})).catch((function(o){t.$notifyApiError(o,"Erro ao salvar informação adicional")}))}}},v=e(42),component=Object(v.a)(f,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("b-modal",{attrs:{id:"modalInfoAdd",size:"lg",centered:"","hide-header-close":"","hide-footer":""},scopedSlots:t._u([{key:"modal-title",fn:function(){return[e("b-row",[e("b-col",{staticClass:"d-flex"},[e("fa-icon",{staticStyle:{"font-size":"1.3rem"},attrs:{icon:"circle-info"}}),t._v(" "),void 0===t.dadosComputados.id?e("h3",{staticClass:"ml-3"},[t._v("\n          Adicionar Informações Adicionais\n        ")]):t._e(),t._v(" "),void 0!==t.dadosComputados.id?e("h3",{staticClass:"ml-3"},[t._v("\n          Editar Informações Adicionais\n        ")]):t._e()],1)],1)]},proxy:!0}])},[t._v(" "),e("b-form",{on:{submit:function(o){return o.stopPropagation(),o.preventDefault(),t.saveInfoAdd.apply(null,arguments)}}},[e("b-row",[e("b-col",{attrs:{md:"6"}},[e("b-form-group",{attrs:{label:"Responsável:"}},[void 0!==t.dadosComputados.responsavel?e("b-form-input",{staticClass:"my-2",attrs:{disabled:""},model:{value:t.dadosComputados.responsavel.nome,callback:function(o){t.$set(t.dadosComputados.responsavel,"nome",o)},expression:"dadosComputados.responsavel.nome"}}):e("b-form-input",{staticClass:"my-2",attrs:{disabled:""},model:{value:t.usuarioAux.nomeUsuario,callback:function(o){t.$set(t.usuarioAux,"nomeUsuario",o)},expression:"usuarioAux.nomeUsuario"}})],1)],1),t._v(" "),e("b-col",{attrs:{md:"6"}},[e("b-form-group",{attrs:{label:"Data:"}},[void 0!==t.dadosComputados.data?e("b-form-input",{staticClass:"my-2",attrs:{type:"date",disabled:""},model:{value:t.dadosComputados.data,callback:function(o){t.$set(t.dadosComputados,"data",o)},expression:"dadosComputados.data"}}):e("b-form-input",{staticClass:"my-2",attrs:{type:"date",disabled:""},model:{value:t.data,callback:function(o){t.data=o},expression:"data"}})],1)],1),t._v(" "),e("b-col",{attrs:{md:"12"}},[e("b-form-group",{attrs:{label:"Descrição:"}},[e("b-form-textarea",{attrs:{placeholder:"Digite a descrição da Informação Adicional...",rows:"8"},model:{value:t.dadosComputados.descricao,callback:function(o){t.$set(t.dadosComputados,"descricao",o)},expression:"dadosComputados.descricao"}})],1)],1),t._v(" "),e("b-col",{attrs:{md:"12"}},[e("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"success",type:"submit"}},[e("fa-icon",{attrs:{icon:"save"}}),t._v(" "),e("span",{staticClass:"ml-1"},[t._v("Salvar")])],1),t._v(" "),e("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"outline-secondary"},on:{click:function(o){return t.cancelModal()}}},[e("fa-icon",{attrs:{icon:"times"}}),t._v(" "),e("span",{staticClass:"ml-1"},[t._v("Cancelar")])],1)],1)],1)],1)],1)}),[],!1,null,null,null);o.default=component.exports}}]);
//# sourceMappingURL=0ec73f1-1.2.11.js.map