(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-pontafelix-movimentos-programacao-veiculo-operacional-programacao-veiculo-operacional-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-filter/programacao-veiculo-operacional-filter.component.html":
/*!****************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-filter/programacao-veiculo-operacional-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\" id=\"programacao-veiculo-operacional-filter-dialog\" tabindex=\"-1\" role=\"dialog\"\r\n    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\">{{title}}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\" *ngIf=\"!!service.filter\">\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=\"emissaoDe\" class=\"required\">\r\n                                    {{\"labels.emissaoDe\" | translate }}\r\n                                </label>\r\n                                <app-data id=\"emissaoDe\" name=\"emissaoDe\" required=\"true\" [disabled]=\"false\"\r\n                                    [(ngModel)]=\"service.filter.dataI\">\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\">\r\n                                    {{\"labels.ate\" | translate}}\r\n                                </label>\r\n                                <app-data id=\"ate\" name=\"ate\" required=\"true\" [disabled]=\"false\"\r\n                                    [(ngModel)]=\"service.filter.dataF\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"navio\" name=\"navio\" label=\"navio\"\r\n                                    modalTitle=\"pesquisaDeNavio\" [(ngModel)]=\"service.filter.destinatarioIdNavio\"\r\n                                    [inSelected]=\"service.filter.navio\" tipoDestinatario=\"N\" showCgcCpf=\"false\"\r\n                                    showInscricao=\"false\" (outModel)=\"trataNavio($event)\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" label=\"cliente\"\r\n                                    modalTitle=\"pesquisaDeCliente\" [(ngModel)]=\"service.filter.destinatarioIdCliente\"\r\n                                    [inSelected]=\"service.filter.cliente\" tipoDestinatario=\"C\" showCgcCpf=\"false\"\r\n                                    showInscricao=\"false\" (outModel)=\"trataCliente($event)\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-material id=\"produto\" name=\"produto\" label=\"produto\"\r\n                                    modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"service.filter.materialId\"\r\n                                    [inSelected]=\"service.filter.material\" (outModel)=\"trataMaterial($event)\">\r\n                                </app-pesquisa-material>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row mt-2\">\r\n                        <div class=\"col-lg-12\">\r\n                            <div class=\"custom-control custom-checkbox\">\r\n                                <input id=\"apresNavioConcluido\"\r\n                                    name=\"apresNavioConcluido\"\r\n                                    [(ngModel)]=\"service.filter.apresNavioConcluido\"\r\n                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                <label class=\"custom-control-label\"\r\n                                    for=\"apresNavioConcluido\">{{'labels.apresNavioConcluido'\r\n                                    | translate}}</label>\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/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-form/programacao-veiculo-operacional-form.component.html":
/*!************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-form/programacao-veiculo-operacional-form.component.html ***!
  \************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\" [sisFormularioId]=\"constantes.sisFormularioId\"\r\n    [formAction]=\"actionForm\" [itemData]=\"service.data.cliFelProgVeicOperacionalId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"col-lg-12 col-12 section-comand-bar\">\r\n    <div class=\"clearfix\">\r\n        <ul class=\"nav nav-tabs\">\r\n            <li class=\"nav-item\">\r\n                <a class=\"nav-link active\" data-toggle=\"tab\" href=\"#tDados\">{{\"labels.dados\" | translate }}</a>\r\n            </li>\r\n            <li class=\"nav-item\">\r\n                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#tItens\" (click)=\"validaAbaItem()\">{{\"labels.itens\" | translate }}</a>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n    <div class=\"tab-content top\">\r\n        <div class=\"tab-pane active\" id=\"tDados\">\r\n            <app-form-legenda></app-form-legenda>\r\n            <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-12\">                        \r\n                        <app-card-container tituloCard=\"tipoOperacao\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-12 mb-0\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label>&nbsp;</label>\r\n                                        <div class=\"form-check-inline\">\r\n                                            <input id=\"tipoMov0\" type=\"radio\" name=\"tipoMov\" class=\"form-check-input\" value=\"C\"\r\n                                                [(ngModel)]=\"service.data.tipoMov\"\r\n                                                [disabled]=\"disabledTipoMov\" \r\n                                                (change)=\"trataNavio()\">\r\n                                            <label for=\"tipoMov0\">{{ 'labels.carga' | translate }}</label>\r\n                                        </div>\r\n                                        <div class=\"form-check-inline\">\r\n                                            <input id=\"tipoMov1\" type=\"radio\" name=\"tipoMov\" class=\"form-check-input\" value=\"D\"\r\n                                                [(ngModel)]=\"service.data.tipoMov\"\r\n                                                [disabled]=\"disabledTipoMov\"\r\n                                                (change)=\"trataNavio()\">\r\n                                            <label for=\"tipoMov1\">{{ 'labels.descarga' | translate }}</label>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </app-card-container>\r\n                    </div>\r\n                </div>                \r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-6 col-md-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label [class.required]=\"reqNavio\" for=\"navio\">{{'labels.navio' |\r\n                                translate}}</label>\r\n                            <select id=\"navio\" name=\"navio\" class=\"form-control form-control-sm\"\r\n                                [(ngModel)]=\"service.data.stoLaudoId\" [disabled]=\"hasNavio\"\r\n                                data-title=\"{{ 'labels.navio' | translate }}\" \r\n                                [required]=\"reqNavio\"\r\n                                (change)=\"trataNavio()\">\r\n                                <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                <option *ngFor=\"let t of navios\" value=\"{{ t.stoLaudoId }}\">\r\n                                    {{ t.navio }}\r\n                                </option>\r\n                            </select>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-6 col-md-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label [class.required]=\"reqProduto\" for=\"produto\">{{'labels.produto' |\r\n                                translate}}</label>\r\n                            <select id=\"produto\" name=\"produto\" class=\"form-control form-control-sm\"\r\n                                [(ngModel)]=\"service.data.stoLaudoItemId\" [disabled]=\"hasProduto\"\r\n                                data-title=\"{{ 'labels.produto' | translate }}\" \r\n                                [required]=\"reqProduto\"\r\n                                (change)=\"trataProduto()\">\r\n                                <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                <option *ngFor=\"let t of produtos\" value=\"{{ t.stoLaudoItem }}\">\r\n                                    {{ t.produto }}\r\n                                </option>\r\n                            </select>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-6 col-md-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label [class.required]=\"reqCliente\" for=\"cliente\">{{'labels.cliente' |\r\n                                translate}}</label>\r\n                            <select id=\"cliente\" name=\"cliente\" class=\"form-control form-control-sm\"\r\n                                [(ngModel)]=\"service.data.stoLaudoClienteId\" [disabled]=\"hasCliente\"\r\n                                data-title=\"{{ 'labels.cliente' | translate }}\" \r\n                                [required]=\"reqCliente\">\r\n                                <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                <option *ngFor=\"let t of clientes\" value=\"{{ t.stoLaudoClienteId }}\">\r\n                                    {{ t.fantasia }}\r\n                                </option>\r\n                            </select>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"qtdProgramada\">{{'labels.qtdProgramada' | translate}}</label>\r\n                            <input id=\"qtdProgramada\" name=\"qtdProgramada\" [(ngModel)]=\"service.data.qtdProgramada\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" \r\n                                [disabled]=\"disabledQtdeProgramada\"\r\n                                currencyMask \r\n                                [options]=\"funcoes.optionCurrency(0)\">\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row mt-2\">\r\n                    <div class=\"col-12\">\r\n                        <div class=\"form-group\">\r\n                            <button class=\"btn btn-success mr-2\" type=\"submit\"\r\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                {{ 'buttons.salvar' | translate }}\r\n                            </button>\r\n                            <button class=\"btn btn-success\" (click)=\"saveAndCreate(f)\" type=\"button\"\r\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvarNovo' | translate\r\n                                }}</button>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </form>\r\n        </div>\r\n        <div class=\"tab-pane\" id=\"tItens\">\r\n            <app-programacao-veiculo-operacional-item id=\"cliFelProgVeicOperacionalItems\" name=\"cliFelProgVeicOperacionalItems\"\r\n                [isDetail]=\"funcoes.isDetail(actionForm)\" (dataResult)=\"outItem($event)\">\r\n            </app-programacao-veiculo-operacional-item>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\" [sisFormularioId]=\"constantes.sisFormularioId\"\n    [formAction]=\"actionForm\" [itemData]=\"data.cliFelProgVeicOperacionalId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtProgramacaoVeiculoOperacional\" class=\"table table-striped table-bordered table-hover nowrap table-sm\">\n    </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-programacao-veiculo-operacional-filter (filtrar)=\"executarFiltro($event)\">\n</app-programacao-veiculo-operacional-filter>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.component.html":
/*!************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.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=\"row\">\r\n    <div class=\"col-md-12 col-lg-12\">\r\n        <button title=\"{{ 'buttons.novo' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"new()\"\r\n            [disabled]=\"isDetail\" *ngIf=\"showTable\">\r\n            <i class=\"icon-plus\"></i>\r\n        </button>\r\n        <button title=\"{{ 'buttons.voltar' | translate }}\" (click)=\"back()\" type=\"button\" class=\"btn uni-btn btn-sm\"\r\n            *ngIf=\"!showTable\">\r\n            <i class=\"icon-arrow-left\"></i>\r\n        </button>\r\n        <button title=\"{{ 'buttons.visualizar' | translate }}\" (click)=\"show()\" class=\"btn uni-btn btn-sm\"\r\n            [disabled]=\"!service.cliFelProgVeicOperacionalItem?.sequencia\" *ngIf=\"showTable\">\r\n            <i class=\"icon-eye\"></i>\r\n        </button>\r\n        <button title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"edit()\"\r\n            [disabled]=\"isDetail || (!showTable && !detail) || !service.cliFelProgVeicOperacionalItem?.sequencia\">\r\n            <i class=\"icon-pencil\"></i>\r\n        </button>\r\n        <button title=\"{{ 'buttons.excluir' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"remove()\"\r\n            [disabled]=\"isDetail || !service.cliFelProgVeicOperacionalItem?.sequencia\" *ngIf=\"showTable\">\r\n            <i class=\"icon-close\"></i>\r\n        </button>\r\n    </div>\r\n</div>\r\n\r\n<ng-container *ngIf=\"showTable\">\r\n    <div class=\"row\">\r\n        <div class=\"col-md-12 col-lg-12\">\r\n            <table class=\"table table-striped table-hover\">\r\n                <thead>\r\n                    <tr>\r\n                        <th style=\"display: none\">{{ 'labels.item' | translate }}</th>\r\n                        <th class=\"text-center\">{{ 'labels.cpf' | translate }}</th>\r\n                        <th class=\"text-center\">{{ 'labels.motorista' | translate }}</th>\r\n                        <th class=\"text-center\">{{ 'labels.placa' | translate }}</th>\r\n                        <th class=\"text-center\">{{ 'labels.situacao' | translate }}</th>\r\n                        <th class=\"text-center\">{{ 'labels.deposito' | translate }}</th>\r\n                    </tr>\r\n                </thead>\r\n                <tbody>\r\n                    <tr *ngFor=\"let c of service.data.cliFelProgVeicOperacionalItems | removeExcluidos; let i = index\"\r\n                        (click)=\"selected(c, i)\"\r\n                        [ngClass]=\"{ 'info': i === _index && service.cliFelProgVeicOperacionalItem.sequencia === c.sequencia }\">\r\n                        <td style=\"display: none\">{{c.cliFelProgVeicOperacionalItemId}}</td>\r\n                        <td class=\"text-center\">{{c.motorista?.cgcCpf}}</td>\r\n                        <td class=\"text-center\">{{c.motorista?.nome}}</td>\r\n                        <td class=\"text-center uppercase\">{{c.placa}}</td>\r\n                        <td class=\"text-center\">{{c.situacao}}</td>\r\n                        <td class=\"text-center\">{{c.tanqueId}}</td>\r\n                    </tr>\r\n                    <tr *ngIf=\"!hasDados\">\r\n                        <th colspan=\"6\">\r\n                            {{'messages.nenhumRegistroEncontrado' | translate }}\r\n                        </th>\r\n                    </tr>\r\n                </tbody>\r\n            </table>\r\n        </div>\r\n    </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"!showTable\">\r\n    <form class=\"form\" #formCliFelProgVeicOperacionalItem=\"ngForm\"\r\n        (ngSubmit)=\"onSubmit(formCliFelProgVeicOperacionalItem)\">\r\n        <div class=\"row\">\r\n            <div class=\"col-lg-12\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-8 col-sm-12\">\r\n                        <app-pesquisa-motorista id=\"motorista\" name=\"motorista\" label=\"motorista\"\r\n                            modalTitle=\"pesquisaMotorista\"\r\n                            [(ngModel)]=\"service.cliFelProgVeicOperacionalItem.motoristaId\" [showCpf]=\"true\"\r\n                            [disabled]=\"isDetail || detail\"\r\n                            [inputMotorista]=\"service.cliFelProgVeicOperacionalItem.motorista\" required=\"true\"\r\n                            (outMotorista)=\"service.trataMotorista($event)\">\r\n                        </app-pesquisa-motorista>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"motoristaCnh\">{{'labels.cnh' | translate }}</label>\r\n                            <input id=\"motoristaCnh\" type=\"text\" name=\"motoristaCnh\"\r\n                                class=\"form-control form-control-sm\"\r\n                                value=\"{{service.cliFelProgVeicOperacionalItem?.motorista?.cnh}}\" disabled>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"motoristaCnhValidade\">{{'labels.validade' | translate }}</label>\r\n                            <input id=\"motoristaCnhValidade\" type=\"text\" name=\"motoristaCnhValidade\"\r\n                                class=\"form-control form-control-sm\"\r\n                                value=\"{{service.cliFelProgVeicOperacionalItem?.motorista?.cnhValidade | date:'dd/MM/yyyy'}}\"\r\n                                disabled>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"motoristaRgCM\">{{'labels.rg' | translate }}</label>\r\n                            <input id=\"motoristaRgCM\" type=\"text\" name=\"motoristaRgCM\"\r\n                                class=\"form-control form-control-sm\"\r\n                                value=\"{{service.cliFelProgVeicOperacionalItem.motorista?.rg}}\" disabled>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"placa\" class=\"required\">\r\n                                {{'labels.placa' |\r\n                                translate}}</label>\r\n                            <input type=\"text\" id=\"placa\" name=\"placa\" class=\"form-control form-control-sm uppercase\"\r\n                                [(ngModel)]=\"service.cliFelProgVeicOperacionalItem.placa\"\r\n                                [disabled]=\"isDetail || detail\" (blur)=\"validation.validaPlaca(0)\" required>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <app-pesquisa-saldo-lote-deposito id=\"tanqueId\" name=\"tanqueId\" required=\"true\"\r\n                                [label]=\"'deposito'\" \r\n                                [modalTitle]=\"'deposito'\"\r\n                                [disabled]=\"isDetail || detail\"\r\n                                [field]=\"'tanqueId'\" \r\n                                [options]=\"saldoDepositoOptions\" \r\n                                [(ngModel)]=\"service.cliFelProgVeicOperacionalItem.tanqueId\">\r\n                            </app-pesquisa-saldo-lote-deposito>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"pesoLiqMedio\" class=\"required\">{{'labels.pesoLiqMedio' | translate}}</label>\r\n                            <input id=\"pesoLiqMedio\" name=\"pesoLiqMedio\" [(ngModel)]=\"service.cliFelProgVeicOperacionalItem.pesoLiqMedio\" maxlength=\"11\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" [disabled]=\"isDetail || detail\"\r\n                                currencyMask [options]=\"funcoesService.optionCurrency(0)\"\r\n                                required>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row mt-2\">\r\n                    <div class=\"col-lg-12\">\r\n                        <div class=\"form-group\">\r\n                            <button class=\"btn btn-success\" type=\"submit\" [disabled]=\"isDetail || detail\">\r\n                                {{ 'buttons.salvar' | translate }}\r\n                            </button>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </form>\r\n</ng-container>\r\n<app-programacao-veiculo-operacional-motorista-validade (confirm)=\"service.validaMotorista($event)\">\r\n</app-programacao-veiculo-operacional-motorista-validade>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-motorista-validade/programacao-veiculo-operacional-motorista-validade.component.html":
/*!****************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-motorista-validade/programacao-veiculo-operacional-motorista-validade.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=\"programacao-veiculo-operacional-motorista-validade-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"modal-dialog modal-sm\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ title | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #frmEVValida=\"ngForm\">\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <label style=\"font-weight:bold\">{{ label | translate}}</label>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <div class=\"form-group\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-data id=\"data\" name=\"data\" [formatDateTime]=\"mascara.getFormatData\"\r\n                                        [(ngModel)]=\"dtParaValidar\">\r\n                                    </app-data>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button type=\"submit\" class=\"btn btn-success btn-sm mr-1\" (click)=\"onSubmit(frmEVValida)\">{{ 'buttons.ok' |\r\n                        translate }}</button>\r\n                    <button type=\"button\" class=\"btn btn-default btn-sm\" (click)=\"close()\">{{ 'buttons.cancelar' |\r\n                        translate }}\r\n                    </button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-filter/programacao-veiculo-operacional-filter.component.ts":
/*!************************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-filter/programacao-veiculo-operacional-filter.component.ts ***!
  \************************************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalFilterComponent", function() { return ProgramacaoVeiculoOperacionalFilterComponent; });
/* 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_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../programacao-veiculo-operacional.constants */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.constants.ts");
/* harmony import */ var _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../programacao-veiculo-operacional.service */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.service.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 ProgramacaoVeiculoOperacionalFilterComponent = /** @class */ (function () {
    function ProgramacaoVeiculoOperacionalFilterComponent(service, message) {
        this.service = service;
        this.message = message;
        this.constantes = new _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoVeiculoOperacionalConstants"]();
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    ProgramacaoVeiculoOperacionalFilterComponent.prototype.ngOnInit = function () {
    };
    Object.defineProperty(ProgramacaoVeiculoOperacionalFilterComponent.prototype, "title", {
        get: function () {
            return this.message.translate("titles.programacaoVeiculoOperacional");
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoVeiculoOperacionalFilterComponent.prototype.onSubmit = function (form) {
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid)
            return;
        this.filtrar.emit(this.service.filter);
        jQuery("#programacao-veiculo-operacional-filter-dialog").modal("hide");
    };
    ProgramacaoVeiculoOperacionalFilterComponent.prototype.trataCliente = function (cliente) {
        if (!cliente)
            return;
        this.service.filter.cliente = cliente;
    };
    ProgramacaoVeiculoOperacionalFilterComponent.prototype.trataMaterial = function (material) {
        if (!material)
            return;
        this.service.filter.material = material;
    };
    ProgramacaoVeiculoOperacionalFilterComponent.prototype.trataNavio = function (navio) {
        if (!navio)
            return;
        this.service.filter.navio = navio;
    };
    ProgramacaoVeiculoOperacionalFilterComponent.ctorParameters = function () { return [
        { type: _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_4__["ProgramacaoVeiculoOperacionalService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoVeiculoOperacionalFilterComponent.prototype, "filtrar", void 0);
    ProgramacaoVeiculoOperacionalFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-programacao-veiculo-operacional-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-veiculo-operacional-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-filter/programacao-veiculo-operacional-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_4__["ProgramacaoVeiculoOperacionalService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"]])
    ], ProgramacaoVeiculoOperacionalFilterComponent);
    return ProgramacaoVeiculoOperacionalFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-form/programacao-veiculo-operacional-form.component.ts":
/*!********************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-form/programacao-veiculo-operacional-form.component.ts ***!
  \********************************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalFormComponent", function() { return ProgramacaoVeiculoOperacionalFormComponent; });
/* 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 app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__ = __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_4__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__ = __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_8__ = __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_9__ = __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_10__ = __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_11__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../programacao-veiculo-operacional.constants */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.constants.ts");
/* harmony import */ var _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../programacao-veiculo-operacional.model */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.model.ts");
/* harmony import */ var _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../programacao-veiculo-operacional.service */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.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 ProgramacaoVeiculoOperacionalFormComponent = /** @class */ (function (_super) {
    __extends(ProgramacaoVeiculoOperacionalFormComponent, _super);
    function ProgramacaoVeiculoOperacionalFormComponent(router, message, activatedRoute, service, funcoes, permissoesUtils, loginService) {
        var _this = _super.call(this, new _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoVeiculoOperacionalConstants"](), funcoes) || this;
        _this.router = router;
        _this.message = message;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.funcoes = funcoes;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.mensagens = [];
        _this.constantes = new _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoVeiculoOperacionalConstants"]();
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        _this.pageRoute = "/especificos/pontafelix/movimentos/programacaoVeiculoOperacional";
        _this.target = _this.funcoes.getTargetLocation();
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    ProgramacaoVeiculoOperacionalFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () { return __awaiter(_this, void 0, void 0, function () {
            var id;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        id = this.activatedRoute.snapshot.paramMap.get("id");
                        return [4 /*yield*/, this.carregaCombos()];
                    case 1:
                        _a.sent();
                        if (!id) return [3 /*break*/, 3];
                        return [4 /*yield*/, this.preEditOrDetail(+id)];
                    case 2:
                        _a.sent();
                        return [3 /*break*/, 4];
                    case 3:
                        this.service.data = new _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_13__["CliFelProgVeicOperacional"]();
                        _a.label = 4;
                    case 4: return [2 /*return*/];
                }
            });
        }); }, function () {
            _this.permissoesUtils.back();
        });
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.preEditOrDetail = function (id) {
        return __awaiter(this, void 0, void 0, function () {
            var resp;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.getById(id).toPromise()];
                    case 1:
                        resp = _a.sent();
                        if (!!resp) {
                            this.service.data = resp;
                            this.trataNavio();
                            this.trataData();
                        }
                        else {
                            this.message.warning("messages.programacaoVeiculoOperacional", "messages.nenhumRegistroEncontrado");
                            this.back();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.carregaCombos = function () {
        return __awaiter(this, void 0, void 0, function () {
            var resp;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!this.navios) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.service.getStoLaudoNavio().toPromise()];
                    case 1:
                        resp = _a.sent();
                        if (!!resp) {
                            this.navios = resp;
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.trataNavio = function () {
        var _this = this;
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(this.service.data.stoLaudoId)) {
            var navio = this.navios.find(function (p) { return p.stoLaudoId === +_this.service.data.stoLaudoId; });
            if (navio)
                this.getStoLaudoItemProduto(navio.stoLaudoId, this.service.data.tipoMov);
        }
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.getStoLaudoItemProduto = function (stoLaudoId, tipoMov) {
        if (tipoMov === void 0) { tipoMov = ""; }
        return __awaiter(this, void 0, void 0, function () {
            var ret, produto;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(stoLaudoId)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.service.getStoLaudoItemProduto({ stoLaudoId: stoLaudoId, tipoMov: tipoMov }).toPromise()];
                    case 1:
                        ret = _a.sent();
                        if (ret) {
                            this.produtos = ret;
                            produto = this.produtos.find(function (p) { return p.stoLaudoId === stoLaudoId; });
                            if (produto)
                                this.getStoLaudoCliente(produto.stoLaudoId, produto.stoLaudoItem);
                            else {
                                this.service.data.stoLaudoItemId = "";
                                this.service.data.stoLaudoClienteId = "";
                            }
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.trataProduto = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(this.service.data.stoLaudoId) &&
            app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(this.service.data.stoLaudoItemId)) {
            this.getStoLaudoCliente(this.service.data.stoLaudoId, this.service.data.stoLaudoItemId);
        }
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.getStoLaudoCliente = function (stoLaudoId, stoLaudoItemId) {
        var _this = this;
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(stoLaudoId) && app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(stoLaudoItemId)) {
            this.service.getStoLaudoCliente({ stoLaudoId: stoLaudoId, stoLaudoItemId: stoLaudoItemId }).subscribe(function (resp) {
                _this.clientes = resp;
            });
        }
    };
    Object.defineProperty(ProgramacaoVeiculoOperacionalFormComponent.prototype, "hasNavio", {
        get: function () {
            if (this.funcoesService.isDetail(this.actionForm))
                return true;
            return !app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ArrayUtilsStaticService"].any(this.navios);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoVeiculoOperacionalFormComponent.prototype, "reqNavio", {
        get: function () {
            return app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ArrayUtilsStaticService"].any(this.navios);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoVeiculoOperacionalFormComponent.prototype, "hasProduto", {
        get: function () {
            if (this.funcoesService.isDetail(this.actionForm))
                return true;
            return !app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ArrayUtilsStaticService"].any(this.produtos);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoVeiculoOperacionalFormComponent.prototype, "reqProduto", {
        get: function () {
            return app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ArrayUtilsStaticService"].any(this.produtos);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoVeiculoOperacionalFormComponent.prototype, "hasCliente", {
        get: function () {
            if (this.funcoesService.isDetail(this.actionForm))
                return true;
            return !app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ArrayUtilsStaticService"].any(this.clientes);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoVeiculoOperacionalFormComponent.prototype, "reqCliente", {
        get: function () {
            return app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ArrayUtilsStaticService"].any(this.clientes);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoVeiculoOperacionalFormComponent.prototype, "disabledQtdeProgramada", {
        get: function () {
            if (this.funcoesService.isDetail(this.actionForm))
                return true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoVeiculoOperacionalFormComponent.prototype, "disabledTipoMov", {
        get: function () {
            if (this.funcoesService.isDetail(this.actionForm))
                return true;
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoVeiculoOperacionalFormComponent.prototype.trataData = function () {
        if (this.service.data) {
            // trata os itens
            if (app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ArrayUtilsStaticService"].any(this.service.data.cliFelProgVeicOperacionalItems)) {
                this.service.data.cliFelProgVeicOperacionalItems.map(function (el, idx) {
                    el.sequencia = idx + 1;
                });
            }
        }
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.preSave = function () {
        if (app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ArrayUtilsStaticService"].any(this.service.data.cliFelProgVeicOperacionalItems)) {
            this.service.data.cliFelProgVeicOperacionalItems.forEach(function (item) {
                item.placa = app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_10__["StringUtilsStaticService"].toUpperOrUndefined(item.placa);
            });
        }
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.onSubmit = function (form, create) {
        if (create === void 0) { create = false; }
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(null);
                if (form.invalid) {
                    app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
                    this.funcoesService.backToTop();
                    return [2 /*return*/];
                }
                if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_10__["StringUtilsStaticService"].isEmpty(this.service.data.tipoMov)) {
                    this.message.warning("messages.programacaoVeiculoOperacional", "messages.necessarioInfTipoOperacao");
                    return [2 /*return*/];
                }
                this.preSave();
                this.service.data.logRotina = "Manutenção Prog. Veículo Operacional";
                this.service.data.podeGravar = false;
                this.service._save(this.service.data).subscribe(function (result) {
                    _this.mensagens = _this.message.validationResult(result);
                    if (result.message === "PERGUNTAR") {
                        _this.message.confirm("titles.programacaoVeiculoOperacional", _this.mensagens[0], null, function () {
                            _this.service.data.podeGravar = true;
                            _this.service._save(_this.service.data).subscribe(function (finalResult) {
                                if (!finalResult.isValid) {
                                    app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("backError").emit(_this.message.validationResult(finalResult));
                                    return;
                                }
                                _this.message.saveSuccess("titles.programacaoVeiculoOperacional");
                                _this.back();
                            });
                        }, false, function () {
                            _this.message.info("titles.programacaoVeiculoOperacional", "Operação cancelada pelo usuário");
                        });
                        return;
                    }
                    if (!result.isValid) {
                        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("backError").emit(_this.mensagens);
                    }
                    else {
                        _this.message.saveSuccess("titles.programacaoVeiculoOperacional");
                        if (create) {
                            _this.service.data = new _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_13__["CliFelProgVeicOperacional"]();
                            _this.router.navigate(["" + _this.target + _this.pageRoute, "create"]);
                        }
                        else {
                            _this.back();
                        }
                    }
                });
                return [2 /*return*/];
            });
        });
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.edit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(this.service.data.cliFelProgVeicOperacionalId)) {
                    this.router.navigate(["" + this.target + this.pageRoute + "/edit/" + this.service.data.cliFelProgVeicOperacionalId]);
                }
                return [2 /*return*/];
            });
        }); });
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.back = function () {
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.outItem = function (event) { };
    ProgramacaoVeiculoOperacionalFormComponent.prototype.validaAbaItem = 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:
                        if (!this.funcoesService.isCreate(this.actionForm)) return [3 /*break*/, 2];
                        if (!(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(+this.service.data.stoLaudoId) &&
                            app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(+this.service.data.stoLaudoItemId) &&
                            app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["NumberUtilsStaticService"].isPositive(+this.service.data.stoLaudoClienteId))) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.service.validaAbaItemNavioProdutoCliente({
                                stoLaudoId: +this.service.data.stoLaudoId,
                                stoLaudoItemId: +this.service.data.stoLaudoItemId,
                                stoLaudoClienteId: +this.service.data.stoLaudoClienteId
                            }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.programacaoVeiculoOperacional", m); });
                            jQuery("a.nav-link[href='#tDados']").click();
                            return [2 /*return*/];
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoVeiculoOperacionalFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_14__["ProgramacaoVeiculoOperacionalService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] }
    ]; };
    ProgramacaoVeiculoOperacionalFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-programacao-veiculo-operacional-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-veiculo-operacional-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-form/programacao-veiculo-operacional-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_14__["ProgramacaoVeiculoOperacionalService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"]])
    ], ProgramacaoVeiculoOperacionalFormComponent);
    return ProgramacaoVeiculoOperacionalFormComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-index/programacao-veiculo-operacional-index.component.ts":
/*!**********************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-index/programacao-veiculo-operacional-index.component.ts ***!
  \**********************************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalIndexComponent", function() { return ProgramacaoVeiculoOperacionalIndexComponent; });
/* 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_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-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 app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_7__ = __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_8__ = __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_9__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../programacao-veiculo-operacional.constants */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.constants.ts");
/* harmony import */ var _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../programacao-veiculo-operacional.model */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.model.ts");
/* harmony import */ var _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../programacao-veiculo-operacional.service */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.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 ProgramacaoVeiculoOperacionalIndexComponent = /** @class */ (function (_super) {
    __extends(ProgramacaoVeiculoOperacionalIndexComponent, _super);
    function ProgramacaoVeiculoOperacionalIndexComponent(router, service, datatables, permissoesUtils, message, loginService, funcoes) {
        var _this = _super.call(this, new _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_10__["ProgramacaoVeiculoOperacionalConstants"](), funcoes) || this;
        _this.router = router;
        _this.service = service;
        _this.datatables = datatables;
        _this.permissoesUtils = permissoesUtils;
        _this.message = message;
        _this.loginService = loginService;
        _this.funcoes = funcoes;
        _this.data = new _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_11__["CliFelProgVeicOperacional"]();
        _this.constantes = new _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_10__["ProgramacaoVeiculoOperacionalConstants"]();
        _this.pageRoute = "/especificos/pontafelix/movimentos/programacaoVeiculoOperacional";
        _this.target = _this.funcoesService.getTargetLocation();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!this.loginService.isTokenExpired()) return [3 /*break*/, 3];
                        if (!!!this.service.filter) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.refresh()];
                    case 1:
                        _a.sent();
                        _a.label = 2;
                    case 2:
                        if (!app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_5__["ArrayUtilsStaticService"].any(this.dados))
                            this.filtrar();
                        _a.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        }); }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.refresh = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _a, columns;
            var _this = this;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (!this.service.filter)
                            return [2 /*return*/];
                        _a = this;
                        return [4 /*yield*/, this.service.getByFiltro(this.service.filter).toPromise()];
                    case 1:
                        _a.dados = _b.sent();
                        columns = [
                            this.datatables.getDataString("cliFelProgVeicOperacionalId", "codigo", "10%"),
                            this.datatables.getDataString("navio", "navio"),
                            this.datatables.getDataString("material", "material"),
                            this.datatables.getDataString("cliente", "cliente"),
                            this.datatables.getDataDouble("qtdProgramada", "programado", 0),
                            this.datatables.getDataDouble("qtdUtilizada", "utilizado", 0),
                        ];
                        this.datatables.datatable("dtProgramacaoVeiculoOperacional", columns, this.dados, function (aData) {
                            _this.data = aData;
                        }, 0, "asc");
                        return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.filtrar = function () {
        jQuery("#programacao-veiculo-operacional-filter-dialog").modal("show");
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.executarFiltro = function (event) {
        this.service.filter = event;
        this.refresh();
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.itemSelecionado = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["NumberUtilsStaticService"].isNotPositive(this.data.cliFelProgVeicOperacionalId)) {
            this.message.warning("titles.programacaoVeiculoOperacional", "messages.selecioneUmRegistro");
            return false;
        }
        return true;
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.detail = function () {
        if (!this.itemSelecionado())
            return;
        this.router.navigate(["" + this.target + this.pageRoute + "/detail/" + this.data.cliFelProgVeicOperacionalId]);
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.edit = function () {
        if (!this.itemSelecionado())
            return;
        this.router.navigate(["" + this.target + this.pageRoute + "/edit/" + this.data.cliFelProgVeicOperacionalId]);
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.create = function () {
        this.router.navigate(["" + this.target + this.pageRoute, "create"]);
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!this.itemSelecionado())
            return;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, 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.podeRemover({ cliFelProgVeicOperacionalId: this.data.cliFelProgVeicOperacionalId }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.programacaoVeiculoOperacional", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.executeRemove();
                        }
                        return [2 /*return*/];
                }
            });
        }); });
    };
    ProgramacaoVeiculoOperacionalIndexComponent.prototype.executeRemove = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.message.removeConfirm(function () {
                    _this.service._remove(_this.data).subscribe(function (validationResult) {
                        if (!validationResult.isValid) {
                            var mensagens = _this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.programacaoVeiculoOperacional", m); });
                            return;
                        }
                        _this.datatables.remove("dtProgramacaoVeiculoOperacional");
                        _this.refresh();
                    });
                });
                return [2 /*return*/];
            });
        });
    };
    ProgramacaoVeiculoOperacionalIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoVeiculoOperacionalService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_4__["DatatablesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] }
    ]; };
    ProgramacaoVeiculoOperacionalIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-programacao-veiculo-operacional-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-veiculo-operacional-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-index/programacao-veiculo-operacional-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoVeiculoOperacionalService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_4__["DatatablesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"]])
    ], ProgramacaoVeiculoOperacionalIndexComponent);
    return ProgramacaoVeiculoOperacionalIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.component.ts":
/*!********************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.component.ts ***!
  \********************************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalItemComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalItemComponent", function() { return ProgramacaoVeiculoOperacionalItemComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* 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 app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.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_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../programacao-veiculo-operacional.model */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.model.ts");
/* harmony import */ var _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../programacao-veiculo-operacional.service */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.service.ts");
/* harmony import */ var _programacao_veiculo_operacional_item_validation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./programacao-veiculo-operacional-item.validation */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.validation.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 __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 ProgramacaoVeiculoOperacionalItemComponent = /** @class */ (function () {
    function ProgramacaoVeiculoOperacionalItemComponent(message, service, funcoesService, loginService) {
        this.message = message;
        this.service = service;
        this.funcoesService = funcoesService;
        this.loginService = loginService;
        this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.detail = false;
        this.now = new Date();
        this.validation = new _programacao_veiculo_operacional_item_validation__WEBPACK_IMPORTED_MODULE_8__["ProgramacaoVeiculoOperacionalValidation"](message, funcoesService, service);
    }
    ProgramacaoVeiculoOperacionalItemComponent.prototype.ngOnInit = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.showTable = true;
                return [2 /*return*/];
            });
        });
    };
    ProgramacaoVeiculoOperacionalItemComponent.prototype.selected = function (val, index) {
        this._index = index;
        this.service.cliFelProgVeicOperacionalItem = val;
    };
    Object.defineProperty(ProgramacaoVeiculoOperacionalItemComponent.prototype, "hasDados", {
        get: function () {
            if (!app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["ArrayUtilsStaticService"].any(this.service.data.cliFelProgVeicOperacionalItems))
                return;
            return !!this.service.data.cliFelProgVeicOperacionalItems.filter(function (r) { return r.sitReg !== 'E'; });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoVeiculoOperacionalItemComponent.prototype, "isCreate", {
        get: function () {
            return !this.service.cliFelProgVeicOperacionalItem.cliFelProgVeicOperacionalItemId;
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoVeiculoOperacionalItemComponent.prototype.new = function () {
        this.detail = false;
        this.showTable = false;
        this.service.cliFelProgVeicOperacionalItem = new _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_6__["CliFelProgVeicOperacionalItem"]();
        this.dataResult.emit(false);
    };
    ProgramacaoVeiculoOperacionalItemComponent.prototype.edit = function () {
        this.detail = false;
        this.showTable = false;
        this.dataResult.emit(false);
    };
    ProgramacaoVeiculoOperacionalItemComponent.prototype.back = function () {
        this.showTable = true;
        this.service.cliFelProgVeicOperacionalItem = new _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_6__["CliFelProgVeicOperacionalItem"]();
        this.dataResult.emit(true);
        this._index = -1;
    };
    ProgramacaoVeiculoOperacionalItemComponent.prototype.show = function () {
        this.detail = true;
        this.showTable = false;
        this.dataResult.emit(false);
    };
    ProgramacaoVeiculoOperacionalItemComponent.prototype.remove = function () {
        var _this = this;
        this.dataResult.emit(false);
        this.message.removeConfirm(function () {
            _this.service.data.cliFelProgVeicOperacionalItems.forEach(function (val, idx) {
                if (!!val.cliFelProgVeicOperacionalId && val.cliFelProgVeicOperacionalId === _this.service.cliFelProgVeicOperacionalItem.cliFelProgVeicOperacionalId && val.cliFelProgVeicOperacionalItemId === _this.service.cliFelProgVeicOperacionalItem.cliFelProgVeicOperacionalItemId) {
                    _this.service.cliFelProgVeicOperacionalItem.sitReg = 'E';
                }
                else if (!val.cliFelProgVeicOperacionalId && val.sequencia === _this.service.cliFelProgVeicOperacionalItem.sequencia) {
                    _this.service.data.cliFelProgVeicOperacionalItems.splice(idx, 1);
                }
            });
            _this.service.cliFelProgVeicOperacionalItem = new _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_6__["CliFelProgVeicOperacionalItem"]();
            _this._index = -1;
        });
        this.dataResult.emit(true);
    };
    ProgramacaoVeiculoOperacionalItemComponent.prototype.onSubmit = function (form) {
        var _this = this;
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            this.funcoesService.backToTop();
            return;
        }
        if (!app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["ArrayUtilsStaticService"].any(this.service.data.cliFelProgVeicOperacionalItems))
            this.service.data.cliFelProgVeicOperacionalItems = [];
        if (this.service.cliFelProgVeicOperacionalItem.sequencia && this.service.cliFelProgVeicOperacionalItem.sequencia > 0) {
            var i = this.service.data.cliFelProgVeicOperacionalItems.findIndex(function (x) { return x.sequencia === _this.service.cliFelProgVeicOperacionalItem.sequencia; });
            this.service.data.cliFelProgVeicOperacionalItems[i] = this.service.cliFelProgVeicOperacionalItem;
        }
        else {
            this.service.cliFelProgVeicOperacionalItem.sequencia = this.service.data.cliFelProgVeicOperacionalItems.length + 1;
            this.service.cliFelProgVeicOperacionalItem.cliFelProgVeicOperacionalItemId = this.service.data.cliFelProgVeicOperacionalItems.length + 1;
            this.service.data.cliFelProgVeicOperacionalItems.push(this.service.cliFelProgVeicOperacionalItem);
        }
        this.dataResult.emit(this.service.data.cliFelProgVeicOperacionalItems);
        this.back();
    };
    Object.defineProperty(ProgramacaoVeiculoOperacionalItemComponent.prototype, "saldoDepositoOptions", {
        get: function () {
            return {
                tanqueId: this.service.cliFelProgVeicOperacionalItem.tanqueId,
                sitLote: 'A',
                modo: 7,
                tipoSaldo: 7,
                dataMovimento: this.now,
                tipoAgrupa: 'D',
                geraArquivo: 'N'
            };
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoVeiculoOperacionalItemComponent.ctorParameters = function () { return [
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoVeiculoOperacionalService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], ProgramacaoVeiculoOperacionalItemComponent.prototype, "isDetail", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoVeiculoOperacionalItemComponent.prototype, "dataResult", void 0);
    ProgramacaoVeiculoOperacionalItemComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-programacao-veiculo-operacional-item",
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-veiculo-operacional-item.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoVeiculoOperacionalService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"]])
    ], ProgramacaoVeiculoOperacionalItemComponent);
    return ProgramacaoVeiculoOperacionalItemComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.validation.ts":
/*!*********************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.validation.ts ***!
  \*********************************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalValidation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalValidation", function() { return ProgramacaoVeiculoOperacionalValidation; });
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
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 ProgramacaoVeiculoOperacionalValidation = /** @class */ (function () {
    function ProgramacaoVeiculoOperacionalValidation(message, funcoes, service) {
        this.message = message;
        this.funcoes = funcoes;
        this.service = service;
    }
    ProgramacaoVeiculoOperacionalValidation.prototype.validaPlaca = function (ordem) {
        return __awaiter(this, void 0, void 0, function () {
            var placas, rs, validationResult, mensagens, validationResult1;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        placas = [
                            app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["StringUtilsStaticService"].removeCaracteres(this.service.cliFelProgVeicOperacionalItem.placa)
                        ];
                        rs = [];
                        if (!app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["StringUtilsStaticService"].isEmpty(placas[ordem])) return [3 /*break*/, 1];
                        return [2 /*return*/, rs];
                    case 1: return [4 /*yield*/, this.service.validaPlaca({
                            placa: placas[+ordem]
                        }).toPromise()];
                    case 2:
                        validationResult = _a.sent();
                        if (!!validationResult.isValid) return [3 /*break*/, 3];
                        mensagens = this.message.validationResult(validationResult);
                        mensagens.forEach(function (m) { return _this.message.warning("titles.programacaoVeiculoOperacional", m); });
                        return [2 /*return*/];
                    case 3: return [4 /*yield*/, this.service.validaVeiculoUtilizadoTransferenciaDeposito({
                            placa: placas[+ordem]
                        }).toPromise()];
                    case 4:
                        validationResult1 = _a.sent();
                        _a.label = 5;
                    case 5: return [2 /*return*/];
                }
            });
        });
    };
    return ProgramacaoVeiculoOperacionalValidation;
}());



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-motorista-validade/programacao-veiculo-operacional-motorista-validade.component.ts":
/*!************************************************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-motorista-validade/programacao-veiculo-operacional-motorista-validade.component.ts ***!
  \************************************************************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalMotoristaValidadeComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalMotoristaValidadeComponent", function() { return ProgramacaoVeiculoOperacionalMotoristaValidadeComponent; });
/* 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_cadastro_motorista_motorista_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/pages/cadastro/motorista/motorista.model */ "./src/app/pages/cadastro/motorista/motorista.model.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_4__ = __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_5__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! sweetalert2 */ "./node_modules/sweetalert2/dist/sweetalert2.all.js");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../programacao-veiculo-operacional.service */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.service.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 __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 ProgramacaoVeiculoOperacionalMotoristaValidadeComponent = /** @class */ (function () {
    function ProgramacaoVeiculoOperacionalMotoristaValidadeComponent(funcoes, service, messages) {
        var _this = this;
        this.funcoes = funcoes;
        this.service = service;
        this.messages = messages;
        this.confirm = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__["Mascaras"]();
        this.title = '';
        this.label = '';
        this.questionMessage = '';
        this.sub = app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get('emiProgramacaoVeiculoOperacionalMotoristaValidade').subscribe(function (req) {
            if (!_this.service.data || !_this.service.cliFelProgVeicOperacionalItem.motorista)
                return;
            _this.valDocMotorista = _this.service.errosDocMotorista.find(function (c) { return !c.isValid; });
            if (_this.valDocMotorista) {
                switch (_this.valDocMotorista.tipoDoc) {
                    case 'CNH':
                        _this.title = 'titles.validadeCnh';
                        _this.label = 'labels.validadeVencidaCnh';
                        _this.questionMessage = _this.valDocMotorista.message;
                        _this.dtParaValidar = _this.service.cliFelProgVeicOperacionalItem.motorista.cnhValidade;
                        break;
                    case 'RESTRICAO':
                        _this.questionMessage = _this.valDocMotorista.message;
                        break;
                    default:
                        _this.confirm.emit(undefined);
                }
                if (!_this.valDocMotorista.question) {
                    if (_this.valDocMotorista.message.indexOf('messages') < 0)
                        _this.valDocMotorista.message = "messages." + _this.valDocMotorista.message;
                    _this.messages.warning("titles.programacaoVeiculoOperacional", _this.valDocMotorista.message);
                    jQuery("#programacao-veiculo-operacional-motorista-validade-dialog").modal("show");
                }
                else {
                    if (_this.valDocMotorista.modal) {
                        _this.messages.confirm("titles.programacaoVeiculoOperacional", _this.questionMessage, "", function () { return __awaiter(_this, void 0, void 0, function () {
                            return __generator(this, function (_a) {
                                switch (_a.label) {
                                    case 0:
                                        if (!this.valDocMotorista.modal) return [3 /*break*/, 2];
                                        return [4 /*yield*/, jQuery("#programacao-veiculo-operacional-motorista-validade-dialog").modal("show")];
                                    case 1:
                                        _a.sent();
                                        _a.label = 2;
                                    case 2: return [2 /*return*/];
                                }
                            });
                        }); }, false, function () {
                            _this.service.cliFelProgVeicOperacionalItem.motoristaId = undefined;
                            _this.service.cliFelProgVeicOperacionalItem.motorista = new app_pages_cadastro_motorista_motorista_model__WEBPACK_IMPORTED_MODULE_2__["Motorista"]();
                            _this.confirm.emit(undefined);
                        });
                    }
                    else {
                        var title = void 0;
                        var buttonCancel = void 0;
                        title = _this.messages.getTranslates("titles", "programacaoVeiculoOperacional");
                        buttonCancel = _this.messages.getTranslates("buttons", "ok");
                        sweetalert2__WEBPACK_IMPORTED_MODULE_7___default.a.fire({
                            title: title,
                            text: _this.valDocMotorista.message,
                            type: "warning",
                            showCancelButton: false,
                            confirmButtonColor: "#3085d6",
                            cancelButtonColor: "#d33",
                            confirmButtonText: buttonCancel,
                            cancelButtonText: ""
                        }).then(function (result) {
                            if (result.value) {
                                _this.service.cliFelProgVeicOperacionalItem.motoristaId = undefined;
                                _this.service.cliFelProgVeicOperacionalItem.motorista = new app_pages_cadastro_motorista_motorista_model__WEBPACK_IMPORTED_MODULE_2__["Motorista"]();
                                _this.confirm.emit(undefined);
                            }
                        });
                    }
                }
            }
            else
                _this.confirm.emit(undefined);
        });
    }
    ProgramacaoVeiculoOperacionalMotoristaValidadeComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
    };
    ProgramacaoVeiculoOperacionalMotoristaValidadeComponent.prototype.onSubmit = function (form) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (form.invalid) {
                    this.messages.warning("titles.programacaoVeiculoOperacional", "messages.campoObrigatorio", { name: 'data' });
                }
                else if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["DateTimeUtilsStaticService"].menorAHoje(this.dtParaValidar)) {
                    this.messages.warning("titles.programacaoVeiculoOperacional", "messages.dtValidadeNaoPodeSerMenor");
                }
                else {
                    jQuery("#programacao-veiculo-operacional-motorista-validade-dialog").modal("hide");
                    this.valDocMotorista.data = this.dtParaValidar;
                    this.valDocMotorista.isValid = true;
                    this.service.errosDocMotorista.map(function (r) {
                        if (_this.valDocMotorista.tipoDoc === r.tipoDoc) {
                            r.data = _this.dtParaValidar;
                            r.isValid = true;
                            return r;
                        }
                    });
                    this.confirm.emit(this.valDocMotorista);
                }
                return [2 /*return*/];
            });
        });
    };
    ProgramacaoVeiculoOperacionalMotoristaValidadeComponent.prototype.close = function () {
        jQuery("#programacao-veiculo-operacional-motorista-validade-dialog").modal("hide");
        this.service.cliFelProgVeicOperacionalItem.motoristaId = undefined;
        this.service.cliFelProgVeicOperacionalItem.motorista = new app_pages_cadastro_motorista_motorista_model__WEBPACK_IMPORTED_MODULE_2__["Motorista"]();
        this.confirm.emit(undefined);
    };
    ProgramacaoVeiculoOperacionalMotoristaValidadeComponent.ctorParameters = function () { return [
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_8__["ProgramacaoVeiculoOperacionalService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoVeiculoOperacionalMotoristaValidadeComponent.prototype, "confirm", void 0);
    ProgramacaoVeiculoOperacionalMotoristaValidadeComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-veiculo-operacional-motorista-validade',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-veiculo-operacional-motorista-validade.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-motorista-validade/programacao-veiculo-operacional-motorista-validade.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _programacao_veiculo_operacional_service__WEBPACK_IMPORTED_MODULE_8__["ProgramacaoVeiculoOperacionalService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"]])
    ], ProgramacaoVeiculoOperacionalMotoristaValidadeComponent);
    return ProgramacaoVeiculoOperacionalMotoristaValidadeComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.constants.ts":
/*!**************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.constants.ts ***!
  \**************************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalConstants", function() { return ProgramacaoVeiculoOperacionalConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ProgramacaoVeiculoOperacionalConstants = /** @class */ (function () {
    function ProgramacaoVeiculoOperacionalConstants() {
        this.sisFormularioId = 65644;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "EVO";
        this.nomeForm = "titles.programacaoVeiculoOperacional";
        this.reportId = "";
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: "icon-close", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: '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' },
        ];
        this.listaParam = [
            { 'sistema': 'FAT', 'parametros': ['LibExpedicao', 'ObsCliConf'] },
        ];
    }
    return ProgramacaoVeiculoOperacionalConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.model.ts":
/*!**********************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.model.ts ***!
  \**********************************************************************************************************************************/
/*! exports provided: CliFelProgVeicOperacional, CliFelProgVeicOperacionalItem, CliFelProgVeicOperacionalFiltroVo, CliFelProgVeicOperacionalDto, CliFelProgVeicOperacionalNavioDto, CliFelProgVeicOperacionalProdutoDto, CliFelProgVeicOperacionalClienteDto */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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


var CliFelProgVeicOperacional = /** @class */ (function (_super) {
    __extends(CliFelProgVeicOperacional, _super);
    function CliFelProgVeicOperacional() {
        var _this = _super.call(this) || this;
        _this.cliFelProgVeicOperacionalId = 0;
        _this.stoLaudoId = "";
        _this.stoLaudoItemId = "";
        _this.stoLaudoClienteId = "";
        _this.qtdProgramada = 0;
        _this.qtdUtilizada = 0;
        _this.tipoMov = "D";
        _this.qtdSaldo = 0;
        _this.tanqueId = "";
        _this.cliFelProgVeicOperacionalItems = [];
        return _this;
    }
    return CliFelProgVeicOperacional;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var CliFelProgVeicOperacionalItem = /** @class */ (function (_super) {
    __extends(CliFelProgVeicOperacionalItem, _super);
    function CliFelProgVeicOperacionalItem() {
        var _this = _super.call(this) || this;
        _this.cliFelProgVeicOperacionalItemId = 0;
        _this.cliFelProgVeicOperacionalId = 0;
        _this.motoristaId = 0;
        _this.placa = "";
        _this.qtdProgramada = 0;
        _this.qtdEntrada = 0;
        _this.pesoLiqMedio = 0;
        _this.flagPrimPes = "";
        _this.tanqueId = "";
        _this.situacao = "";
        _this.motorista = new app_pages_cadastro_motorista_motorista_model__WEBPACK_IMPORTED_MODULE_0__["Motorista"]();
        return _this;
    }
    return CliFelProgVeicOperacionalItem;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var CliFelProgVeicOperacionalFiltroVo = /** @class */ (function () {
    function CliFelProgVeicOperacionalFiltroVo() {
        var currentDate = new Date();
        currentDate.setDate(1);
        this.dataI = currentDate;
        this.dataF = new Date();
        this.destinatarioIdNavio = 0;
        this.destinatarioIdCliente = 0;
        this.materialId = "";
        this.apresNavioConcluido = false;
    }
    return CliFelProgVeicOperacionalFiltroVo;
}());

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

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

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

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



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.module.ts":
/*!***********************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.module.ts ***!
  \***********************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalModule", function() { return ProgramacaoVeiculoOperacionalModule; });
/* 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 _programacao_veiculo_operacional_filter_programacao_veiculo_operacional_filter_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./programacao-veiculo-operacional-filter/programacao-veiculo-operacional-filter.component */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-filter/programacao-veiculo-operacional-filter.component.ts");
/* harmony import */ var _programacao_veiculo_operacional_form_programacao_veiculo_operacional_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programacao-veiculo-operacional-form/programacao-veiculo-operacional-form.component */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-form/programacao-veiculo-operacional-form.component.ts");
/* harmony import */ var _programacao_veiculo_operacional_index_programacao_veiculo_operacional_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programacao-veiculo-operacional-index/programacao-veiculo-operacional-index.component */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-index/programacao-veiculo-operacional-index.component.ts");
/* harmony import */ var _programacao_veiculo_operacional_item_programacao_veiculo_operacional_item_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.component */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-item/programacao-veiculo-operacional-item.component.ts");
/* harmony import */ var _programacao_veiculo_operacional_motorista_validade_programacao_veiculo_operacional_motorista_validade_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./programacao-veiculo-operacional-motorista-validade/programacao-veiculo-operacional-motorista-validade.component */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-motorista-validade/programacao-veiculo-operacional-motorista-validade.component.ts");
/* harmony import */ var _programacao_veiculo_operacional_routing_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./programacao-veiculo-operacional.routing.module */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.routing.module.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};








var ProgramacaoVeiculoOperacionalModule = /** @class */ (function () {
    function ProgramacaoVeiculoOperacionalModule() {
    }
    ProgramacaoVeiculoOperacionalModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _programacao_veiculo_operacional_routing_module__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoVeiculoOperacionalRoutingModule"]],
            declarations: [
                _programacao_veiculo_operacional_index_programacao_veiculo_operacional_index_component__WEBPACK_IMPORTED_MODULE_4__["ProgramacaoVeiculoOperacionalIndexComponent"],
                _programacao_veiculo_operacional_filter_programacao_veiculo_operacional_filter_component__WEBPACK_IMPORTED_MODULE_2__["ProgramacaoVeiculoOperacionalFilterComponent"],
                _programacao_veiculo_operacional_form_programacao_veiculo_operacional_form_component__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoVeiculoOperacionalFormComponent"],
                _programacao_veiculo_operacional_item_programacao_veiculo_operacional_item_component__WEBPACK_IMPORTED_MODULE_5__["ProgramacaoVeiculoOperacionalItemComponent"],
                _programacao_veiculo_operacional_motorista_validade_programacao_veiculo_operacional_motorista_validade_component__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoVeiculoOperacionalMotoristaValidadeComponent"]
            ]
        })
    ], ProgramacaoVeiculoOperacionalModule);
    return ProgramacaoVeiculoOperacionalModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.routing.module.ts":
/*!*******************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.routing.module.ts ***!
  \*******************************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalRoutingModule", function() { return ProgramacaoVeiculoOperacionalRoutingModule; });
/* 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 _programacao_veiculo_operacional_form_programacao_veiculo_operacional_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programacao-veiculo-operacional-form/programacao-veiculo-operacional-form.component */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-form/programacao-veiculo-operacional-form.component.ts");
/* harmony import */ var _programacao_veiculo_operacional_index_programacao_veiculo_operacional_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programacao-veiculo-operacional-index/programacao-veiculo-operacional-index.component */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional-index/programacao-veiculo-operacional-index.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: _programacao_veiculo_operacional_index_programacao_veiculo_operacional_index_component__WEBPACK_IMPORTED_MODULE_4__["ProgramacaoVeiculoOperacionalIndexComponent"],
        data: { breadcrumb: "programacaoVeiculoOperacional", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "create",
        component: _programacao_veiculo_operacional_form_programacao_veiculo_operacional_form_component__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoVeiculoOperacionalFormComponent"],
        data: {
            breadcrumb: "programacaoVeiculoOperacional",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "edit/:id",
        component: _programacao_veiculo_operacional_form_programacao_veiculo_operacional_form_component__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoVeiculoOperacionalFormComponent"],
        data: {
            breadcrumb: "programacaoVeiculoOperacional",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:id",
        component: _programacao_veiculo_operacional_form_programacao_veiculo_operacional_form_component__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoVeiculoOperacionalFormComponent"],
        data: {
            breadcrumb: "programacaoVeiculoOperacional",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var ProgramacaoVeiculoOperacionalRoutingModule = /** @class */ (function () {
    function ProgramacaoVeiculoOperacionalRoutingModule() {
    }
    ProgramacaoVeiculoOperacionalRoutingModule = __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"]]
        })
    ], ProgramacaoVeiculoOperacionalRoutingModule);
    return ProgramacaoVeiculoOperacionalRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.service.ts":
/*!************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.service.ts ***!
  \************************************************************************************************************************************/
/*! exports provided: ProgramacaoVeiculoOperacionalService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoVeiculoOperacionalService", function() { return ProgramacaoVeiculoOperacionalService; });
/* 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 environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programacao-veiculo-operacional.constants */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.constants.ts");
/* harmony import */ var _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programacao-veiculo-operacional.model */ "./src/app/pages/especificos/pontafelix/movimentos/programacao-veiculo-operacional/programacao-veiculo-operacional.model.ts");
/* harmony import */ var app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/base/specifics.base.service */ "./src/app/shared/services/base/specifics.base.service.ts");
/* harmony import */ var app_pages_cadastro_motorista_motorista_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/motorista/motorista.service */ "./src/app/pages/cadastro/motorista/motorista.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_pages_veiculo_entrada_veiculo_entrada_veiculo_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/pages/veiculo/entrada-veiculo/entrada-veiculo.service */ "./src/app/pages/veiculo/entrada-veiculo/entrada-veiculo.service.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.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 ProgramacaoVeiculoOperacionalService = /** @class */ (function (_super) {
    __extends(ProgramacaoVeiculoOperacionalService, _super);
    function ProgramacaoVeiculoOperacionalService(http, message, motoristaService, entradaVeiculoService) {
        var _this = _super.call(this, http, "pontafelix/cliFelProgVeicOperacional") || this;
        _this.http = http;
        _this.message = message;
        _this.motoristaService = motoristaService;
        _this.entradaVeiculoService = entradaVeiculoService;
        _this.data = new _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_4__["CliFelProgVeicOperacional"]();
        _this.filter = new _programacao_veiculo_operacional_model__WEBPACK_IMPORTED_MODULE_4__["CliFelProgVeicOperacionalFiltroVo"]();
        _this.constantes = new _programacao_veiculo_operacional_constants__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoVeiculoOperacionalConstants"]();
        _this.errosDocMotorista = [
            { tipoDoc: 'RESTRICAO', isValid: true, message: "", data: undefined, question: true, modal: false },
        ];
        return _this;
    }
    ProgramacaoVeiculoOperacionalService.prototype.trataMotorista = function (motorista) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, valDocsMotorista;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (!motorista)
                            return [2 /*return*/];
                        _a = this.cliFelProgVeicOperacionalItem;
                        return [4 /*yield*/, this.motoristaService.getMotoristaId(motorista.motoristaId).toPromise()];
                    case 1:
                        _a.motorista = _b.sent();
                        return [4 /*yield*/, this.validaDocumentosMotorista()];
                    case 2:
                        valDocsMotorista = _b.sent();
                        if (!!valDocsMotorista) {
                            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_9__["EventEmitterService"].get('emiProgramacaoVeiculoOperacionalMotoristaValidade').emit();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoVeiculoOperacionalService.prototype.validaDocumentosMotorista = function () {
        return __awaiter(this, void 0, void 0, function () {
            var restricao$, resp;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        restricao$ = this.entradaVeiculoService.getVerifSeExisteRestricaoMotoristaPlaca({
                            "regControle": 0,
                            "motorista": this.cliFelProgVeicOperacionalItem.motoristaId,
                            "tipoVerif": 'M',
                            "placa": this.cliFelProgVeicOperacionalItem.placa
                        });
                        return [4 /*yield*/, Object(rxjs__WEBPACK_IMPORTED_MODULE_11__["forkJoin"])([restricao$]).toPromise()];
                    case 1:
                        resp = _a.sent();
                        this.errosDocMotorista[0].isValid = app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["BooleanUtilsStaticService"].toBoolean(resp[0].isValid);
                        this.errosDocMotorista[0].message = app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["ArrayUtilsStaticService"].any(resp[0].erros) ? this.message.validationResult(resp[0])[0] : "";
                        this.errosDocMotorista[0].data = undefined;
                        return [2 /*return*/, true];
                }
            });
        });
    };
    ProgramacaoVeiculoOperacionalService.prototype.validaMotorista = function (event) {
        if (!!event) {
            switch (event.tipoDoc) {
                case 'CNH':
                    this.cliFelProgVeicOperacionalItem.motorista.cnhValidade = event.data;
                    break;
                case 'RESTRICAO':
                default:
                    break;
            }
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_9__["EventEmitterService"].get('emiProgramacaoVeiculoOperacionalMotoristaValidade').emit();
        }
    };
    ProgramacaoVeiculoOperacionalService.prototype.getByFiltro = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional/getByFiltro", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.prototype.getStoLaudoNavio = function () {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional/getStoLaudoNavio")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.prototype.getStoLaudoItemProduto = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional/getStoLaudoItemProduto", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.prototype.getStoLaudoCliente = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional/getStoLaudoCliente", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.prototype.validaPlaca = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional/validaPlaca", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.prototype.validaVeiculoUtilizadoTransferenciaDeposito = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional/validaVeiculoUtilizadoTransferenciaDeposito", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.prototype.validaAbaItemNavioProdutoCliente = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional/validaAbaItemNavioProdutoCliente", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.prototype._save = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.prototype.podeRemover = function (filter) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional/podeRemover", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.prototype._remove = function (data) {
        return this.http
            .put(environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].specifics_service_url + "/api/v1/pontafelix/cliFelProgVeicOperacional/remove", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    ProgramacaoVeiculoOperacionalService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_14__["MessageService"] },
        { type: app_pages_cadastro_motorista_motorista_service__WEBPACK_IMPORTED_MODULE_8__["MotoristaService"] },
        { type: app_pages_veiculo_entrada_veiculo_entrada_veiculo_service__WEBPACK_IMPORTED_MODULE_10__["EntradaVeiculoService"] }
    ]; };
    ProgramacaoVeiculoOperacionalService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_6__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_14__["MessageService"],
            app_pages_cadastro_motorista_motorista_service__WEBPACK_IMPORTED_MODULE_8__["MotoristaService"],
            app_pages_veiculo_entrada_veiculo_entrada_veiculo_service__WEBPACK_IMPORTED_MODULE_10__["EntradaVeiculoService"]])
    ], ProgramacaoVeiculoOperacionalService);
    return ProgramacaoVeiculoOperacionalService;
}(app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_7__["SpecificsBaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-pontafelix-movimentos-programacao-veiculo-operacional-programacao-veiculo-operacional-module.js.map