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

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia-filter/gra-saldos-por-dia-filter.component.html":
/*!************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia-filter/gra-saldos-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-saldos-por-dia-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-45\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.saldosPorDia' | 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-12\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-8 col-md-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"grupoClienteId\">{{ 'labels.grupo' | translate}}</label>\r\n                                        <app-combo-grupo-cliente name=\"grupoClienteId\" id=\"grupoClienteId\"\r\n                                            [(ngModel)]=\"service.filtro.grupoClienteId\" [disabled]=\"validaClienteSelecionado()\"\r\n                                            (outSelected)=\"trataGrupoCliente($event)\">\r\n                                        </app-combo-grupo-cliente>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\" *ngIf=\"!service.filtro.grupoClienteId\">\r\n                                <div class=\"col-md-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <app-pesquisa-destinatario id=\"destinatarioIdCliente\"\r\n                                            name=\"destinatarioIdCliente\" label=\"cliente\" modalTitle=\"pesquisaDeCliente\"\r\n                                            [(ngModel)]=\"service.filtro.destinatarioIdCliente\" tipoDestinatario=\"C\"\r\n                                            showCgcCpf=\"false\" showInscricao=\"false\"\r\n                                            [disabled]=\"validaGrupoSelecionado()\" [inSelected]=\"service.filtro.cliente\"\r\n                                            (outModel)=\"trataDest($event)\">\r\n                                        </app-pesquisa-destinatario>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-md-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\" [inSelected]=\"service.filtro.material\"\r\n                                            (outModel)=\"trataMat($event)\" [(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-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"periodo\" class=\"required\">{{\"labels.periodo\" | translate }}</label>\r\n                                        <input id=\"periodo\" name=\"periodo\" [(ngModel)]=\"service.filtro.periodo\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\" required=\"true\"\r\n                                            mask=\"00/0000\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"clearfix\">&nbsp;</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                                        <div class=\"row\">\r\n                                            <div class=\"col-lg-2\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label>\r\n                                                        <input type=\"radio\" name=\"kilos\" value=\"N\"\r\n                                                            [(ngModel)]=\"service.filtro.tipoSaldo\" required>\r\n                                                        {{ 'labels.kilos' | translate }}\r\n                                                    </label>\r\n                                                </div>\r\n                                            </div>\r\n                                            <div class=\"col-lg-2\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label>\r\n                                                        <input type=\"radio\" name=\"litros\" value=\"S\"\r\n                                                            [(ngModel)]=\"service.filtro.tipoSaldo\">\r\n                                                        {{ 'labels.litros' | translate }}\r\n                                                    </label>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row mb-2\">\r\n                                <div class=\"col-lg-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"transferencia\" name=\"transferencia\"\r\n                                            [ngModel]=\"service.filtro.totalizacao === 'S'\"\r\n                                            (ngModelChange)=\"service.filtro.totalizacao=$event?'S':'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                        <label class=\"custom-control-label\"\r\n                                            for=\"transferencia\">{{'labels.apenasTotalizacao' | translate}}</label>\r\n                                    </div>\r\n                                </div>\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.consultar' | translate }}</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-saldos-por-dia/gra-saldos-por-dia-index/gra-saldos-por-dia-index.component.html":
/*!**********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia-index/gra-saldos-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<app-gra-saldos-por-dia [showExport]=\"true\"></app-gra-saldos-por-dia>\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n<app-gra-saldos-por-dia-filter (filtrar)=\"executaFiltro($event)\"></app-gra-saldos-por-dia-filter>\r\n");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraSaldosPorDiaFilterComponent", function() { return GraSaldosPorDiaFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../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 _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _gra_saldos_por_dia_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../gra-saldos-por-dia.service */ "./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia.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 GraSaldosPorDiaFilterComponent = /** @class */ (function () {
    function GraSaldosPorDiaFilterComponent(message, funcoes, loginService, service) {
        this.message = message;
        this.funcoes = funcoes;
        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"]();
    }
    GraSaldosPorDiaFilterComponent.prototype.ngOnInit = function () {
        this.blockFields = false;
    };
    GraSaldosPorDiaFilterComponent.prototype.onSubmit = function (form) {
        var per = this.funcoes.dateTimeUtils.getPeriodo(this.service.filtro.periodo);
        if (per.error) {
            this.message.warning('titles.saldosPorDia', 'messages.periodoInformadoInvalido');
            return;
        }
        this.service.filtro.dataI = per.dataI;
        this.service.filtro.dataF = per.dataF;
        this.service.filtro.periodo = per.periodo;
        this.filtrar.emit(this.service.filtro);
        jQuery("#gra-saldos-por-dia-filter-dialog").modal("hide");
    };
    GraSaldosPorDiaFilterComponent.prototype.validaGrupoSelecionado = function () {
        var valReturn = false;
        if (this.service.filtro.grupoClienteId > 0) {
            valReturn = true;
        }
        return valReturn;
    };
    GraSaldosPorDiaFilterComponent.prototype.validaClienteSelecionado = function () {
        var valReturn = false;
        if (this.service.filtro.destinatarioIdCliente > 0) {
            valReturn = true;
        }
        return valReturn;
    };
    GraSaldosPorDiaFilterComponent.prototype.trataDest = function (destinatario) {
        this.service.filtro.cliente = destinatario;
    };
    GraSaldosPorDiaFilterComponent.prototype.trataMat = function (material) {
        this.service.filtro.material = material;
    };
    GraSaldosPorDiaFilterComponent.prototype.trataGrupoCliente = function (grupoCliente) {
        this.service.filtro.grupoCliente = grupoCliente;
    };
    GraSaldosPorDiaFilterComponent.ctorParameters = function () { return [
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] },
        { type: _gra_saldos_por_dia_service__WEBPACK_IMPORTED_MODULE_5__["GraSaldosPorDiaService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], GraSaldosPorDiaFilterComponent.prototype, "filtrar", void 0);
    GraSaldosPorDiaFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-gra-saldos-por-dia-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./gra-saldos-por-dia-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia-filter/gra-saldos-por-dia-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"],
            _gra_saldos_por_dia_service__WEBPACK_IMPORTED_MODULE_5__["GraSaldosPorDiaService"]])
    ], GraSaldosPorDiaFilterComponent);
    return GraSaldosPorDiaFilterComponent;
}());



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraSaldosPorDiaIndexComponent", function() { return GraSaldosPorDiaIndexComponent; });
/* 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_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __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_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __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 _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/excel/excel.service */ "./src/app/shared/services/funcoes/excel/excel.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _gra_saldos_por_dia_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../gra-saldos-por-dia.model */ "./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia.model.ts");
/* harmony import */ var _gra_saldos_por_dia_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../gra-saldos-por-dia.service */ "./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia.service.ts");
/* harmony import */ var _gra_saldos_por_dia_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../gra-saldos-por-dia.constants */ "./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia.constants.ts");
/* harmony import */ var _login_login_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../login/login.model */ "./src/app/pages/login/login.model.ts");
/* harmony import */ var _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_app_settings__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/app.settings */ "./src/app/app.settings.ts");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_15__ = __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_components_commons_menu_button_menu_button_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/shared/components/commons/menu-button/menu-button.component */ "./src/app/shared/components/commons/menu-button/menu-button.component.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-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 GraSaldosPorDiaIndexComponent = /** @class */ (function (_super) {
    __extends(GraSaldosPorDiaIndexComponent, _super);
    function GraSaldosPorDiaIndexComponent(router, messageService, permissoesUtils, service, excelService, loginService, funcoesService, serviceMaterial, serviceDestinatario, appSettings) {
        var _this = _super.call(this, new _gra_saldos_por_dia_constants__WEBPACK_IMPORTED_MODULE_10__["GraSaldosPorDiaConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.service = service;
        _this.excelService = excelService;
        _this.loginService = loginService;
        _this.funcoesService = funcoesService;
        _this.serviceMaterial = serviceMaterial;
        _this.serviceDestinatario = serviceDestinatario;
        _this.appSettings = appSettings;
        _this.data = new _gra_saldos_por_dia_model__WEBPACK_IMPORTED_MODULE_8__["GraSaldosPorDia"]();
        _this.constantes = new _gra_saldos_por_dia_constants__WEBPACK_IMPORTED_MODULE_10__["GraSaldosPorDiaConstants"]();
        _this.hasDados = false;
        _this.executaFiltro = function (event) {
            _this.data = event;
            _this.onRefresh();
        };
        _this.export = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 4, function () {
                var headerDictionary = {
                    "produto1": "produto",
                    "produto2": "produto",
                    "produto3": "produto",
                    "produto4": "produto",
                    "produto5": "produto",
                    "produto6": "produto",
                    "produto7": "produto",
                    "produto8": "produto",
                    "produto9": "produto",
                    "saldo1": "saldo",
                    "saldo2": "saldo",
                    "saldo3": "saldo",
                    "saldo4": "saldo",
                    "saldo5": "saldo",
                    "saldo6": "saldo",
                    "saldo7": "saldo",
                    "saldo8": "saldo",
                    "saldo9": "saldo",
                    "media1": "media",
                    "media2": "media",
                    "media3": "media",
                    "media4": "media",
                    "media5": "media",
                    "media6": "media",
                    "media7": "media",
                    "media8": "media",
                    "media9": "media"
                };
                var options = {
                    headerJsonKeys: true,
                    headerDictionary: headerDictionary
                };
                _this.service.getDados(_this.service.filtro).subscribe(function (resp) {
                    _this.dados = resp;
                    if (_this.dados) {
                        _this.hasDados = resp.length > 0;
                        if (_this.dados.length === 0) {
                            _this.messageService.warning("titles.saldosPorDia", "messages.naoExistemDados");
                        }
                        else {
                            _this.dados.forEach(function (r) {
                                delete r["itens"];
                            });
                            _this.excelService.exportAsExcelFile(_this.dados, _this.messageService.getTranslates("titles", "saldosPorDia"), options);
                        }
                    }
                });
            });
        };
        _this.imprimir = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 3, function () {
                var reportTitulo = {
                    titulo: _this.messageService.getTranslates('titles', 'saldosPorDia'),
                    subTitulo: ""
                };
                if (_this.funcoesService.isPositive(_this.service.filtro.grupoClienteId)) {
                    if (_this.funcoesService.isNotUndefinedOrNull(_this.service.filtro.grupoCliente.descricao)) {
                        reportTitulo.subTitulo = 'Grupo - ' + _this.service.filtro.grupoCliente.descricao;
                    }
                }
                else if (_this.funcoesService.isPositive(_this.service.filtro.destinatarioIdCliente)) {
                    if (_this.funcoesService.isNotUndefinedOrNull(_this.service.filtro.cliente)) {
                        reportTitulo.subTitulo = 'Cliente - ' + _this.service.filtro.cliente.fantasia;
                    }
                }
                if (_this.funcoesService.isNotUndefinedOrNull(_this.service.filtro.totalizacao)) {
                    reportTitulo.subTitulo += _this.service.filtro.totalizacao === 'S' ? " - Total - " : "";
                }
                if (_this.funcoesService.isNotUndefinedOrNull(_this.service.filtro.tipoSaldo)) {
                    reportTitulo.subTitulo += _this.service.filtro.tipoSaldo === 'N' ? "Kilos" : "Litros";
                }
                if (_this.funcoesService.isNotUndefinedOrNull(_this.service.filtro.materialId)) {
                    if (_this.funcoesService.isNotUndefinedOrNull(_this.service.filtro.material)) {
                        reportTitulo.subTitulo += ' - Produto - ' + _this.service.filtro.material.fantasia;
                    }
                }
                _this.funcoesService.reportInvoc.invocaRelatorio(_this.constantes.reportId, reportTitulo, {
                    dataI: _this.service.filtro.dataI,
                    dataF: _this.service.filtro.dataF,
                    materialId: app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].toString(_this.service.filtro.materialId),
                    destinatarioIdCliente: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["NumberUtilsStaticService"].toNumber(_this.service.filtro.destinatarioIdCliente),
                    grupoClienteId: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["NumberUtilsStaticService"].toNumber(_this.service.filtro.grupoClienteId),
                    tipoSaldo: app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].toString(_this.service.filtro.tipoSaldo),
                    totalizacao: app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].toString(_this.service.filtro.totalizacao)
                });
            });
        };
        _this.dashboard = function () {
            var url = _this.router.url.replace('/pages/', 'pages/');
            var filtro = new _login_login_model__WEBPACK_IMPORTED_MODULE_11__["SetFavotiroFiltro"]();
            filtro.isFavorito = false;
            filtro.isDashboard = true;
            filtro.url = url;
            filtro.tipoGrafico = "saldosPorDia";
            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;
    }
    GraSaldosPorDiaIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.getFavorito();
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            if (!_this.loginService.isTokenExpired()) {
                jQuery("#gra-saldos-por-dia-filter-dialog").modal("show");
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'export', func: function () { return _this.export; } },
            { action: 'dashboard', func: function () { return _this.dashboard; } },
            { action: 'imprimir', func: function () { return _this.imprimir; } }
        ]);
    };
    GraSaldosPorDiaIndexComponent.prototype.onRefresh = function () {
        var newFilter = JSON.stringify(this.service.filtro);
        var oldFilter = localStorage.getItem('us.filterGraphicSaldosPorDia');
        if (newFilter !== oldFilter)
            localStorage.setItem('us.filterGraphicSaldosPorDia', newFilter);
        this.service.emitChangeEvent(true);
    };
    GraSaldosPorDiaIndexComponent.prototype.filtrar = function () {
        jQuery("#gra-saldos-por-dia-filter-dialog").modal("show");
        this.hasDados = false;
    };
    GraSaldosPorDiaIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    GraSaldosPorDiaIndexComponent.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_15__["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';
                }
            }
        }
    };
    GraSaldosPorDiaIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: _gra_saldos_por_dia_service__WEBPACK_IMPORTED_MODULE_9__["GraSaldosPorDiaService"] },
        { type: _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_6__["ExcelService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_12__["MaterialService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_13__["DestinatarioService"] },
        { type: app_app_settings__WEBPACK_IMPORTED_MODULE_14__["AppSettings"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChildren"])(app_shared_components_commons_menu_button_menu_button_component__WEBPACK_IMPORTED_MODULE_16__["MenuButtonComponent"]),
        __metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["QueryList"])
    ], GraSaldosPorDiaIndexComponent.prototype, "itemsMenu", void 0);
    GraSaldosPorDiaIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-gra-saldos-por-dia-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./gra-saldos-por-dia-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia-index/gra-saldos-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_2__["MessageService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            _gra_saldos_por_dia_service__WEBPACK_IMPORTED_MODULE_9__["GraSaldosPorDiaService"],
            _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_6__["ExcelService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_12__["MaterialService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_13__["DestinatarioService"],
            app_app_settings__WEBPACK_IMPORTED_MODULE_14__["AppSettings"]])
    ], GraSaldosPorDiaIndexComponent);
    return GraSaldosPorDiaIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraSaldosPorDiaModule", function() { return GraSaldosPorDiaModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _gra_saldos_por_dia_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gra-saldos-por-dia.routing.module */ "./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia.routing.module.ts");
/* harmony import */ var _gra_saldos_por_dia_index_gra_saldos_por_dia_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gra-saldos-por-dia-index/gra-saldos-por-dia-index.component */ "./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia-index/gra-saldos-por-dia-index.component.ts");
/* harmony import */ var _gra_saldos_por_dia_filter_gra_saldos_por_dia_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gra-saldos-por-dia-filter/gra-saldos-por-dia-filter.component */ "./src/app/pages/graficos/gra-saldos-por-dia/gra-saldos-por-dia-filter/gra-saldos-por-dia-filter.component.ts");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
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 GraSaldosPorDiaModule = /** @class */ (function () {
    function GraSaldosPorDiaModule() {
    }
    GraSaldosPorDiaModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_common__WEBPACK_IMPORTED_MODULE_5__["CommonModule"], _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _gra_saldos_por_dia_routing_module__WEBPACK_IMPORTED_MODULE_2__["GraSaldosPorDiaRoutingModule"]],
            declarations: [_gra_saldos_por_dia_index_gra_saldos_por_dia_index_component__WEBPACK_IMPORTED_MODULE_3__["GraSaldosPorDiaIndexComponent"], _gra_saldos_por_dia_filter_gra_saldos_por_dia_filter_component__WEBPACK_IMPORTED_MODULE_4__["GraSaldosPorDiaFilterComponent"]]
        })
    ], GraSaldosPorDiaModule);
    return GraSaldosPorDiaModule;
}());



/***/ }),

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

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



/***/ })

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