reference type small changes
This commit is contained in:
parent
244c8f2afd
commit
720e5f96f3
|
@ -113,23 +113,23 @@ public class AuthenticationConfigurationPersist {
|
||||||
.must(() -> !this.isNull(item.getEnabled()))
|
.must(() -> !this.isNull(item.getEnabled()))
|
||||||
.failOn(AuthenticationConfigurationPersist._enabled).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._enabled}, LocaleContextHolder.getLocale())),
|
.failOn(AuthenticationConfigurationPersist._enabled).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._enabled}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.iff(() -> !this.isNull(item.getEnabled()))
|
.iff(item::getEnabled)
|
||||||
.must(() -> !this.isEmpty(item.getAuthUrl()))
|
.must(() -> !this.isEmpty(item.getAuthUrl()))
|
||||||
.failOn(AuthenticationConfigurationPersist._authUrl).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authUrl}, LocaleContextHolder.getLocale())),
|
.failOn(AuthenticationConfigurationPersist._authUrl).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authUrl}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.iff(() -> !this.isNull(item.getEnabled()))
|
.iff(item::getEnabled)
|
||||||
.must(() -> !this.isNull(item.getAuthMethod()))
|
.must(() -> !this.isNull(item.getAuthMethod()))
|
||||||
.failOn(AuthenticationConfigurationPersist._authMethod).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authMethod}, LocaleContextHolder.getLocale())),
|
.failOn(AuthenticationConfigurationPersist._authMethod).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authMethod}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.iff(() -> !this.isNull(item.getEnabled()))
|
.iff(item::getEnabled)
|
||||||
.must(() -> !this.isEmpty(item.getAuthTokenPath()))
|
.must(() -> !this.isEmpty(item.getAuthTokenPath()))
|
||||||
.failOn(AuthenticationConfigurationPersist._authTokenPath).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authTokenPath}, LocaleContextHolder.getLocale())),
|
.failOn(AuthenticationConfigurationPersist._authTokenPath).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authTokenPath}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.iff(() -> !this.isNull(item.getEnabled()))
|
.iff(item::getEnabled)
|
||||||
.must(() -> !this.isEmpty(item.getAuthRequestBody()))
|
.must(() -> !this.isEmpty(item.getAuthRequestBody()))
|
||||||
.failOn(AuthenticationConfigurationPersist._authRequestBody).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authRequestBody}, LocaleContextHolder.getLocale())),
|
.failOn(AuthenticationConfigurationPersist._authRequestBody).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authRequestBody}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.iff(() -> !this.isNull(item.getEnabled()))
|
.iff(item::getEnabled)
|
||||||
.must(() -> !this.isEmpty(item.getType()))
|
.must(() -> !this.isEmpty(item.getType()))
|
||||||
.failOn(AuthenticationConfigurationPersist._type).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._type}, LocaleContextHolder.getLocale()))
|
.failOn(AuthenticationConfigurationPersist._type).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._type}, LocaleContextHolder.getLocale()))
|
||||||
);
|
);
|
||||||
|
|
|
@ -114,7 +114,7 @@ export class ReferenceTypeEditorComponent extends BaseEditor<ReferenceTypeEditor
|
||||||
if (data) {
|
if (data) {
|
||||||
data.definition.sources?.forEach(source => source.queries?.forEach(query => {
|
data.definition.sources?.forEach(source => source.queries?.forEach(query => {
|
||||||
query?.cases?.forEach(queryCase => {
|
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 {
|
formSubmit(): void {
|
||||||
this.formService.touchAllFormFields(this.formGroup);
|
this.formService.touchAllFormFields(this.formGroup);
|
||||||
// if (!this.isFormValid()) {
|
if (!this.isFormValid()) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
this.persistEntity();
|
this.persistEntity();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue