(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-balanca-autorizacao-saida-autorizacao-saida-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-index/autorizacao-saida-index.component.html":
/*!******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-index/autorizacao-saida-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\" [sisFormularioId]=\"constantes.sisFormularioId\"\n    [formAction]=\"actionForm\" [itemData]=\"data.entradaVeiculoId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtAutorizacaoSaida\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>    \n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-liberar/autorizacao-saida-liberar-form.component.html":
/*!***************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-liberar/autorizacao-saida-liberar-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\" [sisFormularioId]=\"constantes.sisFormularioId\"\n    [formAction]=\"actionForm\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"card\">\n            <app-form-legenda></app-form-legenda>\n            <div class=\"card-body widget-body\">\n                <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\" *ngIf=\"!!data\">\n                    <app-validacoes></app-validacoes>\n                    <div class=\"row\">\n                        <div class=\"col-lg-8 col-sm-12\">\n                            <app-pesquisa-motorista id=\"motorista\" name=\"motorista\" label=\"motorista\"\n                                modalTitle=\"pesquisaMotorista\" [(ngModel)]=\"data.motoristaId\" [showCpf]=\"true\"\n                                [inputMotorista]=\"data.motorista\" required=\"true\"\n                                (outMotorista)=\"trataMotorista($event)\">\n                            </app-pesquisa-motorista>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-3 col-md-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"motoristaCnhCM\">{{'labels.cnh' | translate }}</label>\n                                <input id=\"motoristaCnhCM\" type=\"text\" name=\"motoristaCnhCM\"\n                                    class=\"form-control form-control-sm\" value=\"{{data.motorista?.cnh}}\" disabled>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-3 col-md-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"motoristaCnhValidadeCM\">{{'labels.validade' | translate }}</label>\n                                <input id=\"motoristaCnhValidadeCM\" type=\"text\" name=\"motoristaCnhValidadeCM\"\n                                    class=\"form-control form-control-sm\"\n                                    value=\"{{data.motorista?.cnhValidade | date:'dd/MM/yyyy'}}\" disabled>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-3 col-md-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"motoristaRgCM\">{{'labels.rg' | translate }}</label>\n                                <input id=\"motoristaRgCM\" type=\"text\" name=\"motoristaRgCM\"\n                                    class=\"form-control form-control-sm\" value=\"{{data.motorista?.rg}}\" disabled>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"pesoEntrada\">{{'labels.pesoEntrada' | translate}}</label>\n                                <input id=\"pesoEntrada\" name=\"pesoEntrada\" [(ngModel)]=\"data.pesoTara\"\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled currencyMask\n                                    [options]=\"funcoes.optionCurrency(0)\">\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"pesoSaida\" class=\"required\">{{'labels.pesoSaida' | translate}}</label>\n                                <app-captura-peso id=\"pesoSaida\" name=\"pesoSaida\" [(ngModel)]=\"data.pesoBru\"\n                                    [balancaId]=\"service.configs.balancaId\" (outSelected)=\"getPeso($event)\"\n                                    (outBlur)=\"getPeso($event)\" required=\"true\" [disabledBtn]=\"!enabledBtnPesoBru\"\n                                    [pesagemAutomatica]=\"disabledPesoBru\">\n                                </app-captura-peso>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"diferenca\">{{'labels.diferenca' | translate}}</label>\n                                <input id=\"diferenca\" name=\"diferenca\" [(ngModel)]=\"data.pesoLiq\"\n                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask disabled\n                                    [options]=\"funcoes.optionCurrency(0)\">\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"usuario\" class=\"required\">{{'labels.usuario' | translate}}</label>\n                                <input id=\"usuario\" name=\"usuario\" [(ngModel)]=\"data.usuario\"\n                                    class=\"form-control form-control-sm\" type=\"text\" style=\"text-transform:uppercase\"\n                                    data-title=\"{{'labels.usuario' | translate}}\" required>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"senha\" class=\"required\">{{'labels.senha' | translate}}</label>\n                                <input id=\"senha\" name=\"senha\" [(ngModel)]=\"data.senha\"\n                                    class=\"form-control form-control-sm\" type=\"password\"\n                                    data-title=\"{{'labels.senha' | translate}}\" required>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"clearfix\">&nbsp;</div>\n                    <div class=\"row\">\n                        <div class=\"col-12\">\n                            <div class=\"form-group\">\n                                <button class=\"btn btn-success mr-2\" type=\"submit\" [disabled]=\"f.invalid\">\n                                    {{ 'buttons.salvar' | translate }}\n                                </button>\n                            </div>\n                        </div>\n                    </div>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-index/autorizacao-saida-index.component.ts":
/*!**************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-index/autorizacao-saida-index.component.ts ***!
  \**************************************************************************************************************/
/*! exports provided: AutorizacaoSaidaIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutorizacaoSaidaIndexComponent", function() { return AutorizacaoSaidaIndexComponent; });
/* 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_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var _pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../pages/login/login.service */ "./src/app/pages/login/login.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_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_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 _autorizacao_saida_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../autorizacao-saida.constants */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.constants.ts");
/* harmony import */ var _autorizacao_saida_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../autorizacao-saida.model */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.model.ts");
/* harmony import */ var _autorizacao_saida_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../autorizacao-saida.service */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};












var AutorizacaoSaidaIndexComponent = /** @class */ (function (_super) {
    __extends(AutorizacaoSaidaIndexComponent, _super);
    function AutorizacaoSaidaIndexComponent(router, service, datatables, permissoesUtils, message, loginService, funcoes) {
        var _this = _super.call(this, new _autorizacao_saida_constants__WEBPACK_IMPORTED_MODULE_9__["AutorizacaoSaidaConstants"](), funcoes) || this;
        _this.router = router;
        _this.service = service;
        _this.datatables = datatables;
        _this.permissoesUtils = permissoesUtils;
        _this.message = message;
        _this.loginService = loginService;
        _this.funcoes = funcoes;
        _this.data = new _autorizacao_saida_model__WEBPACK_IMPORTED_MODULE_10__["AutorizacaoSaida"]();
        _this.constantes = new _autorizacao_saida_constants__WEBPACK_IMPORTED_MODULE_9__["AutorizacaoSaidaConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.liberarVeiculo = function () {
            var resp = _this;
            if (!resp.itemSelecionado())
                return;
            if (!!resp.data.entradaVeiculoId) {
                if (resp.autorizacaoSaidaVeiculoJaLiberado(resp.data.operSaida))
                    return;
                resp.permissoesUtils.verificaRotina(resp.constantes.sisFormularioId, 2, function () {
                    _this.router.navigate([_this.target + "/balanca/autorizacaoSaida/liberarVeiculo/" + _this.data.entradaVeiculoId]);
                });
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    AutorizacaoSaidaIndexComponent.prototype.init = function () {
        var _this = this;
        _super.prototype.addFuncoes.call(this, [
            { action: 'liberarVeiculo', func: function () { return _this.liberarVeiculo; } }
        ]);
    };
    AutorizacaoSaidaIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.init();
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!this.loginService.isTokenExpired()) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.refresh()];
                    case 1:
                        _a.sent();
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        }); }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    AutorizacaoSaidaIndexComponent.prototype.refresh = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _a, columns;
            var _this = this;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.get().toPromise()];
                    case 1:
                        _a.dados = _b.sent();
                        columns = [
                            this.datatables.getDataString("entradaVeiculoId", "registro", "10%"),
                            this.datatables.getDataString("cadastroPlacaIdCavalo", "cavalo", "10%"),
                            this.datatables.getDataString("cadastroPlacaIdCarreta1", "carreta1", "10%"),
                            this.datatables.getDataDateTime("dtChegada", "chegada", "DD/MM/YYYY HH:mm", "10%"),
                            this.datatables.getDataDateTime("dtEntrada", "entrada", "DD/MM/YYYY HH:mm", "10%"),
                            this.datatables.getDataString("transportadora", "transportadora"),
                            this.datatables.getDataString("sistema", "sistema"),
                            this.datatables.getDataString("descrSitVeiculo", "situacaoVeiculo"),
                        ];
                        this.datatables.datatable("dtAutorizacaoSaida", columns, this.dados, function (aData) { return _this.data = aData; }, 1, "desc");
                        return [2 /*return*/];
                }
            });
        });
    };
    AutorizacaoSaidaIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    AutorizacaoSaidaIndexComponent.prototype.itemSelecionado = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["NumberUtilsStaticService"].isNotPositive(this.data.entradaVeiculoId)) {
            this.message.warning("titles.autorizacaoSaida", "messages.selecioneUmRegistro");
            return false;
        }
        return true;
    };
    AutorizacaoSaidaIndexComponent.prototype.autorizacaoSaidaVeiculoJaLiberado = function (operSaida) {
        if (!operSaida)
            operSaida = "";
        var result = operSaida !== "";
        if (result)
            this.message.warning("titles.autorizacaoSaida", "messages.veiculoJaLiberado");
        return result;
    };
    AutorizacaoSaidaIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _autorizacao_saida_service__WEBPACK_IMPORTED_MODULE_11__["AutorizacaoSaidaService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] }
    ]; };
    AutorizacaoSaidaIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-autorizacao-saida-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./autorizacao-saida-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-index/autorizacao-saida-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _autorizacao_saida_service__WEBPACK_IMPORTED_MODULE_11__["AutorizacaoSaidaService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"]])
    ], AutorizacaoSaidaIndexComponent);
    return AutorizacaoSaidaIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-liberar/autorizacao-saida-liberar-form.component.ts":
/*!***********************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-liberar/autorizacao-saida-liberar-form.component.ts ***!
  \***********************************************************************************************************************/
/*! exports provided: AutorizacaoSaidaLiberarFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutorizacaoSaidaLiberarFormComponent", function() { return AutorizacaoSaidaLiberarFormComponent; });
/* 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_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.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_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 _autorizacao_saida_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../autorizacao-saida.constants */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.constants.ts");
/* harmony import */ var _autorizacao_saida_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../autorizacao-saida.model */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.model.ts");
/* harmony import */ var _autorizacao_saida_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../autorizacao-saida.service */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.service.ts");
/* harmony import */ var _pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./../../../../pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _cadastro_motorista_motorista_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./../../../cadastro/motorista/motorista.service */ "./src/app/pages/cadastro/motorista/motorista.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./../../../login/login.service */ "./src/app/pages/login/login.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __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 AutorizacaoSaidaLiberarFormComponent = /** @class */ (function (_super) {
    __extends(AutorizacaoSaidaLiberarFormComponent, _super);
    function AutorizacaoSaidaLiberarFormComponent(router, activatedRoute, message, service, configuracao, permissoesUtils, funcoes, loginService, materialService, destinatarioService, motoristaService) {
        var _this = _super.call(this, new _autorizacao_saida_constants__WEBPACK_IMPORTED_MODULE_10__["AutorizacaoSaidaConstants"](), funcoes) || this;
        _this.router = router;
        _this.activatedRoute = activatedRoute;
        _this.message = message;
        _this.service = service;
        _this.configuracao = configuracao;
        _this.permissoesUtils = permissoesUtils;
        _this.funcoes = funcoes;
        _this.loginService = loginService;
        _this.materialService = materialService;
        _this.destinatarioService = destinatarioService;
        _this.motoristaService = motoristaService;
        _this.mensagens = [];
        _this.constantes = new _autorizacao_saida_constants__WEBPACK_IMPORTED_MODULE_10__["AutorizacaoSaidaConstants"]();
        _this.now = new Date();
        _this.permiteAlterarGeraNota = false;
        _this.liberaComPesoZero = false;
        _this.target = _this.funcoes.getTargetLocation();
        _this.pageRoute = "/balanca/autorizacaoSaida";
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.service.configs.balancaId = _this.configuracao.number("BAL", "balancaId");
                _this.service.configs.pesagemAutomatica = _this.configuracao.boolean("BAL", "pesagemAutomatica");
                _this.service.configs.pesagemEntradaEVO = _this.configuracao.boolean("BAL", "pesagemEntradaEVO");
                _this.service.configs.pesCargaOper = _this.configuracao.boolean("BAL", "pesCargaOper");
                _this.service.configs.balCodig = _this.configuracao.number("BAL", "balCodig");
                _this.service.configs.bl2Codig = _this.configuracao.number("BAL", "bl2Codig");
                _this.service.configs.bl3Codig = _this.configuracao.number("BAL", "bl3Codig");
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    AutorizacaoSaidaLiberarFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotinaIdx([1, 2], this.actionForm), function () {
            var id = _this.activatedRoute.snapshot.paramMap.get("id");
            if (id) {
                _this.preLiberty(+id);
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    AutorizacaoSaidaLiberarFormComponent.prototype.preLiberty = function (id) {
        var _this = this;
        this.entradaVeiculoId = id;
        this.data = new _autorizacao_saida_model__WEBPACK_IMPORTED_MODULE_11__["AutorizacaoSaida"]();
        this.service.getPesoTara({ entradaVeiculoId: id }).subscribe(function (resp) {
            _this.data.pesoTara = resp.pesoTara;
        });
    };
    AutorizacaoSaidaLiberarFormComponent.prototype.onSubmit = function (form, create) {
        if (create === void 0) { create = false; }
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
                        if (form.invalid) {
                            return [2 /*return*/];
                        }
                        return [4 /*yield*/, this.service.podeLiberar({
                                entradaVeiculoId: this.entradaVeiculoId,
                                usuario: this.data.usuario,
                                senha: this.data.senha,
                                sisFormularioId: this.constantes.sisFormularioId,
                                permissaoLibAut: 2
                            }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.autorizacaoSaida", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.message.confirm("titles.autorizacaoSaida", "messages.desejaRealmenteAutorizarSaidaDesteVeiculo", null, function () { return __awaiter(_this, void 0, void 0, function () {
                                return __generator(this, function (_a) {
                                    this.executeLiberaAutorizacaoSaida();
                                    return [2 /*return*/];
                                });
                            }); });
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    AutorizacaoSaidaLiberarFormComponent.prototype.executeLiberaAutorizacaoSaida = function () {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.liberaAutorizacao({
                            entradaVeiculoId: this.entradaVeiculoId,
                            motoristaId: this.data.motoristaId,
                            pesoTara: this.data.pesoTara,
                            pesoBru: this.data.pesoBru,
                            diferenca: this.data.pesoLiq,
                            usuario: this.data.usuario,
                            senha: this.data.senha,
                            sisFormularioId: this.constantes.sisFormularioId,
                            permissaoLibAut: 2
                        }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (this.funcoes.isNotUndefinedOrNull(validationResult)) {
                            if (!validationResult.isValid) {
                                mensagens = this.message.validationResult(validationResult);
                                mensagens.forEach(function (m) { return _this.message.warning("titles.autorizacaoSaida", m); });
                                return [2 /*return*/];
                            }
                            else {
                                this.message.success("titles.autorizacaoSaida", "messages.veiculoAutorizadoComSucesso");
                                this.back();
                            }
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    AutorizacaoSaidaLiberarFormComponent.prototype.getPeso = function (resp) {
        if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["NumberUtilsStaticService"].isNotPositive(resp.peso))
            this.data.pesoBru = 0;
        this.data.pesoLiq = this.data.pesoTara - this.data.pesoBru;
    };
    Object.defineProperty(AutorizacaoSaidaLiberarFormComponent.prototype, "disabledPesoBru", {
        get: function () {
            return (this.service.configs.pesagemAutomatica || this.service.configs.pesagemEntradaEVO);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AutorizacaoSaidaLiberarFormComponent.prototype, "enabledBtnPesoBru", {
        get: function () {
            return (this.service.configs.pesagemAutomatica || !this.service.configs.pesagemEntradaEVO);
        },
        enumerable: true,
        configurable: true
    });
    AutorizacaoSaidaLiberarFormComponent.prototype.back = function () {
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    AutorizacaoSaidaLiberarFormComponent.prototype.trataMotorista = function (motorista) {
        return __awaiter(this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (!motorista)
                            return [2 /*return*/];
                        _a = this.data;
                        return [4 /*yield*/, this.motoristaService.getMotoristaId(motorista.motoristaId).toPromise()];
                    case 1:
                        _a.motorista = _b.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    AutorizacaoSaidaLiberarFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"] },
        { type: _autorizacao_saida_service__WEBPACK_IMPORTED_MODULE_12__["AutorizacaoSaidaService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__["ConfiguracaoFacade"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_15__["LoginService"] },
        { type: _pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_13__["MaterialService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_2__["DestinatarioService"] },
        { type: _cadastro_motorista_motorista_service__WEBPACK_IMPORTED_MODULE_14__["MotoristaService"] }
    ]; };
    AutorizacaoSaidaLiberarFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-autorizacao-saida-liberar-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./autorizacao-saida-liberar-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-liberar/autorizacao-saida-liberar-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"],
            _autorizacao_saida_service__WEBPACK_IMPORTED_MODULE_12__["AutorizacaoSaidaService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__["ConfiguracaoFacade"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_15__["LoginService"],
            _pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_13__["MaterialService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_2__["DestinatarioService"],
            _cadastro_motorista_motorista_service__WEBPACK_IMPORTED_MODULE_14__["MotoristaService"]])
    ], AutorizacaoSaidaLiberarFormComponent);
    return AutorizacaoSaidaLiberarFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.constants.ts":
/*!********************************************************************************!*\
  !*** ./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.constants.ts ***!
  \********************************************************************************/
/*! exports provided: AutorizacaoSaidaConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutorizacaoSaidaConstants", function() { return AutorizacaoSaidaConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var AutorizacaoSaidaConstants = /** @class */ (function () {
    function AutorizacaoSaidaConstants() {
        this.sisFormularioId = 95155;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.liberarVeiculo" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.permissoes" },
        ];
        this.sisSistemaId = "BAL";
        this.nomeForm = "titles.autorizacaoSaida";
        this.reportId = "";
        this.listaIndex = [
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'LiberarVeiculo', action: 'liberarVeiculo', icon: "fa fa-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
        this.listaForm = [
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        this.listaLiberarVeiculo = [
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        this.listaParam = [
            { 'sistema': 'BAL', 'parametros': ['SolDuplMovOpe', 'PesCargaOper', 'PesagemAutomatica', 'BalCodig', 'Bl2Codig', 'Bl3Codig', 'PesagemEntradaEVO'] },
        ];
    }
    return AutorizacaoSaidaConstants;
}());



/***/ }),

/***/ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.model.ts":
/*!****************************************************************************!*\
  !*** ./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.model.ts ***!
  \****************************************************************************/
/*! exports provided: AutorizacaoSaida, AutorizacaoSaidaDto */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutorizacaoSaida", function() { return AutorizacaoSaida; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutorizacaoSaidaDto", function() { return AutorizacaoSaidaDto; });
/* harmony import */ var _shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var AutorizacaoSaida = /** @class */ (function (_super) {
    __extends(AutorizacaoSaida, _super);
    function AutorizacaoSaida() {
        var _this = _super.call(this) || this;
        _this.pesoTara = 0;
        _this.pesoLiq = 0;
        _this.pesoBru = 0;
        return _this;
    }
    return AutorizacaoSaida;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

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



/***/ }),

/***/ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.module.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.module.ts ***!
  \*****************************************************************************/
/*! exports provided: AutorizacaoSaidaModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutorizacaoSaidaModule", function() { return AutorizacaoSaidaModule; });
/* 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 _autorizacao_saida_index_autorizacao_saida_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./autorizacao-saida-index/autorizacao-saida-index.component */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-index/autorizacao-saida-index.component.ts");
/* harmony import */ var _autorizacao_saida_liberar_autorizacao_saida_liberar_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autorizacao-saida-liberar/autorizacao-saida-liberar-form.component */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-liberar/autorizacao-saida-liberar-form.component.ts");
/* harmony import */ var _autorizacao_saida_routing_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./autorizacao-saida.routing.module */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.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 AutorizacaoSaidaModule = /** @class */ (function () {
    function AutorizacaoSaidaModule() {
    }
    AutorizacaoSaidaModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _autorizacao_saida_routing_module__WEBPACK_IMPORTED_MODULE_4__["AutorizacaoSaidaRoutingModule"]],
            declarations: [
                _autorizacao_saida_index_autorizacao_saida_index_component__WEBPACK_IMPORTED_MODULE_2__["AutorizacaoSaidaIndexComponent"],
                _autorizacao_saida_liberar_autorizacao_saida_liberar_form_component__WEBPACK_IMPORTED_MODULE_3__["AutorizacaoSaidaLiberarFormComponent"]
            ]
        })
    ], AutorizacaoSaidaModule);
    return AutorizacaoSaidaModule;
}());



/***/ }),

/***/ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.routing.module.ts":
/*!*************************************************************************************!*\
  !*** ./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.routing.module.ts ***!
  \*************************************************************************************/
/*! exports provided: AutorizacaoSaidaRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutorizacaoSaidaRoutingModule", function() { return AutorizacaoSaidaRoutingModule; });
/* 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 _autorizacao_saida_index_autorizacao_saida_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autorizacao-saida-index/autorizacao-saida-index.component */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-index/autorizacao-saida-index.component.ts");
/* harmony import */ var _autorizacao_saida_liberar_autorizacao_saida_liberar_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./autorizacao-saida-liberar/autorizacao-saida-liberar-form.component */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida-liberar/autorizacao-saida-liberar-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: _autorizacao_saida_index_autorizacao_saida_index_component__WEBPACK_IMPORTED_MODULE_3__["AutorizacaoSaidaIndexComponent"],
        data: { breadcrumb: "autorizacaoSaida", formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "liberarVeiculo/:id",
        component: _autorizacao_saida_liberar_autorizacao_saida_liberar_form_component__WEBPACK_IMPORTED_MODULE_4__["AutorizacaoSaidaLiberarFormComponent"],
        data: {
            breadcrumb: "autorizacaoSaida",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var AutorizacaoSaidaRoutingModule = /** @class */ (function () {
    function AutorizacaoSaidaRoutingModule() {
    }
    AutorizacaoSaidaRoutingModule = __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"]],
        })
    ], AutorizacaoSaidaRoutingModule);
    return AutorizacaoSaidaRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.service.ts":
/*!******************************************************************************!*\
  !*** ./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.service.ts ***!
  \******************************************************************************/
/*! exports provided: AutorizacaoSaidaService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutorizacaoSaidaService", function() { return AutorizacaoSaidaService; });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var _pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.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 _autorizacao_saida_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./autorizacao-saida.constants */ "./src/app/pages/balanca/autorizacao-saida/autorizacao-saida.constants.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};










var AutorizacaoSaidaService = /** @class */ (function () {
    function AutorizacaoSaidaService(http, message, materialService, funcoes, loginService) {
        this.http = http;
        this.message = message;
        this.materialService = materialService;
        this.funcoes = funcoes;
        this.loginService = loginService;
        this.constantes = new _autorizacao_saida_constants__WEBPACK_IMPORTED_MODULE_9__["AutorizacaoSaidaConstants"]();
        this.configs = {
            balancaId: 0,
            pesagemAutomatica: false,
            pesagemEntradaEVO: false,
            pesCargaOper: false,
            balCodig: 0,
            bl2Codig: 0,
            bl3Codig: 0,
        };
    }
    AutorizacaoSaidaService.prototype.get = function () {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/balanca/autorizacaoSaida/")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    AutorizacaoSaidaService.prototype.getPesoTara = function (filter) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/balanca/autorizacaoSaida/getPesoTara", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    AutorizacaoSaidaService.prototype.podeLiberar = function (filter) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/balanca/autorizacaoSaida/podeLiberar", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    AutorizacaoSaidaService.prototype.liberaAutorizacao = function (filter) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/balanca/autorizacaoSaida/liberaAutorizacao", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    AutorizacaoSaidaService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__["MaterialService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"] }
    ]; };
    AutorizacaoSaidaService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__["MaterialService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"]])
    ], AutorizacaoSaidaService);
    return AutorizacaoSaidaService;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-balanca-autorizacao-saida-autorizacao-saida-module.js.map