(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-configuracoes-gradar-gradar-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/configuracoes/gradar/gradar-portaria-form/gradar-form.component.html":
/*!**********************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/configuracoes/gradar/gradar-portaria-form/gradar-form.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.listaForm\" [formAction]=\"actionForm\" [itemData]=\"data.filialId\"\r\n    [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"row\">\r\n    <div class=\"col-lg-12\">\r\n        <div class=\"section-comand-bar\">\r\n            <app-form-legenda></app-form-legenda>\r\n            <div class=\"card-body widget-body\">\r\n                <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"_onSubmit(f)\">\r\n                    <app-validacoes></app-validacoes>\r\n                    <div class=\"clearfix\">\r\n                        <ul class=\"nav nav-tabs \">\r\n                            <li class=\"nav-item\">\r\n                                <a class=\"nav-link active show\" data-toggle=\"tab\" href=\"#ge\">{{\"labels.gerais\" |\r\n                                    translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#ta\">{{\"labels.tankMaster\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#un\">{{\"labels.unidata\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#fl\">{{\"labels.fluxo\" | translate}}</a>\r\n                            </li>\r\n                        </ul>\r\n                    </div>\r\n                    <div class=\"tab-content top\">\r\n                        <div class=\"tab-pane active show\" id=\"ge\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"utilizaGRadar\" name=\"utilizaGRadar\"\r\n                                            [ngModel]=\"data.utilizaGRadar === 'S'\"\r\n                                            (ngModelChange)=\"data.utilizaGRadar = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                        <label class=\"custom-control-label\" for=\"utilizaGRadar\">\r\n                                            {{'labels.utilizaGRadar' | translate}}\r\n                                        </label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\" style=\"padding-top: 1%;\">\r\n                                <div class=\"col-md-3 col-lg-3\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"tipoFrete\">{{'labels.tipoDeRadar' | translate}}</label>\r\n                                        <app-combo-padrao id=\"tipoDeRadar\" name=\"tipoDeRadar\" tabela=\"TipoRadar\"\r\n                                            chave=\"IdTipoRadar\" descricao=\"Descricao\" [ativos]=\"true\"\r\n                                            [(ngModel)]=\"data.tipoRadar\">\r\n                                        </app-combo-padrao>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-3\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"salvarLeiturasAcada\">{{'labels.salvarLeiturasAcada' | translate}}</label>\r\n                                        <input id=\"salvarLeiturasAcada\" name=\"salvarLeiturasAcada\"\r\n                                            [(ngModel)]=\"data.minSalvarMed\" class=\"form-control form-control-sm\"\r\n                                            type=\"text\" mask=\"999\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-3\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"manterLogDosultimos\">{{'labels.manterLogDosultimos' | translate}}</label>\r\n                                        <input id=\"manterLogDosultimos\" name=\"manterLogDosultimos\"\r\n                                            [(ngModel)]=\"data.diasLogGRadar\" class=\"form-control form-control-sm\"\r\n                                            type=\"text\" mask=\"999\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-8 col-sm-12\">\r\n                                    <fieldset class=\"fieldset\">\r\n                                        <legend>{{'labels.agendamentosParaMedicoesAutomaticas' | translate}}</legend>\r\n                                        <div class=\"col-lg-3\">\r\n                                            <div class=\"d-flex\">\r\n                                                <input id=\"horaInput\" name=\"horaInput\" [(ngModel)]=\"novoHorario\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" placeholder=\"00:00\" mask=\"00:00\">\r\n                                                \r\n                                                <button type=\"button\" class=\"btn btn-success btn-sm ml-2\" (click)=\"salvarHorario()\">Salvar</button>\r\n                                            </div>\r\n                                            <div style=\"padding-top: 5%;\">\r\n                                                <textarea id=\"agendamentosParaMedicoesAutomaticas\"\r\n                                                name=\"agendamentosParaMedicoesAutomaticas\" [(ngModel)]=\"horariosText\"\r\n                                                class=\"form-control form-control-sm\" rows=\"50\" maxlength=\"250\"\r\n                                                style=\"height: auto; max-height: 100px;\" readonly>\r\n                                                </textarea>\r\n                                            </div>\r\n                                            <div *ngIf=\"horarios.length > 0\" class=\"mt-2\">\r\n                                                <select [(ngModel)]=\"horarioSelecionado\" [ngModelOptions]=\"{standalone: true}\"\r\n                                                    class=\"form-control form-control-sm\">\r\n                                                    <option *ngFor=\"let horario of horarios\" [value]=\"horario\">{{ horario }}</option>\r\n                                                </select>\r\n                                                <button type=\"button\" class=\"btn btn-danger btn-sm mt-2\" (click)=\"removerHorario()\">Remover</button>\r\n                                            </div>\r\n                                        </div>\r\n                                    </fieldset>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"tab-pane\" id=\"ta\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-8 col-sm-12\">\r\n                                    <fieldset class=\"fieldset\">\r\n                                        <legend>{{'labels.campoTankMaterAintegrar' | translate}}</legend>\r\n                                        <div class=\"row\">\r\n                                            <div class=\"col-md-6\">\r\n                                                <div class=\"custom-control custom-checkbox\">\r\n                                                    <input id=\"flowRate\" name=\"flowRate\"\r\n                                                        [ngModel]=\"data.flowRate === 'S'\"\r\n                                                        (ngModelChange)=\"data.flowRate = $event ? 'S' : 'N'\"\r\n                                                        class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                                    <label class=\"custom-control-label\" for=\"flowRate\">\r\n                                                        {{'labels.flowRate' | translate}}\r\n                                                    </label>\r\n                                                </div>\r\n                                                <div class=\"custom-control custom-checkbox\">\r\n                                                    <input id=\"temperatura1\" name=\"temperatura1\"\r\n                                                        [ngModel]=\"data.temperatura1 === 'S'\"\r\n                                                        (ngModelChange)=\"data.temperatura1 = $event ? 'S' : 'N'\"\r\n                                                        class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                                    <label class=\"custom-control-label\" for=\"temperatura1\">\r\n                                                        {{'labels.temperatura1' | translate}}\r\n                                                    </label>\r\n                                                </div>\r\n                                                <div class=\"custom-control custom-checkbox\">\r\n                                                    <input id=\"temperatura3\" name=\"temperatura3\"\r\n                                                        [ngModel]=\"data.temperatura3 === 'S'\"\r\n                                                        (ngModelChange)=\"data.temperatura3 = $event ? 'S' : 'N'\"\r\n                                                        class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                                    <label class=\"custom-control-label\" for=\"temperatura3\">\r\n                                                        {{'labels.temperatura3' | translate}}\r\n                                                    </label>\r\n                                                </div>\r\n                                                <div class=\"custom-control custom-checkbox\">\r\n                                                    <input id=\"temperatura5\" name=\"temperatura5\"\r\n                                                        [ngModel]=\"data.temperatura5 === 'S'\"\r\n                                                        (ngModelChange)=\"data.temperatura5 = $event ? 'S' : 'N'\"\r\n                                                        class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                                    <label class=\"custom-control-label\" for=\"temperatura5\">\r\n                                                        {{'labels.temperatura5' | translate}}\r\n                                                    </label>\r\n                                                </div>\r\n                                            </div>\r\n                                            <div class=\"col-md-6\">\r\n                                                <div class=\"custom-control custom-checkbox\">\r\n                                                    <input id=\"levelRate\" name=\"levelRate\"\r\n                                                        [ngModel]=\"data.levelRate === 'S'\"\r\n                                                        (ngModelChange)=\"data.levelRate = $event ? 'S' : 'N'\"\r\n                                                        class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                                    <label class=\"custom-control-label\" for=\"levelRate\">\r\n                                                        {{'labels.levelRate' | translate}}\r\n                                                    </label>\r\n                                                </div>\r\n                                                <div class=\"custom-control custom-checkbox\">\r\n                                                    <input id=\"temperatura2\" name=\"temperatura2\"\r\n                                                        [ngModel]=\"data.temperatura2 === 'S'\"\r\n                                                        (ngModelChange)=\"data.temperatura2 = $event ? 'S' : 'N'\"\r\n                                                        class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                                    <label class=\"custom-control-label\" for=\"temperatura2\">\r\n                                                        {{'labels.temperatura2' | translate}}\r\n                                                    </label>\r\n                                                </div>\r\n                                                <div class=\"custom-control custom-checkbox\">\r\n                                                    <input id=\"temperatura4\" name=\"temperatura4\"\r\n                                                        [ngModel]=\"data.temperatura4 === 'S'\"\r\n                                                        (ngModelChange)=\"data.temperatura4 = $event ? 'S' : 'N'\"\r\n                                                        class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                                    <label class=\"custom-control-label\" for=\"temperatura4\">\r\n                                                        {{'labels.temperatura4' | translate}}\r\n                                                    </label>\r\n                                                </div>\r\n                                                <div class=\"custom-control custom-checkbox\">\r\n                                                    <input id=\"temperatura6\" name=\"temperatura6\"\r\n                                                        [ngModel]=\"data.temperatura6 === 'S'\"\r\n                                                        (ngModelChange)=\"data.temperatura6 = $event ? 'S' : 'N'\"\r\n                                                        class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                                    <label class=\"custom-control-label\" for=\"temperatura6\">\r\n                                                        {{'labels.temperatura6' | translate}}\r\n                                                    </label>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                    </fieldset>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"tab-pane\" id=\"un\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"intUnidataAtivo\" name=\"intUnidataAtivo\"\r\n                                            [ngModel]=\"data.intUnidataAtivo === 'S'\"\r\n                                            (ngModelChange)=\"data.intUnidataAtivo = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                        <label class=\"custom-control-label\" for=\"intUnidataAtivo\">\r\n                                            {{'labels.ativo' | translate}}\r\n                                        </label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\" style=\"padding-top: 1%;\">\r\n                                <div class=\"col-lg-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"urlWsCorporate\">{{'labels.urlWsCorporate' | translate}}</label>\r\n                                        <input id=\"urlWsCorporate\" name=\"urlWsCorporate\"\r\n                                            [(ngModel)]=\"data.intUnidataUrlWSCorp\" class=\"form-control form-control-sm\"\r\n                                            type=\"text\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"urlWsUnidata\">{{'labels.urlWsUnidata' | translate}}</label>\r\n                                        <input id=\"urlWsUnidata\" name=\"urlWsUnidata\"\r\n                                            [(ngModel)]=\"data.intUnidataUrlWSUnid\" class=\"form-control form-control-sm\"\r\n                                            type=\"text\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"tab-pane\" id=\"fl\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"intFluxoAtivo\" name=\"intFluxoAtivo\"\r\n                                            [ngModel]=\"data.intFluxoAtivo === 'S'\"\r\n                                            (ngModelChange)=\"data.intFluxoAtivo = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                        <label class=\"custom-control-label\" for=\"intFluxoAtivo\">\r\n                                            {{'labels.ativo' | translate}}\r\n                                        </label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\" style=\"padding-top: 1%;\">\r\n                                <div class=\"col-lg-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"urlWsCorporate\">{{'labels.urlWsCorporate' | translate}}</label>\r\n                                        <input id=\"urlWsCorporate\" name=\"urlWsCorporate\"\r\n                                            [(ngModel)]=\"data.intFluxoUrlWSCorp\" class=\"form-control form-control-sm\"\r\n                                            type=\"text\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"urlWsFluxo\">{{'labels.urlWsFluxo' | translate}}</label>\r\n                                        <input id=\"urlWsFluxo\" name=\"urlWsFluxo\" [(ngModel)]=\"data.intFluxoUrlWSFluxo\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"key\">{{'labels.key' | translate}}</label>\r\n                                        <input id=\"key\" name=\"key\" [(ngModel)]=\"data.intFluxoKey\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"secret\">{{'labels.secret' | translate}}</label>\r\n                                        <input id=\"secret\" name=\"secret\" [(ngModel)]=\"data.intFluxoSecret\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <div class=\"form-group\">\r\n                                <button class=\"btn btn-success mr-2\" type=\"submit\">\r\n                                    {{ 'buttons.salvar' | translate }}\r\n                                </button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </form>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./src/app/pages/configuracoes/gradar/gradar-portaria-form/gradar-form.component.ts":
/*!******************************************************************************************!*\
  !*** ./src/app/pages/configuracoes/gradar/gradar-portaria-form/gradar-form.component.ts ***!
  \******************************************************************************************/
/*! exports provided: GradarFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GradarFormComponent", function() { return GradarFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.model */ "./src/app/shared/services/funcoes/configuracao/configuracao.model.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __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_6__ = __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_7__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _gradar_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../gradar.constants */ "./src/app/pages/configuracoes/gradar/gradar.constants.ts");
/* harmony import */ var _gradar_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../gradar.model */ "./src/app/pages/configuracoes/gradar/gradar.model.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 GradarFormComponent = /** @class */ (function (_super) {
    __extends(GradarFormComponent, _super);
    function GradarFormComponent(messageService, configuracao, funcoesService, loginService, permissoesUtils) {
        var _this = _super.call(this, new _gradar_constants__WEBPACK_IMPORTED_MODULE_9__["GradarConstants"](), funcoesService) || this;
        _this.messageService = messageService;
        _this.configuracao = configuracao;
        _this.funcoesService = funcoesService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.data = new _gradar_model__WEBPACK_IMPORTED_MODULE_10__["Gradar"]();
        _this.mensagens = [];
        _this.constantes = new _gradar_constants__WEBPACK_IMPORTED_MODULE_9__["GradarConstants"]();
        _this.novoHorario = '';
        _this.horarios = [];
        _this.horariosText = '';
        _this.horarioSelecionado = '';
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.data.filialId = _this.loginService.getLogin().filialId;
                _this.data.utilizaGRadar = _this.configuracao.string('GRD', 'UtilizaGRadar');
                _this.data.tipoRadar = _this.configuracao.string('GRD', 'TipoRadar');
                _this.data.minSalvarMed = _this.configuracao.number('GRD', 'MinSalvarMed');
                _this.data.diasLogGRadar = _this.configuracao.number('GRD', 'DiasLogGRadar');
                _this.data.horarioMedAutom = _this.configuracao.string('GRD', 'HorarioMedAutom');
                _this.data.flowRate = _this.configuracao.string('GRD', 'FlowRate');
                _this.data.levelRate = _this.configuracao.string('GRD', 'LevelRate');
                _this.data.temperatura1 = _this.configuracao.string('GRD', 'Temperatura1');
                _this.data.temperatura2 = _this.configuracao.string('GRD', 'Temperatura2');
                _this.data.temperatura3 = _this.configuracao.string('GRD', 'Temperatura3');
                _this.data.temperatura4 = _this.configuracao.string('GRD', 'Temperatura4');
                _this.data.temperatura5 = _this.configuracao.string('GRD', 'Temperatura5');
                _this.data.temperatura6 = _this.configuracao.string('GRD', 'Temperatura6');
                _this.data.intUnidataAtivo = _this.configuracao.string('GRD', 'IntUnidataAtivo');
                _this.data.intUnidataUrlWSCorp = _this.configuracao.string('GRD', 'IntUnidataUrlWSCorp');
                _this.data.intUnidataUrlWSUnid = _this.configuracao.string('GRD', 'IntUnidataUrlWSUnid');
                _this.data.intFluxoAtivo = _this.configuracao.string('GRD', 'IntFluxoAtivo');
                _this.data.intFluxoUrlWSCorp = _this.configuracao.string('GRD', 'IntFluxoUrlWSCorp');
                _this.data.intFluxoUrlWSFluxo = _this.configuracao.string('GRD', 'IntFluxoUrlWSFluxo');
                _this.data.intFluxoKey = _this.configuracao.string('GRD', 'IntFluxoKey');
                _this.data.intFluxoSecret = _this.configuracao.string('GRD', 'IntFluxoSecret');
                _this.carregarHorarios();
            }
        };
        return _this;
    }
    GradarFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.configuracao.getConfig({
                codRotina: _this.constantes.sisFormularioId,
                configs: _this.constantes.configuracoes
            }, _this.loadConfig);
        }, function () { return _this.permissoesUtils.back(); }, true);
    };
    GradarFormComponent.prototype._onSubmit = function (form) {
        var _this = this;
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('formError').emit(form);
        if (form.invalid)
            return;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.messageService.confirm('titles.gradar', 'messages.updateConfigConfirm', null, function () { return _this.onSubmit(); });
        });
    };
    GradarFormComponent.prototype.onSubmit = function () {
        var _this = this;
        var object = new _shared_services_funcoes_configuracao_configuracao_model__WEBPACK_IMPORTED_MODULE_4__["Config"](this.constantes.sisFormularioId);
        object.setConfig(this.data.filialId, 'GRD', 'UtilizaGRadar', this.data.utilizaGRadar);
        object.setConfig(this.data.filialId, 'GRD', 'TipoRadar', this.data.tipoRadar);
        object.setConfig(this.data.filialId, 'GRD', 'MinSalvarMed', this.data.minSalvarMed, 'I');
        object.setConfig(this.data.filialId, 'GRD', 'DiasLogGRadar', this.data.diasLogGRadar, 'I');
        object.setConfig(this.data.filialId, 'GRD', 'HorarioMedAutom', this.data.horarioMedAutom);
        object.setConfig(this.data.filialId, 'GRD', 'FlowRate', this.data.flowRate);
        object.setConfig(this.data.filialId, 'GRD', 'LevelRate', this.data.levelRate);
        object.setConfig(this.data.filialId, 'GRD', 'Temperatura1', this.data.temperatura1);
        object.setConfig(this.data.filialId, 'GRD', 'Temperatura2', this.data.temperatura2);
        object.setConfig(this.data.filialId, 'GRD', 'Temperatura3', this.data.temperatura3);
        object.setConfig(this.data.filialId, 'GRD', 'Temperatura4', this.data.temperatura4);
        object.setConfig(this.data.filialId, 'GRD', 'Temperatura5', this.data.temperatura5);
        object.setConfig(this.data.filialId, 'GRD', 'Temperatura6', this.data.temperatura6);
        object.setConfig(this.data.filialId, 'GRD', 'IntUnidataAtivo', this.data.intUnidataAtivo);
        object.setConfig(this.data.filialId, 'GRD', 'IntUnidataUrlWSCorp', this.data.intUnidataUrlWSCorp);
        object.setConfig(this.data.filialId, 'GRD', 'IntUnidataUrlWSUnid', this.data.intUnidataUrlWSUnid);
        object.setConfig(this.data.filialId, 'GRD', 'IntFluxoAtivo', this.data.intFluxoAtivo);
        object.setConfig(this.data.filialId, 'GRD', 'IntFluxoUrlWSCorp', this.data.intFluxoUrlWSCorp);
        object.setConfig(this.data.filialId, 'GRD', 'IntFluxoUrlWSFluxo', this.data.intFluxoUrlWSFluxo);
        object.setConfig(this.data.filialId, 'GRD', 'IntFluxoKey', this.data.intFluxoKey);
        object.setConfig(this.data.filialId, 'GRD', 'IntFluxoSecret', this.data.intFluxoSecret);
        this.configuracao
            .save(object)
            .subscribe(function (result) {
            if (result.validationResult != null && !result.validationResult.isValid) {
                _this.mensagens = _this.messageService.validationResult(result.validationResult);
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('backError').emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess('titles.gradar', 'messages.configuracaoDe');
            }
        });
    };
    GradarFormComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    GradarFormComponent.prototype.salvarHorario = function () {
        this.novoHorario = this.novoHorario.substring(0, 2) + ":" + this.novoHorario.substring(2);
        if (!this.validaHora()) {
            return this.messageService.warning('titles.gradar', 'messages.horarioJaCadastrado');
        }
        if (this.validarHorario(this.novoHorario)) {
            this.horarios.push(this.novoHorario);
            this.horariosText = this.horarios.join('\n');
            this.novoHorario = '';
            this.data.horarioMedAutom = this.horariosText.replace(/\n/g, ',');
        }
        else {
            return this.messageService.warning('titles.gradar', 'messages.horarioInvalido');
        }
    };
    GradarFormComponent.prototype.validaHora = function () {
        if (this.data.horarioMedAutom.split(',').includes(this.novoHorario)) {
            return false;
        }
        return true;
    };
    GradarFormComponent.prototype.carregarHorarios = function () {
        var horariosDoBanco = this.data.horarioMedAutom;
        this.horariosText = horariosDoBanco.replace(/,/g, '\n');
        this.horarios = horariosDoBanco.split(',');
    };
    GradarFormComponent.prototype.removerHorario = function () {
        var index = this.horarios.indexOf(this.horarioSelecionado);
        if (index !== -1) {
            this.horarios.splice(index, 1);
            this.horarioSelecionado = '';
            this.horariosText = this.horarios.join('\n');
            this.data.horarioMedAutom = this.horariosText.replace(/\n/g, ',');
        }
    };
    GradarFormComponent.prototype.validarHorario = function (horario) {
        return /^([01]\d|2[0-3]):([0-5]\d)$/.test(horario);
    };
    GradarFormComponent.ctorParameters = function () { return [
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__["ConfiguracaoFacade"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] }
    ]; };
    GradarFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            template: __importDefault(__webpack_require__(/*! raw-loader!./gradar-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/configuracoes/gradar/gradar-portaria-form/gradar-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__["ConfiguracaoFacade"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"]])
    ], GradarFormComponent);
    return GradarFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_1__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/configuracoes/gradar/gradar.constants.ts":
/*!****************************************************************!*\
  !*** ./src/app/pages/configuracoes/gradar/gradar.constants.ts ***!
  \****************************************************************/
/*! exports provided: GradarConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GradarConstants", function() { return GradarConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var GradarConstants = /** @class */ (function () {
    function GradarConstants() {
        this.sisFormularioId = 375318;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.pemissoes" },
        ];
        this.configuracoes = [];
        this.nomeForm = "titles.gradar";
        this.listaForm = [
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
        this.configuracoes = [
            {
                sistema: "GRD", parametros: [
                    'UtilizaGRadar',
                    'TipoRadar',
                    'MinSalvarMed',
                    'DiasLogGRadar',
                    'HorarioMedAutom',
                    'FlowRate',
                    'LevelRate',
                    'Temperatura1',
                    'Temperatura2',
                    'Temperatura3',
                    'Temperatura4',
                    'Temperatura5',
                    'Temperatura6',
                    'IntUnidataAtivo',
                    'IntUnidataUrlWSCorp',
                    'IntUnidataUrlWSUnid',
                    'IntFluxoAtivo',
                    'IntFluxoUrlWSCorp',
                    'IntFluxoUrlWSFluxo',
                    'IntFluxoKey',
                    'IntFluxoSecret'
                ]
            }
        ];
    }
    return GradarConstants;
}());



/***/ }),

/***/ "./src/app/pages/configuracoes/gradar/gradar.model.ts":
/*!************************************************************!*\
  !*** ./src/app/pages/configuracoes/gradar/gradar.model.ts ***!
  \************************************************************/
/*! exports provided: Gradar */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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



/***/ }),

/***/ "./src/app/pages/configuracoes/gradar/gradar.module.ts":
/*!*************************************************************!*\
  !*** ./src/app/pages/configuracoes/gradar/gradar.module.ts ***!
  \*************************************************************/
/*! exports provided: GradarModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GradarModule", function() { return GradarModule; });
/* 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 _gradar_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gradar.routing.module */ "./src/app/pages/configuracoes/gradar/gradar.routing.module.ts");
/* harmony import */ var _gradar_portaria_form_gradar_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gradar-portaria-form/gradar-form.component */ "./src/app/pages/configuracoes/gradar/gradar-portaria-form/gradar-form.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 GradarModule = /** @class */ (function () {
    function GradarModule() {
    }
    GradarModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [_gradar_portaria_form_gradar_form_component__WEBPACK_IMPORTED_MODULE_4__["GradarFormComponent"]],
            imports: [
                _angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"],
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__["SharedModule"],
                _gradar_routing_module__WEBPACK_IMPORTED_MODULE_3__["GradarRountingModule"]
            ]
        })
    ], GradarModule);
    return GradarModule;
}());



/***/ }),

/***/ "./src/app/pages/configuracoes/gradar/gradar.routing.module.ts":
/*!*********************************************************************!*\
  !*** ./src/app/pages/configuracoes/gradar/gradar.routing.module.ts ***!
  \*********************************************************************/
/*! exports provided: GradarRountingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GradarRountingModule", function() { return GradarRountingModule; });
/* 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 _gradar_portaria_form_gradar_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gradar-portaria-form/gradar-form.component */ "./src/app/pages/configuracoes/gradar/gradar-portaria-form/gradar-form.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: _gradar_portaria_form_gradar_form_component__WEBPACK_IMPORTED_MODULE_3__["GradarFormComponent"],
        data: { breadcrumb: "gradar", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create } }
    }
];
var GradarRountingModule = /** @class */ (function () {
    function GradarRountingModule() {
    }
    GradarRountingModule = __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"]]
        })
    ], GradarRountingModule);
    return GradarRountingModule;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-configuracoes-gradar-gradar-module.js.map