SEBSERV-230 removed attributes from GUI
This commit is contained in:
		
							parent
							
								
									b42dd5e146
								
							
						
					
					
						commit
						33c915bd92
					
				
					 4 changed files with 89 additions and 63 deletions
				
			
		|  | @ -1027,7 +1027,10 @@ public class WidgetFactory { | |||
|     } | ||||
| 
 | ||||
|     public static void setARIALabel(final Widget widget, final String label) { | ||||
|         setAttribute(widget, ADD_HTML_ATTR_ARIA_LABEL, label); | ||||
|         setAttribute( | ||||
|                 widget, | ||||
|                 ADD_HTML_ATTR_ARIA_LABEL, | ||||
|                 Utils.escapeHTML_XML_EcmaScript(label)); | ||||
|     } | ||||
| 
 | ||||
|     public static void setAttribute(final Widget widget, final String name, final String value) { | ||||
|  |  | |||
|  | @ -127,6 +127,9 @@ class ConfigurationDAOBatchService { | |||
|                     .where( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.name, | ||||
|                             isEqualTo(data.name)) | ||||
|                     .and( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.type, | ||||
|                             SqlBuilder.isEqualTo(data.type.name())) | ||||
|                     .and( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.institutionId, | ||||
|                             SqlBuilder.isEqualTo(data.institutionId)) | ||||
|  | @ -355,6 +358,9 @@ class ConfigurationDAOBatchService { | |||
|                     .where( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.name, | ||||
|                             isEqualTo(copyInfo.name)) | ||||
|                     .and( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.type, | ||||
|                             SqlBuilder.isEqualTo(copyInfo.configurationType.name())) | ||||
|                     .and( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.institutionId, | ||||
|                             isEqualTo(institutionId)) | ||||
|  |  | |||
|  | @ -185,24 +185,8 @@ public class ConfigurationNodeDAOImpl implements ConfigurationNodeDAO { | |||
|     @Override | ||||
|     @Transactional | ||||
|     public Result<ConfigurationNode> save(final ConfigurationNode data) { | ||||
|         return Result.tryCatch(() -> { | ||||
| 
 | ||||
|             final Long count = this.configurationNodeRecordMapper.countByExample() | ||||
|                     .where( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.name, | ||||
|                             isEqualTo(data.name)) | ||||
|                     .and( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.id, | ||||
|                             isNotEqualTo(data.id)) | ||||
|                     .and( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.institutionId, | ||||
|                             isNotEqualTo(data.institutionId)) | ||||
|                     .build() | ||||
|                     .execute(); | ||||
| 
 | ||||
|             if (count != null && count > 0) { | ||||
|                 throw new FieldValidationException("name", "configurationNode:name:exists"); | ||||
|             } | ||||
|         return checkUniqueName(data) | ||||
|                 .map(_d -> { | ||||
| 
 | ||||
|                     final ConfigurationNodeRecord newRecord = new ConfigurationNodeRecord( | ||||
|                             data.id, | ||||
|  | @ -316,6 +300,32 @@ public class ConfigurationNodeDAOImpl implements ConfigurationNodeDAO { | |||
|         }); | ||||
|     } | ||||
| 
 | ||||
|     private Result<ConfigurationNode> checkUniqueName(final ConfigurationNode data) { | ||||
|         return Result.tryCatch(() -> { | ||||
|             final Long count = this.configurationNodeRecordMapper.countByExample() | ||||
|                     .where( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.name, | ||||
|                             isEqualTo(data.name)) | ||||
|                     .and( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.type, | ||||
|                             isNotEqualTo(data.type.name())) | ||||
|                     .and( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.id, | ||||
|                             isNotEqualTo(data.id)) | ||||
|                     .and( | ||||
|                             ConfigurationNodeRecordDynamicSqlSupport.institutionId, | ||||
|                             isNotEqualTo(data.institutionId)) | ||||
|                     .build() | ||||
|                     .execute(); | ||||
| 
 | ||||
|             if (count != null && count > 0) { | ||||
|                 throw new FieldValidationException("name", "configurationNode:name:exists"); | ||||
|             } | ||||
| 
 | ||||
|             return data; | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|     static Result<ConfigurationNode> toDomainModel(final ConfigurationNodeRecord record) { | ||||
|         return Result.tryCatch(() -> new ConfigurationNode( | ||||
|                 record.getId(), | ||||
|  |  | |||
|  | @ -0,0 +1,7 @@ | |||
| -- ----------------------------------------------------- | ||||
| -- Remove SEB Settings from GUI (and templates too) | ||||
| -- ----------------------------------------------------- | ||||
| 
 | ||||
| DELETE FROM `orientation` WHERE `config_attribute_id`='5'; | ||||
| DELETE FROM `orientation` WHERE `config_attribute_id`='6'; | ||||
| DELETE FROM `orientation` WHERE `config_attribute_id`='7'; | ||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 anhefti
						anhefti