small fixes

This commit is contained in:
Diamantis Tziotzios 2024-03-29 15:46:19 +02:00
parent db68644eff
commit 0778842f38
4 changed files with 3 additions and 9 deletions

View File

@ -185,7 +185,7 @@ public class LockController {
}
@Transactional
@DeleteMapping("target/touch/{id}")
@GetMapping("target/touch/{id}")
public boolean touch(@PathVariable("id") UUID targetId) throws Exception {
AffiliatedResource affiliatedResourceDmp = this.authorizationContentResolver.dmpAffiliation(targetId);
AffiliatedResource affiliatedResourceDescription = this.authorizationContentResolver.descriptionAffiliation(targetId);

View File

@ -33,7 +33,7 @@ export class DescriptionFormAnnotationService extends BaseService {
}
public getCount(anchor: string) {
if (this.annotationsPerAnchor.has(anchor)) {
if (this.annotationsPerAnchor?.has(anchor)) {
return this.annotationsPerAnchor.get(anchor);
} else {
return 0;

View File

@ -296,7 +296,7 @@
<div class="heading">{{'DMP-EDITOR.FIELDS.DESCRIPTION-TEMPLATES' | translate}}</div>
<mat-form-field class="w-100">
<mat-label>{{'DMP-EDITOR.FIELDS.DESCRIPTION-TEMPLATES-HINT' | translate}}</mat-label>
<app-multiple-auto-complete placeholder="{{'DMP-EDITOR.FIELDS.DESCRIPTION-TEMPLATES-HINT' | translate}}" [hidePlaceholder]="true" required='true' [formControl]="formGroup.get('descriptionTemplates').get(section.id)" [configuration]="descriptionTemplateService.descriptionTempalteGroupMultipleAutocompleteConfiguration" (optionRemoved)="onRemoveDescriptionTemplate($event, i)" (optionActionClicked)="onPreviewDescriptionTemplate($event, i)">
<app-multiple-auto-complete placeholder="{{'DMP-EDITOR.FIELDS.DESCRIPTION-TEMPLATES-HINT' | translate}}" [hidePlaceholder]="true" required='true' [formControl]="formGroup.get('descriptionTemplates').get(section.id)" [configuration]="descriptionTemplateService.descriptionTempalteGroupMultipleAutocompleteConfiguration" (optionActionClicked)="onPreviewDescriptionTemplate($event, i)">
</app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('descriptionTemplates').get(section.id).hasError('backendError')">{{formGroup.get('descriptionTemplates').get(section.id).getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('descriptionTemplates').get(section.id).hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>

View File

@ -451,12 +451,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
//
//
onRemoveDescriptionTemplate(event, sectionIndex: number) {
let found = false;
const section = this.selectedBlueprint.definition.sections[sectionIndex];
let sectionDescriptionTemplates = (this.formGroup.get('descriptionTemplates') as UntypedFormArray).controls.find(x => x.get('sectionId').value === event.id);
}
onPreviewDescriptionTemplate(event, sectionIndex: number) {
// const dialogRef = this.dialog.open(DatasetPreviewDialogComponent, {
// width: '590px',