(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-vopak-movimentos-suspensao-de-os-suspensao-de-os-module"],{

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"suspensao-de-os-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-40\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.suspensaoDeOs' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"periodoDe\" class=\"required\">{{\"labels.periodoDe\" | translate }}</label>\r\n                                <app-data id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"service.filter.dataI\" autofocus\r\n                                    class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\"\r\n                                    (executa)=\"validaDatas()\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"ate\" class=\"required\">{{\"labels.ate\" | translate}}</label>\r\n                                <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"service.filter.dataF\" class=\"dataHora\"\r\n                                    [formatDateTime]=\"mascara.getFormatData\" required=\"true\" (executa)=\"validaDatas()\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <div class=\"custom-control custom-radio custom-control-inline\">\r\n                                    <input class=\"custom-control-input radio-success\" id=\"tipoDataE\" name=\"tipoData\"\r\n                                        [(ngModel)]=\"service.filter.tipoData\" type=\"radio\" value=\"0\">\r\n                                    <label class=\"custom-control-label\" for=\"tipoDataE\">{{\r\n                                        'labels.dtEmis' |\r\n                                        translate }}\r\n                                    </label>\r\n                                </div>\r\n                                <div class=\"custom-control custom-radio custom-control-inline\">\r\n                                    <input class=\"custom-control-input radio-success\" id=\"tipoDataC\" name=\"tipoData\"\r\n                                        [(ngModel)]=\"service.filter.tipoData\" type=\"radio\" value=\"1\">\r\n                                    <label class=\"custom-control-label\" for=\"tipoDataC\">{{\r\n                                        'labels.dataPrevisaoDeChegada' |\r\n                                        translate }}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" tipoDestinatario=\"C\"\r\n                                    modalTitle=\"pesquisaDeCliente\" label=\"cliente\"\r\n                                    [(ngModel)]=\"service.filter.destinatarioIdCliente\" showInscricao=\"false\"\r\n                                    showCgcCpf=\"false\" [inSelected]=\"service.filter.cliente\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-material id=\"materialId\" name=\"materialId\" label=\"produto\"\r\n                                    [inSelected]=\"service.filter.material\" modalTitle=\"pesquisaDeProduto\"\r\n                                    [(ngModel)]=\"service.filter.materialId\">\r\n                                </app-pesquisa-material>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-8 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"situacao\">{{ \"labels.situacao\" | translate}}</label>\r\n                                <select id=\"situacao\" [(ngModel)]=\"service.filter.situacao\"\r\n                                    class=\"form-control form-control-sm\" name=\"situacao\"\r\n                                    data-title=\"{{ 'labels.situacao' | translate }}\">\r\n                                    <option *ngFor=\"let t of situacao.get\" value=\"{{ t.id }}\">\r\n                                        {{ t.descricao }}\r\n                                    </option>\r\n                                </select>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{ 'buttons.sair' | translate\r\n                        }}</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\" [formAction]=\"actionForm\" [itemData]=\"data.regPlaneja\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <div class=\"card-body widget-body\">\n                <div class=\"row\">\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"numeroOS\">{{'labels.numeroOS' | translate}}</label>\n                            <input id=\"numeroOS\" name=\"numeroOS\" [(ngModel)]=\"data.regPlaneja\"\n                                class=\"form-control form-control-sm\" type=\"text\" disabled>\n                        </div>\n                    </div>\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"emissao\">{{'labels.emissao' | translate}}</label>\n                            <input id=\"emissao\" name=\"emissao\" value=\"{{data.dtEmissao | date:'dd/MM/yyyy HH:mm:ss'}}\"\n                                class=\"form-control form-control-sm\" type=\"text\" disabled\n                                data-title=\"{{'labels.emissao' | translate}}\">\n                        </div>\n                    </div>\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"previsaoChegada\">{{'labels.previsaoChegada' | translate}}</label>\n                            <input id=\"previsaoChegada\" name=\"previsaoChegada\"\n                                value=\"{{data.dtPrevisaoChegada | date:'dd/MM/yyyy HH:mm:ss'}}\"\n                                class=\"form-control form-control-sm\" type=\"text\" disabled\n                                data-title=\"{{'labels.previsaoChegada' | translate}}\">\n                        </div>\n                    </div>\n                </div>\n                <div class=\"row\">\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"tipoOperacao\">{{'labels.tipoOperacao' | translate}}</label>\n                            <input id=\"tipoOperacao\" name=\"tipoOperacao\" [(ngModel)]=\"data.tipo\"\n                                class=\"form-control form-control-sm\" type=\"text\" disabled>\n                        </div>\n                    </div>\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"planejamento\">{{'labels.planejamento' | translate}}</label>\n                            <input id=\"planejamento\" name=\"planejamento\" [(ngModel)]=\"data.regPlanejCarga\"\n                                class=\"form-control form-control-sm\" type=\"text\" disabled>\n                        </div>\n                    </div>\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"shipment\">{{'labels.shipment' | translate}}</label>\n                            <input id=\"shipment\" name=\"shipment\" [(ngModel)]=\"data.shipment\"\n                                class=\"form-control form-control-sm\" type=\"text\" disabled currencyMask\n                                [options]=\"funcoesService.numberUtils.formatCurrency(0)\">\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=\"produto\" [valueID]=\"data.materialId\"\n                            [valueDescription]=\"data.produto\">\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.nomeMotorista\">\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\" [valueID]=\"data.transportadoraId\"\n                            [valueDescription]=\"data.razaoTransp\">\n                        </app-input-description>\n                    </div>\n                </div>\n                <div class=\"row\">\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"cavalo\">{{'labels.cavalo' | translate}}</label>\n                            <input id=\"cavalo\" name=\"cavalo\" [(ngModel)]=\"data.placaCavalo\"\n                                class=\"form-control form-control-sm\" type=\"text\" disabled>\n                        </div>\n                    </div>\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"carreta1\">{{'labels.carreta1' | translate}}</label>\n                            <input id=\"carreta1\" name=\"carreta1\" [(ngModel)]=\"data.placaCarreta1\"\n                                class=\"form-control form-control-sm\" type=\"text\" disabled>\n                        </div>\n                    </div>\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"carreta2\">{{'labels.carreta2' | translate}}</label>\n                            <input id=\"carreta2\" name=\"carreta2\" [(ngModel)]=\"data.placaCarreta2\"\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-md-12 col-sm-12\">\n                        <div class=\"form-group\">\n                            <label for=\"observ100\">{{'labels.observacao' | translate}}</label>\n                            <textarea id=\"observ100\" name=\"observ100\" [(ngModel)]=\"data.observ100\" maxlength=\"100\"\n                                class=\"form-control form-control-sm\" rows=\"2\" disabled></textarea>\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                            <label class=\"required\" for=\"motivoSuspensao\">{{\"labels.motivoSuspensao\" | translate\n                                }}</label>\n                            <app-combo-padrao name=\"motivoSuspensao\" id=\"motivoSuspensao\" #motivoSuspensao\n                                [disabled]=\"!isEdit\" chave=\"RegMotivo\" descricao=\"DescrMotivo\" ativo=\"true\"\n                                tabela=\"CliVopMotivoSuspensaoOs\" [required]=\"true\" [(ngModel)]=\"data.regMotivo\">\n                            </app-combo-padrao>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"row mt-2\">\n                    <div class=\"col-lg-6\">\n                        <div class=\"form-group form-group-sm\">\n                            <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"gravar()\"\n                                [disabled]=\"!isEdit\">{{\n                                'buttons.gravar' | translate }}\n                            </button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\" [formAction]=\"actionForm\" [itemData]=\"data.regPlaneja\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtSuspensaoDeOs\" 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<app-suspensao-de-os-filter (filtrar)=\"executaFiltro()\"></app-suspensao-de-os-filter>");

/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-filter/suspensao-de-os-filter.component.ts":
/*!*******************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-filter/suspensao-de-os-filter.component.ts ***!
  \*******************************************************************************************************************************/
/*! exports provided: SuspensaoDeOsFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspensaoDeOsFilterComponent", function() { return SuspensaoDeOsFilterComponent; });
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* 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_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _suspensao_de_os_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../suspensao-de-os.service */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../suspensao-de-os.model */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.model.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};








var SuspensaoDeOsFilterComponent = /** @class */ (function () {
    function SuspensaoDeOsFilterComponent(service, messageService, funcoes) {
        this.service = service;
        this.messageService = messageService;
        this.funcoes = funcoes;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_4__["Mascaras"]();
        this.situacao = new _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_7__["SuspensaoDeOsSituacao"]();
    }
    SuspensaoDeOsFilterComponent.prototype.ngOnInit = function () {
        if (!this.service.filter) {
            this.service.filter = new _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_7__["SuspensaoDeOsFilter"]();
        }
    };
    SuspensaoDeOsFilterComponent.prototype.onSubmit = function (form) {
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formError").emit(form);
        if (!this.validaDatas()) {
            return;
        }
        if (form.invalid) {
            return;
        }
        this.filtrar.emit();
        jQuery("#suspensao-de-os-filter-dialog").modal('hide');
    };
    SuspensaoDeOsFilterComponent.prototype.validaDatas = function () {
        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_5__["DateTimeUtilsStaticService"].menorA(this.service.filter.dataF, this.service.filter.dataI, ['H', 'M'])) {
            this.messageService.warning("titles.suspensaoDeOs", "messages.periodoDeMaiorQueAte");
            return false;
        }
        return true;
    };
    SuspensaoDeOsFilterComponent.ctorParameters = function () { return [
        { type: _suspensao_de_os_service__WEBPACK_IMPORTED_MODULE_3__["SuspensaoDeOsService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_0__["MessageService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], SuspensaoDeOsFilterComponent.prototype, "filtrar", void 0);
    SuspensaoDeOsFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: 'app-suspensao-de-os-filter',
            template: __importDefault(__webpack_require__(/*! raw-loader!./suspensao-de-os-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-filter/suspensao-de-os-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_suspensao_de_os_service__WEBPACK_IMPORTED_MODULE_3__["SuspensaoDeOsService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_0__["MessageService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"]])
    ], SuspensaoDeOsFilterComponent);
    return SuspensaoDeOsFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-form/suspensao-de-os-form.component.ts":
/*!***************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-form/suspensao-de-os-form.component.ts ***!
  \***************************************************************************************************************************/
/*! exports provided: SuspensaoDeOsFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspensaoDeOsFormComponent", function() { return SuspensaoDeOsFormComponent; });
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_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 app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../suspensao-de-os.model */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.model.ts");
/* harmony import */ var _suspensao_de_os_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../suspensao-de-os.constants */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.constants.ts");
/* harmony import */ var _suspensao_de_os_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../suspensao-de-os.service */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.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 SuspensaoDeOsFormComponent = /** @class */ (function (_super) {
    __extends(SuspensaoDeOsFormComponent, _super);
    function SuspensaoDeOsFormComponent(router, messageService, activatedRoute, service, funcoesService, permissoesUtils, destinatarioService, materialService) {
        var _this = _super.call(this, new _suspensao_de_os_constants__WEBPACK_IMPORTED_MODULE_10__["SuspensaoDeOsConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.destinatarioService = destinatarioService;
        _this.materialService = materialService;
        _this.data = new _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_9__["SuspensaoDeOs"]();
        _this.mensagens = [];
        _this.constantes = new _suspensao_de_os_constants__WEBPACK_IMPORTED_MODULE_10__["SuspensaoDeOsConstants"]();
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["Mascaras"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/vopak/movimentos/suspensaoDeOs";
        _this.suspenderOs = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 5, 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.verifSeExisteSuspensao({
                                regPlaneja: this.data.regPlaneja,
                                acao: "suspenderOs"
                            }).toPromise()];
                        case 1:
                            validationResult = _a.sent();
                            if (!validationResult.isValid) {
                                mensagens = this.messageService.validationResult(validationResult);
                                mensagens.forEach(function (m) { return _this.messageService.warning("titles.suspensaoDeOs", m); });
                                return [2 /*return*/];
                            }
                            if (this.data.flagStatus === "CE") {
                                this.messageService.warning("titles.suspensaoDeOs", "messages.ordemDeServico", { flagStatus: this.data.situacao });
                                return [2 /*return*/];
                            }
                            this.suspendeOs();
                            return [2 /*return*/];
                    }
                });
            }); });
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    SuspensaoDeOsFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        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.service.getById(id).subscribe(function (resp) {
                    if (resp) {
                        _this.data = resp;
                        if (_this.actionForm === app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["ActionForm"].edit) {
                            setTimeout(function () {
                                _this.scrollAndFocusComboMotivoSuspensao();
                            });
                        }
                    }
                    else {
                        _this.messageService.warning("titles.suspensaoDeOs", "messages.nenhumRegistroEncontrado");
                        _this.back();
                    }
                });
            }
        }, function () {
            _this.permissoesUtils.back();
        });
        _super.prototype.addFuncoes.call(this, [
            { action: 'suspenderOs', func: function () { return _this.suspenderOs; } }
        ]);
    };
    SuspensaoDeOsFormComponent.prototype.suspendeOs = function () {
        this.router.navigate(["" + this.target + this.pageRoute + "/edit/" + this.data.regPlaneja]);
    };
    SuspensaoDeOsFormComponent.prototype.scrollAndFocusComboMotivoSuspensao = function () {
        if (this.comboMotivoSuspensao && this.comboMotivoSuspensao.nativeElement) {
            var appComboPadrao = this.comboMotivoSuspensao.nativeElement;
            appComboPadrao.scrollIntoView({ behavior: 'smooth', block: 'start' });
            var comboMotivoSuspensao = appComboPadrao.querySelector('app-combo-padrao');
            if (comboMotivoSuspensao) {
                comboMotivoSuspensao.focus();
            }
        }
    };
    SuspensaoDeOsFormComponent.prototype.gravar = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.data.regMotivo) {
                _this.messageService.warning("titles.suspensaoDeOs", "messages.campoObrigatorio", { name: _this.messageService.translate('labels.motivoSuspensao') });
                return;
            }
            _this.messageService.confirm("titles.suspensaoDeOs", "messages.confirmaSuspensaoDaOs", null, function () {
                _this.executaSuspensaoDaOs();
            });
        });
    };
    SuspensaoDeOsFormComponent.prototype.executaSuspensaoDaOs = 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.suspenderOs({
                            regPlaneja: this.data.regPlaneja,
                            regMotivo: this.data.regMotivo
                        }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.messageService.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.messageService.warning("titles.suspensaoDeOs", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.messageService.success("titles.suspensaoDeOs", "messages.suspensaoDaOsRealizadaComSucesso");
                            this.back();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    SuspensaoDeOsFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    SuspensaoDeOsFormComponent.prototype.edit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            if (!!(_this.data.regPlaneja)) {
                _this.router.navigate(["" + _this.target + _this.pageRoute + "/edit/" + _this.data.regPlaneja]);
            }
        });
    };
    Object.defineProperty(SuspensaoDeOsFormComponent.prototype, "isEdit", {
        get: function () {
            return this.actionForm === 1;
        },
        enumerable: true,
        configurable: true
    });
    SuspensaoDeOsFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"] },
        { type: _suspensao_de_os_service__WEBPACK_IMPORTED_MODULE_11__["SuspensaoDeOsService"] },
        { type: app_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_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_0__["MaterialService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('motivoSuspensao', { static: false, read: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"] }),
        __metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"])
    ], SuspensaoDeOsFormComponent.prototype, "comboMotivoSuspensao", void 0);
    SuspensaoDeOsFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-suspensao-de-os-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./suspensao-de-os-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-form/suspensao-de-os-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"],
            _suspensao_de_os_service__WEBPACK_IMPORTED_MODULE_11__["SuspensaoDeOsService"],
            app_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_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_0__["MaterialService"]])
    ], SuspensaoDeOsFormComponent);
    return SuspensaoDeOsFormComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-index/suspensao-de-os-index.component.ts":
/*!*****************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-index/suspensao-de-os-index.component.ts ***!
  \*****************************************************************************************************************************/
/*! exports provided: SuspensaoDeOsIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspensaoDeOsIndexComponent", function() { return SuspensaoDeOsIndexComponent; });
/* 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_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_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_5__ = __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 app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __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 app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../suspensao-de-os.model */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.model.ts");
/* harmony import */ var _suspensao_de_os_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../suspensao-de-os.constants */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.constants.ts");
/* harmony import */ var _suspensao_de_os_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../suspensao-de-os.service */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.service.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.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 SuspensaoDeOsIndexComponent = /** @class */ (function (_super) {
    __extends(SuspensaoDeOsIndexComponent, _super);
    function SuspensaoDeOsIndexComponent(router, service, message, funcoes, datatables, loginService, permissoesUtils) {
        var _this = _super.call(this, new _suspensao_de_os_constants__WEBPACK_IMPORTED_MODULE_10__["SuspensaoDeOsConstants"](), funcoes) || this;
        _this.router = router;
        _this.service = service;
        _this.message = message;
        _this.funcoes = funcoes;
        _this.datatables = datatables;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.data = new _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_9__["SuspensaoDeOs"]();
        _this.constantes = new _suspensao_de_os_constants__WEBPACK_IMPORTED_MODULE_10__["SuspensaoDeOsConstants"]();
        _this.mensagens = [];
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/vopak/movimentos/suspensaoDeOs";
        _this.suspenderOs = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 5, 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.verifSeExisteSuspensao({
                                regPlaneja: this.data.regPlaneja,
                                acao: "suspenderOs"
                            }).toPromise()];
                        case 1:
                            validationResult = _a.sent();
                            if (!validationResult.isValid) {
                                mensagens = this.message.validationResult(validationResult);
                                mensagens.forEach(function (m) { return _this.message.warning("titles.suspensaoDeOs", m); });
                                return [2 /*return*/];
                            }
                            if (this.data.flagStatus === "CE") {
                                this.message.warning("titles.suspensaoDeOs", "messages.ordemDeServico", { flagStatus: this.data.situacao });
                                return [2 /*return*/];
                            }
                            this.suspendeOs();
                            return [2 /*return*/];
                    }
                });
            }); });
        };
        _this.cancelarSuspensaoDaOs = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 6, 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.verifSeExisteSuspensao({
                                regPlaneja: this.data.regPlaneja,
                                acao: "cancelarSuspensaoDaOs"
                            }).toPromise()];
                        case 1:
                            validationResult = _a.sent();
                            if (!validationResult.isValid) {
                                mensagens = this.message.validationResult(validationResult);
                                mensagens.forEach(function (m) { return _this.message.warning("titles.suspensaoDeOs", m); });
                                return [2 /*return*/];
                            }
                            this.message.confirm("titles.suspensaoDeOs", "messages.confirmaCancelamentoDaSuspensaoDaOs", null, function () {
                                _this.executaCancelamentoDaSuspensaoDaOs();
                            });
                            return [2 /*return*/];
                    }
                });
            }); });
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    SuspensaoDeOsIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoes.abrirFiltro) {
                    _this.service.filter = new _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_9__["SuspensaoDeOsFilter"]();
                    _this.funcoes.openModal("suspensao-de-os-filter-dialog");
                }
                else {
                    _this.refresh();
                }
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'suspenderOs', func: function () { return _this.suspenderOs; } },
            { action: 'cancelarSuspensaoDaOs', func: function () { return _this.cancelarSuspensaoDaOs; } }
        ]);
    };
    SuspensaoDeOsIndexComponent.prototype.suspendeOs = function () {
        this.router.navigate(["" + this.target + this.pageRoute + "/edit/" + this.data.regPlaneja]);
    };
    SuspensaoDeOsIndexComponent.prototype.executaCancelamentoDaSuspensaoDaOs = 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.cancelarSuspensaoDaOs(this.data.regPlaneja).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.suspensaoDeOs", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.message.success("titles.suspensaoDeOs", "messages.cancelamentoDaSuspensaoDaOsRealizadaComSucesso");
                            this.refresh();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    SuspensaoDeOsIndexComponent.prototype.filtrar = function () {
        jQuery("#suspensao-de-os-filter-dialog").modal('show');
    };
    SuspensaoDeOsIndexComponent.prototype.executaFiltro = function () {
        this.refresh();
    };
    SuspensaoDeOsIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.data = new _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_9__["SuspensaoDeOs"]();
        this.service.getDados(this.service.filter).subscribe(function (data) {
            var columns = [
                _this.datatables.getDataString("regPlaneja", "numeroOS"),
                _this.datatables.getDataString("tipo", "tipo"),
                _this.datatables.getDataDateTime("dtEmissao", "emissao", "DD/MM/YYYY HH:mm:ss", "15%"),
                _this.datatables.getDataDateTime("dtPrevisaoChegada", "prevChegada", "DD/MM/YYYY HH:mm:ss", "15%"),
                _this.datatables.getDataString("cliente", "cliente"),
                _this.datatables.getDataString("produto", "produto"),
                _this.datatables.getDataString("nomeMotorista", "motorista"),
                _this.datatables.getDataString("razaoTransp", "transportadora"),
                _this.datatables.getDataString("placaCavalo", "cavalo"),
                _this.datatables.getDataString("placaCarreta1", "carreta1"),
                _this.datatables.getDataString("placaCarreta2", "carreta2"),
                _this.datatables.getDataString("situacao", "situacao")
            ];
            _this.datatables.toDataTable({ tableId: "dtSuspensaoDeOs", columns: columns, data: data, columnOrder: 0, orientationOrder: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_12__["EOrientationOrder"].ASC }, function (aData) {
                _this.data = aData;
            });
        });
    };
    SuspensaoDeOsIndexComponent.prototype.edit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            if (!!(_this.data.regPlaneja)) {
                _this.router.navigate(["" + _this.target + _this.pageRoute + "/edit/" + _this.data.regPlaneja]);
            }
        });
    };
    SuspensaoDeOsIndexComponent.prototype.detail = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            if (!!(_this.data.regPlaneja)) {
                _this.router.navigate(["" + _this.target + _this.pageRoute + "/detail/" + _this.data.regPlaneja]);
            }
        });
    };
    SuspensaoDeOsIndexComponent.prototype.print = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
            _this.constantes.paramRelatorio = {
                filialId: _this.loginService.getLogin().filialId,
                dataI: _this.service.filter.dataI,
                dataF: _this.service.filter.dataF,
                destinatarioIdCliente: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_5__["NumberUtilsStaticService"].toNumber(_this.service.filter.destinatarioIdCliente),
                materialId: app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["StringUtilsStaticService"].toString(_this.service.filter.materialId),
                tipoData: app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["StringUtilsStaticService"].toString(_this.service.filter.tipoData),
                situacao: app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["StringUtilsStaticService"].toString(_this.service.filter.situacao),
            };
            _super.prototype.print.call(_this, null, true);
        });
    };
    SuspensaoDeOsIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    SuspensaoDeOsIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _suspensao_de_os_service__WEBPACK_IMPORTED_MODULE_11__["SuspensaoDeOsService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_12__["DatatablesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] }
    ]; };
    SuspensaoDeOsIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-suspensao-de-os-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./suspensao-de-os-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-index/suspensao-de-os-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _suspensao_de_os_service__WEBPACK_IMPORTED_MODULE_11__["SuspensaoDeOsService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_12__["DatatablesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"]])
    ], SuspensaoDeOsIndexComponent);
    return SuspensaoDeOsIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.constants.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.constants.ts ***!
  \*************************************************************************************************/
/*! exports provided: SuspensaoDeOsConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspensaoDeOsConstants", function() { return SuspensaoDeOsConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var SuspensaoDeOsConstants = /** @class */ (function () {
    function SuspensaoDeOsConstants() {
        this.sisFormularioId = 65543;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.suspenderOs" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.cancelarSuspensaoDaOs" }
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.suspensaoDeOs";
        this.reportId = "VOP0053";
        this.reportTitulo = { 'titulo': 'Suspensão de OS', 'subTitulo': '' };
        this.listaIndex = [
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'SuspenderOs', action: 'suspenderOs', icon: "fa fa-hand-paper-o", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'CancelarSuspensaoDaOs', action: 'cancelarSuspensaoDaOs', icon: "icon-na", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'SuspenderOs', action: 'suspenderOs', icon: "fa fa-hand-paper-o", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' }
        ];
    }
    return SuspensaoDeOsConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.model.ts":
/*!*********************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.model.ts ***!
  \*********************************************************************************************/
/*! exports provided: SuspensaoDeOs, SuspensaoDeOsFilter, SuspensaoDeOsSituacao */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspensaoDeOs", function() { return SuspensaoDeOs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspensaoDeOsFilter", function() { return SuspensaoDeOsFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspensaoDeOsSituacao", function() { return SuspensaoDeOsSituacao; });
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.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 __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};


var SuspensaoDeOs = /** @class */ (function (_super) {
    __extends(SuspensaoDeOs, _super);
    function SuspensaoDeOs() {
        return _super.call(this) || this;
    }
    return SuspensaoDeOs;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var SuspensaoDeOsFilter = /** @class */ (function () {
    function SuspensaoDeOsFilter() {
        this.dataI = app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_1__["DateTimeUtilsStaticService"].addDays(new Date(), -1);
        this.dataF = app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_1__["DateTimeUtilsStaticService"].getFinalDay();
        this.destinatarioIdCliente = 0;
        this.materialId = "";
        this.tipoData = "0";
        this.situacao = "T";
    }
    return SuspensaoDeOsFilter;
}());

var SuspensaoDeOsSituacao = /** @class */ (function () {
    function SuspensaoDeOsSituacao() {
        this.get = [
            { id: "T", descricao: "Todas" },
            { id: "A", descricao: "Em Aberto" },
            { id: "S", descricao: "Suspensas" }
        ];
    }
    return SuspensaoDeOsSituacao;
}());



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.module.ts":
/*!**********************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.module.ts ***!
  \**********************************************************************************************/
/*! exports provided: SuspensaoDeOsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspensaoDeOsModule", function() { return SuspensaoDeOsModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _suspensao_de_os_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./suspensao-de-os.routing.module */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.routing.module.ts");
/* harmony import */ var _suspensao_de_os_index_suspensao_de_os_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./suspensao-de-os-index/suspensao-de-os-index.component */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-index/suspensao-de-os-index.component.ts");
/* harmony import */ var _suspensao_de_os_filter_suspensao_de_os_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./suspensao-de-os-filter/suspensao-de-os-filter.component */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-filter/suspensao-de-os-filter.component.ts");
/* harmony import */ var _suspensao_de_os_form_suspensao_de_os_form_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./suspensao-de-os-form/suspensao-de-os-form.component */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-form/suspensao-de-os-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 SuspensaoDeOsModule = /** @class */ (function () {
    function SuspensaoDeOsModule() {
    }
    SuspensaoDeOsModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [
                app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"],
                _suspensao_de_os_routing_module__WEBPACK_IMPORTED_MODULE_2__["SuspensaoDeOsRoutingModule"]
            ],
            declarations: [
                _suspensao_de_os_index_suspensao_de_os_index_component__WEBPACK_IMPORTED_MODULE_3__["SuspensaoDeOsIndexComponent"],
                _suspensao_de_os_form_suspensao_de_os_form_component__WEBPACK_IMPORTED_MODULE_5__["SuspensaoDeOsFormComponent"],
                _suspensao_de_os_filter_suspensao_de_os_filter_component__WEBPACK_IMPORTED_MODULE_4__["SuspensaoDeOsFilterComponent"]
            ]
        })
    ], SuspensaoDeOsModule);
    return SuspensaoDeOsModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.routing.module.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.routing.module.ts ***!
  \******************************************************************************************************/
/*! exports provided: SuspensaoDeOsRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuspensaoDeOsRoutingModule", function() { return SuspensaoDeOsRoutingModule; });
/* 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_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _suspensao_de_os_index_suspensao_de_os_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./suspensao-de-os-index/suspensao-de-os-index.component */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-index/suspensao-de-os-index.component.ts");
/* harmony import */ var _suspensao_de_os_form_suspensao_de_os_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./suspensao-de-os-form/suspensao-de-os-form.component */ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os-form/suspensao-de-os-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: _suspensao_de_os_index_suspensao_de_os_index_component__WEBPACK_IMPORTED_MODULE_3__["SuspensaoDeOsIndexComponent"],
        data: { breadcrumb: "suspensaoDeOs", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "edit/:id",
        component: _suspensao_de_os_form_suspensao_de_os_form_component__WEBPACK_IMPORTED_MODULE_4__["SuspensaoDeOsFormComponent"],
        data: {
            breadcrumb: "suspensaoDeOs",
            formParams: { action: 1 }
        }
    },
    {
        path: "detail/:id",
        component: _suspensao_de_os_form_suspensao_de_os_form_component__WEBPACK_IMPORTED_MODULE_4__["SuspensaoDeOsFormComponent"],
        data: {
            breadcrumb: "suspensaoDeOs",
            formParams: { action: 2 }
        }
    },
];
var SuspensaoDeOsRoutingModule = /** @class */ (function () {
    function SuspensaoDeOsRoutingModule() {
    }
    SuspensaoDeOsRoutingModule = __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"]],
        })
    ], SuspensaoDeOsRoutingModule);
    return SuspensaoDeOsRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.service.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/pages/especificos/vopak/movimentos/suspensao-de-os/suspensao-de-os.service.ts ***!
  \***********************************************************************************************/
/*! exports provided: SuspensaoDeOsService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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







var SuspensaoDeOsService = /** @class */ (function (_super) {
    __extends(SuspensaoDeOsService, _super);
    function SuspensaoDeOsService(http) {
        var _this = _super.call(this, http, "vopak/suspensaoDeOs") || this;
        _this.filter = new _suspensao_de_os_model__WEBPACK_IMPORTED_MODULE_6__["SuspensaoDeOsFilter"]();
        return _this;
    }
    SuspensaoDeOsService.prototype.getDados = function (data) {
        data.destinatarioIdCliente = !data.destinatarioIdCliente ? 0 : data.destinatarioIdCliente;
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/vopak/suspensaoDeOs/getByFilter", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    SuspensaoDeOsService.prototype.verifSeExisteSuspensao = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/vopak/suspensaoDeOs/verifSeExisteSuspensao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    SuspensaoDeOsService.prototype.suspenderOs = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/vopak/suspensaoDeOs/suspenderOs", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    SuspensaoDeOsService.prototype.cancelarSuspensaoDaOs = function (regPlaneja) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/vopak/suspensaoDeOs/cancelarSuspensaoDaOs/" + regPlaneja)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    SuspensaoDeOsService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    SuspensaoDeOsService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], SuspensaoDeOsService);
    return SuspensaoDeOsService;
}(app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_4__["SpecificsBaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-vopak-movimentos-suspensao-de-os-suspensao-de-os-module.js.map