(window.webpackJsonp=window.webpackJsonp||[]).push([[312],{1108:function(t,e,r){"use strict";r.r(e);r(6),r(5),r(7),r(4),r(12),r(8),r(13);var o=r(2),n=(r(50),r(23),r(78));function c(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}var d={name:"HistoricoAtividades",props:{dados:{type:Object,default:function(){return{id:{}}}}},data:function(){return{historicos:[],loading:!1,currentPage:1,perPage:8}},computed:function(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?c(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):c(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}({},Object(n.c)({empresa:"empresa/empresaAtual"})),mounted:function(){var t=this;setTimeout((function(){void 0!==t.dados.id.idMonitoracao&&t.findHistoricos()}),750)},methods:{findHistoricos:function(){var t=this;this.loading=!0,this.$monitoracaoService.findHistoricosAtividades(this.empresa.sigla,this.dados.id.idMonitoracao).then((function(e){t.historicos=e.data,t.loading=!1})).catch((function(e){t.loading=!1,t.$notify({title:"Erro",text:e.response?e.response.data.message:e,type:"error"})}))},historicosPage:function(){return void 0===this.historicos||null===this.historicos?[]:this.historicos.slice((this.currentPage-1)*this.perPage,this.currentPage*this.perPage)}}},l=d,h=r(42),component=Object(h.a)(l,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("b-card",{staticClass:"mt-3"},[r("div",{staticClass:"mt-3",attrs:{slot:"header"},slot:"header"},[r("h4",[t._v("Histórico de Atividades")])]),t._v(" "),r("b-overlay",{attrs:{show:t.loading,rounded:"false"},scopedSlots:t._u([{key:"overlay",fn:function(){return[r("div",{staticClass:"text-center"},[r("b-spinner",{staticClass:"font-weight-bold",staticStyle:{width:"3rem",height:"3rem"},attrs:{variant:"primary"}}),t._v(" "),r("p",{staticClass:"font-weight-bold"},[t._v("Carregando...")])],1)]},proxy:!0}])},[t._v(" "),r("b-row",[r("b-col",{attrs:{md:"12"}},[r("b-list-group",{attrs:{id:"historicoList"}},[0==t.historicos.length?r("b-list-group-item",[t._v("\n            Não há histórico de atividades.\n          ")]):t._e(),t._v(" "),t._l(t.historicosPage(),(function(e,o){return r("b-list-group-item",{key:o,attrs:{button:""}},[t._v("\n            "+t._s(t._f("formatDateTime")(e.datHorHistorico))+"\n            "+t._s(": "+e.usuario.nome+" - "+e.descricaoHistorico)+"\n          ")])}))],2),t._v(" "),t.historicos.length>t.perPage?r("b-pagination",{staticClass:"mt-1",attrs:{"aria-controls":"historicoList","total-rows":t.historicos.length,"per-page":t.perPage,align:"center"},model:{value:t.currentPage,callback:function(e){t.currentPage=e},expression:"currentPage"}}):t._e()],1)],1)],1)],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=183696a-1.2.11.js.map