(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-cadastro-dens-por-produto-dens-por-produto-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/dens-por-produto/dens-por-produto-form/dens-por-produto-form.component.html":
/*!**************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/dens-por-produto/dens-por-produto-form/dens-por-produto-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\"\r\n    [itemData]=\"data.densPorProdutoId\" [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"row\">\r\n    <div class=\"col-lg-12\">\r\n        <div class=\"section-comand-bar\">\r\n            <app-form-legenda></app-form-legenda>\r\n            <div class=\"card-body widget-body\">\r\n                <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\r\n                    <app-validacoes></app-validacoes>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6 col-md-6 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"produto\">{{'labels.produto' | translate}}</label>\r\n                                        <div class=\"input-group\">\r\n                                            <input id=\"materialId\" name=\"materialId\" value=\"{{data.materialId}}\"\r\n                                                maxlength=\"20\" class=\"form-control form-control-sm col-2\" type=\"text\"\r\n                                                disabled=\"true\" required>\r\n                                            <input id=\"produto\" name=\"produto\" disabled\r\n                                                value=\"{{data?.material?.fantasia}}\" maxlength=\"20\"\r\n                                                class=\"form-control form-control-sm col\" type=\"text\">\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6 col-md-6 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"temperatura\" class=\"required\">{{'labels.temperatura' |\r\n                                            translate}}</label>\r\n                                        <input id=\"temperatura\" name=\"tempPadrao\" type=\"text\"\r\n                                            [disabled]=\"!funcoesService.isCreate(actionForm)\" currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 1 }\"\r\n                                            [(ngModel)]=\"data.tempPadrao\" maxlength=\"4\"\r\n                                            class=\"form-control form-control-sm\" required>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6 col-md-6 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"densidade\" class=\"required\">{{'labels.densidade' |\r\n                                            translate}}</label>\r\n                                        <input id=\"densidade\" name=\"densidade\" type=\"text\"\r\n                                            [disabled]=\"!funcoesService.isCreate(actionForm)\" currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decDensidade }\"\r\n                                            [(ngModel)]=\"data.densidade\" [maxlength]=\"maxLengthDensidade\"\r\n                                            class=\"form-control form-control-sm\" required>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6 col-md-6 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"fatorCorrecao\">{{'labels.fatorCorrecao' | translate}}</label>\r\n                                        <input id=\"fatorCorrecao\" name=\"fatorCorrecao\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decFatorCorrecao }\"\r\n                                            [(ngModel)]=\"data.fatorCorrecao\" [maxlength]=\"maxLengthDecFatorCorrecao\"\r\n                                            class=\"form-control form-control-sm\">\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\">\r\n                                        <button class=\"btn btn-success mr-2\" type=\"submit\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvar' |\r\n                                            translate }}</button>\r\n                                        <button class=\"btn btn-success\" (click)=\"saveAndCreate(f)\" type=\"button\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvarNovo' |\r\n                                            translate }}</button>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </form>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/dens-por-produto/dens-por-produto-index/dens-por-produto-index.component.html":
/*!****************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/dens-por-produto/dens-por-produto-index/dens-por-produto-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\"\r\n    [itemData]=\"data.densPorProdutoId\" [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"section-comand-bar\">\r\n    <div class=\"row\">\r\n        <div class=\"col-lg-6\">\r\n            <div class=\"form-group form-group-sm\">\r\n                <app-pesquisa-material id=\"produto\" name=\"produto\" label=\"produto\" [(ngModel)]=\"materialId\"\r\n                    modalTitle=\"pesquisaDeProduto\" required=\"true\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                    (outModel)=\"material = $event\">\r\n                </app-pesquisa-material>\r\n            </div>\r\n        </div>\r\n        <div class=\"col-lg-2\">\r\n            <div class=\"cleafix\">&nbsp;</div>\r\n            <button class=\"btn btn-success\" (click)=\"pesquisar()\" type=\"button\">{{ 'buttons.pesquisar' | translate\r\n                }}</button>\r\n        </div>\r\n    </div>\r\n    <div class=\"cleafix\">&nbsp;</div>\r\n    <table id=\"dtDensPorProduto\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<app-dens-por-produto-filter [data]=\"filtro\" (filtrar)=\"executaFiltro($event)\"></app-dens-por-produto-filter>\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>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/dens-por-produto/dens-por-produto.filter/dens-por-produto-filter.component.html":
/*!******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/dens-por-produto/dens-por-produto.filter/dens-por-produto-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 fade\" id=\"dens-por-produto-filter-dialog\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"modal-label\" data-backdrop=\"static\">\r\n    <div class=\"modal-dialog modal-sm\" role=\"document\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.pesquisaDeDensPorProduto' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"temperatura\">{{'labels.temperatura' | translate}}</label>\r\n                                <input id=\"temperatura\"\r\n                                       name=\"tempPadrao\"\r\n                                       type=\"text\"                                        \r\n                                       currencyMask\r\n                                       [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 1 }\"\r\n                                       [(ngModel)]=\"data.tempPadrao\"\r\n                                       maxlength=\"7\"\r\n                                       class=\"form-control form-control-sm\">\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                                <label for=\"densidade\">{{'labels.densidade' | translate}}</label>\r\n                                <input id=\"densidade\"\r\n                                       name=\"densidade\"\r\n                                       type=\"text\"\r\n                                       currencyMask\r\n                                       [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 5 }\"\r\n                                       [(ngModel)]=\"data.densidade\"\r\n                                       maxlength=\"7\"\r\n                                       class=\"form-control form-control-sm\">\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\" (click)=\"fecharModal()\">Sair</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto-form/dens-por-produto-form.component.ts":
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/dens-por-produto/dens-por-produto-form/dens-por-produto-form.component.ts ***!
  \**********************************************************************************************************/
/*! exports provided: DensPorProdutoFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DensPorProdutoFormComponent", function() { return DensPorProdutoFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_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_message_message_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _material_material_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _dens_por_produto_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../dens-por-produto.constants */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.constants.ts");
/* harmony import */ var _dens_por_produto_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../dens-por-produto.model */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.model.ts");
/* harmony import */ var _dens_por_produto_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../dens-por-produto.service */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.service.ts");
/* harmony import */ var _shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var _material_material_model__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../material/material.model */ "./src/app/pages/cadastro/material/material.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 __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 DensPorProdutoFormComponent = /** @class */ (function (_super) {
    __extends(DensPorProdutoFormComponent, _super);
    function DensPorProdutoFormComponent(router, messageService, activatedRoute, service, materialService, funcoesService, configuracao, permissoesUtils) {
        var _this = _super.call(this, new _dens_por_produto_constants__WEBPACK_IMPORTED_MODULE_9__["DensPorProdutoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.materialService = materialService;
        _this.funcoesService = funcoesService;
        _this.configuracao = configuracao;
        _this.permissoesUtils = permissoesUtils;
        _this.data = new _dens_por_produto_model__WEBPACK_IMPORTED_MODULE_10__["DensPorProduto"]();
        _this.mensagens = [];
        _this.constantes = new _dens_por_produto_constants__WEBPACK_IMPORTED_MODULE_9__["DensPorProdutoConstants"]();
        _this.material = new _material_material_model__WEBPACK_IMPORTED_MODULE_13__["Material"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.loadConfig = function () {
            var self = _this;
            if (self.configuracao.isLoadConfig()) {
                self.service.config.numDecCalc20 = self.configuracao.number("STO", "NumDecCalc20");
                self.service.config.numDecCalcOutros = self.configuracao.number("STO", "NumDecCalcOutros");
                self.service.config.qtDigFatorCorrecao = self.configuracao.number("STO", "QtDigFatorCorrecao");
                self.service.config.qtDigFatorCorrecao20 = self.configuracao.number("STO", "QtDigFatorCorrecao20");
                if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].isNotPositive(self.service.config.numDecCalc20)) {
                    self.service.config.numDecCalc20 = 4;
                    self.service.config.numDecCalcOutros = 4;
                    self.service.config.qtDigFatorCorrecao = 5;
                    self.service.config.qtDigFatorCorrecao20 = 5;
                }
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    DensPorProdutoFormComponent.prototype.ngOnInit = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () { return __awaiter(_this, void 0, void 0, function () {
                    var materialId, id, _a, produto, _b;
                    return __generator(this, function (_c) {
                        switch (_c.label) {
                            case 0:
                                this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
                                materialId = this.activatedRoute.snapshot.paramMap.get("materialId");
                                id = this.activatedRoute.snapshot.paramMap.get("id");
                                if (!id) return [3 /*break*/, 2];
                                _a = this;
                                return [4 /*yield*/, this.service.getById(id).toPromise()];
                            case 1:
                                _a.data = _c.sent();
                                return [3 /*break*/, 3];
                            case 2:
                                produto = atob(materialId).split(';');
                                this.data = new _dens_por_produto_model__WEBPACK_IMPORTED_MODULE_10__["DensPorProduto"](produto[0], produto[1]);
                                _c.label = 3;
                            case 3:
                                _b = this;
                                return [4 /*yield*/, this.materialService.getById(this.data.materialId).toPromise()];
                            case 4:
                                _b.material = _c.sent();
                                return [2 /*return*/];
                        }
                    });
                }); }, function () { return _this.permissoesUtils.back(); });
                return [2 /*return*/];
            });
        });
    };
    DensPorProdutoFormComponent.prototype.onSubmit = function (form, create) {
        var _this = this;
        if (create === void 0) { create = false; }
        if (form.invalid) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        this.data.logRotina = "Manutenção de Densidades Corrigidas";
        this.service
            .save(this.data, this.funcoesService.isEdit(this.actionForm))
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result.validationResult);
            if (!result.validationResult.isValid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.densPorProduto");
                if (create) {
                    _this.data = new _dens_por_produto_model__WEBPACK_IMPORTED_MODULE_10__["DensPorProduto"]('', '');
                    _this.getCamposAdicionais();
                }
                else {
                    _this.back();
                }
            }
        });
    };
    DensPorProdutoFormComponent.prototype.edit = function () {
        var _this = this;
        if (!!(this.data.densPorProdutoId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function (resp) {
                _this.router.navigate([_this.target + "/cadastro/densPorProduto/edit/" + _this.data.densPorProdutoId]);
            });
        }
    };
    DensPorProdutoFormComponent.prototype.back = function () {
        this.router.navigate([this.target + "/cadastro/densPorProduto"]);
    };
    DensPorProdutoFormComponent.prototype.verificaProduto = function () {
        var _this = this;
        this.materialService.getById(this.data.materialId).subscribe(function (elem) {
            _this.data.produto = elem.fantasia;
        });
    };
    DensPorProdutoFormComponent.prototype.getCamposAdicionais = function () {
        var _this = this;
        this.funcoesService.camposAdicionais
            .get(this.constantes.sisFormularioId)
            .subscribe(function (data) {
            _this.data.sisCampoAdds = data;
        });
    };
    DensPorProdutoFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    Object.defineProperty(DensPorProdutoFormComponent.prototype, "decDensidade", {
        get: function () {
            if (!this.material)
                return 0;
            if (['2', 'L'].includes(this.material.metCalcProduto)) {
                if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].isNotPositive(this.service.config.numDecCalc20)) {
                    return 0;
                }
                else {
                    return this.service.config.numDecCalc20;
                }
            }
            else {
                if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].isNotPositive(this.service.config.numDecCalcOutros)) {
                    return 0;
                }
                else {
                    return this.service.config.numDecCalcOutros;
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DensPorProdutoFormComponent.prototype, "decFatorCorrecao", {
        get: function () {
            if (!this.material)
                return 0;
            if (['2', 'L'].includes(this.material.metCalcProduto)) {
                if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].isNotPositive(this.service.config.numDecCalc20)) {
                    return 0;
                }
                else {
                    return this.service.config.qtDigFatorCorrecao20;
                }
            }
            else {
                if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].isNotPositive(this.service.config.numDecCalcOutros)) {
                    return 0;
                }
                else {
                    return this.service.config.qtDigFatorCorrecao;
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DensPorProdutoFormComponent.prototype, "maxLengthDensidade", {
        get: function () {
            return this.decDensidade + 2;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DensPorProdutoFormComponent.prototype, "maxLengthDecFatorCorrecao", {
        get: function () {
            return this.decFatorCorrecao + 2;
        },
        enumerable: true,
        configurable: true
    });
    DensPorProdutoFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _dens_por_produto_service__WEBPACK_IMPORTED_MODULE_11__["DensPorProdutoService"] },
        { type: _material_material_service__WEBPACK_IMPORTED_MODULE_8__["MaterialService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_7__["ConfiguracaoFacade"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_2__["PermissoesUtilsService"] }
    ]; };
    DensPorProdutoFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-dens-por-produto-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./dens-por-produto-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/dens-por-produto/dens-por-produto-form/dens-por-produto-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _dens_por_produto_service__WEBPACK_IMPORTED_MODULE_11__["DensPorProdutoService"],
            _material_material_service__WEBPACK_IMPORTED_MODULE_8__["MaterialService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_7__["ConfiguracaoFacade"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_2__["PermissoesUtilsService"]])
    ], DensPorProdutoFormComponent);
    return DensPorProdutoFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto-index/dens-por-produto-index.component.ts":
/*!************************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/dens-por-produto/dens-por-produto-index/dens-por-produto-index.component.ts ***!
  \************************************************************************************************************/
/*! exports provided: DensPorProdutoIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DensPorProdutoIndexComponent", function() { return DensPorProdutoIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__ = __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_3__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/excel/excel.service */ "./src/app/shared/services/funcoes/excel/excel.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__ = __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_9__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _material_material_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var _dens_por_produto_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../dens-por-produto.constants */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.constants.ts");
/* harmony import */ var _dens_por_produto_model__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../dens-por-produto.model */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.model.ts");
/* harmony import */ var _dens_por_produto_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../dens-por-produto.service */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.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 DensPorProdutoIndexComponent = /** @class */ (function (_super) {
    __extends(DensPorProdutoIndexComponent, _super);
    function DensPorProdutoIndexComponent(permissoesUtils, router, service, excelService, datatables, configuracao, message, funcoes) {
        var _this = _super.call(this, new _dens_por_produto_constants__WEBPACK_IMPORTED_MODULE_11__["DensPorProdutoConstants"](), funcoes) || this;
        _this.permissoesUtils = permissoesUtils;
        _this.router = router;
        _this.service = service;
        _this.excelService = excelService;
        _this.datatables = datatables;
        _this.configuracao = configuracao;
        _this.message = message;
        _this.funcoes = funcoes;
        _this.data = new _dens_por_produto_model__WEBPACK_IMPORTED_MODULE_12__["DensPorProduto"]();
        _this.constantes = new _dens_por_produto_constants__WEBPACK_IMPORTED_MODULE_11__["DensPorProdutoConstants"]();
        _this.target = _this.funcoes.getTargetLocation();
        _this.material = new _material_material_model__WEBPACK_IMPORTED_MODULE_10__["Material"]();
        _this.filtro = new _dens_por_produto_model__WEBPACK_IMPORTED_MODULE_12__["DensPorProdutoFilter"]();
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.service.config.numDecCalc20 = _this.configuracao.number("STO", "NumDecCalc20");
                _this.service.config.numDecCalcOutros = _this.configuracao.number("STO", "NumDecCalcOutros");
                _this.service.config.qtDigFatorCorrecao = _this.configuracao.number("STO", "QtDigFatorCorrecao");
                _this.service.config.qtDigFatorCorrecao20 = _this.configuracao.number("STO", "QtDigFatorCorrecao20");
                if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["NumberUtilsStaticService"].isNotPositive(_this.service.config.numDecCalc20)) {
                    _this.service.config.numDecCalc20 = 4;
                    _this.service.config.numDecCalcOutros = 4;
                    _this.service.config.qtDigFatorCorrecao = 5;
                    _this.service.config.qtDigFatorCorrecao20 = 5;
                }
            }
        };
        _this.export = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 5, function () {
                var headerDictionary = {};
                var options = {
                    headerJsonKeys: true,
                    headerDictionary: headerDictionary
                };
                var resp = _this.dados.map(function (_a) {
                    var tempPadrao = _a.tempPadrao, densidade = _a.densidade, fatorCorrecao = _a.fatorCorrecao;
                    return { tempPadrao: tempPadrao, densidade: densidade, fatorCorrecao: fatorCorrecao };
                });
                _this.excelService.exportAsExcelFile(resp, _this.message.getTranslates("titles", "densPorProduto"), options);
            });
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    DensPorProdutoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _this.refresh();
        }, function () {
            _this.router.navigate(["" + _this.target]);
        }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'export', func: function () { return _this.export; } }
        ]);
    };
    DensPorProdutoIndexComponent.prototype.create = function () {
        if (this.materialId === undefined) {
            this.message.warning("titles.densPorProduto", "messages.informeProduto");
            return;
        }
        var produto = btoa(this.materialId + ";" + this.material.fantasia);
        this.router.navigate([this.target + "/cadastro/densPorProduto/create/" + produto]);
    };
    DensPorProdutoIndexComponent.prototype.refresh = function () {
        var self = this;
        var material = "NENHUM";
        if (self.funcoesService.stringUtils.isNotEmpty(self.materialId)) {
            material = self.materialId;
        }
        self.service.getDados(material).subscribe(function (data) {
            self.dados = data;
            if (self.funcoes.isPositive(self.filtro.tempPadrao) || self.funcoes.isPositive(self.filtro.densidade)) {
                self.dados = self.dados.filter(function (t) { return t.tempPadrao === self.filtro.tempPadrao || t.densidade === self.filtro.densidade; });
            }
            var decDensidade = 0;
            var decFatorCorrecao = 0;
            if (!!self.material) {
                if (['2', 'L'].includes(self.material.metCalcProduto)) {
                    if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["NumberUtilsStaticService"].isNotPositive(self.service.config.numDecCalc20)) {
                        decDensidade = 0;
                        decFatorCorrecao = 0;
                    }
                    else {
                        decDensidade = self.service.config.numDecCalc20;
                        decFatorCorrecao = self.service.config.qtDigFatorCorrecao20;
                    }
                }
                else {
                    if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["NumberUtilsStaticService"].isNotPositive(self.service.config.numDecCalcOutros)) {
                        decDensidade = 0;
                        decFatorCorrecao = 0;
                    }
                    else {
                        decDensidade = self.service.config.numDecCalcOutros;
                        decFatorCorrecao = self.service.config.qtDigFatorCorrecao;
                    }
                }
            }
            var columns = [
                self.datatables.getDataString("materialId", "produto", "10%"),
                self.datatables.getDataString("produto", "descricao"),
                self.datatables.getDataDouble("tempPadrao", "temperatura", 1, false, "10%"),
                self.datatables.getDataDouble("densidade", "densidade", decDensidade, false, "10%"),
                self.datatables.getDataDouble("fatorCorrecao", "fatorCorrecao", decFatorCorrecao, false, "10%")
            ];
            self.datatables.toDataTable({ tableId: "dtDensPorProduto", columns: columns, data: data }, function (aData) {
                self.data = aData;
            });
        });
    };
    DensPorProdutoIndexComponent.prototype.edit = function () {
        if (this.materialId === undefined) {
            this.message.warning("titles.densPorProduto", "messages.informeProduto");
            return;
        }
        if (!!(this.data.densPorProdutoId)) {
            this.router.navigate([this.target + "/cadastro/densPorProduto/edit/" + this.data.densPorProdutoId]);
        }
    };
    DensPorProdutoIndexComponent.prototype.detail = function () {
        if (this.materialId === undefined) {
            this.message.warning("titles.densPorProduto", "messages.informeProduto");
            return;
        }
        if (!!(this.data.densPorProdutoId)) {
            this.router.navigate([this.target + "/cadastro/densPorProduto/detail/" + this.data.densPorProdutoId]);
        }
    };
    DensPorProdutoIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function (resp) {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    DensPorProdutoIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    DensPorProdutoIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!!(this.data.densPorProdutoId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
                _this.message.removeConfirm(function () {
                    _this.service.remove(_this.data).subscribe(function () {
                        _this.datatables.remove("dtDensPorProduto");
                    });
                });
            });
        }
    };
    DensPorProdutoIndexComponent.prototype.pesquisar = function () {
        this.refresh();
    };
    DensPorProdutoIndexComponent.prototype.print = function () {
        var _this = this;
        if (this.materialId === undefined) {
            this.message.warning("titles.densPorProduto", "messages.informeProduto");
            return;
        }
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            var param = {
                materialId: _this.materialId
            };
            _this.constantes.reportTitulo.subTitulo = _this.material.fantasia;
            _this.funcoesService.reportInvoc.invocaRelatorio(_this.constantes.reportId, _this.constantes.reportTitulo, param);
        });
    };
    DensPorProdutoIndexComponent.prototype.filtrar = function () {
        jQuery("#dens-por-produto-filter-dialog").modal("show");
    };
    DensPorProdutoIndexComponent.prototype.executaFiltro = function (event) {
        this.filtro = event;
        this.refresh();
    };
    DensPorProdutoIndexComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _dens_por_produto_service__WEBPACK_IMPORTED_MODULE_13__["DensPorProdutoService"] },
        { type: _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_5__["ExcelService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] }
    ]; };
    DensPorProdutoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-dens-por-produto-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./dens-por-produto-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/dens-por-produto/dens-por-produto-index/dens-por-produto-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _dens_por_produto_service__WEBPACK_IMPORTED_MODULE_13__["DensPorProdutoService"],
            _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_5__["ExcelService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"]])
    ], DensPorProdutoIndexComponent);
    return DensPorProdutoIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.constants.ts":
/*!*******************************************************************************!*\
  !*** ./src/app/pages/cadastro/dens-por-produto/dens-por-produto.constants.ts ***!
  \*******************************************************************************/
/*! exports provided: DensPorProdutoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DensPorProdutoConstants", function() { return DensPorProdutoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var DensPorProdutoConstants = /** @class */ (function () {
    function DensPorProdutoConstants() {
        this.sisFormularioId = 1048;
        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" }
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.densPorProduto";
        this.reportId = "CAD0175";
        this.tabela = "DensPorProduto";
        this.reportTitulo = { "titulo": "Densidades por Produto", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: "icon-close", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Export', action: 'export', icon: "icon-export", exibeButton: true, eximeMenu: true, menuName: 'Movimento', depitem: false },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Propriedade', action: 'properties', icon: "icon-menu", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        this.listaParam = [
            {
                'sistema': 'STO',
                'parametros': [
                    'NumDecCalc20',
                    'NumDecCalcOutros',
                    'QtDigFatorCorrecao',
                    'QtDigFatorCorrecao20'
                ]
            },
        ];
    }
    return DensPorProdutoConstants;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.filter/dens-por-produto-filter.component.ts":
/*!**************************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/dens-por-produto/dens-por-produto.filter/dens-por-produto-filter.component.ts ***!
  \**************************************************************************************************************/
/*! exports provided: DensPorProdutoFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DensPorProdutoFilterComponent", function() { return DensPorProdutoFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _dens_por_produto_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dens-por-produto.model */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.model.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 DensPorProdutoFilterComponent = /** @class */ (function () {
    function DensPorProdutoFilterComponent() {
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    DensPorProdutoFilterComponent.prototype.ngOnInit = function () {
        this.filtro = this.data;
    };
    DensPorProdutoFilterComponent.prototype.onSubmit = function (form) {
        if (!form.invalid) {
            this.filtrar.emit(this.filtro);
            this.fecharModal();
        }
    };
    DensPorProdutoFilterComponent.prototype.fecharModal = function () {
        jQuery("#dens-por-produto-filter-dialog").modal("hide");
    };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _dens_por_produto_model__WEBPACK_IMPORTED_MODULE_1__["DensPorProdutoFilter"])
    ], DensPorProdutoFilterComponent.prototype, "data", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], DensPorProdutoFilterComponent.prototype, "filtrar", void 0);
    DensPorProdutoFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-dens-por-produto-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./dens-por-produto-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/dens-por-produto/dens-por-produto.filter/dens-por-produto-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [])
    ], DensPorProdutoFilterComponent);
    return DensPorProdutoFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.model.ts":
/*!***************************************************************************!*\
  !*** ./src/app/pages/cadastro/dens-por-produto/dens-por-produto.model.ts ***!
  \***************************************************************************/
/*! exports provided: DensPorProduto, DensPorProdutoFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DensPorProduto", function() { return DensPorProduto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DensPorProdutoFilter", function() { return DensPorProdutoFilter; });
/* harmony import */ var _shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
/* harmony import */ var _material_material_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../material/material.model */ "./src/app/pages/cadastro/material/material.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 DensPorProduto = /** @class */ (function (_super) {
    __extends(DensPorProduto, _super);
    function DensPorProduto(materialId, produto) {
        if (materialId === void 0) { materialId = ""; }
        if (produto === void 0) { produto = ""; }
        var _this = _super.call(this) || this;
        _this.materialId = materialId;
        _this.material = new _material_material_model__WEBPACK_IMPORTED_MODULE_1__["Material"]();
        _this.material.materialId = materialId;
        _this.material.fantasia = produto;
        return _this;
    }
    return DensPorProduto;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var DensPorProdutoFilter = /** @class */ (function () {
    function DensPorProdutoFilter() {
        this.tempPadrao = "";
        this.densidade = "";
    }
    return DensPorProdutoFilter;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.module.ts":
/*!****************************************************************************!*\
  !*** ./src/app/pages/cadastro/dens-por-produto/dens-por-produto.module.ts ***!
  \****************************************************************************/
/*! exports provided: DensPorProdutoModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DensPorProdutoModule", function() { return DensPorProdutoModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _dens_por_produto_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dens-por-produto.routing.module */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.routing.module.ts");
/* harmony import */ var _dens_por_produto_index_dens_por_produto_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dens-por-produto-index/dens-por-produto-index.component */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto-index/dens-por-produto-index.component.ts");
/* harmony import */ var _dens_por_produto_form_dens_por_produto_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dens-por-produto-form/dens-por-produto-form.component */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto-form/dens-por-produto-form.component.ts");
/* harmony import */ var _dens_por_produto_filter_dens_por_produto_filter_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dens-por-produto.filter/dens-por-produto-filter.component */ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.filter/dens-por-produto-filter.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 DensPorProdutoModule = /** @class */ (function () {
    function DensPorProdutoModule() {
    }
    DensPorProdutoModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _dens_por_produto_routing_module__WEBPACK_IMPORTED_MODULE_2__["DensPorProdutoRoutingModule"]],
            declarations: [_dens_por_produto_form_dens_por_produto_form_component__WEBPACK_IMPORTED_MODULE_4__["DensPorProdutoFormComponent"], _dens_por_produto_index_dens_por_produto_index_component__WEBPACK_IMPORTED_MODULE_3__["DensPorProdutoIndexComponent"], _dens_por_produto_filter_dens_por_produto_filter_component__WEBPACK_IMPORTED_MODULE_5__["DensPorProdutoFilterComponent"]]
        })
    ], DensPorProdutoModule);
    return DensPorProdutoModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.routing.module.ts":
/*!************************************************************************************!*\
  !*** ./src/app/pages/cadastro/dens-por-produto/dens-por-produto.routing.module.ts ***!
  \************************************************************************************/
/*! exports provided: DensPorProdutoRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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





var MRoutes = [
    {
        path: "",
        component: _dens_por_produto_index_dens_por_produto_index_component__WEBPACK_IMPORTED_MODULE_3__["DensPorProdutoIndexComponent"],
        data: { breadcrumb: "densPorProduto", formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "create/:materialId",
        component: _dens_por_produto_form_dens_por_produto_form_component__WEBPACK_IMPORTED_MODULE_4__["DensPorProdutoFormComponent"],
        data: {
            breadcrumb: "densPorProduto",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "edit/:id",
        component: _dens_por_produto_form_dens_por_produto_form_component__WEBPACK_IMPORTED_MODULE_4__["DensPorProdutoFormComponent"],
        data: {
            breadcrumb: "densPorProduto",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:id",
        component: _dens_por_produto_form_dens_por_produto_form_component__WEBPACK_IMPORTED_MODULE_4__["DensPorProdutoFormComponent"],
        data: {
            breadcrumb: "densPorProduto",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var DensPorProdutoRoutingModule = /** @class */ (function () {
    function DensPorProdutoRoutingModule() {
    }
    DensPorProdutoRoutingModule = __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"]],
        })
    ], DensPorProdutoRoutingModule);
    return DensPorProdutoRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/dens-por-produto/dens-por-produto.service.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/pages/cadastro/dens-por-produto/dens-por-produto.service.ts ***!
  \*****************************************************************************/
/*! exports provided: DensPorProdutoService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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




var DensPorProdutoService = /** @class */ (function (_super) {
    __extends(DensPorProdutoService, _super);
    function DensPorProdutoService(http) {
        var _this = _super.call(this, http, "cadastros/densPorProduto") || this;
        _this.http = http;
        _this.config = {
            numDecCalc20: 0,
            numDecCalcOutros: 0,
            qtDigFatorCorrecao: 0,
            qtDigFatorCorrecao20: 0
        };
        return _this;
    }
    DensPorProdutoService.prototype.getDados = function (materialId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/densPorProduto/getDados/" + materialId);
    };
    DensPorProdutoService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    DensPorProdutoService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], DensPorProdutoService);
    return DensPorProdutoService;
}(_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-cadastro-dens-por-produto-dens-por-produto-module.js.map