Commit 58d1e05fc7fe327c6f933892f684fd38dfb91200
1 parent
7ee69783
Exists in
master
Redmine #4788 Bloqueios de campos visualizar material
Showing
3 changed files
with
18 additions
and
18 deletions
Show diff stats
cit-adm-materiais-web/src/main/webapp/html/material/materialCaracteristica.html
@@ -13,15 +13,15 @@ | @@ -13,15 +13,15 @@ | ||
13 | <div class="widget-main clearfix"> | 13 | <div class="widget-main clearfix"> |
14 | <div class="row"> | 14 | <div class="row"> |
15 | <div class="col-sm-6"> | 15 | <div class="col-sm-6"> |
16 | - <auto-complete button-new-show="true" button-new-tooltip="{{$translate.instant('LABEL.CLIQUE_ADD_CARATERISTICA')}}" button-new-action="novaCaracteristica();" | ||
17 | - ng-find="findCaracteristica(value)" ng-label="LABEL.CARACTERISTICA" ng-acao-borracha="limparCaracteristicaAutoComplete(item)" | 16 | + <auto-complete button-new-show="edit" button-new-tooltip="{{$translate.instant('LABEL.CLIQUE_ADD_CARATERISTICA')}}" button-new-action="novaCaracteristica();" |
17 | + ng-find="findCaracteristica(value)" ng-label="LABEL.CARACTERISTICA" ng-acao-borracha="limparCaracteristicaAutoComplete(item)" ng-show="edit" | ||
18 | ng-item="item.descricao" ng-id="materialCaracteristica.caracteristica" ng-model="materialCaracteristica.caracteristica" ng-disabled="materialCaracteristica.$edit" /> | 18 | ng-item="item.descricao" ng-id="materialCaracteristica.caracteristica" ng-model="materialCaracteristica.caracteristica" ng-disabled="materialCaracteristica.$edit" /> |
19 | </div> | 19 | </div> |
20 | <div class="col-sm-2"> | 20 | <div class="col-sm-2"> |
21 | <div class="form-group no-label"> | 21 | <div class="form-group no-label"> |
22 | <div class="input-group"> | 22 | <div class="input-group"> |
23 | <label> | 23 | <label> |
24 | - <input type="checkbox" ng-model="materialCaracteristica.obrigatorio" value="true" /> | 24 | + <input type="checkbox" ng-model="materialCaracteristica.obrigatorio" value="true" ng-disabled="!edit"/> |
25 | <translate>LABEL.OBRIGATORIO</translate> | 25 | <translate>LABEL.OBRIGATORIO</translate> |
26 | </label> | 26 | </label> |
27 | </div> | 27 | </div> |
@@ -43,23 +43,23 @@ | @@ -43,23 +43,23 @@ | ||
43 | <div class="col-sm-12"> | 43 | <div class="col-sm-12"> |
44 | <div class="panel panel-default"> | 44 | <div class="panel panel-default"> |
45 | <div class="panel-heading clearfix"> | 45 | <div class="panel-heading clearfix"> |
46 | - <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" ng-click="adicionarCaracteristica()" ng-disabled="!materialCaracteristica.caracteristica.id" type="button"> | 46 | + <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" ng-click="adicionarCaracteristica()" ng-disabled="!materialCaracteristica.caracteristica.id && !edit" type="button"> |
47 | <i class="fa fa-plus-circle yellow-dark"></i> | 47 | <i class="fa fa-plus-circle yellow-dark"></i> |
48 | <translate>LABEL.ADICIONAR</translate> </a> | 48 | <translate>LABEL.ADICIONAR</translate> </a> |
49 | </button> | 49 | </button> |
50 | 50 | ||
51 | - <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" class="btn btn-clear" ng-click="editCaracteristica();" ng-show="material.materialCaracteristicas.length > 0" type="button"> | 51 | + <button title="{{$translate.instant('LABEL.EDITAR')}}" ng-disabled="!edit" alt="{{$translate.instant('LABEL.EDITAR')}}" class="btn btn-clear" ng-click="editCaracteristica();" ng-show="material.materialCaracteristicas.length > 0" type="button"> |
52 | <i class="fa fa-pencil blue"></i> | 52 | <i class="fa fa-pencil blue"></i> |
53 | <translate>LABEL.EDITAR</translate> | 53 | <translate>LABEL.EDITAR</translate> |
54 | </button> | 54 | </button> |
55 | 55 | ||
56 | - <button-lock ng-model="dataBloqueio" action-lock="bloquearCaracteristica(dataBloqueio);" ng-show="apresentarBloquearCaracteristica"></button-lock> | 56 | + <button-lock ng-model="dataBloqueio" ng-disabled="!edit" action-lock="bloquearCaracteristica(dataBloqueio);" ng-show="apresentarBloquearCaracteristica"></button-lock> |
57 | 57 | ||
58 | <button title="{{$translate.instant('LABEL.DESBLOQUEAR')}}" alt="{{$translate.instant('LABEL.DESBLOQUEAR')}}" class="btn btn-clear" ng-show="apresentarDesbloquearCaracteristica" ng-click="desbloquearCaracteristica()" type="button"> | 58 | <button title="{{$translate.instant('LABEL.DESBLOQUEAR')}}" alt="{{$translate.instant('LABEL.DESBLOQUEAR')}}" class="btn btn-clear" ng-show="apresentarDesbloquearCaracteristica" ng-click="desbloquearCaracteristica()" type="button"> |
59 | <i class="fa fa-unlock grey"></i> <translate>LABEL.DESBLOQUEAR</translate> | 59 | <i class="fa fa-unlock grey"></i> <translate>LABEL.DESBLOQUEAR</translate> |
60 | </button> | 60 | </button> |
61 | 61 | ||
62 | - <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" class="btn btn-clear" ng-click="excluirCaracteristica()" ng-show="material.materialCaracteristicas.length > 0" type="button"> | 62 | + <button title="{{$translate.instant('LABEL.REMOVER')}}" ng-disabled="!edit" alt="{{$translate.instant('LABEL.REMOVER')}}" class="btn btn-clear" ng-click="excluirCaracteristica()" ng-show="material.materialCaracteristicas.length > 0" type="button"> |
63 | <i class="fa fa-close red"></i> | 63 | <i class="fa fa-close red"></i> |
64 | <translate>LABEL.REMOVER</translate> </a> | 64 | <translate>LABEL.REMOVER</translate> </a> |
65 | </button> | 65 | </button> |
@@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
88 | <tbody> | 88 | <tbody> |
89 | <tr ng-repeat="mat in material.materialCaracteristicas"> | 89 | <tr ng-repeat="mat in material.materialCaracteristicas"> |
90 | <td class="text-center"> | 90 | <td class="text-center"> |
91 | - <input type="radio" name="materialCaracteristicaSelected" ng-checked="mat.$checked" ng-click="checkMaterialCaracteristica(mat)"/> | 91 | + <input type="radio" ng-disabled="!edit" name="materialCaracteristicaSelected" ng-checked="mat.$checked" ng-click="checkMaterialCaracteristica(mat)"/> |
92 | </td> | 92 | </td> |
93 | <td> | 93 | <td> |
94 | {{mat.caracteristica.descricao}} | 94 | {{mat.caracteristica.descricao}} |
cit-adm-materiais-web/src/main/webapp/html/material/materialDadosMaterial.html
@@ -43,9 +43,9 @@ | @@ -43,9 +43,9 @@ | ||
43 | </div> | 43 | </div> |
44 | </div> | 44 | </div> |
45 | <div class="col-sm-4"> | 45 | <div class="col-sm-4"> |
46 | - <auto-complete ng-find="findContaContabil(value)" ng-show='material.dominioTipoMaterial.codigo' button-new-show="true" button-new-tooltip="{{$translate.instant('LABEL.CLIQUE_ADD_CONTA')}}" | 46 | + <auto-complete ng-find="findContaContabil(value)" ng-show='material.dominioTipoMaterial.codigo' button-new-show="edit" button-new-tooltip="{{$translate.instant('LABEL.CLIQUE_ADD_CONTA')}}" |
47 | button-new-action="novaContaContabil();" ng-item="item.codigo + ' / ' + item.descricao" ng-id="material.contaContabil" ng-label="LABEL.CONTA_CONTABIL" ng-model="material.contaContabil" | 47 | button-new-action="novaContaContabil();" ng-item="item.codigo + ' / ' + item.descricao" ng-id="material.contaContabil" ng-label="LABEL.CONTA_CONTABIL" ng-model="material.contaContabil" |
48 | - ng-disabled="material.id" form="materialForm" ng-obrigatorio="true" ng-min-length="1"></auto-complete> | 48 | + ng-disabled="material.id" form="materialForm" ng-obrigatorio="true" ng-min-length="1" ng-disabled="!edit" ></auto-complete> |
49 | </div> | 49 | </div> |
50 | 50 | ||
51 | <div class="col-sm-2" ng-show="material.dominioTipoMaterial.codigo == 2"> | 51 | <div class="col-sm-2" ng-show="material.dominioTipoMaterial.codigo == 2"> |
@@ -60,7 +60,7 @@ | @@ -60,7 +60,7 @@ | ||
60 | </div> | 60 | </div> |
61 | 61 | ||
62 | <div class="col-sm-6"> | 62 | <div class="col-sm-6"> |
63 | - <label-input ng-show='material.dominioTipoMaterial.codigo == 1' ng-id="material.elementoDespesa" name="material.elementoDespesa" ng-typ="text" ng-obrigatorio='false' ng-label="ADMINISTRACAODEMATERIAIS.LABEL.ELEMENTO_DESPESA" ng-model="material.elementoDespesa"/> | 63 | + <label-input ng-show='material.dominioTipoMaterial.codigo == 1' ng-id="material.elementoDespesa" name="material.elementoDespesa" ng-typ="text" ng-obrigatorio='false' ng-label="ADMINISTRACAODEMATERIAIS.LABEL.ELEMENTO_DESPESA" ng-model="material.elementoDespesa" ng-disabled="!edit" /> |
64 | </div> | 64 | </div> |
65 | 65 | ||
66 | </div> | 66 | </div> |
@@ -69,10 +69,10 @@ | @@ -69,10 +69,10 @@ | ||
69 | 69 | ||
70 | <div class='col-sm-6'> | 70 | <div class='col-sm-6'> |
71 | <label-select ng-show="material.dominioTipoMaterial.codigo == 1" ng-id="material.unidadeArmazenamento.id" ng-model="material.unidadeArmazenamento.id" ng-label="{{indicaMultiplasUnidadesMedida ? 'ADMINISTRACAODEMATERIAIS.LABEL.UNIDADE_MEDIDA_ARMAZENAMENTO' : 'ADMINISTRACAODEMATERIAIS.LABEL.UNIDADE_MEDIDA_ENTRADA_ARMAZENAMENTO'}}" | 71 | <label-select ng-show="material.dominioTipoMaterial.codigo == 1" ng-id="material.unidadeArmazenamento.id" ng-model="material.unidadeArmazenamento.id" ng-label="{{indicaMultiplasUnidadesMedida ? 'ADMINISTRACAODEMATERIAIS.LABEL.UNIDADE_MEDIDA_ARMAZENAMENTO' : 'ADMINISTRACAODEMATERIAIS.LABEL.UNIDADE_MEDIDA_ENTRADA_ARMAZENAMENTO'}}" |
72 | - ng-obrigatorio="material.dominioTipoMaterial.codigo == 1" ng-disabled="false" form="materialForm" ng-list="unidadesMedida" ng-custom-options="unidadeMedida.id as unidadeMedida.descricao for unidadeMedida"> </label-select> | 72 | + ng-obrigatorio="material.dominioTipoMaterial.codigo == 1" ng-disabled="!edit" form="materialForm" ng-list="unidadesMedida" ng-custom-options="unidadeMedida.id as unidadeMedida.descricao for unidadeMedida"> </label-select> |
73 | 73 | ||
74 | <label-select ng-show="material.dominioTipoMaterial.codigo == 2" ng-id="material.unidadeMedida" ng-model="material.unidadeMedida.id" ng-label="LABEL.UNIDADE_MEDIDA" | 74 | <label-select ng-show="material.dominioTipoMaterial.codigo == 2" ng-id="material.unidadeMedida" ng-model="material.unidadeMedida.id" ng-label="LABEL.UNIDADE_MEDIDA" |
75 | - ng-obrigatorio="material.dominioTipoMaterial.codigo == 2" ng-disabled="false" form="materialForm" ng-list="unidadesMedida" ng-custom-options="unidadeArmazenamento.id as unidadeArmazenamento.descricao for unidadeArmazenamento"> </label-select> | 75 | + ng-obrigatorio="material.dominioTipoMaterial.codigo == 2" ng-disabled="!edit" form="materialForm" ng-list="unidadesMedida" ng-custom-options="unidadeArmazenamento.id as unidadeArmazenamento.descricao for unidadeArmazenamento"> </label-select> |
76 | </div> | 76 | </div> |
77 | 77 | ||
78 | </div> | 78 | </div> |
cit-adm-materiais-web/src/main/webapp/html/material/materialEnderecoEstoque.html
@@ -15,28 +15,28 @@ | @@ -15,28 +15,28 @@ | ||
15 | <div class="col-sm-12"> | 15 | <div class="col-sm-12"> |
16 | <div class="panel panel-default"> | 16 | <div class="panel panel-default"> |
17 | <div class="panel-heading clearfix"> | 17 | <div class="panel-heading clearfix"> |
18 | - <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" ng-click="adicionarEnderecoEstoque()" type="button"> | 18 | + <button title="{{$translate.instant('LABEL.ADICIONAR')}}" ng-disabled="!edit" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" ng-click="adicionarEnderecoEstoque()" type="button"> |
19 | <i class="fa fa-plus-circle yellow-dark"></i> | 19 | <i class="fa fa-plus-circle yellow-dark"></i> |
20 | <translate>LABEL.ADICIONAR</translate> </a> | 20 | <translate>LABEL.ADICIONAR</translate> </a> |
21 | </button> | 21 | </button> |
22 | 22 | ||
23 | - <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" class="btn btn-clear" type="button" | 23 | + <button title="{{$translate.instant('LABEL.EDITAR')}}" ng-disabled="!edit" alt="{{$translate.instant('LABEL.EDITAR')}}" class="btn btn-clear" type="button" |
24 | ng-click="editarEnderecoEstoque()"> | 24 | ng-click="editarEnderecoEstoque()"> |
25 | <i class="fa fa-pencil blue"></i> | 25 | <i class="fa fa-pencil blue"></i> |
26 | <translate>LABEL.EDITAR</translate> | 26 | <translate>LABEL.EDITAR</translate> |
27 | </button> | 27 | </button> |
28 | 28 | ||
29 | - <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" class="btn btn-clear" ng-click="removerEnderecoEstoque()" type="button"> | 29 | + <button title="{{$translate.instant('LABEL.REMOVER')}}" ng-disabled="!edit" alt="{{$translate.instant('LABEL.REMOVER')}}" class="btn btn-clear" ng-click="removerEnderecoEstoque()" type="button"> |
30 | <i class="fa fa-close red"></i> | 30 | <i class="fa fa-close red"></i> |
31 | <translate>LABEL.REMOVER</translate> </a> | 31 | <translate>LABEL.REMOVER</translate> </a> |
32 | </button> | 32 | </button> |
33 | 33 | ||
34 | - <button title="{{$translate.instant('PORTAL.LABEL.BLOQUEAR')}}" alt="{{$translate.instant('PORTAL.LABEL.BLOQUEAR')}}" class="btn btn-clear" ng-show="!matEndEstoqueCheck.dataBloqueio" ng-click="bloquearEnderecoEstoque()" type="button"> | 34 | + <button title="{{$translate.instant('PORTAL.LABEL.BLOQUEAR')}}" ng-disabled="!edit" alt="{{$translate.instant('PORTAL.LABEL.BLOQUEAR')}}" class="btn btn-clear" ng-show="!matEndEstoqueCheck.dataBloqueio" ng-click="bloquearEnderecoEstoque()" type="button"> |
35 | <i class="fa fa-lock"></i> | 35 | <i class="fa fa-lock"></i> |
36 | <translate>PORTAL.LABEL.BLOQUEAR</translate> </a> | 36 | <translate>PORTAL.LABEL.BLOQUEAR</translate> </a> |
37 | </button> | 37 | </button> |
38 | 38 | ||
39 | - <button type="button" title="{{$translate.instant('LABEL.DESBLOQUEAR')}}" alt="{{$translate.instant('LABEL.DESBLOQUEAR')}}" class="btn btn-clear" ng-show="matEndEstoqueCheck.dataBloqueio" ng-click="desbloquearEnderecoEstoque();"> | 39 | + <button type="button" title="{{$translate.instant('LABEL.DESBLOQUEAR')}}" ng-disabled="!edit" alt="{{$translate.instant('LABEL.DESBLOQUEAR')}}" class="btn btn-clear" ng-show="matEndEstoqueCheck.dataBloqueio" ng-click="desbloquearEnderecoEstoque();"> |
40 | <i class="fa fa-unlock grey"></i> <translate>LABEL.DESBLOQUEAR</translate> | 40 | <i class="fa fa-unlock grey"></i> <translate>LABEL.DESBLOQUEAR</translate> |
41 | </button> | 41 | </button> |
42 | 42 |