Merge branch 'dmp-refactoring' into accessibility-refactor
# Conflicts: # frontend/src/app/ui/reference/reference-field/reference-field.component.html # frontend/src/app/ui/reference/reference-field/reference-field.component.scss
This commit is contained in:
commit
fd831e6814
|
@ -204,7 +204,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.stepper-options {
|
.stepper-options {
|
||||||
height: calc(100vh - 650px);
|
flex: 1;
|
||||||
|
max-height: calc(100vh - 32rem);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
.main-info {
|
.main-info {
|
||||||
color: var(--dark-gray)94;
|
color: var(--dark-gray)94;
|
||||||
|
@ -233,7 +234,7 @@
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: var(--dark-gray);
|
color: var(--dark-gray);
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
margin: 2.875rem 0rem 2.25rem 0rem;
|
margin: 2rem 0rem 1rem 0rem;
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,10 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
||||||
complete => {
|
complete => {
|
||||||
onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete);
|
onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete);
|
||||||
this.descriptionIsOnceSaved = true;
|
this.descriptionIsOnceSaved = true;
|
||||||
if (this.formGroup.get('status').value == DescriptionStatusEnum.Finalized) this.isFinalized = true;
|
if (this.formGroup.get('status').value == DescriptionStatusEnum.Finalized){
|
||||||
|
this.isFinalized = true;
|
||||||
|
this.formGroup.disable();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
if (this.formGroup.get('status').value == DescriptionStatusEnum.Finalized) {
|
if (this.formGroup.get('status').value == DescriptionStatusEnum.Finalized) {
|
||||||
|
|
|
@ -88,13 +88,16 @@ export class TableOfContentsInternal extends BaseComponent implements OnInit, On
|
||||||
isTocEntryValid(entry: ToCEntry): boolean {
|
isTocEntryValid(entry: ToCEntry): boolean {
|
||||||
if (entry == null) return true;
|
if (entry == null) return true;
|
||||||
|
|
||||||
if (entry.validityAbstractControl && !entry.validityAbstractControl.touched) return true;
|
if (entry.validityAbstractControl && (!entry.validityAbstractControl.touched || entry.validityAbstractControl.disabled)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
let currentValidity = entry.validityAbstractControl?.valid ?? true;
|
let currentValidity = entry.validityAbstractControl?.valid ?? true;
|
||||||
if (!currentValidity) return currentValidity;
|
if (!currentValidity) return currentValidity;
|
||||||
entry.subEntries?.forEach(subEntry => {
|
entry.subEntries?.forEach(subEntry => {
|
||||||
currentValidity = currentValidity && this.isTocEntryValid(subEntry);
|
currentValidity = currentValidity && this.isTocEntryValid(subEntry);
|
||||||
if (!currentValidity) return currentValidity;
|
if (!currentValidity){
|
||||||
|
return currentValidity;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return currentValidity;
|
return currentValidity;
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
<div class="row stepper-options">
|
<div class="row stepper-options">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<ol class="stepper-list" start="1">
|
<ol class="stepper-list" start="1">
|
||||||
<div *ngIf="selectedBlueprint?.definition && this.step !== 0">
|
@if(selectedBlueprint?.definition && this.step !== 0){
|
||||||
<ng-container *ngFor="let section of selectedBlueprint?.definition?.sections; let i=index">
|
<ng-container *ngFor="let section of selectedBlueprint?.definition?.sections; let i=index">
|
||||||
<li (click)="changeStep(i + 1)" [ngClass]="{'active': this.step === (i + 1), 'text-danger': hasErrors(section.id) }"><span class="d-flex align-items-center">{{section.label}}
|
<li (click)="changeStep(i + 1)" [ngClass]="{'active': this.step === (i + 1), 'text-danger': hasErrors(section.id) }"><span class="d-flex align-items-center">{{section.label}}
|
||||||
<mat-icon *ngIf="section.description" class="ml-1 w-auto h-auto" style="font-size: 1rem; font-weight: 700;" [matTooltip]="section.description">info</mat-icon>
|
<mat-icon *ngIf="section.description" class="ml-1 w-auto h-auto" style="font-size: 1rem; font-weight: 700;" [matTooltip]="section.description">info</mat-icon>
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
}
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,26 +1,30 @@
|
||||||
<mat-form-field class="w-100" *ngIf="multipleAutoCompleteSearchConfiguration">
|
<div class="d-flex flex-column">
|
||||||
<mat-label>{{label?.length > 0 ? label : referenceType?.name}}</mat-label>
|
@if(multipleAutoCompleteSearchConfiguration){
|
||||||
<app-multiple-auto-complete [id]="id" placeholder="{{ placeholder?.length > 0 ? placeholder : referenceType?.name}}" [formControl]="form" [configuration]="multipleAutoCompleteSearchConfiguration">
|
<mat-form-field class="w-100" subscriptSizing="dynamic">
|
||||||
</app-multiple-auto-complete>
|
<mat-label>{{label?.length > 0 ? label : referenceType?.name}}</mat-label>
|
||||||
<mat-error *ngIf="form.hasError('backendError')">{{form.getError('backendError').message}}</mat-error>
|
<app-multiple-auto-complete [id]="id" placeholder="{{ placeholder?.length > 0 ? placeholder : referenceType?.name}}" [formControl]="form" [configuration]="multipleAutoCompleteSearchConfiguration">
|
||||||
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
</app-multiple-auto-complete>
|
||||||
<mat-hint *ngIf="hint" align="start">{{hint}}</mat-hint>
|
<mat-error *ngIf="form.hasError('backendError')">{{form.getError('backendError').message}}</mat-error>
|
||||||
<mat-hint align="end">
|
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
<span *ngIf="!form.disabled" class="not-found">{{'REFERENCE-FIELD.COULD-NOT-FIND-MESSAGE' | translate}} </span>
|
<mat-hint *ngIf="hint" align="start">{{hint}}</mat-hint>
|
||||||
<span *ngIf="!form.disabled" class="insert-manually" (click)="addReference($event)">{{'REFERENCE-FIELD.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
</mat-form-field>
|
||||||
</mat-hint>
|
<small class="ml-auto inherit-mat-hint" *ngIf="!form.disabled">
|
||||||
</mat-form-field>
|
<span class="not-found">{{'REFERENCE-FIELD.COULD-NOT-FIND-MESSAGE' | translate}} </span>
|
||||||
<mat-form-field class="w-100" *ngIf="singleAutoCompleteSearchConfiguration">
|
<span class="insert-manually" (click)="addReference($event)">{{'REFERENCE-FIELD.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
||||||
<mat-label>{{label?.length > 0 ? label : referenceType?.name}}</mat-label>
|
</small>
|
||||||
<app-single-auto-complete [id]="id" placeholder="{{ placeholder?.length > 0 ? placeholder : referenceType?.name}}" [formControl]="form" [configuration]="singleAutoCompleteSearchConfiguration">
|
}
|
||||||
</app-single-auto-complete>
|
@if(singleAutoCompleteSearchConfiguration){
|
||||||
<mat-error *ngIf="form.hasError('backendError')">{{form.getError('backendError').message}}</mat-error>
|
<mat-form-field class="w-100" subscriptSizing="dynamic">
|
||||||
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
<mat-label>{{label?.length > 0 ? label : referenceType?.name}}</mat-label>
|
||||||
<mat-hint *ngIf="hint" align="start">{{hint}}</mat-hint>
|
<app-single-auto-complete [id]="id" placeholder="{{ placeholder?.length > 0 ? placeholder : referenceType?.name}}" [formControl]="form" [configuration]="singleAutoCompleteSearchConfiguration">
|
||||||
<mat-hint align="end">
|
</app-single-auto-complete>
|
||||||
<span *ngIf="!form.disabled" class="not-found">{{'REFERENCE-FIELD.COULD-NOT-FIND-MESSAGE' | translate}} </span>
|
<mat-error *ngIf="form.hasError('backendError')">{{form.getError('backendError').message}}</mat-error>
|
||||||
<span *ngIf="!form.disabled" class="insert-manually" (click)="addReference($event)">{{'REFERENCE-FIELD.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
</mat-hint>
|
<mat-hint *ngIf="hint" align="start">{{hint}}</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<div class="mb-4">
|
<small class="ml-auto inherit-mat-hint" *ngIf="!form.disabled">
|
||||||
</div>
|
<span class="not-found">{{'REFERENCE-FIELD.COULD-NOT-FIND-MESSAGE' | translate}} </span>
|
||||||
|
<span class="insert-manually" (click)="addReference($event)">{{'REFERENCE-FIELD.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
||||||
|
</small>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
.insert-manually {
|
.insert-manually {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.not-found {
|
.not-found {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding: 0rem 0.5rem 0rem 0rem;
|
padding: 0rem 0.5rem 0rem 0rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inherit-mat-hint { //todo mchouliara move to styles.scss after accessibility refactor merge
|
||||||
|
font-size: var(--mat-form-field-subscript-text-size);
|
||||||
|
}
|
Loading…
Reference in New Issue