(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-vopak-movimentos-substituir-cliente-venda-substituir-cliente-venda-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda-form/substituir-cliente-venda-form.component.html":
/*!**********************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda-form/substituir-cliente-venda-form.component.html ***!
  \**********************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [sisFormularioId]=\"constantes.sisFormularioId\" [botoesComando]=\"constantes.listaForm\">\n</app-menu-command-bar>\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <app-form-legenda></app-form-legenda>\n            <div class=\"card-body widget-body\">\n                <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n                    <app-validacoes></app-validacoes>\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=\"regPlaneja\" class=\"required\">\n                                    {{ \"labels.numeroOS\" | translate }}\n                                </label>\n                                <div class=\"input-group\">\n                                    <input type=\"text\" id=\"regPlaneja\" name=\"regPlaneja\"\n                                        class=\"form-control form-control-sm\" required=\"true\"\n                                        [(ngModel)]=\"data.regPlaneja\" mask=\"999999999\" (blur)=\"pesquisaNumeroOS()\">\n                                    <div class=\"input-group-prepend\">\n                                        <button type=\"button\" class=\"input-group-text\" data-toggle=\"modal\"\n                                            (click)=\"pesquisaNumeroOS()\">\n                                            <i class=\"fa fa-search\"></i>\n                                        </button>\n                                    </div>\n                                </div>\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=\"registro\">{{'labels.registro' | translate}}</label>\n                                <input id=\"registro\" name=\"registro\" [(ngModel)]=\"data.entradaVeiculoId\"\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-sm-12\">\n                            <app-input-description label=\"cliente\" [valueID]=\"data.destinatarioIdCliente\"\n                                [valueDescription]=\"data.cliente\">\n                            </app-input-description>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-sm-12\">\n                            <app-input-description label=\"motorista\" [valueID]=\"data.motoristaId\"\n                                [valueDescription]=\"data.nomeMoto\">\n                            </app-input-description>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-sm-12\">\n                            <app-input-description label=\"transportadora\"\n                                [valueID]=\"data.destinatarioIdTransportadora\" [valueDescription]=\"data.nomeTransp\">\n                            </app-input-description>\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=\"placaCavalo\">{{'labels.placaCavalo' | translate}}</label>\n                                <input id=\"placaCavalo\" name=\"placaCavalo\" [(ngModel)]=\"data.cadastroPlacaIdCavalo\"\n                                    class=\"form-control form-control-sm\" type=\"text\" 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=\"placaCarreta1\">{{'labels.placaCarreta1' | translate}}</label>\n                                <input id=\"placaCarreta1\" name=\"placaCarreta1\"\n                                    [(ngModel)]=\"data.cadastroPlacaIdCarreta1\" class=\"form-control form-control-sm\"\n                                    type=\"text\" disabled>\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=\"placaCarreta2\">{{'labels.placaCarreta2' | translate}}</label>\n                                <input id=\"placaCarreta2\" name=\"placaCarreta2\"\n                                    [(ngModel)]=\"data.cadastroPlacaIdCarreta2\" class=\"form-control form-control-sm\"\n                                    type=\"text\" disabled>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-destinatario id=\"clienteVenda\"\n                                    name=\"clienteVenda\" showCgcCpf=\"false\" showInscricao=\"false\"\n                                    label=\"clienteVenda\" modalTitle=\"pesquisaDeCliente\" tipoDestinatario=\"C\"\n                                    [inSelected]=\"data.clienteVenda\" [(ngModel)]=\"data.destinatarioIdClienteVenda\"\n                                    [disabled]=\"!podeAlterar\"\n                                    [required]=\"true\">\n                                </app-pesquisa-destinatario>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"clearfix\">&nbsp;</div>\n                    <div class=\"form-group\">\n                        <button class=\"btn btn-success mr-2\" type=\"submit\" [disabled]=\"!podeAlterar\">\n                            {{ 'buttons.alterar' | translate }}\n                        </button>\n                        <button class=\"btn btn-default\" type=\"button\" [disabled]=\"!podeAlterar\" (click)=\"limpaCampos()\">\n                            {{ 'buttons.cancelar' | translate }}\n                        </button>\n                    </div>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>");

/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda-form/substituir-cliente-venda-form.component.ts":
/*!******************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda-form/substituir-cliente-venda-form.component.ts ***!
  \******************************************************************************************************************************************************/
/*! exports provided: SubstituirClienteVendaFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirClienteVendaFormComponent", function() { return SubstituirClienteVendaFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* 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_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_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_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _substituir_cliente_venda_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../substituir-cliente-venda.model */ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.model.ts");
/* harmony import */ var _substituir_cliente_venda_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../substituir-cliente-venda.constants */ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.constants.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_10__ = __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 _substituir_cliente_venda_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../substituir-cliente-venda.service */ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.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 SubstituirClienteVendaFormComponent = /** @class */ (function (_super) {
    __extends(SubstituirClienteVendaFormComponent, _super);
    function SubstituirClienteVendaFormComponent(funcoes, permissoesUtils, loginService, messageService, service, destinatarioService) {
        var _this = _super.call(this, new _substituir_cliente_venda_constants__WEBPACK_IMPORTED_MODULE_9__["SubstituirClienteVendaConstants"](), funcoes) || this;
        _this.funcoes = funcoes;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.messageService = messageService;
        _this.service = service;
        _this.destinatarioService = destinatarioService;
        _this.data = new _substituir_cliente_venda_model__WEBPACK_IMPORTED_MODULE_8__["SubstituirClienteVenda"]();
        _this.mensagens = [];
        _this.constantes = new _substituir_cliente_venda_constants__WEBPACK_IMPORTED_MODULE_9__["SubstituirClienteVendaConstants"]();
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__["Mascaras"]();
        _this.podeAlterar = false;
        _this.target = _this.funcoesService.getTargetLocation();
        return _this;
    }
    SubstituirClienteVendaFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () { }, function () { return _this.permissoesUtils.back(); }, true);
    };
    SubstituirClienteVendaFormComponent.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.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () { return __awaiter(_this, void 0, void 0, function () {
            var validationResult, mensagens, message;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.podeAlteraClienteVenda({
                            entradaVeiculoId: this.data.entradaVeiculoId,
                            item: this.data.item,
                            destinatarioIdClienteVenda: this.data.destinatarioIdClienteVenda
                        }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.messageService.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.messageService.warning("titles.substituirClienteVenda", m); });
                            return [2 /*return*/];
                        }
                        message = this.messageService.translate("messages.confirmaAlteracaoDoClienteVenda");
                        this.messageService.confirm("titles.substituirClienteVenda", message, null, function () {
                            _this.executeAlteracaoClienteVenda();
                        });
                        return [2 /*return*/];
                }
            });
        }); });
    };
    SubstituirClienteVendaFormComponent.prototype.executeAlteracaoClienteVenda = 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.alteraClienteVenda({
                            entradaVeiculoId: this.data.entradaVeiculoId,
                            destinatarioIdClienteVenda: this.data.destinatarioIdClienteVenda
                        }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.messageService.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.messageService.warning("titles.substituirClienteVenda", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.messageService.success("titles.substituirClienteVenda", "messages.clienteDeVendaSubstituidoComSucesso");
                            this.pesquisaNumeroOS();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    SubstituirClienteVendaFormComponent.prototype.pesquisaNumeroOS = function () {
        var _this = this;
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_10__["NumberUtilsStaticService"].isPositive(this.data.regPlaneja)) {
            this.service.getByNumeroOS({ regPlaneja: this.data.regPlaneja }).subscribe(function (resp) {
                if (resp) {
                    _this.data = resp;
                    if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_10__["NumberUtilsStaticService"].isPositive(resp.destinatarioIdClienteVenda)) {
                        _this.destinatarioService.getById(resp.destinatarioIdClienteVenda).subscribe(function (r) {
                            _this.data.clienteVenda = r;
                        });
                    }
                    if ([1090, 1091].includes(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_10__["NumberUtilsStaticService"].toNumber(_this.data.situacaoVeiculoId))) {
                        _this.messageService.warning("titles.substituirClienteVenda", "messages.alteracaoNaoPermitidaOperacaoCancelada");
                        return;
                    }
                    else if (_this.data.situacaoVeiculoId === 12) {
                        _this.messageService.warning("titles.substituirClienteVenda", "messages.alteracaoNaoPermitidaCheckListReprovado");
                        return;
                    }
                    if (_this.data.tipoMov === "D") {
                        _this.messageService.warning("titles.substituirClienteVenda", "messages.alteracaoNaoPermitidaInformeOSDeCarga");
                        return;
                    }
                    _this.podeAlterar = true;
                }
                else {
                    _this.messageService.warning("titles.substituirClienteVenda", "messages.numeroOSNaoEncontradaOuAguardandoCheckin");
                    _this.limpaCampos();
                    return;
                }
            });
        }
        else {
            this.messageService.warning("titles.substituirClienteVenda", "messages.informeNumeroDaOrdemDeServico");
            this.limpaCampos();
            return;
        }
    };
    SubstituirClienteVendaFormComponent.prototype.limpaCampos = function () {
        this.data = new _substituir_cliente_venda_model__WEBPACK_IMPORTED_MODULE_8__["SubstituirClienteVenda"]();
        this.podeAlterar = false;
    };
    SubstituirClienteVendaFormComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    SubstituirClienteVendaFormComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_3__["PermissoesUtilsService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _substituir_cliente_venda_service__WEBPACK_IMPORTED_MODULE_11__["SubstituirClienteVendaService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_12__["DestinatarioService"] }
    ]; };
    SubstituirClienteVendaFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-substituir-cliente-venda-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./substituir-cliente-venda-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda-form/substituir-cliente-venda-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_3__["PermissoesUtilsService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _substituir_cliente_venda_service__WEBPACK_IMPORTED_MODULE_11__["SubstituirClienteVendaService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_12__["DestinatarioService"]])
    ], SubstituirClienteVendaFormComponent);
    return SubstituirClienteVendaFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.constants.ts":
/*!*******************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.constants.ts ***!
  \*******************************************************************************************************************/
/*! exports provided: SubstituirClienteVendaConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirClienteVendaConstants", function() { return SubstituirClienteVendaConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var SubstituirClienteVendaConstants = /** @class */ (function () {
    function SubstituirClienteVendaConstants() {
        this.sisFormularioId = 65451;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.substituirClienteVenda";
        this.reportId = "0";
        this.reportTitulo = { "titulo": "", "subTitulo": "" };
        this.listaForm = [
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' }
        ];
    }
    return SubstituirClienteVendaConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.model.ts":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.model.ts ***!
  \***************************************************************************************************************/
/*! exports provided: SubstituirClienteVenda */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirClienteVenda", function() { return SubstituirClienteVenda; });
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var SubstituirClienteVenda = /** @class */ (function () {
    function SubstituirClienteVenda() {
        this.regPlaneja = "";
        this.entradaVeiculoId = "";
        this.destinatarioIdCliente = "";
        this.cliente = "";
        this.motoristaId = "";
        this.nomeMoto = "";
        this.destinatarioIdTransportadora = "";
        this.cadastroPlacaIdCavalo = "";
        this.cadastroPlacaIdCarreta1 = "";
        this.cadastroPlacaIdCarreta2 = "";
        this.destinatarioIdClienteVenda = "";
        this.clienteVenda = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
    }
    return SubstituirClienteVenda;
}());



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.module.ts":
/*!****************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.module.ts ***!
  \****************************************************************************************************************/
/*! exports provided: SubstituirClienteVendaModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirClienteVendaModule", function() { return SubstituirClienteVendaModule; });
/* 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 _substituir_cliente_venda_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./substituir-cliente-venda.routing.module */ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.routing.module.ts");
/* harmony import */ var _substituir_cliente_venda_form_substituir_cliente_venda_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./substituir-cliente-venda-form/substituir-cliente-venda-form.component */ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda-form/substituir-cliente-venda-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 SubstituirClienteVendaModule = /** @class */ (function () {
    function SubstituirClienteVendaModule() {
    }
    SubstituirClienteVendaModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _substituir_cliente_venda_routing_module__WEBPACK_IMPORTED_MODULE_2__["SubstituirClienteVendaRoutingModule"]],
            declarations: [_substituir_cliente_venda_form_substituir_cliente_venda_form_component__WEBPACK_IMPORTED_MODULE_3__["SubstituirClienteVendaFormComponent"]]
        })
    ], SubstituirClienteVendaModule);
    return SubstituirClienteVendaModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.routing.module.ts":
/*!************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.routing.module.ts ***!
  \************************************************************************************************************************/
/*! exports provided: SubstituirClienteVendaRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirClienteVendaRoutingModule", function() { return SubstituirClienteVendaRoutingModule; });
/* 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 _substituir_cliente_venda_form_substituir_cliente_venda_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./substituir-cliente-venda-form/substituir-cliente-venda-form.component */ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda-form/substituir-cliente-venda-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: _substituir_cliente_venda_form_substituir_cliente_venda_form_component__WEBPACK_IMPORTED_MODULE_3__["SubstituirClienteVendaFormComponent"],
        data: { breadcrumb: "substituirClienteVenda", formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    }
];
var SubstituirClienteVendaRoutingModule = /** @class */ (function () {
    function SubstituirClienteVendaRoutingModule() {
    }
    SubstituirClienteVendaRoutingModule = __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"]],
        })
    ], SubstituirClienteVendaRoutingModule);
    return SubstituirClienteVendaRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.service.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/substituir-cliente-venda/substituir-cliente-venda.service.ts ***!
  \*****************************************************************************************************************/
/*! exports provided: SubstituirClienteVendaService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirClienteVendaService", function() { return SubstituirClienteVendaService; });
/* 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_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/base/specifics.base.service */ "./src/app/shared/services/base/specifics.base.service.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};






var SubstituirClienteVendaService = /** @class */ (function (_super) {
    __extends(SubstituirClienteVendaService, _super);
    function SubstituirClienteVendaService(http) {
        var _this = _super.call(this, http, "vopak/substituirClienteVenda") || this;
        _this.http = http;
        return _this;
    }
    SubstituirClienteVendaService.prototype.getByNumeroOS = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/vopak/substituirClienteVenda/getByNumeroOS", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    SubstituirClienteVendaService.prototype.podeAlteraClienteVenda = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/vopak/substituirClienteVenda/podeAlteraClienteVenda", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    SubstituirClienteVendaService.prototype.alteraClienteVenda = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/vopak/substituirClienteVenda/alteraClienteVenda", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    SubstituirClienteVendaService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] }
    ]; };
    SubstituirClienteVendaService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"]])
    ], SubstituirClienteVendaService);
    return SubstituirClienteVendaService;
}(app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_2__["SpecificsBaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-vopak-movimentos-substituir-cliente-venda-substituir-cliente-venda-module.js.map