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

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes-filter/gra-linha-por-mes-filter.component.html":
/*!*********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes-filter/gra-linha-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 fade\" style=\"overflow:auto\" id=\"linha-por-mes-filter\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"uni-modal-dialog-md-60\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.linhaPorMes' | translate }}</h6>\n            </div>\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\n                <div class=\"modal-body\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12\">\n                            <div class=\"row\">\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"periodoDe\" class=\"required\">{{\"labels.periodoDe\" | translate\n                                            }}</label>\n                                        <app-data id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"service.filter.dataI\"\n                                            autofocus class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\"\n                                            required=\"true\">\n                                        </app-data>\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"horaI\" class=\"required\">{{\"labels.hora\" | translate }}</label>\n                                        <input type=\"number\" id=\"horaI\" name=\"horaI\" min=\"0\" max=\"23\" required=\"true\"\n                                            class=\"form-control form-control-sm\" [(ngModel)]=\"service.filter.horaI\"\n                                            (blur)=\"validaHora()\">\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"ate\" class=\"required\">{{\"labels.ate\" | translate}}</label>\n                                        <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"service.filter.dataF\"\n                                            class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\">\n                                        </app-data>\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"horaF\" class=\"required\">{{\"labels.hora\" | translate }}</label>\n                                        <input type=\"number\" id=\"horaF\" name=\"horaF\" min=\"0\" max=\"23\" required=\"true\"\n                                            class=\"form-control form-control-sm\" [(ngModel)]=\"service.filter.horaF\"\n                                            (blur)=\"validaHora()\">\n                                    </div>\n                                </div>\n                            </div>\n\n                            <div class=\"row\">\n                                <div class=\"col-lg-6 col-md-8 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"tempoInicial\" class=\"required\">{{ \"labels.tempoInicial\" | translate\n                                            }}</label>\n                                        <div class=\"d-flex align-items-center\">\n                                            <select class=\"form-control form-control-sm\" required=\"true\"\n                                                [(ngModel)]=\"service.filter.tempoI\" id=\"tempoInicial\"\n                                                name=\"tempoInicial\">\n                                                <option *ngFor=\"let item of tempoInicial\" [value]=\"item.id\">\n                                                    {{ 'labels.' + item.title | translate }}\n                                                </option>\n                                            </select>\n                                            <input type=\"checkbox\"\n                                                style=\"accent-color: #28a745; transform: scale(1.1); margin-left: 0.5rem;\"\n                                                [checked]=\"service.filter.tipoTempo === 1\"\n                                                (change)=\"onTempoCheck(1, $event)\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-5 col-md-8 col-sm-12 mt-4 m1-2\">\n                                    <div class=\"custom-control custom-checkbox\">\n                                        <input id=\"apresentaPeriodoSemMovimento\" name=\"apresentaPeriodoSemMovimento\"\n                                            [ngModel]=\"service.filter.semMovto === 'S'\"\n                                            (ngModelChange)=\"service.filter.semMovto=$event?'S':'N'\"\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\n                                        <label class=\"custom-control-label\"\n                                            for=\"apresentaPeriodoSemMovimento\">{{'labels.apresentaPeriodoSemMovimento' |\n                                            translate}}</label>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-6 col-md-8 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"tempoFinal\" class=\"required\">{{ \"labels.tempoFinal\" | translate\n                                            }}</label>\n                                        <div class=\"d-flex align-items-center\">\n                                            <select class=\"form-control form-control-sm\" required=\"true\"\n                                                [(ngModel)]=\"service.filter.tempoF\" id=\"tempoFinal\" name=\"tempoFinal\">\n                                                <option *ngFor=\"let item of tempoFinal\" [value]=\"item.id\">\n                                                    {{ 'labels.' + item.title | translate }}\n                                                </option>\n                                            </select>\n                                            <input type=\"checkbox\"\n                                                style=\"accent-color: #28a745; transform: scale(1.1); margin-left: 0.5rem;\"\n                                                [checked]=\"service.filter.tipoTempo === 2\"\n                                                (change)=\"onTempoCheck(2, $event)\">\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <app-pesquisa-destinatario id=\"codDest\" name=\"codDest\" label=\"cliente\"\n                                            modalTitle=\"pesquisaDeCliente\"\n                                            [(ngModel)]=\"service.filter.destinatarioIdCliente\" tipoDestinatario=\"C\"\n                                            showCgcCpf=\"false\" showInscricao=\"false\">\n                                        </app-pesquisa-destinatario>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <app-pesquisa-material id=\"produto\" name=\"produto\" label=\"produto\"\n                                            modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"service.filter.materialId\">\n                                        </app-pesquisa-material>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <app-pesquisa-destinatario id=\"transportadora\" name=\"transportadora\"\n                                            label=\"transportadora\" modalTitle=\"pesquisaDeCliente\"\n                                            [(ngModel)]=\"service.filter.destinatarioIdTransportadora\"\n                                            tipoDestinatario=\"NT\" showCgcCpf=\"false\" showInscricao=\"false\">\n                                        </app-pesquisa-destinatario>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"tipoTempo\" class=\"required\">{{\n                                            \"labels.tipoOperacao\" | translate\n                                            }}</label>\n                                        <select class=\"form-control form-control-sm\" required=\"true\"\n                                            [(ngModel)]=\"service.filter.tipoMov\" id=\"tipoOperacao\" name=\"tipoOperacao\">\n                                            <option *ngFor=\"let item of tipoMov.get()\" value=\"{{ item.id }}\">{{\n                                                'labels.' + item.descricao | translate }}</option>\n                                        </select>\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                                    <label for=\"tempoPadrao\">{{ 'labels.tempoPadrao' | translate }}</label>\n                                    <input type=\"number\" class=\"form-control-sm form-control\" name=\"tempoPadrao\"\n                                        id=\"tempoPadrao\" [(ngModel)]=\"service.filter.padrao\">\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-6 col-md-12 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <div class=\"custom-control custom-radio custom-control-inline\">\n                                            <input class=\"custom-control-input radio-success\" id=\"radioDefault\"\n                                                name=\"radioDefault\" [(ngModel)]=\"service.filter.horarioVeiculo\"\n                                                type=\"radio\" value=\"V\">\n                                            <label class=\"custom-control-label\" for=\"radioDefault\">{{ 'labels.veiculo' |\n                                                translate }}\n                                            </label>\n                                        </div>\n                                        <div class=\"custom-control custom-radio custom-control-inline\">\n                                            <input class=\"custom-control-input radio-success\" id=\"radioPrimary\"\n                                                name=\"radioPrimary\" [(ngModel)]=\"service.filter.horarioVeiculo\"\n                                                type=\"radio\" value=\"H\">\n                                            <label class=\"custom-control-label\" for=\"radioPrimary\">{{ 'labels.horario' |\n                                                translate }}\n                                            </label>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-6 col-md-12 col-sm-12\">\n                                    <div class=\"custom-control custom-checkbox\">\n                                        <input id=\"marcacao\" name=\"marcacao\" [ngModel]=\"service.filter.marcacao === 'S'\"\n                                            (ngModelChange)=\"service.filter.marcacao=$event?'S':'N'\"\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\n                                        <label class=\"custom-control-label\" for=\"marcacao\">{{'labels.marcacao' |\n                                            translate}}</label>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-3 col-md-6\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"pagina\" class=\"required\">{{ 'labels.pagina' | translate }}</label>\n                                        <input type=\"number\" class=\"form-control-sm form-control\" name=\"pagina\"\n                                            id=\"pagina\" [(ngModel)]=\"service.filter.pagina\" required=\"true\" min=\"1\"\n                                            max=\"{{ service.valPagMax }}\" (blur)=\"validaValorMaxPagina()\">\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-3 col-md-6\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"itensPag\" class=\"required\">{{ 'labels.itensPag' | translate\n                                            }}</label>\n                                        <input type=\"number\" class=\"form-control-sm form-control\" name=\"itensPag\"\n                                            (blur)=\"service.setValPagMax()\" id=\"itensPag\" required=\"true\" min=\"1\"\n                                            max=\"{{ service.filter.limite }}\" [(ngModel)]=\"service.filter.itensPag\">\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes-index/gra-linha-por-mes-index.component.html":
/*!*******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes-index/gra-linha-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\" [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<app-gra-linha-por-mes [showExport]=\"true\" [tempoPadrao]=\"service.filter.padrao\"></app-gra-linha-por-mes>\n\n<app-gra-linha-por-mes-filter (filtrar)=\"executaFiltro()\"></app-gra-linha-por-mes-filter>\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraLinhaPorMesFilterComponent", function() { return GraLinhaPorMesFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _gra_linha_por_mes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../gra-linha-por-mes.service */ "./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes.service.ts");
/* harmony import */ var _gra_linha_por_mes_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../gra-linha-por-mes.model */ "./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes.model.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.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 GraLinhaPorMesFilterComponent = /** @class */ (function () {
    function GraLinhaPorMesFilterComponent(loginService, message, funcoes, service) {
        this.loginService = loginService;
        this.message = message;
        this.funcoes = funcoes;
        this.service = service;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.blockFields = false;
        this.tipoTempo = new _gra_linha_por_mes_model__WEBPACK_IMPORTED_MODULE_5__["TipoTempo"]();
        this.tempo = new _gra_linha_por_mes_model__WEBPACK_IMPORTED_MODULE_5__["Tempo"]();
        this.tipoMov = new _gra_linha_por_mes_model__WEBPACK_IMPORTED_MODULE_5__["TipoMov"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_1__["Mascaras"]();
        this.valPagMax = 1;
    }
    GraLinhaPorMesFilterComponent.prototype.ngOnInit = function () {
        this.tempoInicial = this.getTime();
        this.tempoFinal = this.getTime();
        this.minValue = 6;
        this.maxValue = 30;
        this.service.setValPagMax();
    };
    GraLinhaPorMesFilterComponent.prototype.onSubmit = function (form) {
        if (!this.funcoes.isNotUndefinedOrNull(this.service.filter.dataI) || !this.funcoes.isNotUndefinedOrNull(this.service.filter.dataF)) {
            this.message.warning('titles.linhaPorMes', 'messages.dataInvalida');
            return;
        }
        if (!this.funcoes.isNotUndefinedOrNull(this.service.filter.horaI) || !(this.service.filter.horaI >= 0) || !(this.service.filter.horaI < 24)) {
            this.message.warning('titles.linhaPorMes', 'messages.horaInvalida');
            return;
        }
        if (!this.funcoes.isNotUndefinedOrNull(this.service.filter.horaF) || !(this.service.filter.horaF >= 0) || !(this.service.filter.horaF < 24)) {
            this.message.warning('titles.linhaPorMes', 'messages.horaInvalida');
            return;
        }
        if (this.service.filter.dataF < this.service.filter.dataI) {
            this.message.warning('titles.linhaPorMes', 'messages.dataDeMaiordataAte');
            return;
        }
        if (!form.invalid) {
            this.filtrar.emit();
        }
    };
    GraLinhaPorMesFilterComponent.prototype.validaValorMaxPagina = function () {
        if (this.service.filter.pagina > this.service.valPagMax) {
            this.message.warning("titles.linhaPorMes", "messages.valorMaxPagUltrapassado");
            this.service.filter.pagina = 1;
        }
    };
    GraLinhaPorMesFilterComponent.prototype.validaHora = function () {
        if (this.service.filter.horaI > 23 || this.service.filter.horaI < 0) {
            this.message.warning("titles.linhaPorMes", "messages.horaIncorreta");
            this.service.filter.horaI = 0;
        }
        if (this.service.filter.horaF > 23 || this.service.filter.horaF < 0) {
            this.message.warning("titles.linhaPorMes", "messages.horaIncorreta");
            this.service.filter.horaF = 0;
        }
    };
    GraLinhaPorMesFilterComponent.prototype.onTempoCheck = function (valor, event) {
        if (event.target.checked) {
            this.service.filter.tipoTempo = valor;
        }
        else {
            this.service.filter.tipoTempo = null;
        }
    };
    GraLinhaPorMesFilterComponent.prototype.getTime = function () {
        return [
            {
                id: 1,
                title: "dataDeChegada"
            },
            {
                id: 2,
                title: "liberacaoNoPatio"
            },
            {
                id: 3,
                title: "inicioDoCheckList"
            },
            {
                id: 4,
                title: "fimdoCheckList"
            },
            {
                id: 5,
                title: "inicioDaInspetora"
            },
            {
                id: 6,
                title: "finalDaInspetora"
            },
            {
                id: 7,
                title: "primeiraPesagem"
            },
            {
                id: 8,
                title: "ultimaPesagem"
            },
            {
                id: 9,
                title: "inicioDeOperacao"
            },
            {
                id: 10,
                title: "finalDeOperacao"
            },
            {
                id: 11,
                title: "dataDeSaida"
            },
            {
                id: 12,
                title: "aguardandoNfVenda"
            },
            {
                id: 13,
                title: "aguardandoNfRetorno"
            },
        ];
    };
    GraLinhaPorMesFilterComponent.ctorParameters = function () { return [
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _gra_linha_por_mes_service__WEBPACK_IMPORTED_MODULE_4__["GraLinhaPorMesService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], GraLinhaPorMesFilterComponent.prototype, "filtrar", void 0);
    GraLinhaPorMesFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-gra-linha-por-mes-filter',
            template: __importDefault(__webpack_require__(/*! raw-loader!./gra-linha-por-mes-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes-filter/gra-linha-por-mes-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _gra_linha_por_mes_service__WEBPACK_IMPORTED_MODULE_4__["GraLinhaPorMesService"]])
    ], GraLinhaPorMesFilterComponent);
    return GraLinhaPorMesFilterComponent;
}());



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraLinhaPorMesIndexComponent", function() { return GraLinhaPorMesIndexComponent; });
/* 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_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_3__ = __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 _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/excel/excel.service */ "./src/app/shared/services/funcoes/excel/excel.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../login/login.model */ "./src/app/pages/login/login.model.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _gra_linha_por_mes_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../gra-linha-por-mes.constants */ "./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes.constants.ts");
/* harmony import */ var _gra_linha_por_mes_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../gra-linha-por-mes.service */ "./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes.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 GraLinhaPorMesIndexComponent = /** @class */ (function (_super) {
    __extends(GraLinhaPorMesIndexComponent, _super);
    function GraLinhaPorMesIndexComponent(router, message, service, messageService, funcoes, excelService, loginService, permissoesUtils, appSettings) {
        var _this = _super.call(this, new _gra_linha_por_mes_constants__WEBPACK_IMPORTED_MODULE_11__["GraLinhaPorMesConstants"](), funcoes) || this;
        _this.router = router;
        _this.message = message;
        _this.service = service;
        _this.messageService = messageService;
        _this.funcoes = funcoes;
        _this.excelService = excelService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.appSettings = appSettings;
        _this.constantes = new _gra_linha_por_mes_constants__WEBPACK_IMPORTED_MODULE_11__["GraLinhaPorMesConstants"]();
        _this.mensagens = [];
        _this.target = _this.funcoesService.getTargetLocation();
        _this.hasDados = false;
        _this.export = function () {
            var headerDictionary = {};
            var options = {
                headerJsonKeys: true,
                headerDictionary: headerDictionary
            };
            _this.service.getDados(_this.service.filter).subscribe(function (resp) {
                _this.dados = resp;
                if (_this.dados) {
                    _this.hasDados = resp.length > 0;
                    if (_this.dados.length === 0) {
                        _this.messageService.warning("titles.linhaPorMes", "messages.naoExistemDados");
                    }
                    else {
                        var rs = _this.dados.map(function (_a) {
                            var minutos = _a.minutos, veiculos = _a.veiculos, mes = _a.mes;
                            return { minutos: minutos, veiculos: veiculos, mes: mes };
                        });
                        _this.excelService.exportAsExcelFile(rs, 'GraLinhaPorMes', options);
                    }
                }
            });
        };
        _this.dashboard = function () {
            var url = _this.router.url.replace('/pages/', 'pages/');
            var filtro = new _login_login_model__WEBPACK_IMPORTED_MODULE_9__["SetFavotiroFiltro"]();
            filtro.isFavorito = false;
            filtro.isDashboard = true;
            filtro.url = url;
            filtro.tipoGrafico = "linhaPorMes";
            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");
            });
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    GraLinhaPorMesIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.getFavorito();
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            if (!_this.loginService.isTokenExpired()) {
                jQuery("#linha-por-mes-filter").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; } },
        ]);
    };
    GraLinhaPorMesIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    GraLinhaPorMesIndexComponent.prototype.filtrar = function () {
        jQuery("#linha-por-mes-filter").modal("show");
    };
    GraLinhaPorMesIndexComponent.prototype.executaFiltro = function () {
        jQuery("#linha-por-mes-filter").modal("hide");
        this.onRefresh();
    };
    GraLinhaPorMesIndexComponent.prototype.onRefresh = function () {
        localStorage.setItem('us.filterLinhaPorMes', JSON.stringify(this.service.filter));
        this.service.emitChangeEvent(true);
    };
    GraLinhaPorMesIndexComponent.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_3__["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';
                }
            }
        }
    };
    GraLinhaPorMesIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _gra_linha_por_mes_service__WEBPACK_IMPORTED_MODULE_12__["GraLinhaPorMesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_5__["ExcelService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: app_app_settings__WEBPACK_IMPORTED_MODULE_2__["AppSettings"] }
    ]; };
    GraLinhaPorMesIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-gra-linha-por-mes-index',
            template: __importDefault(__webpack_require__(/*! raw-loader!./gra-linha-por-mes-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes-index/gra-linha-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"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _gra_linha_por_mes_service__WEBPACK_IMPORTED_MODULE_12__["GraLinhaPorMesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_5__["ExcelService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            app_app_settings__WEBPACK_IMPORTED_MODULE_2__["AppSettings"]])
    ], GraLinhaPorMesIndexComponent);
    return GraLinhaPorMesIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraLinhaPorMesModule", function() { return GraLinhaPorMesModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _gra_linha_por_mes_routing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gra-linha-por-mes.routing */ "./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes.routing.ts");
/* harmony import */ var _gra_linha_por_mes_filter_gra_linha_por_mes_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gra-linha-por-mes-filter/gra-linha-por-mes-filter.component */ "./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes-filter/gra-linha-por-mes-filter.component.ts");
/* harmony import */ var _gra_linha_por_mes_index_gra_linha_por_mes_index_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./gra-linha-por-mes-index/gra-linha-por-mes-index.component */ "./src/app/pages/graficos/gra-linha-por-mes/gra-linha-por-mes-index/gra-linha-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 GraLinhaPorMesModule = /** @class */ (function () {
    function GraLinhaPorMesModule() {
    }
    GraLinhaPorMesModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [_gra_linha_por_mes_filter_gra_linha_por_mes_filter_component__WEBPACK_IMPORTED_MODULE_4__["GraLinhaPorMesFilterComponent"], _gra_linha_por_mes_index_gra_linha_por_mes_index_component__WEBPACK_IMPORTED_MODULE_5__["GraLinhaPorMesIndexComponent"]],
            imports: [
                _angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"],
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__["SharedModule"],
                _gra_linha_por_mes_routing__WEBPACK_IMPORTED_MODULE_3__["GraLinhaPorMesRouting"]
            ]
        })
    ], GraLinhaPorMesModule);
    return GraLinhaPorMesModule;
}());



/***/ }),

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

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



/***/ })

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