Compare commits

..

No commits in common. "218fab4fd1c0ffd84a9d3c1e53a95a0eba2b6cff" and "88054462c6dd417d1cfcd079f47bf70ca65ac2e9" have entirely different histories.

3 changed files with 6 additions and 23 deletions

View File

@ -7,7 +7,7 @@
<!-- Title Field --> <!-- Title Field -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="heading">{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.TITLE' | translate}}*</div> <div class="heading">1.1 {{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.TITLE' | translate}}*</div>
<div class="title-form"> <div class="title-form">
<mat-form-field class="w-100"> <mat-form-field class="w-100">
<input matInput placeholder="{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.TITLE' | translate}}" type="text" name="label" formControlName="label" required> <input matInput placeholder="{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.TITLE' | translate}}" type="text" name="label" formControlName="label" required>
@ -20,7 +20,7 @@
<!-- Description field --> <!-- Description field -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="heading">{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION' | translate}}</div> <div class="heading">1.2 {{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION' | translate}}</div>
<span class="hint">{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION-HINT' | translate}}</span> <span class="hint">{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION-HINT' | translate}}</span>
<div class="description-form"> <div class="description-form">
<rich-text-editor-component [form]="formGroup.get('description')" [placeholder]="'DMP-EDITOR.PLACEHOLDER.DESCRIPTION'" [wrapperClasses]="'full-width editor ' + <rich-text-editor-component [form]="formGroup.get('description')" [placeholder]="'DMP-EDITOR.PLACEHOLDER.DESCRIPTION'" [wrapperClasses]="'full-width editor ' +
@ -36,7 +36,7 @@
<!-- Tags --> <!-- Tags -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="heading">{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.TAGS' | translate}}</div> <div class="heading">1.3 {{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.TAGS' | translate}}</div>
<div class="profile-form"> <div class="profile-form">
<app-tags-field-component [form]="formGroup.get('tags')"></app-tags-field-component> <app-tags-field-component [form]="formGroup.get('tags')"></app-tags-field-component>
</div> </div>
@ -45,7 +45,7 @@
<!-- Template Field --> <!-- Template Field -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="heading">{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION-TEMPLATE' | translate}}*</div> <div class="heading">1.4 {{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION-TEMPLATE' | translate}}*</div>
<div class="profile-form"> <div class="profile-form">
<mat-form-field class="w-100"> <mat-form-field class="w-100">
<mat-select placeholder="{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION-TEMPLATE-PLACEHOLDER'| translate}}" [required]="true" [compareWith]="compareWith" [formControl]="formGroup.get('descriptionTemplateId')"> <mat-select placeholder="{{'DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION-TEMPLATE-PLACEHOLDER'| translate}}" [required]="true" [compareWith]="compareWith" [formControl]="formGroup.get('descriptionTemplateId')">

View File

@ -89,8 +89,8 @@
<div class="stepper-title">{{'DESCRIPTION-EDITOR.TOC.TITLE' | translate}}</div> <div class="stepper-title">{{'DESCRIPTION-EDITOR.TOC.TITLE' | translate}}</div>
<div class="stepper-options" id="stepper-options"> <div class="stepper-options" id="stepper-options">
<div class="col stepper-list"> <div class="col stepper-list">
<div (click)="table0fContents.onToCentrySelected()" *ngIf="!descriptionInfoValid()" class="main-info" [ngClass]="{'active': this.step === 0, 'text-danger': countErrorsOfBaseInfoPage > 0}">{{'DESCRIPTION-EDITOR.TOC.MAIN-INFO' | translate}} ({{ countErrorsOfBaseInfoPage }})</div> <div (click)="table0fContents.onToCentrySelected()" *ngIf="!descriptionInfoValid()" class="main-info" [ngClass]="{'active': this.step === 0, 'text-danger':hintErrors}">0. {{'DESCRIPTION-EDITOR.TOC.MAIN-INFO' | translate}} (2)</div>
<div (click)="table0fContents.onToCentrySelected()" *ngIf="descriptionInfoValid()" class="main-info" [ngClass]="{'active': this.step === 0}">{{'DESCRIPTION-EDITOR.TOC.MAIN-INFO' | translate}} (<mat-icon class="done-icon">done</mat-icon>)</div> <div (click)="table0fContents.onToCentrySelected()" *ngIf="descriptionInfoValid()" class="main-info" [ngClass]="{'active': this.step === 0}">0. {{'DESCRIPTION-EDITOR.TOC.MAIN-INFO' | translate}} (<mat-icon class="done-icon">done</mat-icon>)</div>
<div class="row toc-pane-container" #boundary> <div class="row toc-pane-container" #boundary>
<div #spacer></div> <div #spacer></div>
<app-table-of-contents [visibilityRulesService]="visibilityRulesService" [selectedFieldsetId]="fieldsetIdWithFocus" #table0fContents [showErrors]="showtocentriesErrors" [TOCENTRY_ID_PREFIX]="TOCENTRY_ID_PREFIX" [hasFocus]="step > 0" [formGroup]="formGroup.get('properties')" [descriptionTemplate]="item.descriptionTemplate" *ngIf="formGroup" [links]="links" [boundary]="boundary" [spacer]="spacer" [isActive]="step !== 0" stickyThing (stepFound)="onStepFound($event)" (currentLinks)="getLinks($event)" (entrySelected)="changeStep($event.entry, $event.execute)" [pageToFieldSetMap]="pageToFieldSetMap"></app-table-of-contents> <app-table-of-contents [visibilityRulesService]="visibilityRulesService" [selectedFieldsetId]="fieldsetIdWithFocus" #table0fContents [showErrors]="showtocentriesErrors" [TOCENTRY_ID_PREFIX]="TOCENTRY_ID_PREFIX" [hasFocus]="step > 0" [formGroup]="formGroup.get('properties')" [descriptionTemplate]="item.descriptionTemplate" *ngIf="formGroup" [links]="links" [boundary]="boundary" [spacer]="spacer" [isActive]="step !== 0" stickyThing (stepFound)="onStepFound($event)" (currentLinks)="getLinks($event)" (entrySelected)="changeStep($event.entry, $event.execute)" [pageToFieldSetMap]="pageToFieldSetMap"></app-table-of-contents>

View File

@ -47,7 +47,6 @@ import { DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp
import { DescriptionTemplate, DescriptionTemplateField, DescriptionTemplateFieldSet, DescriptionTemplatePage, DescriptionTemplateSection } from '@app/core/model/description-template/description-template'; import { DescriptionTemplate, DescriptionTemplateField, DescriptionTemplateFieldSet, DescriptionTemplatePage, DescriptionTemplateSection } from '@app/core/model/description-template/description-template';
import { DmpDescriptionTemplate } from '@app/core/model/dmp/dmp'; import { DmpDescriptionTemplate } from '@app/core/model/dmp/dmp';
import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type'; import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type';
import { nameof } from 'ts-simple-nameof';
@Component({ @Component({
selector: 'app-description-editor-component', selector: 'app-description-editor-component',
@ -823,19 +822,6 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
return fieldSets; return fieldSets;
} }
get countErrorsOfBaseInfoPage(): number {
if (this.formGroup == null) return 0;
let errorsCount: number = 0;
const baseInfoControlNames: string[] = [nameof<DescriptionEditorModel>(x => x.label), nameof<DescriptionEditorModel>(x => x.descriptionTemplateId)];
baseInfoControlNames.forEach((name: string) => {
if (!this.formGroup.get(name)?.valid) errorsCount += 1;
});
return errorsCount;
}
getEntryVisibleFieldSets(entry: ToCEntry): ToCEntry[] { getEntryVisibleFieldSets(entry: ToCEntry): ToCEntry[] {
let fieldSets = []; let fieldSets = [];
if (entry.type === ToCEntryType.FieldSet && !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id.toString())) { if (entry.type === ToCEntryType.FieldSet && !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id.toString())) {
@ -925,9 +911,6 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
} }
checkPagesForErrors(): void { checkPagesForErrors(): void {
//this.baseInfoPage = ...
this.pageToFieldSetMap = this.mapPageToFieldSet(this.item.descriptionTemplate); this.pageToFieldSetMap = this.mapPageToFieldSet(this.item.descriptionTemplate);
} }