Commit ba6a29bc75ced8e37cc64ec70be5cf0ebb651d92
1 parent
edd8b8bd
Exists in
master
[Redmine Atendimento #4431]Padronização tabelas contratos
Showing
4 changed files
with
146 additions
and
76 deletions
Show diff stats
cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ContratoController.js
| @@ -111,7 +111,9 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -111,7 +111,9 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 111 | $scope.contratoValorPagamentoUnicoTemp = {}; | 111 | $scope.contratoValorPagamentoUnicoTemp = {}; |
| 112 | 112 | ||
| 113 | carregarDominioPapelEnvolvido(); | 113 | carregarDominioPapelEnvolvido(); |
| 114 | - | 114 | + $scope.atualizarListaSizeSelect(); |
| 115 | + $scope.atualizarListaSizeSelectItemContrato(); | ||
| 116 | + $scope.atualizarListaSizeSelectEnvolvido(); | ||
| 115 | $scope.edit = true; | 117 | $scope.edit = true; |
| 116 | $scope.setCurrentStep(0); | 118 | $scope.setCurrentStep(0); |
| 117 | 119 | ||
| @@ -1048,6 +1050,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1048,6 +1050,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1048 | } | 1050 | } |
| 1049 | } | 1051 | } |
| 1050 | $scope.contratoEmpenhoTemp = {}; | 1052 | $scope.contratoEmpenhoTemp = {}; |
| 1053 | + $scope.atualizarListaSizeSelect(); | ||
| 1051 | $scope.$modalInstance.dismiss('cancel'); | 1054 | $scope.$modalInstance.dismiss('cancel'); |
| 1052 | } else { | 1055 | } else { |
| 1053 | 1056 | ||
| @@ -1088,12 +1091,14 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1088,12 +1091,14 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1088 | $scope.contrato.ctrtEmpenhos = $scope.contrato.ctrtEmpenhos.filter(function(empenho) { | 1091 | $scope.contrato.ctrtEmpenhos = $scope.contrato.ctrtEmpenhos.filter(function(empenho) { |
| 1089 | return empenho.$checked !== true; | 1092 | return empenho.$checked !== true; |
| 1090 | }); | 1093 | }); |
| 1094 | + $scope.atualizarListaSizeSelect(); | ||
| 1091 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | 1095 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); |
| 1092 | }); | 1096 | }); |
| 1093 | } else { | 1097 | } else { |
| 1094 | $scope.contrato.ctrtEmpenhos = $scope.contrato.ctrtEmpenhos.filter(function(empenho) { | 1098 | $scope.contrato.ctrtEmpenhos = $scope.contrato.ctrtEmpenhos.filter(function(empenho) { |
| 1095 | return empenho.$checked !== true; | 1099 | return empenho.$checked !== true; |
| 1096 | }); | 1100 | }); |
| 1101 | + $scope.atualizarListaSizeSelect(); | ||
| 1097 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | 1102 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); |
| 1098 | } | 1103 | } |
| 1099 | } | 1104 | } |
| @@ -1128,6 +1133,8 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1128,6 +1133,8 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1128 | $scope.acaoEmMassaEmpenho = false; | 1133 | $scope.acaoEmMassaEmpenho = false; |
| 1129 | $scope.selectedAllCtrtEmpenhos = false; | 1134 | $scope.selectedAllCtrtEmpenhos = false; |
| 1130 | } | 1135 | } |
| 1136 | + | ||
| 1137 | + $scope.atualizarListaSizeSelect(); | ||
| 1131 | }; | 1138 | }; |
| 1132 | 1139 | ||
| 1133 | // Responsavel por abrir modal de empenho para edicao ou visualizacao do item selecionado | 1140 | // Responsavel por abrir modal de empenho para edicao ou visualizacao do item selecionado |
| @@ -1235,6 +1242,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1235,6 +1242,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1235 | } | 1242 | } |
| 1236 | 1243 | ||
| 1237 | $scope.itemContratoTemp = {}; | 1244 | $scope.itemContratoTemp = {}; |
| 1245 | + $scope.atualizarListaSizeSelectItemContrato(); | ||
| 1238 | $scope.$modalInstance.dismiss('cancel'); | 1246 | $scope.$modalInstance.dismiss('cancel'); |
| 1239 | } else { | 1247 | } else { |
| 1240 | 1248 | ||
| @@ -1275,12 +1283,14 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1275,12 +1283,14 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1275 | $scope.contrato.ctrtItens = $scope.contrato.ctrtItens.filter(function(itemContrato) { | 1283 | $scope.contrato.ctrtItens = $scope.contrato.ctrtItens.filter(function(itemContrato) { |
| 1276 | return itemContrato.$checked !== true; | 1284 | return itemContrato.$checked !== true; |
| 1277 | }); | 1285 | }); |
| 1286 | + $scope.atualizarListaSizeSelectItemContrato(); | ||
| 1278 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | 1287 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); |
| 1279 | }); | 1288 | }); |
| 1280 | } else { | 1289 | } else { |
| 1281 | $scope.contrato.ctrtItens = $scope.contrato.ctrtItens.filter(function(itemContrato) { | 1290 | $scope.contrato.ctrtItens = $scope.contrato.ctrtItens.filter(function(itemContrato) { |
| 1282 | return itemContrato.$checked !== true; | 1291 | return itemContrato.$checked !== true; |
| 1283 | }); | 1292 | }); |
| 1293 | + $scope.atualizarListaSizeSelectItemContrato(); | ||
| 1284 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | 1294 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); |
| 1285 | } | 1295 | } |
| 1286 | } | 1296 | } |
| @@ -1315,6 +1325,8 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1315,6 +1325,8 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1315 | $scope.acaoEmMassaItemContrato = false; | 1325 | $scope.acaoEmMassaItemContrato = false; |
| 1316 | $scope.selectedAllCtrtItens = false; | 1326 | $scope.selectedAllCtrtItens = false; |
| 1317 | } | 1327 | } |
| 1328 | + | ||
| 1329 | + $scope.atualizarListaSizeSelectItemContrato(); | ||
| 1318 | }; | 1330 | }; |
| 1319 | 1331 | ||
| 1320 | // Responsavel por abrir modal de item de contrato para edicao ou visualizacao do item selecionado | 1332 | // Responsavel por abrir modal de item de contrato para edicao ou visualizacao do item selecionado |
| @@ -1421,6 +1433,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1421,6 +1433,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1421 | $scope.contratoEnvolvidoTemp = {justificativas : []}; | 1433 | $scope.contratoEnvolvidoTemp = {justificativas : []}; |
| 1422 | $scope.justificativaTemp = {}; | 1434 | $scope.justificativaTemp = {}; |
| 1423 | $scope.hasAlteracaoEnvolvido = false; | 1435 | $scope.hasAlteracaoEnvolvido = false; |
| 1436 | + $scope.atualizarListaSizeSelectEnvolvido(); | ||
| 1424 | if (continuarEditando) { | 1437 | if (continuarEditando) { |
| 1425 | formDialogEnvolvido.$submitted = false; | 1438 | formDialogEnvolvido.$submitted = false; |
| 1426 | formDialogEnvolvido.$setPristine(); | 1439 | formDialogEnvolvido.$setPristine(); |
| @@ -1501,6 +1514,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1501,6 +1514,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1501 | papelExcluido = contratoEnvolvido.dominioPapelEnvolvidoContrato; | 1514 | papelExcluido = contratoEnvolvido.dominioPapelEnvolvidoContrato; |
| 1502 | return contratoEnvolvido.$checked !== true; | 1515 | return contratoEnvolvido.$checked !== true; |
| 1503 | }); | 1516 | }); |
| 1517 | + $scope.atualizarListaSizeSelectEnvolvido(); | ||
| 1504 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | 1518 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); |
| 1505 | }); | 1519 | }); |
| 1506 | } else { | 1520 | } else { |
| @@ -1508,6 +1522,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1508,6 +1522,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1508 | papelExcluido = contratoEnvolvido.dominioPapelEnvolvidoContrato; | 1522 | papelExcluido = contratoEnvolvido.dominioPapelEnvolvidoContrato; |
| 1509 | return contratoEnvolvido.$checked !== true; | 1523 | return contratoEnvolvido.$checked !== true; |
| 1510 | }); | 1524 | }); |
| 1525 | + $scope.atualizarListaSizeSelectEnvolvido(); | ||
| 1511 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | 1526 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); |
| 1512 | } | 1527 | } |
| 1513 | 1528 | ||
| @@ -1544,6 +1559,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1544,6 +1559,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1544 | $scope.acaoEmMassaEnvolvido = false; | 1559 | $scope.acaoEmMassaEnvolvido = false; |
| 1545 | $scope.selectedAllCtrtEnvolvidos = false; | 1560 | $scope.selectedAllCtrtEnvolvidos = false; |
| 1546 | } | 1561 | } |
| 1562 | + $scope.atualizarListaSizeSelectEnvolvido(); | ||
| 1547 | }; | 1563 | }; |
| 1548 | 1564 | ||
| 1549 | // Responsavel por abrir modal de envolvido para edicao ou visualizacao do item selecionado | 1565 | // Responsavel por abrir modal de envolvido para edicao ou visualizacao do item selecionado |
| @@ -1591,5 +1607,40 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1591,5 +1607,40 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
| 1591 | $scope.radioValueList = [{descricao : $translate.instant('LABEL.SIM'), valor : true}, | 1607 | $scope.radioValueList = [{descricao : $translate.instant('LABEL.SIM'), valor : true}, |
| 1592 | {descricao : $translate.instant('LABEL.NAO'), valor : false}]; | 1608 | {descricao : $translate.instant('LABEL.NAO'), valor : false}]; |
| 1593 | 1609 | ||
| 1610 | + $scope.atualizarListaSizeSelect = function() { | ||
| 1611 | + if(!$scope.listaSize){ | ||
| 1612 | + $scope.listaSize = 0; | ||
| 1613 | + }; | ||
| 1614 | + var lista = $scope.contrato.ctrtEmpenhos.filter(function(empenho) { | ||
| 1615 | + return empenho.$checked === true; | ||
| 1616 | + }); | ||
| 1617 | + $scope.listaSize = lista.length; | ||
| 1618 | + }; | ||
| 1619 | + | ||
| 1620 | + $scope.atualizarListaSizeSelectItemContrato = function() { | ||
| 1621 | + if(!$scope.listaSizeItemContrato){ | ||
| 1622 | + $scope.listaSizeItemContrato = 0; | ||
| 1623 | + }; | ||
| 1624 | + | ||
| 1625 | + var lista = $scope.contrato.ctrtItens.filter(function(itemContrato) { | ||
| 1626 | + return itemContrato.$checked === true; | ||
| 1627 | + }); | ||
| 1628 | + | ||
| 1629 | + $scope.listaSizeItemContrato = lista.length; | ||
| 1630 | + }; | ||
| 1631 | + | ||
| 1632 | + $scope.atualizarListaSizeSelectEnvolvido = function() { | ||
| 1633 | + if(!$scope.listaSizeEnvolvido){ | ||
| 1634 | + $scope.listaSizeEnvolvido = 0; | ||
| 1635 | + }; | ||
| 1636 | + | ||
| 1637 | + var lista = $scope.contrato.ctrtEnvolvidos.filter(function(envolvido) { | ||
| 1638 | + return envolvido.$checked === true; | ||
| 1639 | + }); | ||
| 1640 | + | ||
| 1641 | + $scope.listaSizeEnvolvido = lista.length; | ||
| 1642 | + }; | ||
| 1643 | + | ||
| 1644 | + | ||
| 1594 | // ########################### FIM: STEP: INFORMACOES DE ENVOLVIDOS ####################### | 1645 | // ########################### FIM: STEP: INFORMACOES DE ENVOLVIDOS ####################### |
| 1595 | }]); | 1646 | }]); |
cit-contratos-web/src/main/webapp/html/contrato/contratoPg3.html
| @@ -17,30 +17,36 @@ | @@ -17,30 +17,36 @@ | ||
| 17 | <div class="row margin-top"> | 17 | <div class="row margin-top"> |
| 18 | <div class="col-sm-12"> | 18 | <div class="col-sm-12"> |
| 19 | <div class="panel panel-default"> | 19 | <div class="panel panel-default"> |
| 20 | - <div class="panel-heading clearfix"> | ||
| 21 | - <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" type="button" ng-disabled="!edit || contrato.id" | ||
| 22 | - ng-click="openModalEmpenho();"> | ||
| 23 | - <i class="fa fa-plus-circle yellow-dark"></i> | ||
| 24 | - <translate>LABEL.ADICIONAR</translate> | ||
| 25 | - </button> | ||
| 26 | - | ||
| 27 | - <button title="{{$translate.instant('LABEL.VISUALIZAR')}}" alt="{{$translate.instant('LABEL.VISUALIZAR')}}" class="btn btn-clear" type="button" | ||
| 28 | - ng-click="abrirEmpenho(false);" ng-disabled="acaoEmMassaEmpenho"> | ||
| 29 | - <i class="fa fa-search blue"></i> | ||
| 30 | - <translate>LABEL.VISUALIZAR</translate> | ||
| 31 | - </button> | ||
| 32 | - | ||
| 33 | - <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" class="btn btn-clear" type="button" | ||
| 34 | - ng-click="abrirEmpenho(true);" ng-disabled="acaoEmMassaEmpenho || !edit || contrato.id"> | ||
| 35 | - <i class="fa fa-pencil blue"></i> | ||
| 36 | - <translate>LABEL.EDITAR</translate> | ||
| 37 | - </button> | ||
| 38 | - | ||
| 39 | - <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" ng-disabled="acaoEmMassaEmpenho || !edit || contrato.id" class="btn btn-clear" type="button" | ||
| 40 | - ng-click="removerEmpenho();"> | ||
| 41 | - <i class="fa fa-times red"></i> | ||
| 42 | - <translate>LABEL.REMOVER</translate> | ||
| 43 | - </button> | 20 | + <div class="panel-heading clearfix col-sm-12 text-left"> |
| 21 | + | ||
| 22 | + <div class="col-sm-1" tooltip="{{ !edit ? $translate.instant('PORTAL.MSG.ADICIONAR_NAO_PERMITIDO_ACAO_VISUALIZAR') : '' }}"> | ||
| 23 | + <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" type="button" ng-disabled="!edit || contrato.id" | ||
| 24 | + ng-click="openModalEmpenho();"> | ||
| 25 | + <i class="fa fa-plus-circle yellow-dark"></i> | ||
| 26 | + <translate>LABEL.ADICIONAR</translate> | ||
| 27 | + </button> | ||
| 28 | + </div> | ||
| 29 | + <div class="col-sm-1" tooltip="{{ listaSize == 0 ? $translate.instant('PORTAL.MSG.VISUALIZAR_SELECIONE_ITEM') : listaSize > 1 ? $translate.instant('PORTAL.MSG.VISUALIZAR_DISABLED_SELECIONADOS') : '' }}"> | ||
| 30 | + <button title="{{$translate.instant('LABEL.VISUALIZAR')}}" alt="{{$translate.instant('LABEL.VISUALIZAR')}}" class="btn btn-clear" type="button" | ||
| 31 | + ng-click="abrirEmpenho(false);" ng-disabled="listaSize != 1"> | ||
| 32 | + <i class="fa fa-search blue"></i> | ||
| 33 | + <translate>LABEL.VISUALIZAR</translate> | ||
| 34 | + </button> | ||
| 35 | + </div> | ||
| 36 | + <div class="col-sm-1" tooltip="{{ listaSize == 0 && edit ? $translate.instant('PORTAL.MSG.EDITAR_SELECIONE_ITEM') : listaSize > 1 ? $translate.instant('PORTAL.MSG.EDITAR_DISABLED_SELECIONADOS') : !edit ? $translate.instant('PORTAL.MSG.EDITAR_NAO_PERMITIDO_ACAO_VISUALIZAR') : '' }}"> | ||
| 37 | + <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" class="btn btn-clear" type="button" | ||
| 38 | + ng-click="abrirEmpenho(true);" ng-disabled="listaSize != 1 || !edit || contrato.id"> | ||
| 39 | + <i class="fa fa-pencil blue"></i> | ||
| 40 | + <translate>LABEL.EDITAR</translate> | ||
| 41 | + </button> | ||
| 42 | + </div> | ||
| 43 | + <div class="col-sm-1" tooltip="{{ listaSize == 0 && edit ? $translate.instant('PORTAL.MSG.EXCLUIR_SELECIONE_ITEM') : !edit ? $translate.instant('PORTAL.MSG.EXCLUIR_NAO_PERMITIDO_ACAO_VISUALIZAR') : '' }}"> | ||
| 44 | + <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" ng-disabled="listaSize == 0 || !edit || contrato.id" class="btn btn-clear" type="button" | ||
| 45 | + ng-click="removerEmpenho();"> | ||
| 46 | + <i class="fa fa-times red"></i> | ||
| 47 | + <translate>LABEL.REMOVER</translate> | ||
| 48 | + </button> | ||
| 49 | + </div> | ||
| 44 | </div><!-- .panel-heading --> | 50 | </div><!-- .panel-heading --> |
| 45 | <table class="table table-bordered table-striped"> | 51 | <table class="table table-bordered table-striped"> |
| 46 | <thead> | 52 | <thead> |
| @@ -59,7 +65,7 @@ | @@ -59,7 +65,7 @@ | ||
| 59 | <td colspan="7" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td> | 65 | <td colspan="7" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td> |
| 60 | </tr> | 66 | </tr> |
| 61 | <tr ng-repeat="empenho in contrato.ctrtEmpenhos"> | 67 | <tr ng-repeat="empenho in contrato.ctrtEmpenhos"> |
| 62 | - <td class="text-center"><input type="checkbox" ng-model="empenho.$checked" ng-checked="empenho.$checked" ng-click="checkEmpenho()"/></td> | 68 | + <td class="text-center"><input type="checkbox" ng-model="empenho.$checked" ng-checked="empenho.$checked" ng-click="checkEmpenho(); atualizarListaSizeSelect()"/></td> |
| 63 | <td class="text-center">{{ empenho.numeroEmpenho }}</td> | 69 | <td class="text-center">{{ empenho.numeroEmpenho }}</td> |
| 64 | <td class="text-center">{{ empenho.data | date:'dd/MM/yyyy' }}</td> | 70 | <td class="text-center">{{ empenho.data | date:'dd/MM/yyyy' }}</td> |
| 65 | <td>{{ empenho.dominioFinalidadeEmpenho.descricao }}</td> | 71 | <td>{{ empenho.dominioFinalidadeEmpenho.descricao }}</td> |
cit-contratos-web/src/main/webapp/html/contrato/contratoPg4.html
| @@ -49,30 +49,36 @@ | @@ -49,30 +49,36 @@ | ||
| 49 | <div class="row margin-top"> | 49 | <div class="row margin-top"> |
| 50 | <div class="col-sm-12"> | 50 | <div class="col-sm-12"> |
| 51 | <div class="panel panel-default"> | 51 | <div class="panel panel-default"> |
| 52 | - <div class="panel-heading clearfix"> | ||
| 53 | - <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" type="button"ng-disabled="acaoEmMassaItemContrato || !edit || contrato.id" | ||
| 54 | - ng-click="openModalItemContrato();"> | ||
| 55 | - <i class="fa fa-plus-circle yellow-dark"></i> | ||
| 56 | - <translate>LABEL.ADICIONAR</translate> | ||
| 57 | - </button> | ||
| 58 | - | ||
| 59 | - <button title="{{$translate.instant('LABEL.VISUALIZAR')}}" alt="{{$translate.instant('LABEL.VISUALIZAR')}}" class="btn btn-clear" type="button" | ||
| 60 | - ng-click="abrirItemContrato(false);" ng-disabled="acaoEmMassaItemContrato"> | ||
| 61 | - <i class="fa fa-search blue"></i> | ||
| 62 | - <translate>LABEL.VISUALIZAR</translate> | ||
| 63 | - </button> | ||
| 64 | - | ||
| 65 | - <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" ng-show="edit" class="btn btn-clear" type="button" | ||
| 66 | - ng-click="abrirItemContrato(true);" ng-disabled="acaoEmMassaItemContrato || !edit || contrato.id"> | ||
| 67 | - <i class="fa fa-pencil blue"></i> | ||
| 68 | - <translate>LABEL.EDITAR</translate> | ||
| 69 | - </button> | ||
| 70 | - | ||
| 71 | - <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" ng-disabled="acaoEmMassaItemContrato || !edit || contrato.id" class="btn btn-clear" type="button" | ||
| 72 | - ng-click="removerItemContrato();"> | ||
| 73 | - <i class="fa fa-times red"></i> | ||
| 74 | - <translate>LABEL.REMOVER</translate> | ||
| 75 | - </button> | 52 | + <div class="panel-heading clearfix col-sm-12 text-left"> |
| 53 | + | ||
| 54 | + <div class="col-sm-1" tooltip="{{ !edit ? $translate.instant('PORTAL.MSG.ADICIONAR_NAO_PERMITIDO_ACAO_VISUALIZAR') : '' }}"> | ||
| 55 | + <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" type="button" ng-disabled="!edit || contrato.id" | ||
| 56 | + ng-click="openModalItemContrato();"> | ||
| 57 | + <i class="fa fa-plus-circle yellow-dark"></i> | ||
| 58 | + <translate>LABEL.ADICIONAR</translate> | ||
| 59 | + </button> | ||
| 60 | + </div> | ||
| 61 | + <div class="col-sm-1" tooltip="{{ listaSizeItemContrato == 0 ? $translate.instant('PORTAL.MSG.VISUALIZAR_SELECIONE_ITEM') : listaSizeItemContrato > 1 ? $translate.instant('PORTAL.MSG.VISUALIZAR_DISABLED_SELECIONADOS') : '' }}"> | ||
| 62 | + <button title="{{$translate.instant('LABEL.VISUALIZAR')}}" alt="{{$translate.instant('LABEL.VISUALIZAR')}}" class="btn btn-clear" type="button" | ||
| 63 | + ng-click="abrirItemContrato(false);" ng-disabled="listaSizeItemContrato != 1"> | ||
| 64 | + <i class="fa fa-search blue"></i> | ||
| 65 | + <translate>LABEL.VISUALIZAR</translate> | ||
| 66 | + </button> | ||
| 67 | + </div> | ||
| 68 | + <div class="col-sm-1" tooltip="{{ listaSizeItemContrato == 0 && edit ? $translate.instant('PORTAL.MSG.EDITAR_SELECIONE_ITEM') : listaSizeItemContrato > 1 ? $translate.instant('PORTAL.MSG.EDITAR_DISABLED_SELECIONADOS') : !edit ? $translate.instant('PORTAL.MSG.EDITAR_NAO_PERMITIDO_ACAO_VISUALIZAR') : '' }}"> | ||
| 69 | + <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" class="btn btn-clear" type="button" | ||
| 70 | + ng-click="abrirItemContrato(true);" ng-disabled="listaSizeItemContrato != 1 || !edit || contrato.id"> | ||
| 71 | + <i class="fa fa-pencil blue"></i> | ||
| 72 | + <translate>LABEL.EDITAR</translate> | ||
| 73 | + </button> | ||
| 74 | + </div> | ||
| 75 | + <div class="col-sm-1" tooltip="{{ listaSizeItemContrato == 0 && edit ? $translate.instant('PORTAL.MSG.EXCLUIR_SELECIONE_ITEM') : !edit ? $translate.instant('PORTAL.MSG.EXCLUIR_NAO_PERMITIDO_ACAO_VISUALIZAR') : '' }}"> | ||
| 76 | + <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" ng-disabled="listaSizeItemContrato == 0 || !edit || contrato.id" class="btn btn-clear" type="button" | ||
| 77 | + ng-click="removerItemContrato();"> | ||
| 78 | + <i class="fa fa-times red"></i> | ||
| 79 | + <translate>LABEL.REMOVER</translate> | ||
| 80 | + </button> | ||
| 81 | + </div> | ||
| 76 | </div><!-- .panel-heading --> | 82 | </div><!-- .panel-heading --> |
| 77 | <table class="table table-bordered table-striped"> | 83 | <table class="table table-bordered table-striped"> |
| 78 | <thead> | 84 | <thead> |
| @@ -89,7 +95,7 @@ | @@ -89,7 +95,7 @@ | ||
| 89 | <td colspan="5" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td> | 95 | <td colspan="5" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td> |
| 90 | </tr> | 96 | </tr> |
| 91 | <tr ng-repeat="itemContrato in contrato.ctrtItens"> | 97 | <tr ng-repeat="itemContrato in contrato.ctrtItens"> |
| 92 | - <td class="text-center"><input type="checkbox" ng-model="itemContrato.$checked" ng-checked="itemContrato.$checked" ng-click="checkItemContrato()"/></td> | 98 | + <td class="text-center"><input type="checkbox" ng-model="itemContrato.$checked" ng-checked="itemContrato.$checked" ng-click="checkItemContrato(); atualizarListaSizeSelectItemContrato()"/></td> |
| 93 | <td class="text-center">{{ itemContrato.quantidade }}</td> | 99 | <td class="text-center">{{ itemContrato.quantidade }}</td> |
| 94 | <td>{{ itemContrato.estudoTecnicoBemServicoSolucao.nomeBemServicoSolucao }}</td> | 100 | <td>{{ itemContrato.estudoTecnicoBemServicoSolucao.nomeBemServicoSolucao }}</td> |
| 95 | <td class="text-center">{{ itemContrato.valorUnitarioItem | currency}}</td> | 101 | <td class="text-center">{{ itemContrato.valorUnitarioItem | currency}}</td> |
cit-contratos-web/src/main/webapp/html/contrato/contratoPg5.html
| @@ -17,31 +17,38 @@ | @@ -17,31 +17,38 @@ | ||
| 17 | <div class="row margin-top"> | 17 | <div class="row margin-top"> |
| 18 | <div class="col-sm-12"> | 18 | <div class="col-sm-12"> |
| 19 | <div class="panel panel-default"> | 19 | <div class="panel panel-default"> |
| 20 | - <div class="panel-heading clearfix"> | ||
| 21 | - <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" type="button" ng-show="edit" | ||
| 22 | - ng-click="openModalContratoEnvolvido();"> | ||
| 23 | - <i class="fa fa-plus-circle yellow-dark"></i> | ||
| 24 | - <translate>LABEL.ADICIONAR</translate> | ||
| 25 | - </button> | ||
| 26 | - | ||
| 27 | - <button title="{{$translate.instant('LABEL.VISUALIZAR')}}" alt="{{$translate.instant('LABEL.VISUALIZAR')}}" class="btn btn-clear" type="button" | ||
| 28 | - ng-click="visualizarEditarContratoEnvolvido(false);" ng-if="!acaoEmMassaEnvolvido"> | ||
| 29 | - <i class="fa fa-search blue"></i> | ||
| 30 | - <translate>LABEL.VISUALIZAR</translate> | ||
| 31 | - </button> | ||
| 32 | - | ||
| 33 | - <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" ng-show="edit" class="btn btn-clear" type="button" | ||
| 34 | - ng-click="visualizarEditarContratoEnvolvido(true);" ng-if="!acaoEmMassaEnvolvido"> | ||
| 35 | - <i class="fa fa-pencil blue"></i> | ||
| 36 | - <translate>LABEL.EDITAR</translate> | ||
| 37 | - </button> | ||
| 38 | - | ||
| 39 | - <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" ng-show="edit" class="btn btn-clear" type="button" | ||
| 40 | - ng-click="removerContratoEnvolvido();" ng-disabled="contrato.id && edit && contrato.ctrtEnvolvidos.length <= 3"> | ||
| 41 | - <i class="fa fa-times red"></i> | ||
| 42 | - <translate>LABEL.REMOVER</translate> | ||
| 43 | - </button> | 20 | + <div class="panel-heading clearfix col-sm-12 text-left"> |
| 21 | + | ||
| 22 | + <div class="col-sm-1" tooltip="{{ !edit ? $translate.instant('PORTAL.MSG.ADICIONAR_NAO_PERMITIDO_ACAO_VISUALIZAR') : '' }}"> | ||
| 23 | + <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" type="button" ng-disabled="!edit" | ||
| 24 | + ng-click="openModalContratoEnvolvido();"> | ||
| 25 | + <i class="fa fa-plus-circle yellow-dark"></i> | ||
| 26 | + <translate>LABEL.ADICIONAR</translate> | ||
| 27 | + </button> | ||
| 28 | + </div> | ||
| 29 | + <div class="col-sm-1" tooltip="{{ listaSizeEnvolvido == 0 ? $translate.instant('PORTAL.MSG.VISUALIZAR_SELECIONE_ITEM') : listaSizeEnvolvido > 1 ? $translate.instant('PORTAL.MSG.VISUALIZAR_DISABLED_SELECIONADOS') : '' }}"> | ||
| 30 | + <button title="{{$translate.instant('LABEL.VISUALIZAR')}}" alt="{{$translate.instant('LABEL.VISUALIZAR')}}" class="btn btn-clear" type="button" | ||
| 31 | + ng-click="visualizarEditarContratoEnvolvido(false);" ng-disabled="listaSizeEnvolvido != 1"> | ||
| 32 | + <i class="fa fa-search blue"></i> | ||
| 33 | + <translate>LABEL.VISUALIZAR</translate> | ||
| 34 | + </button> | ||
| 35 | + </div> | ||
| 36 | + <div class="col-sm-1" tooltip="{{ listaSizeEnvolvido == 0 && edit ? $translate.instant('PORTAL.MSG.EDITAR_SELECIONE_ITEM') : listaSizeEnvolvido > 1 ? $translate.instant('PORTAL.MSG.EDITAR_DISABLED_SELECIONADOS') : !edit ? $translate.instant('PORTAL.MSG.EDITAR_NAO_PERMITIDO_ACAO_VISUALIZAR') : '' }}"> | ||
| 37 | + <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" ng-disabled="listaSizeEnvolvido != 1 " class="btn btn-clear" type="button" | ||
| 38 | + ng-click="visualizarEditarContratoEnvolvido(true);" > | ||
| 39 | + <i class="fa fa-pencil blue"></i> | ||
| 40 | + <translate>LABEL.EDITAR</translate> | ||
| 41 | + </button> | ||
| 42 | + </div> | ||
| 43 | + <div class="col-sm-1" tooltip="{{ listaSizeEnvolvido == 0 && edit ? $translate.instant('PORTAL.MSG.EXCLUIR_SELECIONE_ITEM') : !edit ? $translate.instant('PORTAL.MSG.EXCLUIR_NAO_PERMITIDO_ACAO_VISUALIZAR') : '' }}"> | ||
| 44 | + <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" class="btn btn-clear" type="button" | ||
| 45 | + ng-click="removerContratoEnvolvido();" ng-disabled="listaSizeEnvolvido == 0 || !edit || contrato.ctrtEnvolvidos.length <= 3"> | ||
| 46 | + <i class="fa fa-times red"></i> | ||
| 47 | + <translate>LABEL.REMOVER</translate> | ||
| 48 | + </button> | ||
| 49 | + </div> | ||
| 44 | </div><!-- .panel-heading --> | 50 | </div><!-- .panel-heading --> |
| 51 | + | ||
| 45 | <table class="table table-bordered table-striped"> | 52 | <table class="table table-bordered table-striped"> |
| 46 | <thead> | 53 | <thead> |
| 47 | <tr> | 54 | <tr> |
| @@ -55,7 +62,7 @@ | @@ -55,7 +62,7 @@ | ||
| 55 | <td colspan="3" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td> | 62 | <td colspan="3" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td> |
| 56 | </tr> | 63 | </tr> |
| 57 | <tr ng-repeat="contratoEnvolvido in contrato.ctrtEnvolvidos"> | 64 | <tr ng-repeat="contratoEnvolvido in contrato.ctrtEnvolvidos"> |
| 58 | - <td class="text-center"><input type="checkbox" ng-model="contratoEnvolvido.$checked" ng-checked="contratoEnvolvido.$checked" ng-click="checkContratoEnvolvido()"/></td> | 65 | + <td class="text-center"><input type="checkbox" ng-model="contratoEnvolvido.$checked" ng-checked="contratoEnvolvido.$checked" ng-click="checkContratoEnvolvido(); atualizarListaSizeSelectEnvolvido()"/></td> |
| 59 | <td>{{ contratoEnvolvido.envolvido.pessoa.nome }}</td> | 66 | <td>{{ contratoEnvolvido.envolvido.pessoa.nome }}</td> |
| 60 | <td>{{ contratoEnvolvido.dominioPapelEnvolvidoContrato.descricao }}</td> | 67 | <td>{{ contratoEnvolvido.dominioPapelEnvolvidoContrato.descricao }}</td> |
| 61 | </tr> | 68 | </tr> |