Merge branch 'dmp-refactoring' of https://code-repo.d4science.org/MaDgiK-CITE/argos into dmp-refactoring

This commit is contained in:
Diamantis Tziotzios 2024-02-16 11:49:04 +02:00
commit 4f5b3cf647
2 changed files with 9 additions and 9 deletions

View File

@ -113,23 +113,23 @@ public class AuthenticationConfigurationPersist {
.must(() -> !this.isNull(item.getEnabled()))
.failOn(AuthenticationConfigurationPersist._enabled).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._enabled}, LocaleContextHolder.getLocale())),
this.spec()
.iff(() -> !this.isNull(item.getEnabled()))
.iff(item::getEnabled)
.must(() -> !this.isEmpty(item.getAuthUrl()))
.failOn(AuthenticationConfigurationPersist._authUrl).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authUrl}, LocaleContextHolder.getLocale())),
this.spec()
.iff(() -> !this.isNull(item.getEnabled()))
.iff(item::getEnabled)
.must(() -> !this.isNull(item.getAuthMethod()))
.failOn(AuthenticationConfigurationPersist._authMethod).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authMethod}, LocaleContextHolder.getLocale())),
this.spec()
.iff(() -> !this.isNull(item.getEnabled()))
.iff(item::getEnabled)
.must(() -> !this.isEmpty(item.getAuthTokenPath()))
.failOn(AuthenticationConfigurationPersist._authTokenPath).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authTokenPath}, LocaleContextHolder.getLocale())),
this.spec()
.iff(() -> !this.isNull(item.getEnabled()))
.iff(item::getEnabled)
.must(() -> !this.isEmpty(item.getAuthRequestBody()))
.failOn(AuthenticationConfigurationPersist._authRequestBody).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authRequestBody}, LocaleContextHolder.getLocale())),
this.spec()
.iff(() -> !this.isNull(item.getEnabled()))
.iff(item::getEnabled)
.must(() -> !this.isEmpty(item.getType()))
.failOn(AuthenticationConfigurationPersist._type).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._type}, LocaleContextHolder.getLocale()))
);

View File

@ -114,7 +114,7 @@ export class ReferenceTypeEditorComponent extends BaseEditor<ReferenceTypeEditor
if (data) {
data.definition.sources?.forEach(source => source.queries?.forEach(query => {
query?.cases?.forEach(queryCase => {
this.selectedReferenceTypeChanged(queryCase.referenceType.id);
if(queryCase.referenceType && queryCase.referenceType.id) this.selectedReferenceTypeChanged(queryCase.referenceType.id);
})
}));
}
@ -163,9 +163,9 @@ export class ReferenceTypeEditorComponent extends BaseEditor<ReferenceTypeEditor
formSubmit(): void {
this.formService.touchAllFormFields(this.formGroup);
// if (!this.isFormValid()) {
// return;
// }
if (!this.isFormValid()) {
return;
}
this.persistEntity();
}