(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-graficos-gra-barra-por-mes-gra-barra-por-mes-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-filter/gra-barra-por-mes-filter.component.html":
/*!*********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-filter/gra-barra-por-mes-filter.component.html ***!
  \*********************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"gra-barra-por-mes-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-60\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.graBarraPorMes' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"periodoDe\" class=\"required\">{{\"labels.periodoDe\" | translate }}</label>\r\n                                <app-data id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"service.filtro.dataI\" autofocus\r\n                                    class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-2 col-md-8 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"horaI\" class=\"required\">{{\"labels.hora\" | translate }}</label>\r\n                                <input type=\"text\" id=\"horaI\" name=\"horaI\" min=\"0\" max=\"23\"\r\n                                    class=\"form-control form-control-sm\" mask=\"99\" [(ngModel)]=\"service.filtro.horaI\"\r\n                                    (blur)=\"validaHora()\">\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"ate\" class=\"required\">{{\"labels.ate\" | translate}}</label>\r\n                                <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"service.filtro.dataF\" class=\"dataHora\"\r\n                                    [formatDateTime]=\"mascara.getFormatData\" required=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-2 col-md-8 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"horaF\" class=\"required\">{{\"labels.hora\" | translate }}</label>\r\n                                <input type=\"text\" id=\"horaF\" name=\"horaF\" min=\"0\" max=\"23\"\r\n                                    class=\"form-control form-control-sm\" mask=\"99\" [(ngModel)]=\"service.filtro.horaF\"\r\n                                    (blur)=\"validaHora()\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" tipoDestinatario=\"C\"\r\n                                    modalTitle=\"pesquisaDeCliente\" label=\"cliente\"\r\n                                    [(ngModel)]=\"service.filtro.destinatarioIdCliente\" showInscricao=\"false\"\r\n                                    showCgcCpf=\"false\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-material id=\"materialId\" name=\"materialId\" label=\"produto\"\r\n                                    modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"service.filtro.materialId\">\r\n                                </app-pesquisa-material>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"destinatarioIdTransportadora\"\r\n                                    name=\"destinatarioIdTransportadora\" label=\"transportadora\"\r\n                                    modalTitle=\"pesquisaDeTransportadora\"\r\n                                    [(ngModel)]=\"service.filtro.destinatarioIdTransportadora\" tipoDestinatario=\"NT\"\r\n                                    showCgcCpf=\"false\" showInscricao=\"false\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"tipo\">{{ \"labels.tipoOperacao\" | translate }}</label>\r\n                                <select class=\"form-control form-control-sm\" [(ngModel)]=\"service.filtro.tipoOperacao\"\r\n                                    id=\"tipo\" name=\"tipoOperacao\">\r\n                                    <option *ngFor=\"let item of tipoOperacao\" value=\"{{ item.id }}\">{{ 'labels.' +\r\n                                        item.title |\r\n                                        translate }}</option>\r\n                                </select>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"tempoPadrao\">{{ 'labels.tempoPadrao' | translate }}</label>\r\n                                <input type=\"number\" class=\"form-control-sm form-control\" name=\"tempoPadrao\"\r\n                                    id=\"tempoPadrao\" [(ngModel)]=\"service.filtro.padrao\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <div class=\"custom-control custom-radio custom-control-inline\">\r\n                                    <input class=\"custom-control-input radio-success\" id=\"radioPrimary\"\r\n                                        name=\"radioPrimary\" [(ngModel)]=\"service.filtro.horarioVeiculo\" type=\"radio\"\r\n                                        value=\"H\">\r\n                                    <label class=\"custom-control-label\" for=\"radioPrimary\">{{ 'labels.horario' |\r\n                                        translate }}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                            <div class=\"custom-control custom-checkbox\">\r\n                                <input id=\"marcacao\" name=\"marcacao\" [ngModel]=\"service.filtro.marcacao === 'S'\"\r\n                                    (ngModelChange)=\"service.filtro.marcacao=$event?'S':'N'\"\r\n                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                <label class=\"custom-control-label\" for=\"marcacao\">{{'labels.marcacao' |\r\n                                    translate}}</label>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"itensPag\">{{ 'labels.itensPag' | translate }}</label>\r\n                                <input type=\"number\" class=\"form-control-sm form-control\" name=\"itensPag\"\r\n                                    (blur)=\"setValPagMax()\" id=\"itensPag\" min=\"1\" max=\"{{ service.filtro.limite }}\"\r\n                                    [(ngModel)]=\"service.filtro.itensPag\">\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6 col-md-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"pagina\">{{ 'labels.pagina' | translate }}</label>\r\n                                <input type=\"number\" class=\"form-control-sm form-control\" name=\"pagina\" id=\"pagina\"\r\n                                    [(ngModel)]=\"service.filtro.pagina\" min=\"1\" max=\"{{ valPagMax }}\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label>{{ 'labels.limite' | translate }}</label>\r\n                                <input type=\"number\" class=\"form-control-sm form-control\" name=\"limite\" id=\"limite\"\r\n                                    [(ngModel)]=\"service.filtro.limite\" min=\"1\" (blur)=\"setValPagMax()\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-index/gra-barra-por-mes-index.component.html":
/*!*******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-index/gra-barra-por-mes-index.component.html ***!
  \*******************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\"\r\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div>\r\n    <app-gra-barra-mes [showExport]=\"true\"></app-gra-barra-mes>\r\n</div>\r\n\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n<app-gra-barra-por-mes-filter (filtrar)=\"executaFiltro($event)\"></app-gra-barra-por-mes-filter>");

/***/ }),

/***/ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-filter/gra-barra-por-mes-filter.component.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-filter/gra-barra-por-mes-filter.component.ts ***!
  \*****************************************************************************************************************/
/*! exports provided: GraBarraPorMesFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorMesFilterComponent", function() { return GraBarraPorMesFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var _gra_barra_por_mes_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../gra-barra-por-mes.service */ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};








var GraBarraPorMesFilterComponent = /** @class */ (function () {
    function GraBarraPorMesFilterComponent(message, funcoesService, loginService, service) {
        this.message = message;
        this.funcoesService = funcoesService;
        this.loginService = loginService;
        this.service = service;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        this.valPagMax = 1;
    }
    GraBarraPorMesFilterComponent.prototype.ngOnInit = function () {
        this.tempoInicial = this.getTime();
        this.tempoFinal = this.getTime();
        this.tipoOperacao = this.geTipoOperacao();
        this.blockFields = false;
    };
    GraBarraPorMesFilterComponent.prototype.onSubmit = function (form) {
        if (form.invalid) {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
            this.funcoesService.backToTop();
            return;
        }
        this.filtrar.emit();
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ModalUtilsStaticService"].closeModal("gra-barra-por-mes-filter-dialog");
    };
    GraBarraPorMesFilterComponent.prototype.getTime = function () {
        return [
            {
                id: 1,
                title: "chegada"
            },
            {
                id: 2,
                title: "segundaPesagem"
            },
            {
                id: 3,
                title: "notaVenda"
            },
            {
                id: 4,
                title: "notaRetorno"
            },
            {
                id: 5,
                title: "emissaoCte"
            },
            {
                id: 6,
                title: "liberacaoVeiculo"
            },
            {
                id: 7,
                title: "impressaoDocumento"
            }
        ];
    };
    GraBarraPorMesFilterComponent.prototype.geTipoOperacao = function () {
        return [
            {
                id: "C",
                title: "carga"
            },
            {
                id: "D",
                title: "descarga"
            },
            {
                id: "T",
                title: "todos"
            }
        ];
    };
    GraBarraPorMesFilterComponent.prototype.setValPagMax = function () {
        this.valPagMax = this.service.filtro.limite / this.service.filtro.itensPag;
        this.valPagMax = Math.round(this.valPagMax);
    };
    GraBarraPorMesFilterComponent.prototype.validaHora = function () {
        if (this.service.filtro.horaI > 23 || this.service.filtro.horaI < 0) {
            this.message.warning("titles.graBarraPorMes", "messages.horaIncorreta");
            this.service.filtro.horaI = 0;
        }
        if (this.service.filtro.horaF > 23 || this.service.filtro.horaF < 0) {
            this.message.warning("titles.graBarraPorMes", "messages.horaIncorreta");
            this.service.filtro.horaF = 0;
        }
    };
    GraBarraPorMesFilterComponent.ctorParameters = function () { return [
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__["MessageService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] },
        { type: _gra_barra_por_mes_service__WEBPACK_IMPORTED_MODULE_7__["GraBarraPorMesService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], GraBarraPorMesFilterComponent.prototype, "filtrar", void 0);
    GraBarraPorMesFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-gra-barra-por-mes-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./gra-barra-por-mes-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-filter/gra-barra-por-mes-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__["MessageService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"],
            _gra_barra_por_mes_service__WEBPACK_IMPORTED_MODULE_7__["GraBarraPorMesService"]])
    ], GraBarraPorMesFilterComponent);
    return GraBarraPorMesFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-index/gra-barra-por-mes-index.component.ts":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-index/gra-barra-por-mes-index.component.ts ***!
  \***************************************************************************************************************/
/*! exports provided: GraBarraPorMesIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorMesIndexComponent", function() { return GraBarraPorMesIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_app_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/app.settings */ "./src/app/app.settings.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/funcoes/excel/excel.service */ "./src/app/shared/services/funcoes/excel/excel.service.ts");
/* harmony import */ var app_pages_login_login_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/pages/login/login.model */ "./src/app/pages/login/login.model.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var _gra_barra_por_mes_model__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../gra-barra-por-mes.model */ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.model.ts");
/* harmony import */ var _gra_barra_por_mes_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../gra-barra-por-mes.service */ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.service.ts");
/* harmony import */ var _gra_barra_por_mes_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../gra-barra-por-mes.constants */ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.constants.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};















var GraBarraPorMesIndexComponent = /** @class */ (function (_super) {
    __extends(GraBarraPorMesIndexComponent, _super);
    function GraBarraPorMesIndexComponent(router, messageService, permissoesUtils, service, excelService, loginService, funcoesService, appSettings) {
        var _this = _super.call(this, new _gra_barra_por_mes_constants__WEBPACK_IMPORTED_MODULE_14__["GraBarraPorMesConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.service = service;
        _this.excelService = excelService;
        _this.loginService = loginService;
        _this.funcoesService = funcoesService;
        _this.appSettings = appSettings;
        _this.data = new _gra_barra_por_mes_model__WEBPACK_IMPORTED_MODULE_12__["GraBarraPorMes"]();
        _this.constantes = new _gra_barra_por_mes_constants__WEBPACK_IMPORTED_MODULE_14__["GraBarraPorMesConstants"]();
        _this.hasDados = false;
        _this.permissoes = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 2, function () {
                _super.prototype.permissoes.call(_this, _this.constantes);
            });
        };
        _this.executaFiltro = function (event) {
            _this.data = event;
            _this.onRefresh();
        };
        _this.export = function () {
            var headerDictionary = {};
            var options = {
                headerJsonKeys: true,
                headerDictionary: headerDictionary
            };
            _this.excelService.exportAsExcelFile(_this.dados, 'graBarraPorMes', options);
        };
        _this.dashboard = function () {
            var url = _this.router.url.replace('/pages/', 'pages/');
            var filtro = new app_pages_login_login_model__WEBPACK_IMPORTED_MODULE_9__["SetFavotiroFiltro"]();
            filtro.isFavorito = false;
            filtro.isDashboard = true;
            filtro.url = url;
            filtro.tipoGrafico = "graBarraMes";
            filtro.codRotina = _this.constantes.sisFormularioId;
            _this.loginService.setFavorito(filtro).subscribe(function (favoritos) {
                _this.appSettings.settings.favoritos = favoritos;
                _this.getFavorito();
                _this.messageService.success("titles.gerenciarDashboard", !_this._isDashboard ? "messages.rotinaNaoDashboard" : "messages.rotinaDashboard");
            });
        };
        return _this;
    }
    GraBarraPorMesIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.getFavorito();
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            if (!_this.loginService.isTokenExpired()) {
                app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["ModalUtilsStaticService"].openModal("gra-barra-por-mes-filter-dialog");
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'export', func: function () { return _this.export; } },
            { action: 'dashboard', func: function () { return _this.dashboard; } },
        ]);
    };
    GraBarraPorMesIndexComponent.prototype.onRefresh = function () {
        var _this = this;
        localStorage.setItem('us.filterBarraPorMes', JSON.stringify(this.service.filtro));
        this.service.emitChangeEvent(true);
        this.service.getDados(this.service.filtro).subscribe(function (resp) {
            _this.dados = resp;
            if (resp) {
                _this.hasDados = resp.length > 0;
                if (!resp || resp.length === 0) {
                    _this.messageService.warning("titles.graBarraPorMes", "messages.naoExistemDados");
                }
            }
        });
    };
    GraBarraPorMesIndexComponent.prototype.filtrar = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["ModalUtilsStaticService"].openModal("gra-barra-por-mes-filter-dialog");
        this.hasDados = false;
    };
    GraBarraPorMesIndexComponent.prototype.getFavorito = function () {
        var _this = this;
        this._isDashboard = false;
        var idxdasboard = this.constantes.listaIndex.findIndex(function (c) { return c.action === 'dashboard'; });
        this.constantes.listaIndex[idxdasboard].icon = 'fa fa-map-o';
        if (!this.loginService.isTokenExpired()) {
            if (app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["ArrayUtilsStaticService"].any(this.appSettings.settings.favoritos)) {
                var fav = this.appSettings.settings.favoritos.find(function (c) { return +c.codRotina === +_this.constantes.sisFormularioId && c.grafico === 'S'; });
                if (!!fav) {
                    this._isDashboard = true;
                    var idxdasboard_1 = this.constantes.listaIndex.findIndex(function (c) { return c.action === 'dashboard'; });
                    this.constantes.listaIndex[idxdasboard_1].icon = 'fa fa-map';
                }
            }
        }
    };
    GraBarraPorMesIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] },
        { type: _gra_barra_por_mes_service__WEBPACK_IMPORTED_MODULE_13__["GraBarraPorMesService"] },
        { type: app_shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_8__["ExcelService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: app_app_settings__WEBPACK_IMPORTED_MODULE_2__["AppSettings"] }
    ]; };
    GraBarraPorMesIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-gra-barra-por-mes",
            template: __importDefault(__webpack_require__(/*! raw-loader!./gra-barra-por-mes-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-index/gra-barra-por-mes-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"],
            _gra_barra_por_mes_service__WEBPACK_IMPORTED_MODULE_13__["GraBarraPorMesService"],
            app_shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_8__["ExcelService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            app_app_settings__WEBPACK_IMPORTED_MODULE_2__["AppSettings"]])
    ], GraBarraPorMesIndexComponent);
    return GraBarraPorMesIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.constants.ts":
/*!*********************************************************************************!*\
  !*** ./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.constants.ts ***!
  \*********************************************************************************/
/*! exports provided: GraBarraPorMesConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorMesConstants", function() { return GraBarraPorMesConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var GraBarraPorMesConstants = /** @class */ (function () {
    function GraBarraPorMesConstants() {
        this.sisFormularioId = 375433;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.impressao" },
        ];
        this.sisSistemaId = "CON";
        this.nomeForm = "titles.graBarraPorDia";
        this.listaIndex = [
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'exportExcel', action: 'export', icon: "fa fa-file-excel-o", exibeButton: true, eximeMenu: true, menuName: 'Arquivo', depitem: false },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Dashboard', action: 'dashboard', icon: "fa fa-map", exibeButton: true, eximeMenu: true, menuName: 'Movimento', depitem: false },
        ];
    }
    return GraBarraPorMesConstants;
}());



/***/ }),

/***/ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.module.ts":
/*!******************************************************************************!*\
  !*** ./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.module.ts ***!
  \******************************************************************************/
/*! exports provided: GraBarraPorMesModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorMesModule", function() { return GraBarraPorMesModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _gra_barra_por_mes_filter_gra_barra_por_mes_filter_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gra-barra-por-mes-filter/gra-barra-por-mes-filter.component */ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-filter/gra-barra-por-mes-filter.component.ts");
/* harmony import */ var _gra_barra_por_mes_index_gra_barra_por_mes_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gra-barra-por-mes-index/gra-barra-por-mes-index.component */ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-index/gra-barra-por-mes-index.component.ts");
/* harmony import */ var _gra_barra_por_mes_routing_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gra-barra-por-mes.routing.module */ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.routing.module.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





var GraBarraPorMesModule = /** @class */ (function () {
    function GraBarraPorMesModule() {
    }
    GraBarraPorMesModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _gra_barra_por_mes_routing_module__WEBPACK_IMPORTED_MODULE_4__["GraBarraPorMesRoutingModule"]],
            declarations: [_gra_barra_por_mes_index_gra_barra_por_mes_index_component__WEBPACK_IMPORTED_MODULE_3__["GraBarraPorMesIndexComponent"],
                _gra_barra_por_mes_filter_gra_barra_por_mes_filter_component__WEBPACK_IMPORTED_MODULE_2__["GraBarraPorMesFilterComponent"]
            ]
        })
    ], GraBarraPorMesModule);
    return GraBarraPorMesModule;
}());



/***/ }),

/***/ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.routing.module.ts":
/*!**************************************************************************************!*\
  !*** ./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes.routing.module.ts ***!
  \**************************************************************************************/
/*! exports provided: GraBarraPorMesRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorMesRoutingModule", function() { return GraBarraPorMesRoutingModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _gra_barra_por_mes_index_gra_barra_por_mes_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gra-barra-por-mes-index/gra-barra-por-mes-index.component */ "./src/app/pages/graficos/gra-barra-por-mes/gra-barra-por-mes-index/gra-barra-por-mes-index.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};



var MRoutes = [
    {
        path: "",
        component: _gra_barra_por_mes_index_gra_barra_por_mes_index_component__WEBPACK_IMPORTED_MODULE_2__["GraBarraPorMesIndexComponent"],
        data: { breadcrumb: "graBarraPorMes" }
    }
];
var GraBarraPorMesRoutingModule = /** @class */ (function () {
    function GraBarraPorMesRoutingModule() {
    }
    GraBarraPorMesRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(MRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], GraBarraPorMesRoutingModule);
    return GraBarraPorMesRoutingModule;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-graficos-gra-barra-por-mes-gra-barra-por-mes-module.js.map