(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-cadastro-nome-armazenado-nome-armazenado-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/nome-armazenado/nome-armazenado-form/nome-armazenado-form.component.html":
/*!***********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/nome-armazenado/nome-armazenado-form/nome-armazenado-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.nomeArmazenadoId\" [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-6\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"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\r\n                                            <input id=\"produto\" name=\"produto\" disabled\r\n                                                [(ngModel)]=\"data?.material.fantasia\" maxlength=\"20\"\r\n                                                class=\"form-control form-control-sm text-uppercase\" type=\"text\" uppercase>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"descrMater\">{{'labels.nomeArmazenado' | translate}}</label>\r\n                                <input id=\"descrMater\" name=\"descrMater\" [(ngModel)]=\"data.descrMater\" maxlength=\"50\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                    data-title=\"{{'labels.nomeArmazenado' | translate}}\" uppercase>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"descrCompl\">{{'labels.complemento' | translate}}</label>\r\n                                <input id=\"descrCompl\" name=\"descrCompl\" [(ngModel)]=\"data.descrCompl\" maxlength=\"50\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                    data-title=\"{{'labels.complemento' | translate}}\" uppercase>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-4\">\r\n                            <span *ngIf=\"data.sisCampoAdds\">\r\n                                <div *ngFor=\"let d of data.sisCampoAdds\" [class.col-lg-6]=\"!d.colunas\">\r\n                                    <app-campos-adicionais name=\"{{d.campo}}\" [sisCampoAdd]=\"d\"\r\n                                        [(ngModel)]=\"d.valorCampo\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        [required]=\"d.obrigatorio === 'S'\"></app-campos-adicionais>\r\n                                </div>\r\n                            </span>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-4\">\r\n                            <div class=\"form-group\">\r\n                                <button class=\"btn btn-success mr-2\" type=\"submit\"\r\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    {{ 'buttons.salvar' | translate }}\r\n                                </button>\r\n                                <button class=\"btn btn-success\" (click)=\"saveAndCreate(f)\" type=\"button\"\r\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvarNovo' | translate\r\n                                    }}</button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </form>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/nome-armazenado/nome-armazenado-index/nome-armazenado-index.component.html":
/*!*************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/nome-armazenado/nome-armazenado-index/nome-armazenado-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"] = ("\r\n<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\"\r\n                      [formAction]=\"actionForm\"\r\n                      [itemData]=\"data.nomeArmazenadoId\"\r\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\r\n\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\"\r\n                                       name=\"produto\"\r\n                                       label=\"produto\"\r\n                                       [(ngModel)]=\"service.filtro.materialId\"\r\n                                       modalTitle=\"pesquisaDeProduto\"\r\n                                       required=\"true\"\r\n                                       [inSelected]=\"service.filtro.material\"\r\n                                       [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                       (outModel)=\"trataMaterial($event)\">\r\n                </app-pesquisa-material>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <table id=\"dtNomeArmazenado\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<app-propriedades></app-propriedades>\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n");

/***/ }),

/***/ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado-form/nome-armazenado-form.component.ts":
/*!*******************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/nome-armazenado/nome-armazenado-form/nome-armazenado-form.component.ts ***!
  \*******************************************************************************************************/
/*! exports provided: NomeArmazenadoFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NomeArmazenadoFormComponent", function() { return NomeArmazenadoFormComponent; });
/* 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 _pages_cadastro_nome_armazenado_nome_armazenado_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../pages/cadastro/nome-armazenado/nome-armazenado.model */ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.model.ts");
/* harmony import */ var _pages_cadastro_nome_armazenado_nome_armazenado_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../pages/cadastro/nome-armazenado/nome-armazenado.service */ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __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_5__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_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_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __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_8__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _material_material_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _nome_armazenado_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../nome-armazenado.constants */ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.constants.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 NomeArmazenadoFormComponent = /** @class */ (function (_super) {
    __extends(NomeArmazenadoFormComponent, _super);
    function NomeArmazenadoFormComponent(router, messageService, materialService, activatedRoute, service, funcoesService, permissoesUtils) {
        var _this = _super.call(this, new _nome_armazenado_constants__WEBPACK_IMPORTED_MODULE_10__["NomeArmazenadoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.materialService = materialService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.data = new _pages_cadastro_nome_armazenado_nome_armazenado_model__WEBPACK_IMPORTED_MODULE_2__["NomeArmazenado"]();
        _this.mensagens = [];
        _this.constantes = new _nome_armazenado_constants__WEBPACK_IMPORTED_MODULE_10__["NomeArmazenadoConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    NomeArmazenadoFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            var id = _this.activatedRoute.snapshot.paramMap.get("id");
            if (id) {
                _this.service.getById(id).subscribe(function (resp) {
                    _this.data = resp;
                });
            }
            _this.produto = _this.activatedRoute.snapshot.paramMap.get("produto");
            _this.preCreate();
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    NomeArmazenadoFormComponent.prototype.onSubmit = function (form, create) {
        var _this = this;
        if (create === void 0) { create = false; }
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        this.data.logRotina = "Manutenção de Nome Armazenado";
        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_5__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.nomeArmazenado");
                if (create) {
                    _this.preCreate();
                    _this.router.navigate([_this.target + "/cadastro/nomeArmazenado/create/" + _this.data.materialId]);
                }
                else {
                    _this.back();
                }
            }
        });
    };
    NomeArmazenadoFormComponent.prototype.preCreate = function () {
        if (this.produto) {
            this.data = new _pages_cadastro_nome_armazenado_nome_armazenado_model__WEBPACK_IMPORTED_MODULE_2__["NomeArmazenado"]();
            this.data.materialId = this.produto;
            this.verificaProduto();
        }
    };
    NomeArmazenadoFormComponent.prototype.edit = function () {
        this.router.navigate([this.target + "/cadastro/nomeArmazenado/edit/" + this.data.nomeArmazenadoId + "/" + this.data.materialId]);
    };
    NomeArmazenadoFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    NomeArmazenadoFormComponent.prototype.back = function () {
        this.router.navigate([this.target + "/cadastro/nomeArmazenado"]);
    };
    NomeArmazenadoFormComponent.prototype.getCamposAdicionais = function () {
        var _this = this;
        this.funcoesService.camposAdicionais
            .get(this.constantes.sisFormularioId)
            .subscribe(function (data) {
            _this.data.sisCampoAdds = data;
        });
    };
    NomeArmazenadoFormComponent.prototype.verificaProduto = function () {
        var _this = this;
        this.materialService.getById(this.data.materialId).subscribe(function (elem) {
            _this.data.material = elem;
        });
    };
    NomeArmazenadoFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _pages_cadastro_nome_armazenado_nome_armazenado_service__WEBPACK_IMPORTED_MODULE_3__["NomeArmazenadoService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] }
    ]; };
    NomeArmazenadoFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-nome-armazenado-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./nome-armazenado-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/nome-armazenado/nome-armazenado-form/nome-armazenado-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_8__["MessageService"],
            _material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _pages_cadastro_nome_armazenado_nome_armazenado_service__WEBPACK_IMPORTED_MODULE_3__["NomeArmazenadoService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"]])
    ], NomeArmazenadoFormComponent);
    return NomeArmazenadoFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado-index/nome-armazenado-index.component.ts":
/*!*********************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/nome-armazenado/nome-armazenado-index/nome-armazenado-index.component.ts ***!
  \*********************************************************************************************************/
/*! exports provided: NomeArmazenadoIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NomeArmazenadoIndexComponent", function() { return NomeArmazenadoIndexComponent; });
/* 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 _nome_armazenado_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../nome-armazenado.model */ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.model.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _nome_armazenado_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../nome-armazenado.constants */ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.constants.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_pages_cadastro_nome_armazenado_nome_armazenado_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/nome-armazenado/nome-armazenado.service */ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};










var NomeArmazenadoIndexComponent = /** @class */ (function (_super) {
    __extends(NomeArmazenadoIndexComponent, _super);
    function NomeArmazenadoIndexComponent(router, permissoesUtils, service, datatables, message, funcoes) {
        var _this = _super.call(this, new _nome_armazenado_constants__WEBPACK_IMPORTED_MODULE_6__["NomeArmazenadoConstants"](), funcoes) || this;
        _this.router = router;
        _this.permissoesUtils = permissoesUtils;
        _this.service = service;
        _this.datatables = datatables;
        _this.message = message;
        _this.funcoes = funcoes;
        _this.data = new _nome_armazenado_model__WEBPACK_IMPORTED_MODULE_2__["NomeArmazenado"]();
        _this.constantes = new _nome_armazenado_constants__WEBPACK_IMPORTED_MODULE_6__["NomeArmazenadoConstants"]();
        _this.target = _this.funcoes.getTargetLocation();
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    NomeArmazenadoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _this.refresh();
        }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    NomeArmazenadoIndexComponent.prototype.create = function () {
        if (this.funcoes.isUndefinedOrNull(this.service.filtro.materialId)) {
            this.message.warning("titles.nomeArmazenado", "messages.informeUmProduto");
            return;
        }
        this.router.navigate([this.target + "/cadastro/nomeArmazenado/create/" + this.service.filtro.materialId]);
    };
    NomeArmazenadoIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getByMaterial(this.service.filtro.materialId).subscribe(function (data) {
            var columns = [
                _this.datatables.getDataString("descrMater", "nomeArmazenado", "40%"),
                _this.datatables.getDataString("descrCompl", "complemento")
            ];
            _this.datatables.toDataTable({ tableId: "dtNomeArmazenado", columns: columns, data: data }, function (aData) {
                _this.data = aData;
            });
        });
    };
    NomeArmazenadoIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    NomeArmazenadoIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function (resp) {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    NomeArmazenadoIndexComponent.prototype.edit = function () {
        var _this = this;
        if (!!(this.data.nomeArmazenadoId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function (resp) {
                _this.router.navigate([_this.target + "/cadastro/nomeArmazenado/edit/" + _this.data.nomeArmazenadoId + "/" + _this.service.filtro.materialId]);
            });
        }
    };
    NomeArmazenadoIndexComponent.prototype.detail = function () {
        var _this = this;
        if (!!(this.data.nomeArmazenadoId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function (resp) {
                _this.router.navigate([_this.target + "/cadastro/nomeArmazenado/detail/" + _this.data.nomeArmazenadoId + "/" + _this.service.filtro.materialId]);
            });
        }
    };
    NomeArmazenadoIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!!(this.data.nomeArmazenadoId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
                _this.message.removeConfirm(function () {
                    _this.service.remove(_this.data).subscribe(function () {
                        _this.datatables.remove("dtNomeArmazenado");
                    });
                });
            });
        }
    };
    NomeArmazenadoIndexComponent.prototype.print = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            var param = {
                materialId: _this.service.filtro.materialId
            };
            _this.funcoesService.reportInvoc.invocaRelatorio(_this.constantes.reportId, _this.constantes.reportTitulo, param);
        });
    };
    NomeArmazenadoIndexComponent.prototype.trataMaterial = function (m) {
        this.service.filtro.material = m;
        this.service.filtro.materialId = m.materialId;
        this.refresh();
    };
    NomeArmazenadoIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"] },
        { type: app_pages_cadastro_nome_armazenado_nome_armazenado_service__WEBPACK_IMPORTED_MODULE_8__["NomeArmazenadoService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] }
    ]; };
    NomeArmazenadoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-nome-armazenado-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./nome-armazenado-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/nome-armazenado/nome-armazenado-index/nome-armazenado-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"],
            app_pages_cadastro_nome_armazenado_nome_armazenado_service__WEBPACK_IMPORTED_MODULE_8__["NomeArmazenadoService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"]])
    ], NomeArmazenadoIndexComponent);
    return NomeArmazenadoIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_7__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.constants.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/pages/cadastro/nome-armazenado/nome-armazenado.constants.ts ***!
  \*****************************************************************************/
/*! exports provided: NomeArmazenadoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NomeArmazenadoConstants", function() { return NomeArmazenadoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var NomeArmazenadoConstants = /** @class */ (function () {
    function NomeArmazenadoConstants() {
        this.sisFormularioId = 1052;
        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.nomeArmazenado";
        this.reportId = "CAD0167";
        this.tabela = "NomeArmazenado";
        this.reportTitulo = { "titulo": "Nome Armazenado", "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: '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' },
        ];
    }
    return NomeArmazenadoConstants;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.module.ts":
/*!**************************************************************************!*\
  !*** ./src/app/pages/cadastro/nome-armazenado/nome-armazenado.module.ts ***!
  \**************************************************************************/
/*! exports provided: NomeArmazenadoModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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





var NomeArmazenadoModule = /** @class */ (function () {
    function NomeArmazenadoModule() {
    }
    NomeArmazenadoModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], app_pages_cadastro_nome_armazenado_nome_armazenado_routing_module__WEBPACK_IMPORTED_MODULE_4__["NomeArmazenadoRoutingModule"]],
            declarations: [app_pages_cadastro_nome_armazenado_nome_armazenado_form_nome_armazenado_form_component__WEBPACK_IMPORTED_MODULE_2__["NomeArmazenadoFormComponent"], app_pages_cadastro_nome_armazenado_nome_armazenado_index_nome_armazenado_index_component__WEBPACK_IMPORTED_MODULE_3__["NomeArmazenadoIndexComponent"]]
        })
    ], NomeArmazenadoModule);
    return NomeArmazenadoModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.routing.module.ts":
/*!**********************************************************************************!*\
  !*** ./src/app/pages/cadastro/nome-armazenado/nome-armazenado.routing.module.ts ***!
  \**********************************************************************************/
/*! exports provided: NomeArmazenadoRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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





var MRoutes = [
    {
        path: "",
        component: _nome_armazenado_index_nome_armazenado_index_component__WEBPACK_IMPORTED_MODULE_2__["NomeArmazenadoIndexComponent"],
        data: { breadcrumb: "NomeArmazenado", formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].index } }
    },
    {
        path: "create/:produto",
        component: _nome_armazenado_form_nome_armazenado_form_component__WEBPACK_IMPORTED_MODULE_3__["NomeArmazenadoFormComponent"],
        data: {
            breadcrumb: "NomeArmazenado",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].create }
        }
    },
    {
        path: "edit/:id/:produto",
        component: _nome_armazenado_form_nome_armazenado_form_component__WEBPACK_IMPORTED_MODULE_3__["NomeArmazenadoFormComponent"],
        data: {
            breadcrumb: "NomeArmazenado",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:id/:produto",
        component: _nome_armazenado_form_nome_armazenado_form_component__WEBPACK_IMPORTED_MODULE_3__["NomeArmazenadoFormComponent"],
        data: {
            breadcrumb: "NomeArmazenado",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].detail }
        }
    }
];
var NomeArmazenadoRoutingModule = /** @class */ (function () {
    function NomeArmazenadoRoutingModule() {
    }
    NomeArmazenadoRoutingModule = __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"]],
        })
    ], NomeArmazenadoRoutingModule);
    return NomeArmazenadoRoutingModule;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-cadastro-nome-armazenado-nome-armazenado-module.js.map