(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-relatorios-valores-segurados-valores-segurados-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/relatorios/valores-segurados/valores-segurados-form/valores-segurados-form.component.html":
/*!*******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/relatorios/valores-segurados/valores-segurados-form/valores-segurados-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 [sisFormularioId]=\"constantes.sisFormularioId\"\n                      [botoesComando]=\"constantes.listaForm\"></app-menu-command-bar>\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <div class=\"\">\n                <app-form-legenda></app-form-legenda>\n                <div class=\"card-body widget-body\">\n                    <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit()\" autocomplete=\"off\" novalidate>\n                        <div class=\"row mt-2\">\n                            <div class=\"col-lg-12\">\n                                <div class=\"form-group\">\n                                    <button class=\"btn btn-success mr-2\"\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                        {{ 'buttons.gerarRelatorio' | translate }}\n                                    </button>\n                                    <button class=\"btn btn-success mr-2\" (click)=\"export(f)\" type=\"button\">{{\n                                        'buttons.exportarExcel' | translate }}\n                                    </button>\n                                    <button class=\"btn btn-success mr-2\" (click)=\"sendMail(f)\" type=\"button\">{{\n                                        'buttons.enviarEmail' | translate }}\n                                    </button>\n                                </div>\n                            </div>\n                        </div>\n                    </form>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<app-email [reportId]=\"constantes.reportId\"\n           [titulo]=\"constantes.reportTitulo.titulo\"\n           [subTitulo]=\"constantes.reportTitulo.subTitulo\"\n           [data]=\"constantes.paramRelatorio\"></app-email>\n");

/***/ }),

/***/ "./src/app/pages/relatorios/valores-segurados/valores-segurados-form/valores-segurados-form.component.ts":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/relatorios/valores-segurados/valores-segurados-form/valores-segurados-form.component.ts ***!
  \***************************************************************************************************************/
/*! exports provided: ValoresSeguradosFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValoresSeguradosFormComponent", function() { return ValoresSeguradosFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/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_2__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_components_report_report_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/components/report/report.service */ "./src/app/shared/components/report/report.service.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__ = __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_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/excel/excel.service */ "./src/app/shared/services/funcoes/excel/excel.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _valores_segurados_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../valores-segurados.constants */ "./src/app/pages/relatorios/valores-segurados/valores-segurados.constants.ts");
/* harmony import */ var _valores_segurados_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../valores-segurados.model */ "./src/app/pages/relatorios/valores-segurados/valores-segurados.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 ValoresSeguradosFormComponent = /** @class */ (function (_super) {
    __extends(ValoresSeguradosFormComponent, _super);
    function ValoresSeguradosFormComponent(loginService, permissoesUtils, messageService, funcoesService, excelService, configuracao, reportService) {
        var _this = _super.call(this, new _valores_segurados_constants__WEBPACK_IMPORTED_MODULE_10__["ValoresSeguradosConstants"](), funcoesService) || this;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.messageService = messageService;
        _this.funcoesService = funcoesService;
        _this.excelService = excelService;
        _this.configuracao = configuracao;
        _this.reportService = reportService;
        _this.mensagens = [];
        _this.constantes = new _valores_segurados_constants__WEBPACK_IMPORTED_MODULE_10__["ValoresSeguradosConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.apolice = "";
        _this.data = new _valores_segurados_model__WEBPACK_IMPORTED_MODULE_11__["ValoresSegurados"]();
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.apolice = _this.configuracao.lerConfig("CTR", "Apolice");
            }
        };
        _this.export = function (form) {
            if (form.invalid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
                return;
            }
            if (_this.funcoesService.isUndefinedOrNull(_this.apolice)) {
                if (_this.apolice === "") {
                    _this.messageService.warning("valoresSegurados", "necessarioInformarApolice");
                    return;
                }
            }
            _this.printParams();
            _this.reportService.export(_this.constantes.sisFormularioId, _this.constantes.paramRelatorio).subscribe(function (resp) {
                var headerDictionary = {};
                var options = {
                    headerJsonKeys: true,
                    headerDictionary: headerDictionary
                };
                _this.excelService.exportAsExcelFile(resp, _this.messageService.getTranslates("titles", "valoresSegurados"), options);
            });
        };
        return _this;
    }
    ValoresSeguradosFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.configuracao.getConfig(_this.constantes.configs, _this.loadConfig);
        }, function () { return _this.permissoesUtils.back(); }, true);
    };
    ValoresSeguradosFormComponent.prototype.onSubmit = function () {
        if (this.funcoesService.isUndefinedOrNull(this.apolice)) {
            if (this.apolice === "") {
                this.messageService.warning("valoresSegurados", "messages.necessarioInformarApolice");
                return;
            }
        }
        this.constantes.paramRelatorio = {
            filialId: this.loginService.getLogin().filialId,
            apolice: this.apolice
        };
        this.print();
    };
    ValoresSeguradosFormComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    ValoresSeguradosFormComponent.prototype.printParams = function () {
        this.constantes.paramRelatorio = {
            filialId: this.loginService.getLogin().filialId,
            apolice: this.apolice
        };
    };
    ValoresSeguradosFormComponent.prototype.sendMail = function (form) {
        if (form.invalid) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        if (this.funcoesService.isUndefinedOrNull(this.apolice)) {
            if (this.apolice === "") {
                this.messageService.warning("valoresSegurados", "necessarioInformarApolice");
                return;
            }
        }
        this.printParams();
        _super.prototype.sendMail.call(this, this.constantes);
    };
    ValoresSeguradosFormComponent.ctorParameters = function () { return [
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_2__["PermissoesUtilsService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_8__["FuncoesService"] },
        { type: _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_7__["ExcelService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_6__["ConfiguracaoFacade"] },
        { type: _shared_components_report_report_service__WEBPACK_IMPORTED_MODULE_4__["ReportService"] }
    ]; };
    ValoresSeguradosFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-valores-segurados-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./valores-segurados-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/relatorios/valores-segurados/valores-segurados-form/valores-segurados-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_2__["PermissoesUtilsService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_8__["FuncoesService"],
            _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_7__["ExcelService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_6__["ConfiguracaoFacade"],
            _shared_components_report_report_service__WEBPACK_IMPORTED_MODULE_4__["ReportService"]])
    ], ValoresSeguradosFormComponent);
    return ValoresSeguradosFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/relatorios/valores-segurados/valores-segurados.constants.ts":
/*!***********************************************************************************!*\
  !*** ./src/app/pages/relatorios/valores-segurados/valores-segurados.constants.ts ***!
  \***********************************************************************************/
/*! exports provided: ValoresSeguradosConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValoresSeguradosConstants", function() { return ValoresSeguradosConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ValoresSeguradosConstants = /** @class */ (function () {
    function ValoresSeguradosConstants() {
        this.sisFormularioId = 90195;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" }
        ];
        this.nomeForm = "titles.valoresSegurados";
        this.reportId = "REL0026";
        this.reportTitulo = { "titulo": "Valores Segurados", "subTitulo": "" };
        this.configs = [];
        this.listaForm = [
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' }
        ];
        this.configs = [
            { sistema: "CTR", parametros: ["Apolice"] }
        ];
    }
    return ValoresSeguradosConstants;
}());



/***/ }),

/***/ "./src/app/pages/relatorios/valores-segurados/valores-segurados.model.ts":
/*!*******************************************************************************!*\
  !*** ./src/app/pages/relatorios/valores-segurados/valores-segurados.model.ts ***!
  \*******************************************************************************/
/*! exports provided: ValoresSegurados */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValoresSegurados", function() { return ValoresSegurados; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ValoresSegurados = /** @class */ (function () {
    function ValoresSegurados() {
        this.filialId = 0;
        this.dataRef = new Date();
        this.destinatarioIdCliente = 0;
        this.destinatarioIdEmitente = 0;
        this.grupoClienteId = 0;
        this.materialId = "";
        this.destinatarioIdNavio = 0;
        this.loteId = "";
        this.osgId = 0;
        this.tanques = "";
        this.consideraLotesEncerrados = false;
        this.apresentarTanqueSemSaldo = false;
        this.stoContratoId = 0;
        this.stoContratoItemId = 0;
        this.localizacaoId = 0;
    }
    return ValoresSegurados;
}());



/***/ }),

/***/ "./src/app/pages/relatorios/valores-segurados/valores-segurados.module.ts":
/*!********************************************************************************!*\
  !*** ./src/app/pages/relatorios/valores-segurados/valores-segurados.module.ts ***!
  \********************************************************************************/
/*! exports provided: ValoresSeguradosModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValoresSeguradosModule", function() { return ValoresSeguradosModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _valores_segurados_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./valores-segurados.routing.module */ "./src/app/pages/relatorios/valores-segurados/valores-segurados.routing.module.ts");
/* harmony import */ var _valores_segurados_form_valores_segurados_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./valores-segurados-form/valores-segurados-form.component */ "./src/app/pages/relatorios/valores-segurados/valores-segurados-form/valores-segurados-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 ValoresSeguradosModule = /** @class */ (function () {
    function ValoresSeguradosModule() {
    }
    ValoresSeguradosModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _valores_segurados_routing_module__WEBPACK_IMPORTED_MODULE_2__["ValoresSeguradosRoutingModule"]],
            declarations: [_valores_segurados_form_valores_segurados_form_component__WEBPACK_IMPORTED_MODULE_3__["ValoresSeguradosFormComponent"]],
            providers: []
        })
    ], ValoresSeguradosModule);
    return ValoresSeguradosModule;
}());



/***/ }),

/***/ "./src/app/pages/relatorios/valores-segurados/valores-segurados.routing.module.ts":
/*!****************************************************************************************!*\
  !*** ./src/app/pages/relatorios/valores-segurados/valores-segurados.routing.module.ts ***!
  \****************************************************************************************/
/*! exports provided: ValoresSeguradosRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValoresSeguradosRoutingModule", function() { return ValoresSeguradosRoutingModule; });
/* 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 _config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _valores_segurados_form_valores_segurados_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./valores-segurados-form/valores-segurados-form.component */ "./src/app/pages/relatorios/valores-segurados/valores-segurados-form/valores-segurados-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: _valores_segurados_form_valores_segurados_form_component__WEBPACK_IMPORTED_MODULE_3__["ValoresSeguradosFormComponent"],
        data: { breadcrumb: "valoresSegurados", formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
];
var ValoresSeguradosRoutingModule = /** @class */ (function () {
    function ValoresSeguradosRoutingModule() {
    }
    ValoresSeguradosRoutingModule = __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"]],
        })
    ], ValoresSeguradosRoutingModule);
    return ValoresSeguradosRoutingModule;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-relatorios-valores-segurados-valores-segurados-module.js.map