more ui changes
This commit is contained in:
parent
078ca9e0cb
commit
2ba9e146e5
|
@ -75,9 +75,6 @@ public class DmpPropertiesPersist {
|
||||||
.over(item.getDmpBlueprintValues())
|
.over(item.getDmpBlueprintValues())
|
||||||
.mapKey((k) -> ((UUID)k).toString())
|
.mapKey((k) -> ((UUID)k).toString())
|
||||||
.using((itm) -> this.validatorFactory.validator(DmpBlueprintValuePersist.DmpBlueprintValuePersistValidator.class)),
|
.using((itm) -> this.validatorFactory.validator(DmpBlueprintValuePersist.DmpBlueprintValuePersistValidator.class)),
|
||||||
this.spec()
|
|
||||||
.must(() -> !this.isListNullOrEmpty(item.getContacts()))
|
|
||||||
.failOn(DmpPropertiesPersist._contacts).failWith(messageSource.getMessage("Validation_Required", new Object[]{DmpPropertiesPersist._contacts}, LocaleContextHolder.getLocale())),
|
|
||||||
this.navSpec()
|
this.navSpec()
|
||||||
.iff(() -> !this.isListNullOrEmpty(item.getContacts()))
|
.iff(() -> !this.isListNullOrEmpty(item.getContacts()))
|
||||||
.on(DmpPropertiesPersist._contacts)
|
.on(DmpPropertiesPersist._contacts)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export enum DmpBlueprintExtraFieldDataType {
|
export enum DmpBlueprintExtraFieldDataType {
|
||||||
Text = 0,
|
Text = 0,
|
||||||
RichTex = 1,
|
RichText = 1,
|
||||||
Date = 2,
|
Date = 2,
|
||||||
Number = 3
|
Number = 3
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ export class EnumUtils {
|
||||||
toDmpBlueprintExtraFieldDataTypeString(status: DmpBlueprintExtraFieldDataType): string {
|
toDmpBlueprintExtraFieldDataTypeString(status: DmpBlueprintExtraFieldDataType): string {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case DmpBlueprintExtraFieldDataType.Text: return this.language.instant('TYPES.DMP-PROFILE-FIELD.DATA-TYPE.TEXT');
|
case DmpBlueprintExtraFieldDataType.Text: return this.language.instant('TYPES.DMP-PROFILE-FIELD.DATA-TYPE.TEXT');
|
||||||
case DmpBlueprintExtraFieldDataType.RichTex: return this.language.instant('TYPES.DMP-PROFILE-FIELD.DATA-TYPE.RICH-TEXT');
|
case DmpBlueprintExtraFieldDataType.RichText: return this.language.instant('TYPES.DMP-PROFILE-FIELD.DATA-TYPE.RICH-TEXT');
|
||||||
case DmpBlueprintExtraFieldDataType.Date: return this.language.instant('TYPES.DMP-PROFILE-FIELD.DATA-TYPE.DATE');
|
case DmpBlueprintExtraFieldDataType.Date: return this.language.instant('TYPES.DMP-PROFILE-FIELD.DATA-TYPE.DATE');
|
||||||
case DmpBlueprintExtraFieldDataType.Number: return this.language.instant('TYPES.DMP-PROFILE-FIELD.DATA-TYPE.NUMBER');
|
case DmpBlueprintExtraFieldDataType.Number: return this.language.instant('TYPES.DMP-PROFILE-FIELD.DATA-TYPE.NUMBER');
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,34 +258,34 @@
|
||||||
<mat-error *ngIf="formGroup.get('accessType').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
<mat-error *ngIf="formGroup.get('accessType').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="field.category === dmpBlueprintSectionFieldCategoryEnum.EXTRA">
|
</div>
|
||||||
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.TEXT">
|
<div *ngIf="field.category === dmpBlueprintSectionFieldCategoryEnum.EXTRA">
|
||||||
<mat-form-field class="w-100">
|
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.Text">
|
||||||
<input matInput placeholder="{{field.placeholder}}" type="text" name="value" [formControl]="formGroup.get('extraFields').get(getExtraFieldIndex(field.id)).get('value')" [required]="field.required">
|
<mat-form-field class="w-100">
|
||||||
</mat-form-field>
|
<mat-label>{{field.label}}</mat-label>
|
||||||
</div>
|
<input matInput placeholder="{{field.placeholder ?? field.label}}" type="text" name="value" [formControl]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue')" [required]="field.required">
|
||||||
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.RICH_TEXT">
|
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('backendError')">{{formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').getError('backendError').message}}</mat-error>
|
||||||
<ng-container formArrayName="extraFields">
|
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
<ng-container *ngFor="let control of extraFieldsArray().controls; let extraFieldIndex = index;">
|
</mat-form-field>
|
||||||
<ng-container [formGroupName]="extraFieldIndex">
|
</div>
|
||||||
<ng-container *ngIf="control.get('id').value === field.id">
|
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.RichText">
|
||||||
<rich-text-editor-component [form]="control.get('value')" [placeholder]="field.placeholder" [required]="field.required">
|
<rich-text-editor-component [form]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue')" placeholder="{{field.placeholder ?? field.label}}" [required]="field.required"></rich-text-editor-component>
|
||||||
</rich-text-editor-component>
|
</div>
|
||||||
</ng-container>
|
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.Date">
|
||||||
</ng-container>
|
<mat-form-field class="w-100">
|
||||||
</ng-container>
|
<mat-label>{{field.label}}</mat-label>
|
||||||
</ng-container>
|
<input matInput placeholder="{{field.placeholder ?? field.label}}" type="date" name="value" [formControl]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue')" [required]="field.required">
|
||||||
</div>
|
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('backendError')">{{formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').getError('backendError').message}}</mat-error>
|
||||||
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.DATE">
|
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
<mat-form-field class="w-100">
|
</mat-form-field>
|
||||||
<input matInput placeholder="{{field.placeholder}}" type="date" name="value" [formControl]="formGroup.get('extraFields').get(getExtraFieldIndex(field.id)).get('value')" [required]="field.required">
|
</div>
|
||||||
</mat-form-field>
|
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.Number">
|
||||||
</div>
|
<mat-form-field class="w-100">
|
||||||
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.NUMBER">
|
<mat-label>{{field.label}}</mat-label>
|
||||||
<mat-form-field class="w-100">
|
<input matInput placeholder="{{field.placeholder ?? field.label}}" type="number" name="value" [formControl]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue')" [required]="field.required">
|
||||||
<input matInput placeholder="{{field.placeholder}}" type="number" name="value" [formControl]="formGroup.get('extraFields').get(getExtraFieldIndex(field.id)).get('value')" [required]="field.required">
|
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('backendError')">{{formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').getError('backendError').message}}</mat-error>
|
||||||
</mat-form-field>
|
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
</div>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue