(window.webpackJsonp=window.webpackJsonp||[]).push([[224],{2063: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(307),c=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}var d={components:{ValidationProvider:n.ValidationProvider,ValidationObserver:n.ValidationObserver},props:{dados:{type:Object,default:function(){},required:!0},getValidationState:{type:Function,default:function(){return!1},required:!0}},data:function(){return{desativarPontoContole:{}}},computed:function(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}({},Object(c.c)({empresa:"empresa/empresaAtual"})),methods:{saveDesativacao:function(){var t=this;this.$pontoControleService.saveDesativacao(this.desativarPontoContole,this.empresa.sigla,this.dados.id).then((function(){t.$bvModal.hide("modalDesativarPonto"),t.$router.push("/ambiental/fichas/pontoControle"),t.$notify({title:"Confirmação",text:"Ponto de Controle desativado com sucesso.",type:"success"})})).catch((function(e){t.busyFichas=!1,t.$notifyApiError(e,"Erro")}))},cancelDesativacao:function(){this.$bvModal.hide("modalDesativarPonto")}}},v=d,f=o(42),component=Object(f.a)(v,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("b-modal",{attrs:{id:"modalDesativarPonto",size:"mg",centered:"","hide-header-close":"","hide-footer":""},scopedSlots:t._u([{key:"modal-header",fn:function(){return[o("div",{staticClass:"d-flex"},[o("fa-icon",{staticStyle:{"font-size":"1.3rem","margin-top":"15px"},attrs:{icon:"toggle-off"}}),t._v(" "),o("h4",{staticClass:"ml-3 mt-3"},[t._v("Desativação de ponto de controle")])],1)]},proxy:!0}])},[t._v(" "),o("validation-observer",{ref:"observer",scopedSlots:t._u([{key:"default",fn:function(e){var r=e.handleSubmit;return[o("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),r(t.saveDesativacao)}}},[o("b-row",[o("b-col",{attrs:{md:"12"}},[o("validation-provider",{attrs:{name:"Data desativação",rules:{required:!0}},scopedSlots:t._u([{key:"default",fn:function(e){return[o("b-form-group",{attrs:{label:"Data da desativação:"}},[o("b-form-input",{staticClass:"my-2",attrs:{type:"date",state:t.getValidationState(e)},model:{value:t.desativarPontoContole.datDesativacao,callback:function(e){t.$set(t.desativarPontoContole,"datDesativacao",e)},expression:"desativarPontoContole.datDesativacao"}})],1)]}}],null,!0)})],1),t._v(" "),o("b-col",{attrs:{md:"12"}},[o("b-form-group",{attrs:{label:"Observação:"}},[o("b-form-textarea",{staticClass:"my-2",attrs:{rows:"5"},model:{value:t.desativarPontoContole.observacao,callback:function(e){t.$set(t.desativarPontoContole,"observacao",e)},expression:"desativarPontoContole.observacao"}})],1)],1)],1),t._v(" "),o("b-row",{staticClass:"border-top"},[o("b-col",{staticClass:"pl-2 d-flex justify-content-end",attrs:{md:"12"}},[o("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"danger",type:"submit"}},[o("fa-icon",{attrs:{icon:"toggle-off"}}),t._v(" "),o("span",{staticClass:"ml-1"},[t._v("Desativar")])],1),t._v(" "),o("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"outline-secondary"},on:{click:function(e){return t.cancelDesativacao()}}},[o("fa-icon",{attrs:{icon:"times"}}),t._v(" "),o("span",{staticClass:"ml-1"},[t._v("Cancelar")])],1)],1)],1)],1)]}}])})],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=3e72d5d-1.2.11.js.map