(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-nfe-carta-correcao-carta-correcao-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/carta-correcao/carta-correcao-filter/carta-correcao-filter.component.html":
/*!*******************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/carta-correcao/carta-correcao-filter/carta-correcao-filter.component.html ***!
  \*******************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"carta-correcao-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-45\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.filtroCartaCorrecao' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"emissaoDe\" class=\"required\">{{\"labels.emissaoDe\" | translate }}</label>\r\n                                <app-data id=\"emissaoDe\"\r\n                                          name=\"emissaoDe\"\r\n                                          [(ngModel)]=\"service.filter.dataI\"\r\n                                          autofocus\r\n                                          class=\"dataHora\"\r\n                                          [formatDateTime]=\"mascara.getFormatData\"\r\n                                          required=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"ate\" class=\"required\">{{\"labels.ate\" | translate}}</label>\r\n                                <app-data id=\"ate\"\r\n                                          name=\"ate\"\r\n                                          [(ngModel)]=\"service.filter.dataF\"\r\n                                          class=\"dataHora\"\r\n                                          [formatDateTime]=\"mascara.getFormatData\"\r\n                                          required=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario\r\n                                        id=\"destinatario\"\r\n                                        name=\"destinatario\"\r\n                                        label=\"cliente\"\r\n                                        modalTitle=\"pesquisaDeCliente\"\r\n                                        [(ngModel)]=\"service.filter.destinatarioIdCliente\"\r\n                                        tipoDestinatario=\"C\"\r\n                                        showCgcCpf=\"false\"\r\n                                        showInscricao=\"false\"\r\n                                        [inSelected]=\"\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"ordem\">{{'labels.ordem' | translate}}</label>\r\n                                <app-ordem\r\n                                        id=\"ordem\" name=\"ordem\"\r\n                                        [list]=\"constantes.orderBy\"\r\n                                        (outOrdem)=\"service.filter.ordem = $event\"></app-ordem>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-form.component.html":
/*!***************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-form.component.html ***!
  \***************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\" [formAction]=\"actionForm\" [itemData]=\"data.notaFiscalId\"\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        <app-validacoes></app-validacoes>\r\n        <div class=\"section-comand-bar\">\r\n            <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-4 col-md-5 col-sm-10\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"nota\">{{'labels.nota' | translate}}</label>\r\n                            <input id=\"nota\" name=\"nota\" [(ngModel)]=\"data.nota\" maxlength=\"20\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-2 col-md-3 col-sm-2\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"serieNF\">{{'labels.serie' | translate}}</label>\r\n                            <input id=\"serieNF\" name=\"serieNF\" [(ngModel)]=\"data.serieNF\" maxlength=\"20\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <app-input-description id=\"destinatario\" name=\"destinatario\" [label]=\"'cliente'\"\r\n                                [valueID]=\"data.cliente?.destinatarioId\" [valueDescription]=\"data.cliente?.fantasia\">\r\n                            </app-input-description>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"emissao\">{{\"labels.emissao\" | translate}}</label>\r\n                            <app-data id=\"emissao\" name=\"emissao\" [(ngModel)]=\"data.dtEmissao\" class=\"dataHora\"\r\n                                [formatDateTime]=\"mascara.getFormatDataHorMinSeg\" disabled>\r\n                            </app-data>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"emissao\">{{\"labels.escrituracao\" | translate}}</label>\r\n                            <app-data id=\"escritura\" name=\"escritura\" [(ngModel)]=\"data.dtEscritura\" class=\"dataHora\"\r\n                                [formatDateTime]=\"mascara.getFormatDataHorMinSeg\" disabled>\r\n                            </app-data>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n\r\n                <div class=\"card mt-2\">\r\n                    <div class=\"card-body widget-body\">\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"correcao\" class=\"required\">{{\"labels.dtcorrecao\" |\r\n                                        translate}}</label>\r\n                                    <app-data id=\"correcao\" name=\"correcao\" [(ngModel)]=\"data.dtCorrecao\"\r\n                                        class=\"dataHora\" [formatDateTime]=\"mascara.getFormatDataHorMinSeg\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" required=\"true\">\r\n                                    </app-data>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"item\">{{'labels.sequencia' | translate}}</label>\r\n                                    <input id=\"item\" name=\"item\" [(ngModel)]=\"data.item\" maxlength=\"20\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"conteudo\">{{'labels.conteudoCartaCorrecao' | translate}}</label>\r\n                                    <textarea id=\"conteudo\" name=\"conteudo\" [(ngModel)]=\"data.descrCorrecao\"\r\n                                        class=\"form-control\" rows=\"12\" maxlength=\"500\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        data-title=\"{{'labels.observacoes' | translate}}\"></textarea>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"clearfix\">&nbsp;</div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-12\">\r\n                        <div class=\"form-group\">\r\n                            <button class=\"btn btn-success mr-2\" type=\"submit\"\r\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                {{ 'buttons.salvar' | translate }}\r\n                            </button>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>\r\n\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/carta-correcao/carta-correcao-index/carta-correcao-index.component.html":
/*!*****************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/carta-correcao/carta-correcao-index/carta-correcao-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\" [itemData]=\"data.nota\"\r\n    [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"box-shadow\" style=\"padding: 10px; background-color: #fff;\">\r\n    <div class=\"row\">\r\n        <div class=\"col-lg-12 col-md-12\">\r\n            <div class=\"card\">\r\n                <div class=\"card-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-4 col-md-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"entradaSaida\">{{\"labels.entradaSaida\" | translate}}</label>\r\n                                    <select id=\"entradaSaida\" name=\"entradaSaida\"\r\n                                        data-title=\"{{ 'labels.tipoConsulta' | translate }}\"\r\n                                        class=\"form-control form-control-sm\" [(ngModel)]=\"service.filter.tipoMov\"\r\n                                        (change)=\"refresh()\">\r\n                                        <option value=\"E\">{{ 'labels.entrada' | translate}}</option>\r\n                                        <option value=\"S\">{{ 'labels.saida' | translate}}</option>\r\n                                    </select>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n\r\n<div class=\"section-comand-bar\">\r\n    <table id=\"dtCartaCorrecao\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<app-propriedades></app-propriedades>\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n<app-carta-correcao-filter (filtrar)=\"executaFiltro()\"></app-carta-correcao-filter>");

/***/ }),

/***/ "./src/app/pages/nfe/carta-correcao/carta-correcao-filter/carta-correcao-filter.component.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/nfe/carta-correcao/carta-correcao-filter/carta-correcao-filter.component.ts ***!
  \***************************************************************************************************/
/*! exports provided: CartaCorrecaoFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecaoFilterComponent", function() { return CartaCorrecaoFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _carta_correcao_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../carta-correcao.service */ "./src/app/pages/nfe/carta-correcao/carta-correcao.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _carta_correcao_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../carta-correcao.constants */ "./src/app/pages/nfe/carta-correcao/carta-correcao.constants.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





var CartaCorrecaoFilterComponent = /** @class */ (function () {
    function CartaCorrecaoFilterComponent(messageService, service) {
        this.messageService = messageService;
        this.service = service;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_1__["Mascaras"]();
        this.constantes = new _carta_correcao_constants__WEBPACK_IMPORTED_MODULE_4__["CartaCorrecaoConstants"]();
    }
    CartaCorrecaoFilterComponent.prototype.ngOnInit = function () {
    };
    CartaCorrecaoFilterComponent.prototype.onSubmit = function (form) {
        if (((this.service.filter.dataI === undefined) || (this.service.filter.dataI === "")) ||
            ((this.service.filter.dataF === undefined) || (this.service.filter.dataF === "")) ||
            (this.service.filter.dataF.toString() === "Invalid Date") || (this.service.filter.dataI.toString() === "Invalid Date")) {
            this.messageService.warning("titles.filtroCartaCorrecao", "messages.periodoNaoPreenchidoOuInvalido");
        }
        else {
            if (this.service.filter.dataI > this.service.filter.dataF) {
                this.messageService.warning("titles.filtroCartaCorrecao", "messages.periodoNaoPreenchidoOuInvalido");
            }
            else {
                if (this.service.filter.dataF < this.service.filter.dataI) {
                    this.messageService.warning("titles.filtroCartaCorrecao", "messages.periodoNaoPreenchidoOuInvalido");
                }
                else {
                    if (!form.invalid) {
                        this.filtrar.emit(this.service.filter);
                        jQuery("#carta-correcao-filter").modal("hide");
                    }
                }
            }
        }
    };
    CartaCorrecaoFilterComponent.ctorParameters = function () { return [
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"] },
        { type: _carta_correcao_service__WEBPACK_IMPORTED_MODULE_2__["CartaCorrecaoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], CartaCorrecaoFilterComponent.prototype, "filtrar", void 0);
    CartaCorrecaoFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-carta-correcao-filter',
            template: __importDefault(__webpack_require__(/*! raw-loader!./carta-correcao-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/carta-correcao/carta-correcao-filter/carta-correcao-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"],
            _carta_correcao_service__WEBPACK_IMPORTED_MODULE_2__["CartaCorrecaoService"]])
    ], CartaCorrecaoFilterComponent);
    return CartaCorrecaoFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-form.component.scss":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-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"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL25mZS9jYXJ0YS1jb3JyZWNhby9jYXJ0YS1jb3JyZWNhby1mb3JtL2NhcnRhLWNvcnJlY2FvLWZvcm0uY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-form.component.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-form.component.ts ***!
  \***********************************************************************************************/
/*! exports provided: CartaCorrecaoFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecaoFormComponent", function() { return CartaCorrecaoFormComponent; });
/* 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 _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_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__ = __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_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _carta_correcao_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../carta-correcao.constants */ "./src/app/pages/nfe/carta-correcao/carta-correcao.constants.ts");
/* harmony import */ var _carta_correcao_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../carta-correcao.model */ "./src/app/pages/nfe/carta-correcao/carta-correcao.model.ts");
/* harmony import */ var _carta_correcao_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../carta-correcao.service */ "./src/app/pages/nfe/carta-correcao/carta-correcao.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 __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 CartaCorrecaoFormComponent = /** @class */ (function (_super) {
    __extends(CartaCorrecaoFormComponent, _super);
    function CartaCorrecaoFormComponent(router, messageService, activatedRoute, funcoesService, permissoesUtils, cartaCorrecaoService, destinatarioService) {
        var _this = _super.call(this, new _carta_correcao_constants__WEBPACK_IMPORTED_MODULE_9__["CartaCorrecaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.cartaCorrecaoService = cartaCorrecaoService;
        _this.destinatarioService = destinatarioService;
        _this.data = new _carta_correcao_model__WEBPACK_IMPORTED_MODULE_10__["CartaCorrecao"]();
        _this.dataGrava = new _carta_correcao_model__WEBPACK_IMPORTED_MODULE_10__["CartaCorrecaoGravaVo"]();
        _this.mensagens = [];
        _this.constantes = new _carta_correcao_constants__WEBPACK_IMPORTED_MODULE_9__["CartaCorrecaoConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    CartaCorrecaoFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        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.data.filialId = object.filialId;
                _this.data.notaFiscalId = object.notaFiscalId;
                _this.data.nota = object.nota;
                _this.data.serieNF = object.serieNF;
                _this.data.destinatarioIdCliente = object.destinatarioIdCliente;
                _this.data.dtEmissao = new Date(object.dtEmissao);
                _this.data.dtEscritura = new Date(object.dtEscritura);
                _this.data.dtCorrecao = new Date(object.dtCorrecao);
                _this.data.item = object.item;
                _this.data.descrCorrecao = object.descrCorrecao;
                _this.data.situacaoNfe = object.situacaoNfe;
                _this.destinatarioService.getById(object.destinatarioIdCliente).subscribe(function (ret2) {
                    _this.data.cliente = ret2;
                });
            }
        }, function () { return _this.permissoesUtils.back(); });
    };
    CartaCorrecaoFormComponent.prototype.onSubmit = function (form, create) {
        if (create === void 0) { create = false; }
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("formError").emit(form);
                if (form.invalid) {
                    this.funcoesService.backToTop();
                    return [2 /*return*/];
                }
                if (!this.funcoesService.isNotUndefinedOrNull(this.data.descrCorrecao)) {
                    this.messageService.warning("titles.cartaCorrecao", "messages.dtCorrecaoObrigatoria");
                    return [2 /*return*/];
                }
                if ((!this.funcoesService.isNotUndefinedOrNull(this.data.descrCorrecao)) || (this.data.descrCorrecao.length < 15)) {
                    this.messageService.warning("titles.cartaCorrecao", "messages.conteudoCartaCorrecaoDeveTer15Caracteres");
                    return [2 /*return*/];
                }
                this.preSave();
                this.cartaCorrecaoService.gravaCartaCorrecao(this.dataGrava).subscribe(function (validationResult) {
                    if (!validationResult.isValid) {
                        _this.mensagens = _this.messageService.validationResult(validationResult);
                        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit(_this.mensagens);
                        _this.funcoesService.backToTop();
                    }
                    else {
                        _this.messageService.saveSuccess("titles.cartaCorrecao");
                        _this.back();
                    }
                });
                return [2 /*return*/];
            });
        });
    };
    CartaCorrecaoFormComponent.prototype.preSave = function () {
        this.dataGrava.notaFiscalId = this.data.notaFiscalId;
        this.dataGrava.descrCorrecao = this.data.descrCorrecao;
        this.dataGrava.dtCorrecao = this.data.dtCorrecao;
        this.dataGrava.item = this.data.item;
    };
    CartaCorrecaoFormComponent.prototype.edit = function () {
        if (!!(this.data.nota)) {
            if (this.data.situacaoNfe === "135") {
                this.messageService.warning("titles.cartaCorrecao", "messages.cartaCorrecaoJaTransmitida");
                return;
            }
            this.data.dtCorrecao = new Date();
            var object = btoa(JSON.stringify({
                filialId: this.data.filialId,
                notaFiscalId: this.data.notaFiscalId,
                nota: this.data.nota,
                serieNF: this.data.serieNF,
                destinatarioIdCliente: this.data.destinatarioIdCliente,
                dtEmissao: this.data.dtEmissao,
                dtEscritura: this.data.dtEscritura,
                dtCorrecao: this.data.dtCorrecao,
                item: this.data.item,
                descrCorrecao: this.data.descrCorrecao,
                situacaoNfe: this.data.situacaoNfe,
                cliente: this.data.cliente
            }));
            this.router.navigate([this.target + "/nfe/cartaCorrecao/edit/" + object]);
        }
    };
    CartaCorrecaoFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate([this.target + "/nfe/cartaCorrecao"]);
    };
    CartaCorrecaoFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] },
        { type: _carta_correcao_service__WEBPACK_IMPORTED_MODULE_11__["CartaCorrecaoService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"] }
    ]; };
    CartaCorrecaoFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-carta-correcao-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./carta-correcao-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./carta-correcao-form.component.scss */ "./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-form.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"],
            _carta_correcao_service__WEBPACK_IMPORTED_MODULE_11__["CartaCorrecaoService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"]])
    ], CartaCorrecaoFormComponent);
    return CartaCorrecaoFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/nfe/carta-correcao/carta-correcao-index/carta-correcao-index.component.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/nfe/carta-correcao/carta-correcao-index/carta-correcao-index.component.ts ***!
  \*************************************************************************************************/
/*! exports provided: CartaCorrecaoIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecaoIndexComponent", function() { return CartaCorrecaoIndexComponent; });
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/object-utils/object-utils.static.service */ "./src/app/shared/services/funcoes/object-utils/object-utils.static.service.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_8__ = __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_funcoes_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _carta_correcao_constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../carta-correcao.constants */ "./src/app/pages/nfe/carta-correcao/carta-correcao.constants.ts");
/* harmony import */ var _carta_correcao_model__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../carta-correcao.model */ "./src/app/pages/nfe/carta-correcao/carta-correcao.model.ts");
/* harmony import */ var _carta_correcao_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../carta-correcao.service */ "./src/app/pages/nfe/carta-correcao/carta-correcao.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 __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 CartaCorrecaoIndexComponent = /** @class */ (function (_super) {
    __extends(CartaCorrecaoIndexComponent, _super);
    function CartaCorrecaoIndexComponent(router, service, loginService, datatablesService, configuracao, messageService, funcoesService, permissoesUtils) {
        var _this = _super.call(this, new _carta_correcao_constants__WEBPACK_IMPORTED_MODULE_13__["CartaCorrecaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.service = service;
        _this.loginService = loginService;
        _this.datatablesService = datatablesService;
        _this.configuracao = configuracao;
        _this.messageService = messageService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.data = new _carta_correcao_model__WEBPACK_IMPORTED_MODULE_14__["CartaCorrecao"]();
        _this.filtro = new _carta_correcao_model__WEBPACK_IMPORTED_MODULE_14__["CartaCorrecaoFilter"]();
        _this.constantes = new _carta_correcao_constants__WEBPACK_IMPORTED_MODULE_13__["CartaCorrecaoConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.mensagens = [];
        _this.solicitaEmailCC = false;
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.data.filialId = _this.loginService.getLogin().filialId;
                _this.solicitaEmailCC = _this.configuracao.boolean("BAL", "IntCta");
            }
        };
        _this.gerarNovaCCorrecao = function () {
            if (!!(_this.data.notaFiscalId)) {
                _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 8, function () {
                    if (_this.data.situacaoNfe !== "135") {
                        _this.messageService.warning("titles.cartaCorrecao", "messages.cartaCorrecaoNaoTransmitida");
                        return;
                    }
                    _this.messageService.confirm("titles.cartaCorrecao", "messages.desejaEmitirNovaCartaCorrecao", null, function () {
                        var cartaGrava = new _carta_correcao_model__WEBPACK_IMPORTED_MODULE_14__["CartaCorrecaoGravaVo"]();
                        cartaGrava.notaFiscalId = _this.data.notaFiscalId;
                        cartaGrava.descrCorrecao = _this.data.descrCorrecao;
                        cartaGrava.dtCorrecao = _this.data.dtCorrecao;
                        cartaGrava.item = 0;
                        _this.service.gravaCartaCorrecao(cartaGrava).subscribe(function (validationResult) {
                            if (!validationResult.isValid) {
                                _this.mensagens = _this.messageService.validationResult(validationResult);
                                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_8__["EventEmitterService"].get("backError").emit(_this.mensagens);
                                _this.funcoesService.backToTop();
                            }
                            else {
                                _this.refresh();
                            }
                        });
                    });
                });
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    CartaCorrecaoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig({ codRotina: this.constantes.sisFormularioId, configs: this.constantes.listaParam }, this.loadConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    _this.service.filter = new _carta_correcao_model__WEBPACK_IMPORTED_MODULE_14__["CartaCorrecaoFilter"]();
                    _this.filtrar();
                }
                else {
                    _this.refresh();
                }
            }
        }, function () { return _this.permissoesUtils.back(); }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'gerar', func: function () { return _this.gerarNovaCCorrecao(); } }
        ]);
    };
    ;
    CartaCorrecaoIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    CartaCorrecaoIndexComponent.prototype.filtrar = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["ModalUtilsStaticService"].openModal("carta-correcao-filter-dialog");
    };
    CartaCorrecaoIndexComponent.prototype.executaFiltro = function () {
        var _this = this;
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["ModalUtilsStaticService"].closeModal("carta-correcao-filter-dialog", function () {
            _this.refresh();
        });
    };
    CartaCorrecaoIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getByFiltro(this.service.filter).subscribe(function (data) {
            var columns = [
                _this.datatablesService.getDataStringAlignRight("nota", "nota"),
                _this.datatablesService.getDataString("serieNF", "serie"),
                _this.datatablesService.getDataDateTime("dtEmissao", "emissao"),
                _this.datatablesService.getDataDateTime("dtEscritura", "escrituracao"),
                _this.datatablesService.getDataString("fantasia", "destinatario"),
                _this.datatablesService.getDataDouble("item", "sequencia"),
                _this.datatablesService.getDataDouble("vlNota", "valorTotal", 2),
                _this.datatablesService.getDataString("situacaoNfe", "situacao")
            ];
            _this.datatablesService.toDataTable({ tableId: "dtCartaCorrecao", columns: columns, data: data, disableOrder: true }, function (aData) {
                _this.data = aData;
            });
        });
    };
    CartaCorrecaoIndexComponent.prototype.detail = function () {
        if (!!(this.data.nota)) {
            var object = btoa(JSON.stringify({
                filialId: this.data.filialId,
                notaFiscalId: this.data.notaFiscalId,
                nota: this.data.nota,
                serieNF: this.data.serieNF,
                destinatarioIdCliente: this.data.destinatarioIdCliente,
                dtEmissao: this.data.dtEmissao,
                dtEscritura: this.data.dtEscritura,
                dtCorrecao: this.data.dtCorrecao,
                item: this.data.item,
                descrCorrecao: this.data.descrCorrecao,
                situacaoNfe: this.data.situacaoNfe,
                cliente: this.data.cliente
            }));
            this.router.navigate([this.target + "/nfe/cartaCorrecao/detail/" + object]);
        }
    };
    CartaCorrecaoIndexComponent.prototype.edit = function () {
        if (!!(this.data.nota)) {
            if (this.data.situacaoNfe === "135") {
                this.messageService.warning("titles.cartaCorrecao", "messages.cartaCorrecaoJaTransmitida");
                return;
            }
            this.data.dtCorrecao = new Date();
            var object = app_shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["ObjectUtilsStaticService"].objToB64({
                filialId: this.data.filialId,
                notaFiscalId: this.data.notaFiscalId,
                nota: this.data.nota,
                serieNF: this.data.serieNF,
                destinatarioIdCliente: this.data.destinatarioIdCliente,
                dtEmissao: this.data.dtEmissao,
                dtEscritura: this.data.dtEscritura,
                dtCorrecao: this.data.dtCorrecao,
                item: this.data.item,
                descrCorrecao: this.data.descrCorrecao,
                situacaoNfe: this.data.situacaoNfe,
                cliente: this.data.cliente
            });
            this.router.navigate([this.target + "/nfe/cartaCorrecao/edit/" + object]);
        }
    };
    CartaCorrecaoIndexComponent.prototype.print = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () { return __awaiter(_this, void 0, void 0, function () {
            var result, mensagem;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!this.solicitaEmailCC) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.service.verificaDestEmail({ regNota: this.data.notaFiscalId, fantasia: this.data.fantasia }).toPromise()];
                    case 1:
                        result = _a.sent();
                        if (result.has) {
                            mensagem = result.messages[0];
                            this.messageService.confirm("messages.naoTemEmailsCadastrados", mensagem, null, function () { return _this.router.navigate([_this.target + "/cadastro/destinatario/edit/" + _this.data.destinatarioIdCliente]); }, false, function () { return; });
                        }
                        _a.label = 2;
                    case 2:
                        this.data.situacaoNfe = this.funcoesService.isNotUndefinedOrNull(this.data.situacaoNfe) ? this.data.situacaoNfe : "0";
                        if (!['135', '300'].includes(this.data.situacaoNfe)) {
                            this.service.enviarSefaz({ regNota: this.data.notaFiscalId, item: this.data.item }).subscribe(function (validationResult) {
                                if (!validationResult.isValid) {
                                    var mensagens = _this.messageService.validationResult(validationResult);
                                    mensagens.forEach(function (m) { return _this.messageService.warning("titles.cartaCorrecao", m); });
                                    return;
                                }
                                else {
                                    _this.printCCor();
                                    _this.enviarEmail();
                                }
                            });
                        }
                        else {
                            if (['135'].includes(this.data.situacaoNfe)) {
                                this.printCCor();
                            }
                        }
                        return [2 /*return*/];
                }
            });
        }); });
    };
    CartaCorrecaoIndexComponent.prototype.printCCor = function () {
        this.constantes.paramRelatorio = {
            reportTitulo: { titulo: this.messageService.getTranslates('titles', 'consultaAcuracidadePatio'), subTitulo: '' },
            filialId: this.loginService.getLogin().filialId,
            notaFiscalId: this.funcoesService.isNotUndefinedOrNull(this.data.notaFiscalId) ? this.data.notaFiscalId : 0,
            item: this.funcoesService.isNotUndefinedOrNull(this.data.item) ? this.data.item : "",
        };
        _super.prototype.print.call(this);
    };
    CartaCorrecaoIndexComponent.prototype.enviarEmail = function () {
        var _this = this;
        this.data.logotipo = _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].logotipo_relatorio;
        this.service.enviarEmail(this.data).subscribe(function (result) {
            var message = null;
            if (result && result.erros.length > 0) {
                message = result.erros[0].message;
                _this.mensagens = _this.messageService.validationResult(result.erros[0].message);
            }
            if (!result.isValid) {
                if (message) {
                    _this.messageService.error("titles.cartaCorrecao", result.erros[0].message);
                }
            }
            else {
                _this.messageService.success("titles.cartaCorrecao", "messages.emailEnviadoSucesso");
                _this.refresh();
            }
            _this.funcoesService.backToTop();
        });
    };
    CartaCorrecaoIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: _carta_correcao_service__WEBPACK_IMPORTED_MODULE_15__["CartaCorrecaoService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_12__["LoginService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_7__["DatatablesService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_0__["ConfiguracaoFacade"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_9__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_10__["PermissoesUtilsService"] }
    ]; };
    CartaCorrecaoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: 'app-carta-correcao-index',
            template: __importDefault(__webpack_require__(/*! raw-loader!./carta-correcao-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/carta-correcao/carta-correcao-index/carta-correcao-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            _carta_correcao_service__WEBPACK_IMPORTED_MODULE_15__["CartaCorrecaoService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_12__["LoginService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_7__["DatatablesService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_0__["ConfiguracaoFacade"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_9__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_10__["PermissoesUtilsService"]])
    ], CartaCorrecaoIndexComponent);
    return CartaCorrecaoIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_6__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/nfe/carta-correcao/carta-correcao.constants.ts":
/*!**********************************************************************!*\
  !*** ./src/app/pages/nfe/carta-correcao/carta-correcao.constants.ts ***!
  \**********************************************************************/
/*! exports provided: CartaCorrecaoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecaoConstants", function() { return CartaCorrecaoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var CartaCorrecaoConstants = /** @class */ (function () {
    function CartaCorrecaoConstants() {
        this.sisFormularioId = 80072;
        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.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 8, acao: "labels.gerarNovaCCorrecao" }
        ];
        this.sisSistemaId = "FAT";
        this.configs = [];
        this.nomeForm = "titles.cartaCorrecao";
        this.reportId = "NFE0001";
        this.reportTitulo = { "titulo": "Carta de Correção Eletrônica", "subTitulo": "" };
        this.listaIndex = [
            { 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: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { 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' },
            { title: 'GerarNovaCCorrecao', action: 'gerar', icon: "icon-alert _orange", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        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.orderBy = [
            { field: 'N.RegNota', description: 'Nota Fiscal', direction: 'asc', default: true, sequence: 1 },
            { field: 'N.CodDest', description: 'Destinatátio', direction: 'asc', default: false, sequence: 2 },
            { field: 'N.DtEmissao', description: 'Emissão', direction: 'asc', default: false, sequence: 3 },
            { field: 'N.DtEscrituracao', description: 'Escrituração', direction: 'asc', default: false, sequence: 4 },
        ];
        this.listaParam = [
            {
                sistema: "FAT",
                parametros: [
                    "SolicitaEmailCC"
                ]
            },
        ];
    }
    return CartaCorrecaoConstants;
}());



/***/ }),

/***/ "./src/app/pages/nfe/carta-correcao/carta-correcao.model.ts":
/*!******************************************************************!*\
  !*** ./src/app/pages/nfe/carta-correcao/carta-correcao.model.ts ***!
  \******************************************************************/
/*! exports provided: CartaCorrecao, CartaCorrecaoFilter, CartaCorrecaoGravaVo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecao", function() { return CartaCorrecao; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecaoFilter", function() { return CartaCorrecaoFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecaoGravaVo", function() { return CartaCorrecaoGravaVo; });
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__ = __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 CartaCorrecao = /** @class */ (function (_super) {
    __extends(CartaCorrecao, _super);
    function CartaCorrecao() {
        return _super.call(this) || this;
    }
    return CartaCorrecao;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var CartaCorrecaoFilter = /** @class */ (function () {
    function CartaCorrecaoFilter() {
        this.dataI = moment__WEBPACK_IMPORTED_MODULE_0__().add(-10, "days").toDate();
        this.dataF = moment__WEBPACK_IMPORTED_MODULE_0__().add(30, "days").toDate();
        this.destinatarioIdCliente = 0;
        this.ordem = "N.RegNota";
        this.tipoMov = "S";
    }
    return CartaCorrecaoFilter;
}());

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



/***/ }),

/***/ "./src/app/pages/nfe/carta-correcao/carta-correcao.module.ts":
/*!*******************************************************************!*\
  !*** ./src/app/pages/nfe/carta-correcao/carta-correcao.module.ts ***!
  \*******************************************************************/
/*! exports provided: CartaCorrecaoModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecaoModule", function() { return CartaCorrecaoModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _carta_correcao_filter_carta_correcao_filter_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./carta-correcao-filter/carta-correcao-filter.component */ "./src/app/pages/nfe/carta-correcao/carta-correcao-filter/carta-correcao-filter.component.ts");
/* harmony import */ var _carta_correcao_index_carta_correcao_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./carta-correcao-index/carta-correcao-index.component */ "./src/app/pages/nfe/carta-correcao/carta-correcao-index/carta-correcao-index.component.ts");
/* harmony import */ var _carta_correcao_routing_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./carta-correcao.routing.module */ "./src/app/pages/nfe/carta-correcao/carta-correcao.routing.module.ts");
/* harmony import */ var _carta_correcao_form_carta_correcao_form_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./carta-correcao-form/carta-correcao-form.component */ "./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-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 CartaCorrecaoModule = /** @class */ (function () {
    function CartaCorrecaoModule() {
    }
    CartaCorrecaoModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [_carta_correcao_filter_carta_correcao_filter_component__WEBPACK_IMPORTED_MODULE_3__["CartaCorrecaoFilterComponent"],
                _carta_correcao_form_carta_correcao_form_component__WEBPACK_IMPORTED_MODULE_6__["CartaCorrecaoFormComponent"],
                _carta_correcao_index_carta_correcao_index_component__WEBPACK_IMPORTED_MODULE_4__["CartaCorrecaoIndexComponent"]],
            imports: [
                _angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"],
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__["SharedModule"],
                _carta_correcao_routing_module__WEBPACK_IMPORTED_MODULE_5__["CartaCorrecaoRoutingModule"]
            ]
        })
    ], CartaCorrecaoModule);
    return CartaCorrecaoModule;
}());



/***/ }),

/***/ "./src/app/pages/nfe/carta-correcao/carta-correcao.routing.module.ts":
/*!***************************************************************************!*\
  !*** ./src/app/pages/nfe/carta-correcao/carta-correcao.routing.module.ts ***!
  \***************************************************************************/
/*! exports provided: CartaCorrecaoRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecaoRoutingModule", function() { return CartaCorrecaoRoutingModule; });
/* 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 _carta_correcao_index_carta_correcao_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./carta-correcao-index/carta-correcao-index.component */ "./src/app/pages/nfe/carta-correcao/carta-correcao-index/carta-correcao-index.component.ts");
/* harmony import */ var _carta_correcao_form_carta_correcao_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./carta-correcao-form/carta-correcao-form.component */ "./src/app/pages/nfe/carta-correcao/carta-correcao-form/carta-correcao-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 CartaCorrecaoRoutes = [
    {
        path: "",
        component: _carta_correcao_index_carta_correcao_index_component__WEBPACK_IMPORTED_MODULE_3__["CartaCorrecaoIndexComponent"],
        data: {
            breadcrumb: "cartaCorrecao",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index }
        }
    },
    {
        path: "edit/:object",
        component: _carta_correcao_form_carta_correcao_form_component__WEBPACK_IMPORTED_MODULE_4__["CartaCorrecaoFormComponent"],
        data: {
            breadcrumb: "cartaCorrecao",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:object",
        component: _carta_correcao_form_carta_correcao_form_component__WEBPACK_IMPORTED_MODULE_4__["CartaCorrecaoFormComponent"],
        data: {
            breadcrumb: "cartaCorrecao",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var CartaCorrecaoRoutingModule = /** @class */ (function () {
    function CartaCorrecaoRoutingModule() {
    }
    CartaCorrecaoRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(CartaCorrecaoRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], CartaCorrecaoRoutingModule);
    return CartaCorrecaoRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/nfe/carta-correcao/carta-correcao.service.ts":
/*!********************************************************************!*\
  !*** ./src/app/pages/nfe/carta-correcao/carta-correcao.service.ts ***!
  \********************************************************************/
/*! exports provided: CartaCorrecaoService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CartaCorrecaoService", function() { return CartaCorrecaoService; });
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.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 rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var _carta_correcao_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./carta-correcao.model */ "./src/app/pages/nfe/carta-correcao/carta-correcao.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 CartaCorrecaoService = /** @class */ (function (_super) {
    __extends(CartaCorrecaoService, _super);
    function CartaCorrecaoService(http) {
        var _this = _super.call(this, http, "") || this;
        _this.filter = new _carta_correcao_model__WEBPACK_IMPORTED_MODULE_6__["CartaCorrecaoFilter"]();
        return _this;
    }
    CartaCorrecaoService.prototype.getByFiltro = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cartaCorrecaoNfe/getByFilter", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    CartaCorrecaoService.prototype.gravaCartaCorrecao = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cartaCorrecaoNfe/grava", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    CartaCorrecaoService.prototype.verificaDestEmail = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cartaCorrecaoNfe/verificaDestEmail", { data: data })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    CartaCorrecaoService.prototype.enviarSefaz = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cartaCorrecaoNfe/enviaSefaz", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    CartaCorrecaoService.prototype.enviarEmail = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cartaCorrecaoNfe/enviarEmail", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    CartaCorrecaoService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] }
    ]; };
    CartaCorrecaoService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
    ], CartaCorrecaoService);
    return CartaCorrecaoService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_0__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-nfe-carta-correcao-carta-correcao-module.js.map