(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-admin-corporate-sis-relatorio-sis-relatorio-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-form.component.html":
/*!************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-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\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"data.sisRelatorioId\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <div class=\"card-body widget-body\">\n                <app-form-legenda></app-form-legenda>\n                <form class=\"form\" #dtSisRelatorio=\"ngForm\" (ngSubmit)=\"onSubmit(dtSisRelatorio)\">\n                    <app-validacoes></app-validacoes>\n                    <div class=\"row\">\n                        <div class=\"col-lg-3\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"sisRelatorioId\">{{'labels.id' | translate}}</label>\n                                <input id=\"sisRelatorioId\" name=\"sisRelatorioId\" [(ngModel)]=\"data.sisRelatorioId\"\n                                       class=\"form-control form-control-sm\" type=\"text\"\n                                       disabled>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-9\">\n                            <div class=\"custom-control custom-checkbox uni-checkbox\">\n                                <input id=\"ativo\" name=\"ativo\" [ngModel]=\"data.ativo === 'S'\"\n                                       (ngModelChange)=\"data.ativo=$event?'S':'N'\"\n                                       class=\"custom-control-input checkbox-success\"\n                                       type=\"checkbox\" [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                <label class=\"custom-control-label\"\n                                       for=\"ativo\">{{'labels.ativo' | translate}}</label>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-4\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"codigo\" class=\"required\">{{'labels.codigo' | translate}}</label>\n                                <input id=\"codigo\" name=\"codigo\" [(ngModel)]=\"data.codigo\"\n                                       class=\"form-control form-control-sm\" type=\"text\"\n                                       [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                       required maxlength=\"20\">\n                            </div>\n                        </div>\n                        <div class=\"col-lg-8\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"descricao\" class=\"required\">{{'labels.descricao' | translate}}</label>\n                                <input id=\"descricao\" name=\"descricao\" [(ngModel)]=\"data.descricao\"\n                                       class=\"form-control form-control-sm\" type=\"text\"\n                                       [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                       required maxlength=\"100\">\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row mb-5\">\n                        <div class=\"col-lg-4 col-md-2 col-xs-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"parentCodigo\">{{'labels.codigoPai' | translate}}</label>\n                                <input id=\"parentCodigo\" name=\"parentCodigo\" [(ngModel)]=\"data.parentCodigo\"\n                                       class=\"form-control form-control-sm\" type=\"text\"\n                                       [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                       maxlength=\"20\">\n                            </div>\n                        </div>\n                        <div class=\"col-lg-8 col-md-10 col-xs-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"parentCodigo\">{{'labels.empresa' | translate}}</label>\n                                <select id=\"parentIdEmpresa\" name=\"parentIdEmpresa\" [(ngModel)]=\"parentIdEmpresa\"\n                                        class=\"form-control form-control-sm mb-1\"\n                                        (change)=\"selectedEmpresa()\"\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                    <option [value]=\"r.corpWebEmpresaId \"\n                                            *ngFor=\"let r of empresasPrincipais\">{{ r.nomeFantasia }}</option>\n                                </select>\n                                <select id=\"corpWebEmpresaId\" name=\"corpWebEmpresaId\"\n                                        class=\"form-control form-control-sm mb-2\"\n                                        [(ngModel)]=\"data.corpWebEmpresaId\"\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                    <option value=\"\">Selecione uma empresa</option>\n                                    <option [value]=\"r.corpWebEmpresaId\"\n                                            *ngFor=\"let r of empresasFilhas\">{{ r.nomeFantasia }}</option>\n                                </select>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <div class=\"form-group\">\n                                <label for=\"template\" class=\"required\">{{'labels.template' | translate}}</label>\n                                <textarea id=\"template\" name=\"template\" [(ngModel)]=\"data.template\" class=\"form-control\"\n                                          type=\"text\" [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                          rows=\"20\" required></textarea>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <div class=\"form-group\">\n                                <label for=\"fupload\" class=\"control-label label-bordered\">Clique aqui para escolher um\n                                    arquivo</label>\n                                <input id=\"fupload\" type=\"file\" accept=\".xml\" (change)=\"fileUpload($event)\">\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <button class=\"btn btn-success\" type=\"submit\"\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvar' | translate }}</button>\n                    </div>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-index/sis-relatorio-index.component.html":
/*!**************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-index/sis-relatorio-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\" [formAction]=\"actionForm\"\n    [itemData]=\"sisRelatorio.sisRelatorioId\" [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <div class=\"row\">\n        <div class=\"col-lg-4\">\n            <div class=\"form-group form-group-sm\">\n                <label for=\"codigo\">Código</label>\n                <div class=\"input-group\">\n                    <input id=\"codigo\" name=\"codigo\" [(ngModel)]=\"codigo\" class=\"form-control form-control-sm\"\n                        type=\"text\" placeholder=\"Informe ou pesquisar para trazer todos\">\n                    <button class=\"button btn btn-default\" (click)=\"filtrar()\">Pesquisar</button>\n                </div>\n            </div>\n        </div>\n    </div>\n    <div class=\"row\">\n        <div class=\"col-lg-12\">\n            <table id=\"dtSisRelatorio\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n        </div>\n    </div>\n</div>\n\n<app-propriedades></app-propriedades>");

/***/ }),

/***/ "./src/app/pages/admin/corporate/corp-web-empresa/corp-web-empresa.service.ts":
/*!************************************************************************************!*\
  !*** ./src/app/pages/admin/corporate/corp-web-empresa/corp-web-empresa.service.ts ***!
  \************************************************************************************/
/*! exports provided: CorpWebEmpresaService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CorpWebEmpresaService", function() { return CorpWebEmpresaService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../environments/environment */ "./src/environments/environment.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 CorpWebEmpresaService = /** @class */ (function (_super) {
    __extends(CorpWebEmpresaService, _super);
    function CorpWebEmpresaService(http) {
        var _this = _super.call(this, http, "corporateAuth/corpWebEmpresa") || this;
        _this.http = http;
        return _this;
    }
    CorpWebEmpresaService.prototype.getCorpWebEmpresas = function () {
        return this.http.get(_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].service_url + "/api/v1/corporateAuth/getCorpWebEmpresas")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    CorpWebEmpresaService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    CorpWebEmpresaService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], CorpWebEmpresaService);
    return CorpWebEmpresaService;
}(_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__["BaseService"]));



/***/ }),

/***/ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-form.component.scss":
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-form.component.scss ***!
  \**********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input[type=file] {\n  display: none;\n}\n\n.label-bordered {\n  border: 1px solid #cecece;\n  padding: 10px;\n  border-radius: 5px;\n}\n\n.label-bordered:hover {\n  cursor: pointer;\n  background-color: antiquewhite;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvYWRtaW4vY29ycG9yYXRlL3Npcy1yZWxhdG9yaW8vc2lzLXJlbGF0b3Jpby1mb3JtL0M6XFxDb3Jwb3JhdGVcXENvcnBvcmF0ZVdlYkRlc2VudlxcX3VuaXNvbHV0aW9uL3NyY1xcYXBwXFxwYWdlc1xcYWRtaW5cXGNvcnBvcmF0ZVxcc2lzLXJlbGF0b3Jpb1xcc2lzLXJlbGF0b3Jpby1mb3JtXFxzaXMtcmVsYXRvcmlvLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3BhZ2VzL2FkbWluL2NvcnBvcmF0ZS9zaXMtcmVsYXRvcmlvL3Npcy1yZWxhdG9yaW8tZm9ybS9zaXMtcmVsYXRvcmlvLWZvcm0uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxhQUFBO0FDQ0Y7O0FERUE7RUFDRSx5QkFBQTtFQUNBLGFBQUE7RUFDQSxrQkFBQTtBQ0NGOztBREVBO0VBQ0ksZUFBQTtFQUNBLDhCQUFBO0FDQ0oiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9hZG1pbi9jb3Jwb3JhdGUvc2lzLXJlbGF0b3Jpby9zaXMtcmVsYXRvcmlvLWZvcm0vc2lzLXJlbGF0b3Jpby1mb3JtLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiaW5wdXRbdHlwZT1cImZpbGVcIl0ge1xuICBkaXNwbGF5OiBub25lO1xufVxuXG4ubGFiZWwtYm9yZGVyZWQge1xuICBib3JkZXI6IDFweCBzb2xpZCAjY2VjZWNlO1xuICBwYWRkaW5nOiAxMHB4O1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG59XG5cbi5sYWJlbC1ib3JkZXJlZDpob3ZlciB7XG4gICAgY3Vyc29yOiBwb2ludGVyO1xuICAgIGJhY2tncm91bmQtY29sb3I6IGFudGlxdWV3aGl0ZTtcbn1cbiIsImlucHV0W3R5cGU9ZmlsZV0ge1xuICBkaXNwbGF5OiBub25lO1xufVxuXG4ubGFiZWwtYm9yZGVyZWQge1xuICBib3JkZXI6IDFweCBzb2xpZCAjY2VjZWNlO1xuICBwYWRkaW5nOiAxMHB4O1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG59XG5cbi5sYWJlbC1ib3JkZXJlZDpob3ZlciB7XG4gIGN1cnNvcjogcG9pbnRlcjtcbiAgYmFja2dyb3VuZC1jb2xvcjogYW50aXF1ZXdoaXRlO1xufSJdfQ== */");

/***/ }),

/***/ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-form.component.ts":
/*!********************************************************************************************************!*\
  !*** ./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-form.component.ts ***!
  \********************************************************************************************************/
/*! exports provided: SisRelatorioFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisRelatorioFormComponent", function() { return SisRelatorioFormComponent; });
/* 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 _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _sis_relatorio_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../sis-relatorio.service */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.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 _sis_relatorio_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../sis-relatorio.model */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.model.ts");
/* harmony import */ var _sis_relatorio_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../sis-relatorio.constants */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.constants.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _corp_web_empresa_corp_web_empresa_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../corp-web-empresa/corp-web-empresa.service */ "./src/app/pages/admin/corporate/corp-web-empresa/corp-web-empresa.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../login/login.service */ "./src/app/pages/login/login.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 SisRelatorioFormComponent = /** @class */ (function (_super) {
    __extends(SisRelatorioFormComponent, _super);
    function SisRelatorioFormComponent(router, messageService, activatedRoute, sisRelatorioService, funcoesService, corpWebEmpresaService, loginService) {
        var _this = _super.call(this, new _sis_relatorio_constants__WEBPACK_IMPORTED_MODULE_7__["SisRelatorioConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.sisRelatorioService = sisRelatorioService;
        _this.funcoesService = funcoesService;
        _this.corpWebEmpresaService = corpWebEmpresaService;
        _this.loginService = loginService;
        _this.data = new _sis_relatorio_model__WEBPACK_IMPORTED_MODULE_6__["SisRelatorio"]();
        _this.mensagens = [];
        _this.constantes = new _sis_relatorio_constants__WEBPACK_IMPORTED_MODULE_7__["SisRelatorioConstants"]();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    SisRelatorioFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        var id = this.activatedRoute.snapshot.paramMap.get("id");
        if (id) {
            this.sisRelatorioService.getById(id).subscribe(function (resp) {
                _this.data = resp;
            });
        }
        else {
            this.data = new _sis_relatorio_model__WEBPACK_IMPORTED_MODULE_6__["SisRelatorio"]();
        }
        var login = this.loginService.getLogin();
        this.corpWebEmpresaService.getCorpWebEmpresas().subscribe(function (resp) {
            _this.empresas = resp;
            _this.empresasPrincipais = resp.filter(function (c) { return c.parentIdEmpresa === null; });
            var emp = resp.find(function (x) { return x.corpWebEmpresaId === +login.codEmpresaWeb; });
            if (emp !== undefined) {
                if (emp.parentIdEmpresa === null) {
                    _this.parentIdEmpresa = +login.codEmpresaWeb;
                    _this.selectedEmpresa();
                }
                else {
                    _this.parentIdEmpresa = emp.parentIdEmpresa;
                    _this.selectedEmpresa();
                }
            }
        });
    };
    SisRelatorioFormComponent.prototype.fileUpload = function (event) {
        var _this = this;
        var reader = new FileReader();
        var f = event.srcElement.files[0];
        reader.readAsText(f);
        reader.onload = function () {
            _this.data.template = reader.result.toString();
        };
    };
    SisRelatorioFormComponent.prototype.onSubmit = function (form) {
        var _this = this;
        if (form.invalid) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        this.data.logRotina = "Manutenção SisRelatorio";
        this.sisRelatorioService.save(this.data, this.funcoesService.isEdit(this.actionForm))
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result.validationResult);
            if (result.sisRelatorioId > 0) {
                _this.sisRelatorioService.sincronize(result.sisRelatorioId).subscribe(function () {
                });
            }
            if (!result.validationResult.isValid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.sisRelatorio");
                _this.back();
            }
        });
    };
    SisRelatorioFormComponent.prototype.edit = function () {
        this.router.navigate(["pages/admin/corporate/relatorio", "edit", this.data.sisRelatorioId]);
    };
    SisRelatorioFormComponent.prototype.back = function () {
        this.router.navigate(["pages/admin/corporate/relatorio"]);
    };
    SisRelatorioFormComponent.prototype.selectedEmpresa = function () {
        var _this = this;
        if (this.parentIdEmpresa) {
            this.empresasFilhas = this.empresas.filter(function (c) { return c.parentIdEmpresa === +_this.parentIdEmpresa; });
        }
    };
    SisRelatorioFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _sis_relatorio_service__WEBPACK_IMPORTED_MODULE_3__["SisRelatorioService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _corp_web_empresa_corp_web_empresa_service__WEBPACK_IMPORTED_MODULE_9__["CorpWebEmpresaService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"] }
    ]; };
    SisRelatorioFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-relatorio-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sis-relatorio-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./sis-relatorio-form.component.scss */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-form.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _sis_relatorio_service__WEBPACK_IMPORTED_MODULE_3__["SisRelatorioService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _corp_web_empresa_corp_web_empresa_service__WEBPACK_IMPORTED_MODULE_9__["CorpWebEmpresaService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"]])
    ], SisRelatorioFormComponent);
    return SisRelatorioFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_8__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-index/sis-relatorio-index.component.ts":
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-index/sis-relatorio-index.component.ts ***!
  \**********************************************************************************************************/
/*! exports provided: SisRelatorioIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisRelatorioIndexComponent", function() { return SisRelatorioIndexComponent; });
/* 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 _sis_relatorio_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../sis-relatorio.service */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.service.ts");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __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_5__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _sis_relatorio_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../sis-relatorio.model */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.model.ts");
/* harmony import */ var _sis_relatorio_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../sis-relatorio.constants */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.constants.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.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 SisRelatorioIndexComponent = /** @class */ (function (_super) {
    __extends(SisRelatorioIndexComponent, _super);
    function SisRelatorioIndexComponent(router, sisRelatorioService, datatablesService, messageService, funcoesService, permissoesUtils) {
        var _this = _super.call(this, new _sis_relatorio_constants__WEBPACK_IMPORTED_MODULE_7__["SisRelatorioConstants"](), funcoesService) || this;
        _this.router = router;
        _this.sisRelatorioService = sisRelatorioService;
        _this.datatablesService = datatablesService;
        _this.messageService = messageService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.sisRelatorio = new _sis_relatorio_model__WEBPACK_IMPORTED_MODULE_6__["SisRelatorio"]();
        _this.constantes = new _sis_relatorio_constants__WEBPACK_IMPORTED_MODULE_7__["SisRelatorioConstants"]();
        _this.sincronize = function () {
            if (!!(_this.sisRelatorio.sisRelatorioId)) {
                _this.sisRelatorioService.sincronize(_this.sisRelatorio.sisRelatorioId).subscribe(function (resp) {
                    _this.messageService.saveSuccess("titles.sisRelatorio");
                });
            }
        };
        _this.sincronizeAll = function () {
            _this.messageService.confirm("messages.confirmaOperacao", "messages.sincDeTodosOsRelatorios", "messages.operacaoRealizadaComSucesso", function () {
                _this.sisRelatorioService.sincronize(0).subscribe(function (resp) {
                    _this.messageService.saveSuccess("titles.sisRelatorio");
                });
            });
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    SisRelatorioIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () { }, function () { }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'sincronize', func: function () { return _this.sincronize; } },
            { action: 'sincronizeAll', func: function () { return _this.sincronizeAll; } }
        ]);
    };
    SisRelatorioIndexComponent.prototype.create = function () {
        this.router.navigate(["pages/admin/corporate/relatorio/create"]);
    };
    SisRelatorioIndexComponent.prototype.filtrar = function () {
        var _this = this;
        if (!!this.codigo) {
            this.sisRelatorioService.getByCodigo(this.codigo).subscribe(function (resp) {
                if (!resp) {
                    _this.messageService.warning("titles.relatorio", 'Registro não encontrado');
                    return;
                }
                _this.router.navigate(["pages/admin/corporate/relatorio/edit/" + resp.sisRelatorioId]);
            });
        }
        else {
            this.refresh();
        }
    };
    SisRelatorioIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.sisRelatorioService.get().subscribe(function (resp) {
            var columns = [
                _this.datatablesService.getDataString("sisRelatorioId", "id", "10%"),
                _this.datatablesService.getDataString("codigo", "codigo", "10%"),
                _this.datatablesService.getDataString("descricao", "descricao"),
                _this.datatablesService.getDataString("empresa", "especifico", "30%"),
                _this.datatablesService.getDataBool("ativo", "ativo", "10%")
            ];
            _this.datatablesService.datatable("dtSisRelatorio", columns, resp, function (aData) {
                _this.sisRelatorio = aData;
            });
        });
    };
    SisRelatorioIndexComponent.prototype.edit = function () {
        var _this = this;
        if (!!(this.sisRelatorio.sisRelatorioId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function (resp) {
                _this.router.navigate([
                    "pages/admin/corporate/relatorio/edit/" + _this.sisRelatorio.sisRelatorioId
                ]);
            });
        }
    };
    SisRelatorioIndexComponent.prototype.detail = function () {
        var _this = this;
        if (!!(this.sisRelatorio.sisRelatorioId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function (resp) {
                _this.router.navigate([
                    "pages/admin/corporate/relatorio",
                    "detail",
                    _this.sisRelatorio.sisRelatorioId
                ]);
            });
        }
    };
    SisRelatorioIndexComponent.prototype.properties = function (param) {
        var _this = this;
        if (param === void 0) { param = {}; }
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function (resp) {
            _super.prototype.properties.call(_this, _this.sisRelatorio);
        });
    };
    SisRelatorioIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!!(this.sisRelatorio.sisRelatorioId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
                _this.messageService.removeConfirm(function () {
                    _this.sisRelatorioService.remove(_this.sisRelatorio).subscribe(function () {
                        _this.datatablesService.remove("dtSisRelatorio");
                    });
                });
            });
        }
    };
    SisRelatorioIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _sis_relatorio_service__WEBPACK_IMPORTED_MODULE_2__["SisRelatorioService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"] }
    ]; };
    SisRelatorioIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-relatorio-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sis-relatorio-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-index/sis-relatorio-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _sis_relatorio_service__WEBPACK_IMPORTED_MODULE_2__["SisRelatorioService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"]])
    ], SisRelatorioIndexComponent);
    return SisRelatorioIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_8__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.constants.ts":
/*!********************************************************************************!*\
  !*** ./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.constants.ts ***!
  \********************************************************************************/
/*! exports provided: SisRelatorioConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisRelatorioConstants", function() { return SisRelatorioConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var SisRelatorioConstants = /** @class */ (function () {
    function SisRelatorioConstants() {
        this.sisFormularioId = 23;
        this.permissoes = [
            { sisRotinaId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisRotinaId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisRotinaId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisRotinaId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisRotinaId: this.sisFormularioId, libRotina: 5, acao: "labels.impressao" },
            { sisRotinaId: this.sisFormularioId, libRotina: 6, acao: "labels.propriedades" }
        ];
        this.sisSistemaId = "COR";
        this.nomeForm = "titles.sisRelatorio";
        this.reportId = "COR0004";
        this.tabela = "SisRelatorio";
        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: 'Sincronize', action: 'sincronize', icon: "fa fa-reply", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'SincronizeAll', action: 'sincronizeAll', icon: "fa fa-reply-all", exibeButton: true, eximeMenu: true, menuName: 'Movimento', depitem: false }
        ];
        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' },
        ];
    }
    return SisRelatorioConstants;
}());



/***/ }),

/***/ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.model.ts":
/*!****************************************************************************!*\
  !*** ./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.model.ts ***!
  \****************************************************************************/
/*! exports provided: SisRelatorio */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisRelatorio", function() { return SisRelatorio; });
/* harmony import */ var _shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../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 SisRelatorio = /** @class */ (function (_super) {
    __extends(SisRelatorio, _super);
    function SisRelatorio() {
        var _this = _super.call(this) || this;
        _this.corpWebEmpresaId = "";
        _this.ativo = "S";
        return _this;
    }
    return SisRelatorio;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));



/***/ }),

/***/ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.module.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.module.ts ***!
  \*****************************************************************************/
/*! exports provided: SisRelatorioModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisRelatorioModule", function() { return SisRelatorioModule; });
/* 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 _sis_relatorio_index_sis_relatorio_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sis-relatorio-index/sis-relatorio-index.component */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-index/sis-relatorio-index.component.ts");
/* harmony import */ var _sis_relatorio_form_sis_relatorio_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sis-relatorio-form/sis-relatorio-form.component */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-form.component.ts");
/* harmony import */ var _sis_relatorio_routing_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sis-relatorio.routing.module */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.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 SisRelatorioModule = /** @class */ (function () {
    function SisRelatorioModule() {
    }
    SisRelatorioModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _sis_relatorio_routing_module__WEBPACK_IMPORTED_MODULE_4__["SisRelatorioRoutingModule"]],
            declarations: [_sis_relatorio_index_sis_relatorio_index_component__WEBPACK_IMPORTED_MODULE_2__["SisRelatorioIndexComponent"], _sis_relatorio_form_sis_relatorio_form_component__WEBPACK_IMPORTED_MODULE_3__["SisRelatorioFormComponent"]]
        })
    ], SisRelatorioModule);
    return SisRelatorioModule;
}());



/***/ }),

/***/ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.routing.module.ts":
/*!*************************************************************************************!*\
  !*** ./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.routing.module.ts ***!
  \*************************************************************************************/
/*! exports provided: SisRelatorioRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisRelatorioRoutingModule", function() { return SisRelatorioRoutingModule; });
/* 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 _sis_relatorio_index_sis_relatorio_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sis-relatorio-index/sis-relatorio-index.component */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-index/sis-relatorio-index.component.ts");
/* harmony import */ var _sis_relatorio_form_sis_relatorio_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sis-relatorio-form/sis-relatorio-form.component */ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio-form/sis-relatorio-form.component.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.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: _sis_relatorio_index_sis_relatorio_index_component__WEBPACK_IMPORTED_MODULE_2__["SisRelatorioIndexComponent"],
        data: { breadcrumb: "Relatorio", formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].index } }
    },
    {
        path: "create",
        component: _sis_relatorio_form_sis_relatorio_form_component__WEBPACK_IMPORTED_MODULE_3__["SisRelatorioFormComponent"],
        data: {
            breadcrumb: "Relatorio",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].create }
        }
    },
    {
        path: "edit/:id",
        component: _sis_relatorio_form_sis_relatorio_form_component__WEBPACK_IMPORTED_MODULE_3__["SisRelatorioFormComponent"],
        data: {
            breadcrumb: "Relatorio",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:id",
        component: _sis_relatorio_form_sis_relatorio_form_component__WEBPACK_IMPORTED_MODULE_3__["SisRelatorioFormComponent"],
        data: {
            breadcrumb: "Relatorio",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].detail }
        }
    }
];
var SisRelatorioRoutingModule = /** @class */ (function () {
    function SisRelatorioRoutingModule() {
    }
    SisRelatorioRoutingModule = __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"]],
        })
    ], SisRelatorioRoutingModule);
    return SisRelatorioRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.service.ts":
/*!******************************************************************************!*\
  !*** ./src/app/pages/admin/corporate/sis-relatorio/sis-relatorio.service.ts ***!
  \******************************************************************************/
/*! exports provided: SisRelatorioService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisRelatorioService", function() { return SisRelatorioService; });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.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 SisRelatorioService = /** @class */ (function (_super) {
    __extends(SisRelatorioService, _super);
    function SisRelatorioService(http, loginService) {
        var _this = _super.call(this, http, "corporate/sisRelatorio") || this;
        _this.http = http;
        _this.loginService = loginService;
        return _this;
    }
    SisRelatorioService.prototype.getByCodigo = function (codigo) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/corporate/sisRelatorio/byCodigo/" + codigo)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    SisRelatorioService.prototype.sincronize = function (sisRelatorioId) {
        var login = this.loginService.getLogin();
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/corporate/sisRelatorio/sincronize", {
            codEmpresaWeb: login.codEmpresaWeb,
            sisRelatorioId: sisRelatorioId
        })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    SisRelatorioService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"] }
    ]; };
    SisRelatorioService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"], _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"]])
    ], SisRelatorioService);
    return SisRelatorioService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-admin-corporate-sis-relatorio-sis-relatorio-module.js.map