Commit 23ed04dadd561f0f5d688587241c77a10c0906db
1 parent
03da991f
Exists in
master
Redmine #5043 Tela visualizar atendimento
Showing
4 changed files
with
11 additions
and
3 deletions
Show diff stats
cit-almoxarifado-api/src/main/java/br/com/centralit/api/service/impl/RequisicaoConsumoServiceImpl.java
| ... | ... | @@ -523,7 +523,9 @@ public class RequisicaoConsumoServiceImpl extends GenericServiceImpl<RequisicaoC |
| 523 | 523 | @Override |
| 524 | 524 | public List<RequisicaoConsumo> findRequisicoesParaAtendimento(AtendimentoVH atendimentoVH) { |
| 525 | 525 | List<RequisicaoConsumo> requisicoes = this.requisicaoConsumoDao.findRequisicoesParaAtendimento(atendimentoVH); |
| 526 | - this.atualizarStatusAtendimento(requisicoes); | |
| 526 | + if(atendimentoVH.isBloquearAtendimento()){ | |
| 527 | + this.atualizarStatusAtendimento(requisicoes); | |
| 528 | + } | |
| 527 | 529 | return requisicoes; |
| 528 | 530 | } |
| 529 | 531 | ... | ... |
cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/AtendimentoRequisicaoConsumoController.js
| ... | ... | @@ -297,7 +297,7 @@ citApp.controller( 'AtendimentoRequisicaoConsumoController', |
| 297 | 297 | $scope.idsRequisicoesSelecionados = atendimentoVH.idsRequisicao; |
| 298 | 298 | |
| 299 | 299 | if ($scope.idsRequisicoesSelecionados && $scope.requisicoesSelecionadas && $scope.idsRequisicoesSelecionados.length > 0) { |
| 300 | - | |
| 300 | + atendimentoVH.bloquearAtendimento = $scope.edit; | |
| 301 | 301 | iniciarAtendimentoRequisicoes(atendimentoVH); |
| 302 | 302 | } else { |
| 303 | 303 | $scope.showAlert("warning", $translate.instant('MSG.NENHUM_ITEM_SELECIONADO')); | ... | ... |
cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/AtendimentoRequisicaoConsumoListController.js
| ... | ... | @@ -221,6 +221,7 @@ citApp.controller('AtendimentoRequisicaoConsumoListController', ['$scope', 'Aten |
| 221 | 221 | }else{ |
| 222 | 222 | permiteExcluir = false; |
| 223 | 223 | $scope.showAlert('warning', $translate.instant('ALMOXARIFADO.MSG.EXCLUIR_ATENDIMENTO_SOMENTE_ATENDIMENTO_PARCIAL_FINALIZADA')); |
| 224 | + return; | |
| 224 | 225 | } |
| 225 | 226 | }); |
| 226 | 227 | ... | ... |
cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEdit.html
| ... | ... | @@ -16,10 +16,15 @@ |
| 16 | 16 | </li> |
| 17 | 17 | </ul> |
| 18 | 18 | </div> |
| 19 | - <button class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | |
| 19 | + <button ng-show="edit" class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | |
| 20 | 20 | <i class="fa fa-reply"></i> |
| 21 | 21 | <translate>ALMOXARIFADO.LABEL.CANCELAR_ATENDIMENTO_INICIADO</translate> |
| 22 | 22 | </button> |
| 23 | + <button ng-show="!edit" class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | |
| 24 | + <i class="fa fa-search"></i> | |
| 25 | + <translate>LABEL.PESQUISAR</translate> | |
| 26 | + </button> | |
| 27 | + | |
| 23 | 28 | </div><!-- .col --> |
| 24 | 29 | <div class="col-sm-4 text-right"> |
| 25 | 30 | <favorito /> | ... | ... |