(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-operacao-medicao-dutoviario-medicao-dutoviario-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-form/medicao-dutoviario-form.component.html":
/*!********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-form/medicao-dutoviario-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\"\r\n                      [formAction]=\"actionForm\"\r\n                      [itemData]=\"data.laudoId\"\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\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <app-card-container>\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-md-3 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"laudo\">{{'labels.laudo' | translate}}</label>\r\n                                            <input id=\"laudo\" name=\"laudo\" [(ngModel)]=\"filtro.regLaudo\"\r\n                                                class=\"form-control form-control-sm\" type=\"text\" disabled=\"true\">\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"col-md-3 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"produtoFiltro\">{{'labels.produto' | translate}}</label>\r\n                                            <input id=\"produtoFiltro\" name=\"produtoFiltro\" [(ngModel)]=\"filtro.material\"\r\n                                                class=\"form-control form-control-sm\" type=\"text\" disabled=\"true\">\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </app-card-container>\r\n                        </div>\r\n                    </div>\r\n\r\n                    <app-medicao-shared-form *ngIf=\"isDataLoaded\"\r\n                        [form]=\"f\"\r\n                        [data]=\"data\"\r\n                        [actionForm]=\"actionForm\"\r\n                        [tipoLaudo]=\"tipoLaudoMedicao\"\r\n                        [hasPermissaoTodosCampos]=\"perTodosCampos\"\r\n                        [showCustomComboTanque]=\"true\"\r\n                        [showCustomComboProduto]=\"true\"\r\n                        [showTipoMedicao]=\"true\"\r\n                        [showCliente]=\"false\"\r\n                        [filtro]=\"filtro\"\r\n                        [dadosComboTanque]=\"dadosComboTanque\"\r\n                        [dadosComboProduto]=\"dadosComboProduto\"\r\n                        pageTitle=\"medicoesDutoviario\"\r\n                        (executaTrataDtMedicao)=\"trataDtMedicao()\"\r\n                        (executaTrataTipoMedicao)=\"trataTipoMedicao($event)\"\r\n                        (executaSubmit)=\"onSubmit($event)\"\r\n                        (executaBack)=\"back()\">\r\n                    </app-medicao-shared-form>\r\n                    \r\n                    <div class=\"row\">\r\n                        <div class=\"col-sm-12\">\r\n                            <div class=\"form-group\">\r\n                                <button class=\"btn btn-success mr-2\" type=\"submit\"\r\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    {{ 'buttons.salvar' | translate }}\r\n                                </button>\r\n                                <button class=\"btn btn-default\" type=\"button\"\r\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\" (click)=\"back()\">\r\n                                    {{ 'buttons.cancelar' | 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\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-index/medicao-dutoviario-index.component.html":
/*!**********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-index/medicao-dutoviario-index.component.html ***!
  \**********************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"data.laudoId\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <div class=\"table-responsive\" style=\"overflow: auto;\">\n        <label for=\"dtProdutos\" *ngIf=\"hasDados\">{{ \"labels.produtos\" | translate}}</label>\n        <table id=\"dtProdutos\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n\n        <div class=\"clearfix\">&nbsp;</div>\n        <label for=\"dtMedicoes\" *ngIf=\"showMedicoes\">{{ \"labels.medicoes\" | translate}}</label>\n        <table id=\"dtMedicoes\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n    </div>\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/operacao/medicao-dutoviario/medicao-dutoviario-form/medicao-dutoviario-form.component.ts":
/*!****************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-form/medicao-dutoviario-form.component.ts ***!
  \****************************************************************************************************************/
/*! exports provided: MedicaoDutoviarioFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MedicaoDutoviarioFormComponent", function() { return MedicaoDutoviarioFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_estoque_fisico_medicao_medicao_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/estoque-fisico/medicao/medicao.service */ "./src/app/pages/estoque-fisico/medicao/medicao.service.ts");
/* harmony import */ var app_pages_estoque_fisico_medicao_medicao_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/estoque-fisico/medicao/medicao.model */ "./src/app/pages/estoque-fisico/medicao/medicao.model.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_shared_components_forms_medicao_shared_form_medicao_shared_form_validation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/shared/components/forms/medicao-shared-form/medicao-shared-form.validation */ "./src/app/shared/components/forms/medicao-shared-form/medicao-shared-form.validation.ts");
/* harmony import */ var _medicao_dutoviario_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../medicao-dutoviario.constants */ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.constants.ts");
/* harmony import */ var _medicao_dutoviario_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../medicao-dutoviario.service */ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.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 MedicaoDutoviarioFormComponent = /** @class */ (function (_super) {
    __extends(MedicaoDutoviarioFormComponent, _super);
    function MedicaoDutoviarioFormComponent(router, messageService, activatedRoute, service, medicaoService, loginService, configuracao, funcoesService, permissoesUtils) {
        var _this = _super.call(this, new _medicao_dutoviario_constants__WEBPACK_IMPORTED_MODULE_11__["MedicaoDutoviarioConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.medicaoService = medicaoService;
        _this.loginService = loginService;
        _this.configuracao = configuracao;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.data = new app_pages_estoque_fisico_medicao_medicao_model__WEBPACK_IMPORTED_MODULE_8__["Medicao"]();
        _this.filtro = new app_pages_estoque_fisico_medicao_medicao_model__WEBPACK_IMPORTED_MODULE_8__["MedicaoAuxFilter"]();
        _this.filtroCriaTmp = new app_pages_estoque_fisico_medicao_medicao_model__WEBPACK_IMPORTED_MODULE_8__["MedicaoCriaTmp"]();
        _this.dadosComboTanque = [];
        _this.dadosComboProduto = [];
        _this.mensagens = [];
        _this.constantes = new _medicao_dutoviario_constants__WEBPACK_IMPORTED_MODULE_11__["MedicaoDutoviarioConstants"]();
        _this.perTodosCampos = true;
        _this.isContinueDtMedicao = false;
        _this.isDataLoaded = false;
        _this.tipoLaudoMedicao = app_config_enumerables__WEBPACK_IMPORTED_MODULE_9__["TipoLaudoMedicaoEnum"].dutovia;
        _this.target = _this.funcoesService.getTargetLocation();
        _this.loadConfig = function () {
            _this.medicaoService.configs.medicaoMM = _this.configuracao.boolean("OPE", "MedicaoMM");
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        _this.medicaoValidation = new app_shared_components_forms_medicao_shared_form_medicao_shared_form_validation__WEBPACK_IMPORTED_MODULE_10__["MedicaoSharedFormValidation"](funcoesService);
        return _this;
    }
    MedicaoDutoviarioFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            var obj = _this.activatedRoute.snapshot.paramMap.get("object");
            if (obj) {
                var object = JSON.parse(atob(obj));
                _this.filtro.regLog = object.regLog;
                _this.filtro.nrMedicao = object.nrMedicao;
                _this.filtro.regLaudo = object.regLaudo;
                _this.filtro.item = object.item;
                _this.filtro.subItem = object.subItem;
                _this.filtro.material = object.material;
            }
            if (_this.funcoesService.isPositive(_this.filtro.item)) {
                _this.service.getOperacaoDutoMedicao(_this.filtro.regLaudo, _this.filtro.item).subscribe(function (resp) {
                    _this.data = resp;
                    _this.auxDtMedicao = _this.data.dtMedicao;
                    if (_this.funcoesService.isEdit(_this.actionForm)) {
                        _this.filtroCriaTmp.nrMedicao = _this.data.medicaoId;
                        _this.filtroCriaTmp.regLaudo = _this.data.laudoId;
                        _this.filtroCriaTmp.item = _this.data.item;
                        _this.filtroCriaTmp.subItem = _this.data.subItem;
                        _this.medicaoService.medicaoCriaTmp(_this.filtroCriaTmp, _this.tipoLaudoMedicao).subscribe(function () {
                            _this.isDataLoaded = true;
                            _this.carregarDados();
                        });
                    }
                    else {
                        _this.isDataLoaded = true;
                    }
                });
            }
            else {
                _this.data = new app_pages_estoque_fisico_medicao_medicao_model__WEBPACK_IMPORTED_MODULE_8__["Medicao"]();
                _this.data.filialId = _this.loginService.getLogin().filialId;
                _this.data.medicaoId = _this.filtroCriaTmp.nrMedicao = _this.filtro.nrMedicao;
                _this.data.laudoId = _this.filtroCriaTmp.regLaudo = _this.filtro.regLaudo;
                _this.data.item = _this.filtroCriaTmp.item = _this.filtro.item;
                _this.data.subItem = _this.filtroCriaTmp.subItem = _this.filtro.subItem;
                _this.data.materialId = _this.filtro.material;
                _this.medicaoService.medicaoCriaTmp(_this.filtroCriaTmp, _this.tipoLaudoMedicao).subscribe(function () {
                    _this.isDataLoaded = true;
                    _this.carregarDados();
                });
            }
            _this.permissoesUtils.validRotina(_this.constantes.sisFormularioId, 6, function () { return _this.perTodosCampos = true; }, function () { return _this.perTodosCampos = false; });
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    MedicaoDutoviarioFormComponent.prototype.carregarDados = function () {
        this.carregarComboTanque();
        this.carregarComboProduto();
    };
    MedicaoDutoviarioFormComponent.prototype.carregarComboTanque = function () {
        var _this = this;
        this.service.getTanquesByOperacaoDutoTanque(this.data.laudoId).subscribe(function (resp) {
            _this.dadosComboTanque = resp;
        });
    };
    MedicaoDutoviarioFormComponent.prototype.carregarComboProduto = function () {
        var _this = this;
        this.service.getMateriaisOperacaoDuto(this.data.laudoId).subscribe(function (resp) {
            _this.dadosComboProduto = resp;
        });
    };
    MedicaoDutoviarioFormComponent.prototype.onSubmit = function (form) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (form.invalid) {
                    this.medicaoService.removerFormatacaoMedicaoTanqueAgua(this.data);
                    this.data.medicaoVal = this.data.maskedMedicaoVal;
                    this.data.medAgua = this.data.maskedMedAgua;
                    app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
                    this.funcoesService.backToTop();
                    return [2 /*return*/];
                }
                this.data.inclui = this.funcoesService.isCreate(this.actionForm) ? "S" : "N";
                this.service
                    .gravaMedicao(this.data)
                    .subscribe(function (result) {
                    if (!result.validationResult.isValid) {
                        _this.data.medicaoVal = _this.data.maskedMedicaoVal;
                        _this.data.medAgua = _this.data.maskedMedAgua;
                        _this.mensagens = _this.messageService.validationResult(result.validationResult);
                        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("backError").emit(_this.mensagens);
                        _this.funcoesService.backToTop();
                    }
                    else {
                        _this.messageService.saveSuccess("titles.medicoesDutoviario");
                        _this.back();
                    }
                }, function (error) {
                    _this.messageService.error("titles.medicoesDutoviario", error);
                });
                return [2 /*return*/];
            });
        });
    };
    MedicaoDutoviarioFormComponent.prototype.edit = function () {
        if (!this.funcoesService.isCreate(this.actionForm)) {
            var object = btoa(JSON.stringify({
                regLaudo: this.filtro.regLaudo,
                item: this.filtro.item,
                subItem: this.filtro.subItem,
                material: this.filtro.material,
                regLog: this.filtro.regLog,
                nrMedicao: this.filtro.nrMedicao
            }));
            this.router.navigate([this.target + "/operacao/medicaoDutoviario/edit/" + object]);
        }
    };
    MedicaoDutoviarioFormComponent.prototype.back = function () {
        this.router.navigate([this.target + "/operacao/medicaoDutoviario/" + this.data.laudoId]);
    };
    MedicaoDutoviarioFormComponent.prototype.trataDtMedicao = function () {
        var _this = this;
        this.service.getDuplicidadeDtMedicao(this.data).subscribe(function (dtMedicao) {
            if (dtMedicao) {
                _this.messageService.warning("titles.medicoesDutoviario", "messages.jaExisteMedicaoParaDataInformada");
                _this.data.dtMedicao = _this.auxDtMedicao;
            }
            else {
                _this.service.getDataPosteriorDtMedicao(_this.data).subscribe(function (dtPosterior) {
                    if (dtPosterior) {
                        _this.messageService.confirm("messages.confirmaOperacao", "messages.existeMedicaoDataPosteriorContinua", "messages.operacaoRealizadaComSucesso", function () {
                            _this.isContinueDtMedicao = true;
                        }, false, function () {
                            _this.data.dtMedicao = _this.auxDtMedicao;
                        });
                    }
                });
            }
        });
    };
    MedicaoDutoviarioFormComponent.prototype.trataTipoMedicao = function (tipoMedicaoInicial) {
        var _this = this;
        this.service.getTipoUltimaMedicao(this.data.laudoId, this.data.tanqueId, this.data.filialId).subscribe(function (ultMedicao) {
            var validation = _this.medicaoValidation.validaTipoUltimaMedicao(ultMedicao, _this.data, _this.actionForm);
            if (!validation.isValid) {
                _this.messageService.warning("titles.medicoesDutoviario", validation.message);
                _this.data.tipoMedicao = tipoMedicaoInicial;
            }
        });
    };
    MedicaoDutoviarioFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _medicao_dutoviario_service__WEBPACK_IMPORTED_MODULE_12__["MedicaoDutoviarioService"] },
        { type: app_pages_estoque_fisico_medicao_medicao_service__WEBPACK_IMPORTED_MODULE_7__["MedicaoService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_14__["ConfiguracaoFacade"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] }
    ]; };
    MedicaoDutoviarioFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-medicao-dutoviario-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./medicao-dutoviario-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-form/medicao-dutoviario-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _medicao_dutoviario_service__WEBPACK_IMPORTED_MODULE_12__["MedicaoDutoviarioService"],
            app_pages_estoque_fisico_medicao_medicao_service__WEBPACK_IMPORTED_MODULE_7__["MedicaoService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_14__["ConfiguracaoFacade"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"]])
    ], MedicaoDutoviarioFormComponent);
    return MedicaoDutoviarioFormComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-index/medicao-dutoviario-index.component.ts":
/*!******************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-index/medicao-dutoviario-index.component.ts ***!
  \******************************************************************************************************************/
/*! exports provided: MedicaoDutoviarioIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MedicaoDutoviarioIndexComponent", function() { return MedicaoDutoviarioIndexComponent; });
/* 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_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __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_4__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __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_estoque_fisico_medicao_medicao_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/estoque-fisico/medicao/medicao.model */ "./src/app/pages/estoque-fisico/medicao/medicao.model.ts");
/* harmony import */ var _medicao_dutoviario_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../medicao-dutoviario.constants */ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.constants.ts");
/* harmony import */ var _medicao_dutoviario_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../medicao-dutoviario.model */ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.model.ts");
/* harmony import */ var _medicao_dutoviario_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../medicao-dutoviario.service */ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};












var MedicaoDutoviarioIndexComponent = /** @class */ (function (_super) {
    __extends(MedicaoDutoviarioIndexComponent, _super);
    function MedicaoDutoviarioIndexComponent(router, activatedRoute, datatablesService, messageService, loginService, service, funcoesService, permissoesUtils) {
        var _this = _super.call(this, new _medicao_dutoviario_constants__WEBPACK_IMPORTED_MODULE_9__["MedicaoDutoviarioConstants"](), funcoesService) || this;
        _this.router = router;
        _this.activatedRoute = activatedRoute;
        _this.datatablesService = datatablesService;
        _this.messageService = messageService;
        _this.loginService = loginService;
        _this.service = service;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.data = new _medicao_dutoviario_model__WEBPACK_IMPORTED_MODULE_10__["MedicaoDutoviarioProdutoIndex"]();
        _this.dataMedicao = new _medicao_dutoviario_model__WEBPACK_IMPORTED_MODULE_10__["MedicaoDutoviarioIndex"]();
        _this.filtroAux = new app_pages_estoque_fisico_medicao_medicao_model__WEBPACK_IMPORTED_MODULE_8__["MedicaoAuxFilter"]();
        _this.mensagens = [];
        _this.constantes = new _medicao_dutoviario_constants__WEBPACK_IMPORTED_MODULE_9__["MedicaoDutoviarioConstants"]();
        _this.hasDados = false;
        _this.showMedicoes = false;
        _this.target = _this.funcoesService.getTargetLocation();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    MedicaoDutoviarioIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _this.laudoId = _this.funcoesService.getValue(_this.activatedRoute.snapshot.paramMap.get("id"), "I");
            if (!_this.loginService.isTokenExpired()) {
                _this.refresh();
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    MedicaoDutoviarioIndexComponent.prototype.create = function () {
        if (this.funcoesService.isNotUndefinedOrNull(this.data.laudoId)) {
            var object = btoa(JSON.stringify({
                regLaudo: this.data.laudoId,
                item: 0,
                subItem: 0,
                material: this.data.materialId,
                regLog: this.loginService.getLogin().colaboradorId,
                nrMedicao: 0
            }));
            this.router.navigate([this.target + "/operacao/medicaoDutoviario/create/" + object]);
        }
        else {
            this.messageService.warning("titles.medicoesDutoviario", "messages.produtoNaoSelecionado");
        }
    };
    MedicaoDutoviarioIndexComponent.prototype.refresh = function () {
        var _this = this;
        if (!!(this.laudoId)) {
            this.service.getMedicoes(this.laudoId).subscribe(function (resp) {
                _this.hasDados = resp && resp.length > 0;
                _this.showMedicoes = false;
                var columns = [
                    _this.datatablesService.getDataStringAlignRight("laudoId", "laudo", "10%"),
                    _this.datatablesService.getDataDateTime("dtMovimento", "data", "DD/MM/YYYY HH:mm:ss"),
                    _this.datatablesService.getDataStringAlignRight("destinatarioIdCliente", "codigo", "10%"),
                    _this.datatablesService.getDataString("clienteFantasia", "cliente"),
                    _this.datatablesService.getDataString("materialId", "produto"),
                    _this.datatablesService.getDataString("materialFantasia", "descrProduto")
                ];
                _this.datatablesService.datatable("dtProdutos", columns, resp, function (aData) {
                    _this.data = aData;
                    _this.refreshMedicoes();
                    _this.dataMedicao = null;
                });
            });
        }
        else {
            this.messageService.warning("titles.medicoesDutoviario", "messages.necessarioInformarRegLaudo");
            this.router.navigate([this.target + "/operacao/operacaoDutoviario"]);
        }
    };
    MedicaoDutoviarioIndexComponent.prototype.refreshMedicoes = function () {
        var _this = this;
        this.showMedicoes = true;
        var columns = [
            this.datatablesService.getDataString('tanqueId', 'deposito', '10%'),
            this.datatablesService.getDataString('tipo', 'tipo'),
            this.datatablesService.getDataDateTime('dtMedicao', 'data', 'DD/MM/YYYY HH:mm:ss', '15%'),
            this.datatablesService.getDataDouble('kilos', 'kilos', 0),
            this.datatablesService.getDataDouble('litros', 'litros', 0)
        ];
        this.datatablesService.datatable('dtMedicoes', columns, this.data.medicoes, function (aData) {
            _this.dataMedicao = aData;
        }, 0, 'asc', true);
    };
    MedicaoDutoviarioIndexComponent.prototype.edit = function () {
        var _this = this;
        if (this.funcoesService.isNotUndefinedOrNull(this.dataMedicao)) {
            this.service.validarPodeAlterarMedicoes(this.dataMedicao.laudoId).subscribe(function (resp) {
                if (!resp.isValid) {
                    _this.mensagens = _this.messageService.validationResult(resp);
                    _this.messageService.warning("titles.medicoesDutoviario", _this.mensagens[0]);
                }
                else {
                    var object = btoa(JSON.stringify({
                        regLaudo: _this.dataMedicao.laudoId,
                        item: _this.dataMedicao.item,
                        subItem: 0,
                        material: _this.data.materialId,
                        regLog: _this.loginService.getLogin().colaboradorId,
                        nrMedicao: _this.dataMedicao.medicaoId
                    }));
                    _this.router.navigate([_this.target + "/operacao/medicaoDutoviario/edit/" + object]);
                }
            });
        }
        else {
            this.messageService.warning("titles.medicoesDutoviario", "messages.medicaoNaoSelecionada");
        }
    };
    MedicaoDutoviarioIndexComponent.prototype.detail = function () {
        if (this.funcoesService.isNotUndefinedOrNull(this.dataMedicao)) {
            var object = btoa(JSON.stringify({
                regLaudo: this.dataMedicao.laudoId,
                item: this.dataMedicao.item,
                subItem: 0,
                material: this.data.materialId,
                regLog: this.loginService.getLogin().colaboradorId,
                nrMedicao: this.dataMedicao.medicaoId
            }));
            this.router.navigate([this.target + "/operacao/medicaoDutoviario/detail/" + object]);
        }
        else {
            this.messageService.warning("titles.medicoesDutoviario", "messages.medicaoNaoSelecionada");
        }
    };
    MedicaoDutoviarioIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    MedicaoDutoviarioIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    MedicaoDutoviarioIndexComponent.prototype.remove = function () {
        var _this = this;
        if (this.funcoesService.isNotUndefinedOrNull(this.dataMedicao)) {
            this.filtroAux.regLaudo = this.dataMedicao.laudoId;
            this.filtroAux.item = this.dataMedicao.item;
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
                _this.service.validarPodeAlterarMedicoes(_this.dataMedicao.laudoId).subscribe(function (resp) {
                    if (!resp.isValid) {
                        _this.mensagens = _this.messageService.validationResult(resp);
                        _this.messageService.warning("titles.medicoesDutoviario", _this.mensagens[0]);
                    }
                    else {
                        _this.messageService.removeConfirm(function () {
                            _this.service.excluirMedicao(_this.filtroAux).subscribe(function (result) {
                                _this.mensagens = _this.messageService.validationResult(result.validationResult);
                                if (!result.validationResult.isValid) {
                                    _this.messageService.warning("titles.medicoesDutoviario", _this.mensagens[0]);
                                }
                                else {
                                    _this.datatablesService.remove("dtMedicoes");
                                    _this.dataMedicao = null;
                                    _this.refresh();
                                }
                            });
                        });
                    }
                });
            });
        }
        else {
            this.messageService.warning("titles.medicoesDutoviario", "messages.medicaoNaoSelecionada");
        }
    };
    MedicaoDutoviarioIndexComponent.prototype.print = function () {
        var _this = this;
        if (!!this.data.laudoId) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
                _this.constantes.paramRelatorio = {
                    laudoId: _this.data.laudoId
                };
                _super.prototype.print.call(_this);
            });
        }
        else {
            this.messageService.warning("titles.medicoesDutoviario", "messages.produtoNaoSelecionado");
        }
    };
    MedicaoDutoviarioIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"] },
        { type: _medicao_dutoviario_service__WEBPACK_IMPORTED_MODULE_11__["MedicaoDutoviarioService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] }
    ]; };
    MedicaoDutoviarioIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-medicao-dutoviario-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./medicao-dutoviario-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-index/medicao-dutoviario-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"],
            _medicao_dutoviario_service__WEBPACK_IMPORTED_MODULE_11__["MedicaoDutoviarioService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"]])
    ], MedicaoDutoviarioIndexComponent);
    return MedicaoDutoviarioIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.constants.ts":
/*!***********************************************************************************!*\
  !*** ./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.constants.ts ***!
  \***********************************************************************************/
/*! exports provided: MedicaoDutoviarioConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MedicaoDutoviarioConstants", function() { return MedicaoDutoviarioConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var MedicaoDutoviarioConstants = /** @class */ (function () {
    function MedicaoDutoviarioConstants() {
        this.sisFormularioId = 250121;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: 'labels.inclusao' },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: 'labels.alteracao' },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: 'labels.exclusao' },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: 'labels.consulta' },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: 'labels.todosCampos' },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: 'labels.propriedades' },
            { sisFormularioId: this.sisFormularioId, libRotina: 8, acao: 'labels.permissoes' }
        ];
        this.sisSistemaId = "OPE";
        this.nomeForm = "titles.medicoesDutoviario";
        this.reportId = "OPE0012";
        this.reportTitulo = { "titulo": "Medições de Dutoviário", "subTitulo": "" };
        this.reportLaudoId = "OPE0011";
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: 'icon-plus', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: 'icon-eye', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: 'icon-pencil', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: 'icon-close', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: 'icon-reload', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: 'icon-printer', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Propriedade', action: 'properties', icon: 'icon-menu', exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: 'icon-unlock', exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        this.listaParam = [
            { 'sistema': 'OPE', 'parametros': ['MedicaoMM'] }
        ];
    }
    return MedicaoDutoviarioConstants;
}());



/***/ }),

/***/ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.model.ts":
/*!*******************************************************************************!*\
  !*** ./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.model.ts ***!
  \*******************************************************************************/
/*! exports provided: MedicaoDutoviario, MedicaoDutoviarioProdutoIndex, MedicaoDutoviarioIndex */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MedicaoDutoviario", function() { return MedicaoDutoviario; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MedicaoDutoviarioProdutoIndex", function() { return MedicaoDutoviarioProdutoIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MedicaoDutoviarioIndex", function() { return MedicaoDutoviarioIndex; });
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.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 __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var MedicaoDutoviario = /** @class */ (function (_super) {
    __extends(MedicaoDutoviario, _super);
    function MedicaoDutoviario() {
        var _this = _super.call(this) || this;
        _this.tipoMov = "C";
        _this.flagDegradacao = "N";
        return _this;
    }
    return MedicaoDutoviario;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var MedicaoDutoviarioProdutoIndex = /** @class */ (function (_super) {
    __extends(MedicaoDutoviarioProdutoIndex, _super);
    function MedicaoDutoviarioProdutoIndex() {
        var _this = _super.call(this) || this;
        _this.medicoes = [];
        return _this;
    }
    return MedicaoDutoviarioProdutoIndex;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var MedicaoDutoviarioIndex = /** @class */ (function (_super) {
    __extends(MedicaoDutoviarioIndex, _super);
    function MedicaoDutoviarioIndex() {
        return _super.call(this) || this;
    }
    return MedicaoDutoviarioIndex;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));



/***/ }),

/***/ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.module.ts":
/*!********************************************************************************!*\
  !*** ./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.module.ts ***!
  \********************************************************************************/
/*! exports provided: MedicaoDutoviarioModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MedicaoDutoviarioModule", function() { return MedicaoDutoviarioModule; });
/* 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 _medicao_dutoviario_form_medicao_dutoviario_form_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./medicao-dutoviario-form/medicao-dutoviario-form.component */ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-form/medicao-dutoviario-form.component.ts");
/* harmony import */ var _medicao_dutoviario_index_medicao_dutoviario_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./medicao-dutoviario-index/medicao-dutoviario-index.component */ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario-index/medicao-dutoviario-index.component.ts");
/* harmony import */ var _medicao_dutoviario_routing_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./medicao-dutoviario.routing.module */ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.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 MedicaoDutoviarioModule = /** @class */ (function () {
    function MedicaoDutoviarioModule() {
    }
    MedicaoDutoviarioModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [
                app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"],
                _medicao_dutoviario_routing_module__WEBPACK_IMPORTED_MODULE_4__["MedicaoDutoviarioRoutingModule"]
            ],
            declarations: [
                _medicao_dutoviario_index_medicao_dutoviario_index_component__WEBPACK_IMPORTED_MODULE_3__["MedicaoDutoviarioIndexComponent"],
                _medicao_dutoviario_form_medicao_dutoviario_form_component__WEBPACK_IMPORTED_MODULE_2__["MedicaoDutoviarioFormComponent"]
            ]
        })
    ], MedicaoDutoviarioModule);
    return MedicaoDutoviarioModule;
}());



/***/ }),

/***/ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.routing.module.ts":
/*!****************************************************************************************!*\
  !*** ./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.routing.module.ts ***!
  \****************************************************************************************/
/*! exports provided: MedicaoDutoviarioRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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





var MRoutes = [
    {
        path: ":id",
        component: _medicao_dutoviario_index_medicao_dutoviario_index_component__WEBPACK_IMPORTED_MODULE_4__["MedicaoDutoviarioIndexComponent"],
        data: { breadcrumb: "medicoesDutoviario", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "create/:object",
        component: _medicao_dutoviario_form_medicao_dutoviario_form_component__WEBPACK_IMPORTED_MODULE_3__["MedicaoDutoviarioFormComponent"],
        data: {
            breadcrumb: "medicoesDutoviario",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "edit/:object",
        component: _medicao_dutoviario_form_medicao_dutoviario_form_component__WEBPACK_IMPORTED_MODULE_3__["MedicaoDutoviarioFormComponent"],
        data: {
            breadcrumb: "medicoesDutoviario",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:object",
        component: _medicao_dutoviario_form_medicao_dutoviario_form_component__WEBPACK_IMPORTED_MODULE_3__["MedicaoDutoviarioFormComponent"],
        data: {
            breadcrumb: "medicoesDutoviario",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var MedicaoDutoviarioRoutingModule = /** @class */ (function () {
    function MedicaoDutoviarioRoutingModule() {
    }
    MedicaoDutoviarioRoutingModule = __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"]],
        })
    ], MedicaoDutoviarioRoutingModule);
    return MedicaoDutoviarioRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.service.ts":
/*!*********************************************************************************!*\
  !*** ./src/app/pages/operacao/medicao-dutoviario/medicao-dutoviario.service.ts ***!
  \*********************************************************************************/
/*! exports provided: MedicaoDutoviarioService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MedicaoDutoviarioService", function() { return MedicaoDutoviarioService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};







var MedicaoDutoviarioService = /** @class */ (function (_super) {
    __extends(MedicaoDutoviarioService, _super);
    function MedicaoDutoviarioService(http, messageService) {
        var _this = _super.call(this, http, "operacao/operacaoDutoMedicao") || this;
        _this.http = http;
        _this.messageService = messageService;
        return _this;
    }
    MedicaoDutoviarioService.prototype.getMedicoes = function (laudoId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/getMedicoes/" + laudoId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.prototype.getOperacaoDutoMedicao = function (laudoId, item) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/getOperacaoDutoMedicao/" + laudoId + "/" + item)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.prototype.gravaMedicao = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/gravaMedicao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.prototype.excluirMedicao = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/excluirMedicao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.prototype.getTanquesByOperacaoDutoTanque = function (laudoId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/getTanquesByOperacaoDutoTanque/" + laudoId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.prototype.getMateriaisOperacaoDuto = function (laudoId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/getMateriaisOperacaoDuto/" + laudoId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.prototype.getTipoUltimaMedicao = function (laudoId, tanqueId, filialId) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/getTipoUltimaMedicao", {
            laudoId: laudoId,
            tanqueId: tanqueId,
            filialId: filialId
        })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.prototype.getDuplicidadeDtMedicao = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/getDuplicidadeDtMedicao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.prototype.getDataPosteriorDtMedicao = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/getDataPosteriorDtMedicao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.prototype.validarPodeAlterarMedicoes = function (laudoId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/operacao/operacaoDutoMedicao/validarPodeAlterarMedicoes/" + laudoId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    MedicaoDutoviarioService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] }
    ]; };
    MedicaoDutoviarioService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"]])
    ], MedicaoDutoviarioService);
    return MedicaoDutoviarioService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_5__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-operacao-medicao-dutoviario-medicao-dutoviario-module.js.map