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

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia-filter/gra-barra-por-dia-filter.component.html":
/*!*********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia-filter/gra-barra-por-dia-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-dia-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.graBarraPorDia' | 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-dia/gra-barra-por-dia-index/gra-barra-por-dia-index.component.html":
/*!*******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia-index/gra-barra-por-dia-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-dia [showExport]=\"true\"></app-gra-barra-dia>\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-dia-filter (filtrar)=\"executaFiltro($event)\"></app-gra-barra-por-dia-filter>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorDiaFilterComponent", function() { return GraBarraPorDiaFilterComponent; });
/* 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 _gra_barra_por_dia_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../gra-barra-por-dia.service */ "./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.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 GraBarraPorDiaFilterComponent = /** @class */ (function () {
    function GraBarraPorDiaFilterComponent(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;
    }
    GraBarraPorDiaFilterComponent.prototype.ngOnInit = function () {
        this.tempoInicial = this.getTime();
        this.tempoFinal = this.getTime();
        this.tipoOperacao = this.geTipoOperacao();
        this.blockFields = false;
    };
    GraBarraPorDiaFilterComponent.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_7__["ModalUtilsStaticService"].closeModal("gra-barra-por-dia-filter-dialog");
    };
    GraBarraPorDiaFilterComponent.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"
            }
        ];
    };
    GraBarraPorDiaFilterComponent.prototype.geTipoOperacao = function () {
        return [
            {
                id: "C",
                title: "carga"
            },
            {
                id: "D",
                title: "descarga"
            },
            {
                id: "T",
                title: "todos"
            }
        ];
    };
    GraBarraPorDiaFilterComponent.prototype.setValPagMax = function () {
        this.valPagMax = this.service.filtro.limite / this.service.filtro.itensPag;
        this.valPagMax = Math.round(this.valPagMax);
    };
    GraBarraPorDiaFilterComponent.prototype.validaHora = function () {
        if (this.service.filtro.horaI > 23 || this.service.filtro.horaI < 0) {
            this.message.warning("titles.graBarraPorDia", "messages.horaIncorreta");
            this.service.filtro.horaI = 0;
        }
        if (this.service.filtro.horaF > 23 || this.service.filtro.horaF < 0) {
            this.message.warning("titles.graBarraPorDia", "messages.horaIncorreta");
            this.service.filtro.horaF = 0;
        }
    };
    GraBarraPorDiaFilterComponent.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_dia_service__WEBPACK_IMPORTED_MODULE_6__["GraBarraPorDiaService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], GraBarraPorDiaFilterComponent.prototype, "filtrar", void 0);
    GraBarraPorDiaFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-gra-barra-por-dia-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./gra-barra-por-dia-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia-filter/gra-barra-por-dia-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_dia_service__WEBPACK_IMPORTED_MODULE_6__["GraBarraPorDiaService"]])
    ], GraBarraPorDiaFilterComponent);
    return GraBarraPorDiaFilterComponent;
}());



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorDiaIndexComponent", function() { return GraBarraPorDiaIndexComponent; });
/* 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 _gra_barra_por_dia_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../gra-barra-por-dia.model */ "./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia.model.ts");
/* harmony import */ var _gra_barra_por_dia_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../gra-barra-por-dia.constants */ "./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia.constants.ts");
/* harmony import */ var _gra_barra_por_dia_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../gra-barra-por-dia.service */ "./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.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 GraBarraPorDiaIndexComponent = /** @class */ (function (_super) {
    __extends(GraBarraPorDiaIndexComponent, _super);
    function GraBarraPorDiaIndexComponent(router, messageService, permissoesUtils, service, excelService, loginService, funcoesService, appSettings) {
        var _this = _super.call(this, new _gra_barra_por_dia_constants__WEBPACK_IMPORTED_MODULE_12__["GraBarraPorDiaConstants"](), 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_dia_model__WEBPACK_IMPORTED_MODULE_11__["GraBarraPorDia"]();
        _this.constantes = new _gra_barra_por_dia_constants__WEBPACK_IMPORTED_MODULE_12__["GraBarraPorDiaConstants"]();
        _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, 'graBarraPorDia', 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 = "graBarraPorDia";
            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;
    }
    GraBarraPorDiaIndexComponent.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_14__["ModalUtilsStaticService"].openModal("gra-barra-por-dia-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; } },
        ]);
    };
    GraBarraPorDiaIndexComponent.prototype.onRefresh = function () {
        var _this = this;
        localStorage.setItem('us.filterBarraPorDia', 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.graBarraPorDia", "messages.naoExistemDados");
                }
            }
        });
    };
    GraBarraPorDiaIndexComponent.prototype.filtrar = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_14__["ModalUtilsStaticService"].openModal("gra-barra-por-dia-filter-dialog");
        this.hasDados = false;
    };
    GraBarraPorDiaIndexComponent.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';
                }
            }
        }
    };
    GraBarraPorDiaIndexComponent.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_dia_service__WEBPACK_IMPORTED_MODULE_13__["GraBarraPorDiaService"] },
        { 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"] }
    ]; };
    GraBarraPorDiaIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-gra-barra-por-dia-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./gra-barra-por-dia-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia-index/gra-barra-por-dia-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_dia_service__WEBPACK_IMPORTED_MODULE_13__["GraBarraPorDiaService"],
            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"]])
    ], GraBarraPorDiaIndexComponent);
    return GraBarraPorDiaIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorDiaConstants", function() { return GraBarraPorDiaConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var GraBarraPorDiaConstants = /** @class */ (function () {
    function GraBarraPorDiaConstants() {
        this.sisFormularioId = 375432;
        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 GraBarraPorDiaConstants;
}());



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorDiaModule", function() { return GraBarraPorDiaModule; });
/* 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_dia_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gra-barra-por-dia.routing.module */ "./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia.routing.module.ts");
/* harmony import */ var _gra_barra_por_dia_index_gra_barra_por_dia_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gra-barra-por-dia-index/gra-barra-por-dia-index.component */ "./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia-index/gra-barra-por-dia-index.component.ts");
/* harmony import */ var _gra_barra_por_dia_filter_gra_barra_por_dia_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gra-barra-por-dia-filter/gra-barra-por-dia-filter.component */ "./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia-filter/gra-barra-por-dia-filter.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 GraBarraPorDiaModule = /** @class */ (function () {
    function GraBarraPorDiaModule() {
    }
    GraBarraPorDiaModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _gra_barra_por_dia_routing_module__WEBPACK_IMPORTED_MODULE_2__["GraBarraPorDiaRoutingModule"]],
            declarations: [_gra_barra_por_dia_index_gra_barra_por_dia_index_component__WEBPACK_IMPORTED_MODULE_3__["GraBarraPorDiaIndexComponent"],
                _gra_barra_por_dia_filter_gra_barra_por_dia_filter_component__WEBPACK_IMPORTED_MODULE_4__["GraBarraPorDiaFilterComponent"]
            ]
        })
    ], GraBarraPorDiaModule);
    return GraBarraPorDiaModule;
}());



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraBarraPorDiaRoutingModule", function() { return GraBarraPorDiaRoutingModule; });
/* 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_dia_index_gra_barra_por_dia_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gra-barra-por-dia-index/gra-barra-por-dia-index.component */ "./src/app/pages/graficos/gra-barra-por-dia/gra-barra-por-dia-index/gra-barra-por-dia-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_dia_index_gra_barra_por_dia_index_component__WEBPACK_IMPORTED_MODULE_2__["GraBarraPorDiaIndexComponent"],
        data: { breadcrumb: "graBarraPorDia" }
    }
];
var GraBarraPorDiaRoutingModule = /** @class */ (function () {
    function GraBarraPorDiaRoutingModule() {
    }
    GraBarraPorDiaRoutingModule = __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"]]
        })
    ], GraBarraPorDiaRoutingModule);
    return GraBarraPorDiaRoutingModule;
}());



/***/ })

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