(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-cattalini-diversos-envia-email-rel-pesagem-envia-email-rel-pesagem-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component.html":
/*!*********************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component.html ***!
  \*********************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [sisFormularioId]=\"constantes.sisFormularioId\" [botoesComando]=\"constantes.listaForm\">\n</app-menu-command-bar>\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <div class=\"\">\n                <app-form-legenda></app-form-legenda>\n                <div class=\"card-body widget-body\">\n                    <form class=\"form\" #f=\"ngForm\" autocomplete=\"off\" novalidate>\n                        <app-validacoes></app-validacoes>\n                        <div class=\"row\">\n                            <div class=\"col-lg-4 col-md-4 col-sm-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"dtIni\" class=\"required\">{{ 'labels.periodoDe' | translate }}</label>\n                                    <app-data id=\"dtIni\" name=\"dtIni\" required=\"true\" [(ngModel)]=\"filtro.dataI\">\n                                    </app-data>\n                                </div>\n                            </div>\n                            <div class=\"col-lg-4 col-md-4 col-sm-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"dtFim\" class=\"required\">{{ 'labels.ate' | translate }}</label>\n                                    <app-data id=\"dtFim\" name=\"dtFim\" required=\"true\" [(ngModel)]=\"filtro.dataF\">\n                                    </app-data>\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-lg-8 col-md-8 col-sm-12\">\n                                <app-pesquisa-material id=\"materialId\" name=\"materialId\" label=\"produto\"\n                                    modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"filtro.materialId\"\n                                    (outModel)=\"trataMaterial($event)\">\n                                </app-pesquisa-material>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-lg-8 col-md-8 col-sm-12\">\n                                <label for=\"selectedItems\">\n                                    {{ 'labels.cliente' | translate }}\n                                </label>\n                                <angular2-multiselect id=\"selectedItems\" name=\"selectedItems\" [data]=\"dropdownList\"\n                                    [(ngModel)]=\"selectedItems\" [settings]=\"dropdownSettings\"\n                                    (onSelect)=\"onItemSelect($event)\" (onDeSelect)=\"onItemDeSelect($event)\"\n                                    (onSelectAll)=\"onSelectAll($event)\" (onDeSelectAll)=\"onDeSelectAll($event)\">\n                                </angular2-multiselect>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-12\">\n                                <div class=\"form-group\">\n                                    <button class=\"btn btn-success mr-2\" (click)=\"sendMail(f)\" type=\"button\">{{\n                                        'buttons.enviarEmail' | translate }}\n                                    </button>\n                                </div>\n                            </div>\n                        </div>\n                    </form>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n");

/***/ }),

/***/ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component.scss":
/*!*******************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-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"] = ("div.container-tree {\n  position: relative;\n}\n\ndiv.container-tree div.mask_disabled {\n  position: absolute;\n  width: 99%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.3);\n  z-index: 1;\n  display: none;\n}\n\ndiv.container-tree div.mask_disabled.actived {\n  display: block;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvZXNwZWNpZmljb3MvY2F0dGFsaW5pL2RpdmVyc29zL2VudmlhLWVtYWlsLXJlbC1wZXNhZ2VtL2VudmlhLWVtYWlsLXJlbC1wZXNhZ2VtLWZvcm0vQzpcXENvcnBvcmF0ZVxcQ29ycG9yYXRlV2ViRGVzZW52XFxfdW5pc29sdXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxlc3BlY2lmaWNvc1xcY2F0dGFsaW5pXFxkaXZlcnNvc1xcZW52aWEtZW1haWwtcmVsLXBlc2FnZW1cXGVudmlhLWVtYWlsLXJlbC1wZXNhZ2VtLWZvcm1cXGVudmlhLWVtYWlsLXJlbC1wZXNhZ2VtLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3BhZ2VzL2VzcGVjaWZpY29zL2NhdHRhbGluaS9kaXZlcnNvcy9lbnZpYS1lbWFpbC1yZWwtcGVzYWdlbS9lbnZpYS1lbWFpbC1yZWwtcGVzYWdlbS1mb3JtL2VudmlhLWVtYWlsLXJlbC1wZXNhZ2VtLWZvcm0uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxrQkFBQTtBQ0NGOztBREVBO0VBQ0Usa0JBQUE7RUFDQSxVQUFBO0VBQ0EsWUFBQTtFQUNBLG9DQUFBO0VBQ0EsVUFBQTtFQUNBLGFBQUE7QUNDRjs7QURFQTtFQUNFLGNBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL2VzcGVjaWZpY29zL2NhdHRhbGluaS9kaXZlcnNvcy9lbnZpYS1lbWFpbC1yZWwtcGVzYWdlbS9lbnZpYS1lbWFpbC1yZWwtcGVzYWdlbS1mb3JtL2VudmlhLWVtYWlsLXJlbC1wZXNhZ2VtLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyJkaXYuY29udGFpbmVyLXRyZWUge1xyXG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcclxufVxyXG5cclxuZGl2LmNvbnRhaW5lci10cmVlIGRpdi5tYXNrX2Rpc2FibGVkIHtcclxuICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgd2lkdGg6IDk5JTtcclxuICBoZWlnaHQ6IDEwMCU7XHJcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgwLCAwLCAwLCAwLjMpO1xyXG4gIHotaW5kZXg6IDE7XHJcbiAgZGlzcGxheTogbm9uZTtcclxufVxyXG5cclxuZGl2LmNvbnRhaW5lci10cmVlIGRpdi5tYXNrX2Rpc2FibGVkLmFjdGl2ZWR7XHJcbiAgZGlzcGxheTogYmxvY2s7XHJcbn1cclxuIiwiZGl2LmNvbnRhaW5lci10cmVlIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xufVxuXG5kaXYuY29udGFpbmVyLXRyZWUgZGl2Lm1hc2tfZGlzYWJsZWQge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHdpZHRoOiA5OSU7XG4gIGhlaWdodDogMTAwJTtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgwLCAwLCAwLCAwLjMpO1xuICB6LWluZGV4OiAxO1xuICBkaXNwbGF5OiBub25lO1xufVxuXG5kaXYuY29udGFpbmVyLXRyZWUgZGl2Lm1hc2tfZGlzYWJsZWQuYWN0aXZlZCB7XG4gIGRpc3BsYXk6IGJsb2NrO1xufSJdfQ== */");

/***/ }),

/***/ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component.ts":
/*!*****************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component.ts ***!
  \*****************************************************************************************************************************************************/
/*! exports provided: EnviaEmailRelPesagemFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnviaEmailRelPesagemFormComponent", function() { return EnviaEmailRelPesagemFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../environments/environment */ "./src/environments/environment.ts");
/* 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 _login_login_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _envia_email_rel_pesagem_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../envia-email-rel-pesagem.constants */ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.constants.ts");
/* harmony import */ var _envia_email_rel_pesagem_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../envia-email-rel-pesagem.model */ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.model.ts");
/* harmony import */ var _envia_email_rel_pesagem_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../envia-email-rel-pesagem.service */ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.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 EnviaEmailRelPesagemFormComponent = /** @class */ (function (_super) {
    __extends(EnviaEmailRelPesagemFormComponent, _super);
    function EnviaEmailRelPesagemFormComponent(loginService, permissoesUtils, funcoesService, messageService, enviaEmailRelPesagemService) {
        var _this = _super.call(this, new _envia_email_rel_pesagem_constants__WEBPACK_IMPORTED_MODULE_9__["EnviaEmailRelPesagemConstants"](), funcoesService) || this;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.enviaEmailRelPesagemService = enviaEmailRelPesagemService;
        _this.mensagens = [];
        _this.constantes = new _envia_email_rel_pesagem_constants__WEBPACK_IMPORTED_MODULE_9__["EnviaEmailRelPesagemConstants"]();
        _this.filtro = new _envia_email_rel_pesagem_model__WEBPACK_IMPORTED_MODULE_10__["EnviaEmailRelPesagem"]();
        _this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        _this.dropdownList = [];
        _this.selectedItems = [];
        _this.dropdownSettings = {
            singleSelection: false,
            text: "Selecione",
            selectAllText: 'Seleciona Todos',
            unSelectAllText: 'Desmarcar Todos',
            searchPlaceholderText: "Pesquisar",
            classes: "form-control-sm",
            enableSearchFilter: true,
            badgeShowLimit: 1,
            noDataLabel: "Nenhum dado disponível",
            filterUnSelectAllText: 'Desmarcar Todos',
            filterSelectAllText: 'Seleciona Todos',
            maxHeight: 150,
            disabled: false
        };
        _this.target = _this.funcoesService.getTargetLocation();
        return _this;
    }
    EnviaEmailRelPesagemFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.isVisibleClientes = false;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () { return _this.onLoadTreeViewItems(); }, function () { return _this.permissoesUtils.back(); }, true);
        this.colaboradorId = this.loginService.getLogin().colaboradorId;
    };
    EnviaEmailRelPesagemFormComponent.prototype.onCancelar = function () {
        this.filtro = new _envia_email_rel_pesagem_model__WEBPACK_IMPORTED_MODULE_10__["EnviaEmailRelPesagem"]();
    };
    EnviaEmailRelPesagemFormComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    EnviaEmailRelPesagemFormComponent.prototype.sendMail = function (form) {
        return __awaiter(this, void 0, void 0, function () {
            var i, object, result, message, err_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("formError").emit(form);
                        if (form.invalid) {
                            return [2 /*return*/];
                        }
                        if (this.filtro.clientes.length === 0) {
                            this.messageService.warning("titles.enviaEmailRelPesagem", "messages.selecioneUmCliente");
                            return [2 /*return*/];
                        }
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 6, , 7]);
                        i = 0;
                        _a.label = 2;
                    case 2:
                        if (!(i < this.filtro.clientes.length)) return [3 /*break*/, 5];
                        object = {
                            reportId: this.constantes.reportId,
                            materialId: this.filtro.materialId === undefined ? "" : this.filtro.materialId,
                            dataI: this.filtro.dataI === undefined ? "" : this.filtro.dataI,
                            dataF: this.filtro.dataF === undefined ? "" : this.filtro.dataF,
                            resumoLT: "S",
                            codUsuario: 0,
                            colaboradorId: this.colaboradorId,
                            destinatarioClienteId: this.filtro.clientes[i],
                            logotipo: _environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].logotipo_relatorio
                        };
                        return [4 /*yield*/, this.executePromiseEnviarEmailRel(object)];
                    case 3:
                        result = _a.sent();
                        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.enviaEmailRelPesagem", result.erros[0].message);
                            }
                        }
                        else {
                            this.messageService.success("titles.enviaEmailRelPesagem", "messages.emailEnviadoSucesso");
                        }
                        this.funcoesService.backToTop();
                        _a.label = 4;
                    case 4:
                        i++;
                        return [3 /*break*/, 2];
                    case 5: return [3 /*break*/, 7];
                    case 6:
                        err_1 = _a.sent();
                        return [2 /*return*/, console.log(err_1.message)];
                    case 7: return [2 /*return*/];
                }
            });
        });
    };
    EnviaEmailRelPesagemFormComponent.prototype.executePromiseEnviarEmailRel = function (obj) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.enviaEmailRelPesagemService.enviarEmailRel(obj).subscribe(function (result) {
                resolve(result);
            });
        });
        return promise;
    };
    EnviaEmailRelPesagemFormComponent.prototype.trataDest = function (destinatario) {
        this.filtro.cliente = destinatario;
    };
    EnviaEmailRelPesagemFormComponent.prototype.trataMaterial = function (event) {
        var _this = this;
        if (event) {
            this.material = event;
            this.enviaEmailRelPesagemService.consultaCliCattaRelCliente(this.material.materialId).subscribe(function (resp) {
                _this.cliCattaRelCliente = resp;
                _this.isVisibleClientes = true;
                _this.onLoadTreeViewItems();
            });
        }
        else {
            this.isVisibleClientes = false;
        }
    };
    EnviaEmailRelPesagemFormComponent.prototype.trataCombo = function (reset) {
        var _this = this;
        if (reset === void 0) { reset = false; }
        if (!this.filtro.clientes)
            this.filtro.clientes = [];
        if (!reset) {
            this.selectedItems.forEach(function (e) {
                _this.filtro.clientes.push(e.id);
            });
        }
    };
    EnviaEmailRelPesagemFormComponent.prototype.onItemSelect = function (selectedItems) {
        this.trataCombo();
    };
    EnviaEmailRelPesagemFormComponent.prototype.onItemDeSelect = function (selectedItems) {
        this.trataCombo();
    };
    EnviaEmailRelPesagemFormComponent.prototype.onSelectAll = function (selectedItems) {
        this.selectedItems = selectedItems;
        this.trataCombo();
    };
    EnviaEmailRelPesagemFormComponent.prototype.onDeSelectAll = function (selectedItems) {
        this.trataCombo(true);
    };
    EnviaEmailRelPesagemFormComponent.prototype.onLoadTreeViewItems = function () {
        var _this = this;
        this.dropdownList = [];
        this.selectedItems = [];
        this.enviaEmailRelPesagemService.consultaCliCattaRelCliente(this.filtro.materialId).subscribe(function (resp) {
            resp.forEach(function (item) {
                _this.dropdownList.push({ "id": item.destinatarioIdCliente, "itemName": item.destinatarioIdCliente + " - " + item.cliente });
            });
            _this.isVisibleClientes = true;
        });
    };
    EnviaEmailRelPesagemFormComponent.ctorParameters = function () { return [
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _envia_email_rel_pesagem_service__WEBPACK_IMPORTED_MODULE_11__["EnviaEmailRelPesagemService"] }
    ]; };
    EnviaEmailRelPesagemFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-envia-email-rel-pesagem-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./envia-email-rel-pesagem-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./envia-email-rel-pesagem-form.component.scss */ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _envia_email_rel_pesagem_service__WEBPACK_IMPORTED_MODULE_11__["EnviaEmailRelPesagemService"]])
    ], EnviaEmailRelPesagemFormComponent);
    return EnviaEmailRelPesagemFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.constants.ts":
/*!*******************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.constants.ts ***!
  \*******************************************************************************************************************/
/*! exports provided: EnviaEmailRelPesagemConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnviaEmailRelPesagemConstants", function() { return EnviaEmailRelPesagemConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var EnviaEmailRelPesagemConstants = /** @class */ (function () {
    function EnviaEmailRelPesagemConstants() {
        this.sisFormularioId = 65123;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "REL";
        this.nomeForm = "titles.enviaEmailRelPesagem";
        this.reportId = "CAT0022";
        this.reportTitulo = { "titulo": "Relatório de Pesagem", "subTitulo": "" };
        this.listaForm = [
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' }
        ];
    }
    return EnviaEmailRelPesagemConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.model.ts":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.model.ts ***!
  \***************************************************************************************************************/
/*! exports provided: EnviaEmailRelPesagem, CliCattaRelClienteDto */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnviaEmailRelPesagem", function() { return EnviaEmailRelPesagem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CliCattaRelClienteDto", function() { return CliCattaRelClienteDto; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var EnviaEmailRelPesagem = /** @class */ (function () {
    function EnviaEmailRelPesagem() {
        var currentDate = new Date();
        currentDate.setDate(1);
        this.dataI = currentDate;
        this.dataF = new Date();
        this.destinatarioIdCliente = 0;
        this.materialId = "";
        this.clientes = [];
    }
    return EnviaEmailRelPesagem;
}());

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



/***/ }),

/***/ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.module.ts":
/*!****************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.module.ts ***!
  \****************************************************************************************************************/
/*! exports provided: EnviaEmailRelPesagemModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnviaEmailRelPesagemModule", function() { return EnviaEmailRelPesagemModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _envia_email_rel_pesagem_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./envia-email-rel-pesagem.routing.module */ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.routing.module.ts");
/* harmony import */ var _envia_email_rel_pesagem_form_envia_email_rel_pesagem_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component */ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-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 EnviaEmailRelPesagemModule = /** @class */ (function () {
    function EnviaEmailRelPesagemModule() {
    }
    EnviaEmailRelPesagemModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _envia_email_rel_pesagem_routing_module__WEBPACK_IMPORTED_MODULE_2__["EnviaEmailRelPesagemRoutingModule"]],
            declarations: [_envia_email_rel_pesagem_form_envia_email_rel_pesagem_form_component__WEBPACK_IMPORTED_MODULE_3__["EnviaEmailRelPesagemFormComponent"]],
            providers: []
        })
    ], EnviaEmailRelPesagemModule);
    return EnviaEmailRelPesagemModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.routing.module.ts":
/*!************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.routing.module.ts ***!
  \************************************************************************************************************************/
/*! exports provided: EnviaEmailRelPesagemRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnviaEmailRelPesagemRoutingModule", function() { return EnviaEmailRelPesagemRoutingModule; });
/* 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 _envia_email_rel_pesagem_form_envia_email_rel_pesagem_form_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component */ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem-form/envia-email-rel-pesagem-form.component.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_3__ = __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: _envia_email_rel_pesagem_form_envia_email_rel_pesagem_form_component__WEBPACK_IMPORTED_MODULE_2__["EnviaEmailRelPesagemFormComponent"],
        data: { breadcrumb: "enviaEmailRelPesagem", formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_3__["ActionForm"].index } }
    },
];
var EnviaEmailRelPesagemRoutingModule = /** @class */ (function () {
    function EnviaEmailRelPesagemRoutingModule() {
    }
    EnviaEmailRelPesagemRoutingModule = __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"]],
        })
    ], EnviaEmailRelPesagemRoutingModule);
    return EnviaEmailRelPesagemRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.service.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cattalini/diversos/envia-email-rel-pesagem/envia-email-rel-pesagem.service.ts ***!
  \*****************************************************************************************************************/
/*! exports provided: EnviaEmailRelPesagemService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnviaEmailRelPesagemService", function() { return EnviaEmailRelPesagemService; });
/* 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 _environments_environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../environments/environment */ "./src/environments/environment.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 app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/base/specifics.base.service */ "./src/app/shared/services/base/specifics.base.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 EnviaEmailRelPesagemService = /** @class */ (function (_super) {
    __extends(EnviaEmailRelPesagemService, _super);
    function EnviaEmailRelPesagemService(http) {
        var _this = _super.call(this, http, "cattalini/enviaEmailRelPesagem") || this;
        _this.http = http;
        return _this;
    }
    EnviaEmailRelPesagemService.prototype.consultaCliCattaRelCliente = function (materialId) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].specifics_service_url + "/api/v1/cattalini/enviaEmailRelPesagem/consultaCliCattaRelCliente", { materialId: materialId })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EnviaEmailRelPesagemService.prototype.enviarEmailRel = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].specifics_service_url + "/api/v1/cattalini/enviaEmailRelPesagem/enviarEmailRel", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EnviaEmailRelPesagemService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    EnviaEmailRelPesagemService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], EnviaEmailRelPesagemService);
    return EnviaEmailRelPesagemService;
}(app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_5__["SpecificsBaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-cattalini-diversos-envia-email-rel-pesagem-envia-email-rel-pesagem-module.js.map