Commit 58d1e05fc7fe327c6f933892f684fd38dfb91200

Authored by erick.sato
1 parent 7ee69783
Exists in master

Redmine #4788 Bloqueios de campos visualizar material

cit-adm-materiais-web/src/main/webapp/html/material/materialCaracteristica.html
... ... @@ -13,15 +13,15 @@
13 13 <div class="widget-main clearfix">
14 14 <div class="row">
15 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 18 ng-item="item.descricao" ng-id="materialCaracteristica.caracteristica" ng-model="materialCaracteristica.caracteristica" ng-disabled="materialCaracteristica.$edit" />
19 19 </div>
20 20 <div class="col-sm-2">
21 21 <div class="form-group no-label">
22 22 <div class="input-group">
23 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 25 <translate>LABEL.OBRIGATORIO</translate>
26 26 </label>
27 27 </div>
... ... @@ -43,23 +43,23 @@
43 43 <div class="col-sm-12">
44 44 <div class="panel panel-default">
45 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 47 <i class="fa fa-plus-circle yellow-dark"></i>
48 48 <translate>LABEL.ADICIONAR</translate> </a>
49 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 52 <i class="fa fa-pencil blue"></i>
53 53 <translate>LABEL.EDITAR</translate>
54 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 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 59 <i class="fa fa-unlock grey"></i> <translate>LABEL.DESBLOQUEAR</translate>
60 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 63 <i class="fa fa-close red"></i>
64 64 <translate>LABEL.REMOVER</translate> </a>
65 65 </button>
... ... @@ -88,7 +88,7 @@
88 88 <tbody>
89 89 <tr ng-repeat="mat in material.materialCaracteristicas">
90 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 92 </td>
93 93 <td>
94 94 {{mat.caracteristica.descricao}}
... ...
cit-adm-materiais-web/src/main/webapp/html/material/materialDadosMaterial.html
... ... @@ -43,9 +43,9 @@
43 43 </div>
44 44 </div>
45 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 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 49 </div>
50 50  
51 51 <div class="col-sm-2" ng-show="material.dominioTipoMaterial.codigo == 2">
... ... @@ -60,7 +60,7 @@
60 60 </div>
61 61  
62 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 64 </div>
65 65  
66 66 </div>
... ... @@ -69,10 +69,10 @@
69 69  
70 70 <div class='col-sm-6'>
71 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 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 76 </div>
77 77  
78 78 </div>
... ...
cit-adm-materiais-web/src/main/webapp/html/material/materialEnderecoEstoque.html
... ... @@ -15,28 +15,28 @@
15 15 <div class="col-sm-12">
16 16 <div class="panel panel-default">
17 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 19 <i class="fa fa-plus-circle yellow-dark"></i>
20 20 <translate>LABEL.ADICIONAR</translate> </a>
21 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 24 ng-click="editarEnderecoEstoque()">
25 25 <i class="fa fa-pencil blue"></i>
26 26 <translate>LABEL.EDITAR</translate>
27 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 30 <i class="fa fa-close red"></i>
31 31 <translate>LABEL.REMOVER</translate> </a>
32 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 35 <i class="fa fa-lock"></i>
36 36 <translate>PORTAL.LABEL.BLOQUEAR</translate> </a>
37 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 40 <i class="fa fa-unlock grey"></i> <translate>LABEL.DESBLOQUEAR</translate>
41 41 </button>
42 42  
... ...