(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-oiltanking-cadastros-consulta-situacao-terminal-consulta-situacao-terminal-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-index.component.html":
/*!**********************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-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 [formAction]=\"actionForm\" [sisFormularioId]=\"constantes.sisFormularioId\"\n    [botoesComando]=\"constantes.listaIndex\">\n</app-menu-command-bar>\n\n<ng-container>\n    <div class=\"row mb-2\">\n        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n            <div class=\"section-comand-bar\">\n                <div class=\"dias-semana row\">\n                    <div class=\"dia col-6 col-sm-4 col-md-3 col-lg d-flex flex-column align-items-center text-center\">\n                        <label>\n                            <div>{{ 'labels.domingo' | translate }}</div>\n                            <div>{{ diasSemana.domingo | date:'dd/MM/yyyy' }}</div>\n                            <div class=\"d-flex justify-content-center\">\n                                <input type=\"radio\" name=\"diaSemana\" [value]=\"diasSemana.domingo\"\n                                    [(ngModel)]=\"diaSelecionado\" (change)=\"onSelecionarDia(diasSemana.domingo)\" />\n                            </div>\n                        </label>\n                    </div>\n                    <div class=\"dia col-6 col-sm-4 col-md-3 col-lg d-flex flex-column align-items-center text-center\">\n                        <label>\n                            <div>{{ 'labels.segundaFeira' | translate }}</div>\n                            <div>{{ diasSemana.segunda | date:'dd/MM/yyyy' }}</div>\n                            <div class=\"d-flex justify-content-center\">\n                                <input type=\"radio\" name=\"diaSemana\" [value]=\"diasSemana.segunda\"\n                                    [(ngModel)]=\"diaSelecionado\" (change)=\"onSelecionarDia(diasSemana.segunda)\" />\n                            </div>\n                        </label>\n                    </div>\n                    <div class=\"dia col-6 col-sm-4 col-md-3 col-lg d-flex flex-column align-items-center text-center\">\n                        <label>\n                            <div>{{ 'labels.tercaFeira' | translate }}</div>\n                            <div>{{ diasSemana.terca | date:'dd/MM/yyyy' }}</div>\n                            <div class=\"d-flex justify-content-center\">\n                                <input type=\"radio\" name=\"diaSemana\" [value]=\"diasSemana.terca\"\n                                    [(ngModel)]=\"diaSelecionado\" (change)=\"onSelecionarDia(diasSemana.terca)\" />\n                            </div>\n                        </label>\n                    </div>\n                    <div class=\"dia col-6 col-sm-4 col-md-3 col-lg d-flex flex-column align-items-center text-center\">\n                        <label>\n                            <div>{{ 'labels.quartaFeira' | translate }}</div>\n                            <div>{{ diasSemana.quarta | date:'dd/MM/yyyy' }}</div>\n                            <div class=\"d-flex justify-content-center\">\n                                <input type=\"radio\" name=\"diaSemana\" [value]=\"diasSemana.quarta\"\n                                    [(ngModel)]=\"diaSelecionado\" (change)=\"onSelecionarDia(diasSemana.quarta)\" />\n                            </div>\n                        </label>\n                    </div>\n                    <div class=\"dia col-6 col-sm-4 col-md-3 col-lg d-flex flex-column align-items-center text-center\">\n                        <label>\n                            <div>{{ 'labels.quintaFeira' | translate }}</div>\n                            <div>{{ diasSemana.quinta | date:'dd/MM/yyyy' }}</div>\n                            <div class=\"d-flex justify-content-center\">\n                                <input type=\"radio\" name=\"diaSemana\" [value]=\"diasSemana.quinta\"\n                                    [(ngModel)]=\"diaSelecionado\" (change)=\"onSelecionarDia(diasSemana.quinta)\" />\n                            </div>\n                        </label>\n                    </div>\n                    <div class=\"dia col-6 col-sm-4 col-md-3 col-lg d-flex flex-column align-items-center text-center\">\n                        <label>\n                            <div>{{ 'labels.sextaFeira' | translate }}</div>\n                            <div>{{ diasSemana.sexta | date:'dd/MM/yyyy' }}</div>\n                            <div class=\"d-flex justify-content-center\">\n                                <input type=\"radio\" name=\"diaSemana\" [value]=\"diasSemana.sexta\"\n                                    [(ngModel)]=\"diaSelecionado\" (change)=\"onSelecionarDia(diasSemana.sexta)\" />\n                            </div>\n                        </label>\n                    </div>\n                    <div class=\"dia col-6 col-sm-4 col-md-3 col-lg d-flex flex-column align-items-center text-center\">\n                        <label>\n                            <div>{{ 'labels.sabado' | translate }}</div>\n                            <div>{{ diasSemana.sabado | date:'dd/MM/yyyy' }}</div>\n                            <div class=\"d-flex justify-content-center\">\n                                <input type=\"radio\" name=\"diaSemana\" [value]=\"diasSemana.sabado\"\n                                    [(ngModel)]=\"diaSelecionado\" (change)=\"onSelecionarDia(diasSemana.sabado)\" />\n                            </div>\n                        </label>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</ng-container>\n\n<div class=\"section-comand-bar\">\n    <fieldset class=\"mb-4\">\n        <legend>{{ \"labels.janelas\" | translate }}</legend>\n        <table id=\"dtConsultaSituacaoTerminalJanelas\"\n            class=\"table table-striped table-bordered table-hover nowrap table-sm\">\n        </table>\n    </fieldset>\n    <fieldset>\n        <legend>{{ \"labels.agendamentos\" | translate }}</legend>\n        <table id=\"dtConsultaSituacaoTerminalAgendamentos\"\n            class=\"table table-striped table-bordered table-hover nowrap table-sm\">\n        </table>\n    </fieldset>\n</div>\n\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/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-index.component.scss":
/*!********************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-index.component.scss ***!
  \********************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("@charset \"UTF-8\";\n.dias-semana {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n.dia {\n  margin: 10px 0;\n}\n@media (max-width: 992px) {\n  .dia {\n    width: 30%;\n    /* mais larga para telas médias e pequenas */\n  }\n}\n@media (max-width: 576px) {\n  .dia {\n    width: 45%;\n    /* quase metade da largura em telas pequenas */\n  }\n}\n.dia label {\n  display: block;\n  cursor: pointer;\n}\n.dia input[type=radio] {\n  margin-bottom: 5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvZXNwZWNpZmljb3Mvb2lsdGFua2luZy9jYWRhc3Ryb3MvY29uc3VsdGEtc2l0dWFjYW8tdGVybWluYWwvY29uc3VsdGEtc2l0dWFjYW8tdGVybWluYWwtaW5kZXgvY29uc3VsdGEtc2l0dWFjYW8tdGVybWluYWwtaW5kZXguY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3BhZ2VzL2VzcGVjaWZpY29zL29pbHRhbmtpbmcvY2FkYXN0cm9zL2NvbnN1bHRhLXNpdHVhY2FvLXRlcm1pbmFsL2NvbnN1bHRhLXNpdHVhY2FvLXRlcm1pbmFsLWluZGV4L0M6XFxDb3Jwb3JhdGVcXENvcnBvcmF0ZVdlYkRlc2VudlxcX3VuaXNvbHV0aW9uL3NyY1xcYXBwXFxwYWdlc1xcZXNwZWNpZmljb3NcXG9pbHRhbmtpbmdcXGNhZGFzdHJvc1xcY29uc3VsdGEtc2l0dWFjYW8tdGVybWluYWxcXGNvbnN1bHRhLXNpdHVhY2FvLXRlcm1pbmFsLWluZGV4XFxjb25zdWx0YS1zaXR1YWNhby10ZXJtaW5hbC1pbmRleC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxnQkFBZ0I7QUNBaEI7RUFDRSxhQUFBO0VBQ0EsZUFBQTtFQUNBLDhCQUFBO0FERUY7QUNDQTtFQUNFLGNBQUE7QURFRjtBQ0NBO0VBQ0U7SUFDRSxVQUFBO0lBQVksNENBQUE7RURHZDtBQUNGO0FDQUE7RUFDRTtJQUNFLFVBQUE7SUFBWSw4Q0FBQTtFREdkO0FBQ0Y7QUNBQTtFQUNFLGNBQUE7RUFDQSxlQUFBO0FERUY7QUNDQTtFQUNFLGtCQUFBO0FERUYiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9lc3BlY2lmaWNvcy9vaWx0YW5raW5nL2NhZGFzdHJvcy9jb25zdWx0YS1zaXR1YWNhby10ZXJtaW5hbC9jb25zdWx0YS1zaXR1YWNhby10ZXJtaW5hbC1pbmRleC9jb25zdWx0YS1zaXR1YWNhby10ZXJtaW5hbC1pbmRleC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIkBjaGFyc2V0IFwiVVRGLThcIjtcbi5kaWFzLXNlbWFuYSB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGZsZXgtd3JhcDogd3JhcDtcbiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xufVxuXG4uZGlhIHtcbiAgbWFyZ2luOiAxMHB4IDA7XG59XG5cbkBtZWRpYSAobWF4LXdpZHRoOiA5OTJweCkge1xuICAuZGlhIHtcbiAgICB3aWR0aDogMzAlO1xuICAgIC8qIG1haXMgbGFyZ2EgcGFyYSB0ZWxhcyBtw6lkaWFzIGUgcGVxdWVuYXMgKi9cbiAgfVxufVxuQG1lZGlhIChtYXgtd2lkdGg6IDU3NnB4KSB7XG4gIC5kaWEge1xuICAgIHdpZHRoOiA0NSU7XG4gICAgLyogcXVhc2UgbWV0YWRlIGRhIGxhcmd1cmEgZW0gdGVsYXMgcGVxdWVuYXMgKi9cbiAgfVxufVxuLmRpYSBsYWJlbCB7XG4gIGRpc3BsYXk6IGJsb2NrO1xuICBjdXJzb3I6IHBvaW50ZXI7XG59XG5cbi5kaWEgaW5wdXRbdHlwZT1yYWRpb10ge1xuICBtYXJnaW4tYm90dG9tOiA1cHg7XG59IiwiLmRpYXMtc2VtYW5hIHtcclxuICBkaXNwbGF5OiBmbGV4O1xyXG4gIGZsZXgtd3JhcDogd3JhcDtcclxuICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XHJcbn1cclxuXHJcbi5kaWEge1xyXG4gIG1hcmdpbjogMTBweCAwO1xyXG59XHJcblxyXG5AbWVkaWEgKG1heC13aWR0aDogOTkycHgpIHtcclxuICAuZGlhIHtcclxuICAgIHdpZHRoOiAzMCU7IC8qIG1haXMgbGFyZ2EgcGFyYSB0ZWxhcyBtw6lkaWFzIGUgcGVxdWVuYXMgKi9cclxuICB9XHJcbn1cclxuXHJcbkBtZWRpYSAobWF4LXdpZHRoOiA1NzZweCkge1xyXG4gIC5kaWEge1xyXG4gICAgd2lkdGg6IDQ1JTsgLyogcXVhc2UgbWV0YWRlIGRhIGxhcmd1cmEgZW0gdGVsYXMgcGVxdWVuYXMgKi9cclxuICB9XHJcbn1cclxuXHJcbi5kaWEgbGFiZWwge1xyXG4gIGRpc3BsYXk6IGJsb2NrO1xyXG4gIGN1cnNvcjogcG9pbnRlcjtcclxufVxyXG5cclxuLmRpYSBpbnB1dFt0eXBlPVwicmFkaW9cIl0ge1xyXG4gIG1hcmdpbi1ib3R0b206IDVweDtcclxufVxyXG4iXX0= */");

/***/ }),

/***/ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-index.component.ts":
/*!******************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-index.component.ts ***!
  \******************************************************************************************************************************************************************/
/*! exports provided: ConsultaSituacaoTerminalIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSituacaoTerminalIndexComponent", function() { return ConsultaSituacaoTerminalIndexComponent; });
/* 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_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.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 app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.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 _consulta_situacao_terminal_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../consulta-situacao-terminal.model */ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.model.ts");
/* harmony import */ var _consulta_situacao_terminal_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../consulta-situacao-terminal.service */ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.service.ts");
/* harmony import */ var _consulta_situacao_terminal_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../consulta-situacao-terminal.constants */ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.constants.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};











var ConsultaSituacaoTerminalIndexComponent = /** @class */ (function (_super) {
    __extends(ConsultaSituacaoTerminalIndexComponent, _super);
    function ConsultaSituacaoTerminalIndexComponent(router, service, datatablesService, funcoesService, messageService, permissoesUtils, loginService) {
        var _this = _super.call(this, new _consulta_situacao_terminal_constants__WEBPACK_IMPORTED_MODULE_10__["ConsultaSituacaoTerminalConstants"](), funcoesService) || this;
        _this.router = router;
        _this.service = service;
        _this.datatablesService = datatablesService;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.diasSemana = new _consulta_situacao_terminal_model__WEBPACK_IMPORTED_MODULE_8__["ConsultaSituacaoTerminalListaDiasDto"]();
        _this.dataJanelas = new _consulta_situacao_terminal_model__WEBPACK_IMPORTED_MODULE_8__["ConsultaSituacaoTerminalListaJanelaDto"]();
        _this.dataAgendamentos = new _consulta_situacao_terminal_model__WEBPACK_IMPORTED_MODULE_8__["ConsultaSituacaoTerminalListaAgendamentoDto"]();
        _this.constantes = new _consulta_situacao_terminal_constants__WEBPACK_IMPORTED_MODULE_10__["ConsultaSituacaoTerminalConstants"]();
        _this.mensagens = [];
        _this.login = loginService.getLogin();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    ConsultaSituacaoTerminalIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            if (!_this.loginService.isTokenExpired()) {
                _this.refresh();
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    ConsultaSituacaoTerminalIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getlistaDias().subscribe(function (resp) {
            if (!!resp) {
                _this.diasSemana = resp;
                _this.selecionaDiaAtual();
            }
        });
    };
    ConsultaSituacaoTerminalIndexComponent.prototype.selecionaDiaAtual = function () {
        var hoje = new Date();
        var diasSemana = ['domingo', 'segunda', 'terca', 'quarta', 'quinta', 'sexta', 'sabado'];
        var diaAtual = diasSemana[hoje.getDay()];
        this.onSelecionarDia(this.diasSemana[diaAtual]);
    };
    ConsultaSituacaoTerminalIndexComponent.prototype.onSelecionarDia = function (dia) {
        this.diaSelecionado = dia;
        this.refreshTables();
    };
    ConsultaSituacaoTerminalIndexComponent.prototype.refreshTables = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.getDados()];
                    case 1:
                        _a.sent();
                        if (this._intervalFilter) {
                            clearInterval(this._intervalFilter);
                        }
                        this._intervalFilter = setInterval(function () {
                            _this.getDados();
                        }, 10000);
                        return [2 /*return*/];
                }
            });
        });
    };
    ConsultaSituacaoTerminalIndexComponent.prototype.getDados = function () {
        return __awaiter(this, void 0, void 0, function () {
            var dados, filterJanelas, filterAgendamentos, columnsJanelas;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.getDados().toPromise()];
                    case 1:
                        dados = _a.sent();
                        filterJanelas = dados.listaJanelas.filter(function (j) {
                            return j.data.getDate() === _this.diaSelecionado.getDate();
                        });
                        filterAgendamentos = dados.listaAgendamentos.filter(function (a) {
                            return a.data.getDate() === _this.diaSelecionado.getDate();
                        });
                        columnsJanelas = [
                            this.datatablesService.getDataDateTime("data", "data", "DD/MM/YYYY", "10%"),
                            this.datatablesService.getDataStringAlignRight('janela', 'janela'),
                            this.datatablesService.getDataDouble('capacidadeTerminal', 'capacidadeTerminal', 0),
                            this.datatablesService.getDataDouble('volumeAgendado', 'volumeAgendado', 0),
                            this.datatablesService.getDataDouble('totalReserva', 'totalReservado', 0),
                            this.datatablesService.getDataDouble('avancoDefinido', 'avancoDefinido', 0),
                            this.datatablesService.getDataDouble('volumeAvancoUtilizado', 'avancoUtilizado', 0),
                            this.datatablesService.getDataDouble('publico', 'publico', 0),
                        ];
                        this.datatablesService.toDataTable({ tableId: 'dtConsultaSituacaoTerminalJanelas', columns: columnsJanelas, data: filterJanelas }, function (aData) {
                            _this.dataJanelas = aData;
                        });
                        setTimeout(function () {
                            var columnsAgend = [
                                _this.datatablesService.getDataDateTime("horarioInicio", "horarioInicio", "DD/MM/YYYY", "10%"),
                                _this.datatablesService.getDataDateTime("horarioFim", "horarioFim", "DD/MM/YYYY", "10%"),
                                _this.datatablesService.getDataDouble('volumeAgendado', 'volumeAgendado', 0, false, "10%"),
                                _this.datatablesService.getDataString('baiaDedicada', 'baiaDedicada')
                            ];
                            _this.datatablesService.toDataTable({ tableId: 'dtConsultaSituacaoTerminalAgendamentos', columns: columnsAgend, data: filterAgendamentos }, function (aData) {
                                _this.dataAgendamentos = aData;
                            }, 100);
                        });
                        return [2 /*return*/];
                }
            });
        });
    };
    ConsultaSituacaoTerminalIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    ConsultaSituacaoTerminalIndexComponent.prototype.ngOnDestroy = function () {
        if (this._intervalFilter) {
            clearInterval(this._intervalFilter);
        }
    };
    ConsultaSituacaoTerminalIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _consulta_situacao_terminal_service__WEBPACK_IMPORTED_MODULE_9__["ConsultaSituacaoTerminalService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { 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_5__["PermissoesUtilsService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"] }
    ]; };
    ConsultaSituacaoTerminalIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-consulta-situacao-terminal-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./consulta-situacao-terminal-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./consulta-situacao-terminal-index.component.scss */ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-index.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _consulta_situacao_terminal_service__WEBPACK_IMPORTED_MODULE_9__["ConsultaSituacaoTerminalService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"]])
    ], ConsultaSituacaoTerminalIndexComponent);
    return ConsultaSituacaoTerminalIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.constants.ts":
/*!***************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.constants.ts ***!
  \***************************************************************************************************************************/
/*! exports provided: ConsultaSituacaoTerminalConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSituacaoTerminalConstants", function() { return ConsultaSituacaoTerminalConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ConsultaSituacaoTerminalConstants = /** @class */ (function () {
    function ConsultaSituacaoTerminalConstants() {
        this.sisFormularioId = 375457;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.consultaSituacaoTerminal";
        this.reportId = "OIL0000";
        this.reportTitulo = { "titulo": "Consulta Situação Terminal", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
    }
    return ConsultaSituacaoTerminalConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.model.ts":
/*!***********************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.model.ts ***!
  \***********************************************************************************************************************/
/*! exports provided: ConsultaSituacaoTerminalListaDiasDto, ConsultaSituacaoTerminalIndextDto, ConsultaSituacaoTerminalListaJanelaDto, ConsultaSituacaoTerminalListaAgendamentoDto */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSituacaoTerminalListaDiasDto", function() { return ConsultaSituacaoTerminalListaDiasDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSituacaoTerminalIndextDto", function() { return ConsultaSituacaoTerminalIndextDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSituacaoTerminalListaJanelaDto", function() { return ConsultaSituacaoTerminalListaJanelaDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSituacaoTerminalListaAgendamentoDto", function() { return ConsultaSituacaoTerminalListaAgendamentoDto; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ConsultaSituacaoTerminalListaDiasDto = /** @class */ (function () {
    function ConsultaSituacaoTerminalListaDiasDto() {
    }
    return ConsultaSituacaoTerminalListaDiasDto;
}());

var ConsultaSituacaoTerminalIndextDto = /** @class */ (function () {
    function ConsultaSituacaoTerminalIndextDto() {
    }
    return ConsultaSituacaoTerminalIndextDto;
}());

var ConsultaSituacaoTerminalListaJanelaDto = /** @class */ (function () {
    function ConsultaSituacaoTerminalListaJanelaDto() {
    }
    return ConsultaSituacaoTerminalListaJanelaDto;
}());

var ConsultaSituacaoTerminalListaAgendamentoDto = /** @class */ (function () {
    function ConsultaSituacaoTerminalListaAgendamentoDto() {
    }
    return ConsultaSituacaoTerminalListaAgendamentoDto;
}());



/***/ }),

/***/ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.module.ts":
/*!************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.module.ts ***!
  \************************************************************************************************************************/
/*! exports provided: ConsultaSituacaoTerminalModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSituacaoTerminalModule", function() { return ConsultaSituacaoTerminalModule; });
/* 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 _consulta_situacao_terminal_index_consulta_situacao_terminal_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./consulta-situacao-terminal-index/consulta-situacao-terminal-index.component */ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-index.component.ts");
/* harmony import */ var _consulta_situacao_terminal_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./consulta-situacao-terminal.routing.module */ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.routing.module.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};




var ConsultaSituacaoTerminalModule = /** @class */ (function () {
    function ConsultaSituacaoTerminalModule() {
    }
    ConsultaSituacaoTerminalModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [
                _consulta_situacao_terminal_index_consulta_situacao_terminal_index_component__WEBPACK_IMPORTED_MODULE_2__["ConsultaSituacaoTerminalIndexComponent"]
            ],
            imports: [
                app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"],
                _consulta_situacao_terminal_routing_module__WEBPACK_IMPORTED_MODULE_3__["ConsultaSituacaoTerminalRoutingModule"]
            ]
        })
    ], ConsultaSituacaoTerminalModule);
    return ConsultaSituacaoTerminalModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.routing.module.ts":
/*!********************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.routing.module.ts ***!
  \********************************************************************************************************************************/
/*! exports provided: ConsultaSituacaoTerminalRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSituacaoTerminalRoutingModule", function() { return ConsultaSituacaoTerminalRoutingModule; });
/* 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_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _consulta_situacao_terminal_index_consulta_situacao_terminal_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./consulta-situacao-terminal-index/consulta-situacao-terminal-index.component */ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal-index/consulta-situacao-terminal-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 ConsultaSituacaoTerminalRoutes = [
    {
        path: "",
        component: _consulta_situacao_terminal_index_consulta_situacao_terminal_index_component__WEBPACK_IMPORTED_MODULE_3__["ConsultaSituacaoTerminalIndexComponent"],
        data: {
            breadcrumb: "consultaSituacaoTerminal",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index }
        }
    }
];
var ConsultaSituacaoTerminalRoutingModule = /** @class */ (function () {
    function ConsultaSituacaoTerminalRoutingModule() {
    }
    ConsultaSituacaoTerminalRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(ConsultaSituacaoTerminalRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], ConsultaSituacaoTerminalRoutingModule);
    return ConsultaSituacaoTerminalRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.service.ts":
/*!*************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.service.ts ***!
  \*************************************************************************************************************************/
/*! exports provided: ConsultaSituacaoTerminalService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSituacaoTerminalService", function() { return ConsultaSituacaoTerminalService; });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var _consulta_situacao_terminal_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./consulta-situacao-terminal.constants */ "./src/app/pages/especificos/oiltanking/cadastros/consulta-situacao-terminal/consulta-situacao-terminal.constants.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 ConsultaSituacaoTerminalService = /** @class */ (function () {
    function ConsultaSituacaoTerminalService(http) {
        this.http = http;
        this.constantes = new _consulta_situacao_terminal_constants__WEBPACK_IMPORTED_MODULE_5__["ConsultaSituacaoTerminalConstants"]();
    }
    ConsultaSituacaoTerminalService.prototype.getlistaDias = function () {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].specifics_service_url + "/api/v1/oiltanking/consultaSituacaoTerminal/getListaDias")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ConsultaSituacaoTerminalService.prototype.getDados = function () {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].specifics_service_url + "/api/v1/oiltanking/consultaSituacaoTerminal/getDados")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ConsultaSituacaoTerminalService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] }
    ]; };
    ConsultaSituacaoTerminalService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"]])
    ], ConsultaSituacaoTerminalService);
    return ConsultaSituacaoTerminalService;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-oiltanking-cadastros-consulta-situacao-terminal-consulta-situacao-terminal-module.js.map