full name upload file display
This commit is contained in:
parent
f12ddd7090
commit
8fc4f939b9
|
@ -125,12 +125,16 @@ public class FieldPersist {
|
||||||
.must(() -> !this.isNull(item.getExternalIdentifier()))
|
.must(() -> !this.isNull(item.getExternalIdentifier()))
|
||||||
.failOn(FieldPersist._externalIdentifier).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._externalIdentifier}, LocaleContextHolder.getLocale())),
|
.failOn(FieldPersist._externalIdentifier).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._externalIdentifier}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.iff(()-> FieldType.isTextListType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && required)
|
.iff(()-> FieldType.isTextListType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && required && !fieldType.equals(FieldType.TAGS))
|
||||||
.must(() -> !this.isNull(item.getTextListValue()))
|
.must(() -> !this.isListNullOrEmpty(item.getTextListValue()) || !this.isEmpty(item.getTextValue()))
|
||||||
|
.failOn(FieldPersist._textListValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._textListValue}, LocaleContextHolder.getLocale())),
|
||||||
|
this.spec()
|
||||||
|
.iff(()-> fieldType.equals(FieldType.TAGS) && DescriptionStatus.Finalized.equals(this.status) && required)
|
||||||
|
.must(() -> !this.isListNullOrEmpty(item.getTextListValue()))
|
||||||
.failOn(FieldPersist._textListValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._textListValue}, LocaleContextHolder.getLocale())),
|
.failOn(FieldPersist._textListValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._textListValue}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.iff(()-> FieldType.isReferenceType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && required)
|
.iff(()-> FieldType.isReferenceType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && required)
|
||||||
.must(() -> !this.isNull(item.getTextListValue()))
|
.must(() -> !this.isListNullOrEmpty(item.getTextListValue()))
|
||||||
.failOn(FieldPersist._textListValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._textListValue}, LocaleContextHolder.getLocale())),
|
.failOn(FieldPersist._textListValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._textListValue}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.iff(()-> !this.isEmpty(item.getTextValue()) && fieldType.equals(FieldType.CHECK_BOX) || fieldType.equals(FieldType.BOOLEAN_DECISION) )
|
.iff(()-> !this.isEmpty(item.getTextValue()) && fieldType.equals(FieldType.CHECK_BOX) || fieldType.equals(FieldType.BOOLEAN_DECISION) )
|
||||||
|
|
|
@ -104,10 +104,12 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn
|
||||||
const fields = [
|
const fields = [
|
||||||
nameof<StorageFile>(x => x.id),
|
nameof<StorageFile>(x => x.id),
|
||||||
nameof<StorageFile>(x => x.name),
|
nameof<StorageFile>(x => x.name),
|
||||||
|
nameof<StorageFile>(x => x.extension),
|
||||||
]
|
]
|
||||||
|
|
||||||
this.storageFileService.getSingle(id, fields).pipe(takeUntil(this._destroyed)).subscribe(storageFile => {
|
this.storageFileService.getSingle(id, fields).pipe(takeUntil(this._destroyed)).subscribe(storageFile => {
|
||||||
this.fileNameDisplay = storageFile.name;
|
if(storageFile.extension.startsWith('.')) this.fileNameDisplay = storageFile.name + storageFile.extension;
|
||||||
|
else this.fileNameDisplay = storageFile.name + '.' +storageFile.extension;
|
||||||
this.applyFieldType();
|
this.applyFieldType();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue