description small fiexes

This commit is contained in:
amentis 2024-04-29 17:25:59 +03:00
parent 85b2258e19
commit 7056678bbb
3 changed files with 6 additions and 5 deletions

View File

@ -80,7 +80,7 @@
<div class="row editor-content"> <div class="row editor-content">
<div class="col-12 col-md-3 pr-md-0"> <div class="col-12 col-md-3 pr-md-0">
<div class="stepper-back row"> <div class="stepper-back row">
<div class="col-auto d-flex align-items-center back-to-dmp" (click)="backToDmp()"> <div class="col-auto d-flex align-items-center back-to-dmp" (click)="backToDmp(this.formGroup.get('dmpId').value)">
<mat-icon class="back-icon pointer">chevron_left</mat-icon> <mat-icon class="back-icon pointer">chevron_left</mat-icon>
<span class="pointer">{{'DESCRIPTION-EDITOR.ACTIONS.BACK-TO' | translate}}</span> <span class="pointer">{{'DESCRIPTION-EDITOR.ACTIONS.BACK-TO' | translate}}</span>
</div> </div>

View File

@ -686,8 +686,9 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
saveAndClose(){ saveAndClose(){
this.formSubmit((data) => { this.formSubmit((data) => {
this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
const dmpId = this.formGroup.get('dmpId').value;
this.formGroup = null; this.formGroup = null;
this.backToDmp(); this.backToDmp(dmpId);
}); });
} }
@ -767,8 +768,8 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
this.formService.validateAllFormFields(this.formGroup); this.formService.validateAllFormFields(this.formGroup);
} }
backToDmp() { backToDmp(dmpId) {
this.router.navigate(['/plans', 'edit', this.formGroup.get('dmpId').value]); this.router.navigate(['/plans', 'edit', dmpId]);
} }
private showSaveStateValidationErrorsDialog(projectOnly?: boolean, errmess?: string[]) { private showSaveStateValidationErrorsDialog(projectOnly?: boolean, errmess?: string[]) {

View File

@ -75,7 +75,7 @@ export class DescriptionEditorResolver extends BaseEditorResolver {
[nameof<Description>(x => x.descriptionTags), nameof<DescriptionTag>(x => x.id),].join('.'), [nameof<Description>(x => x.descriptionTags), nameof<DescriptionTag>(x => x.id),].join('.'),
[nameof<Description>(x => x.descriptionTags), nameof<DescriptionTag>(x => x.tag), nameof<Tag>(x => x.label)].join('.'), [nameof<Description>(x => x.descriptionTags), nameof<DescriptionTag>(x => x.tag), nameof<Tag>(x => x.label)].join('.'),
[nameof<Description>(x => x.descriptionTags), nameof<DescriptionTag>(x => x.tag), nameof<Tag>(x => x.isActive)].join('.'), [nameof<Description>(x => x.descriptionTags), nameof<DescriptionTag>(x => x.isActive)].join('.'),
[nameof<Description>(x => x.descriptionReferences), nameof<DescriptionReference>(x => x.data), nameof<DescriptionReferenceData>(x => x.fieldId)].join('.'), [nameof<Description>(x => x.descriptionReferences), nameof<DescriptionReference>(x => x.data), nameof<DescriptionReferenceData>(x => x.fieldId)].join('.'),
[nameof<Description>(x => x.descriptionReferences), nameof<DescriptionReference>(x => x.reference), nameof<Reference>(x => x.id)].join('.'), [nameof<Description>(x => x.descriptionReferences), nameof<DescriptionReference>(x => x.reference), nameof<Reference>(x => x.id)].join('.'),