description editor > added option to skip form-refresh on save

This commit is contained in:
Sofia Papacharalampous 2024-04-26 16:03:49 +03:00
parent 96f160476a
commit e7bc0406d6
1 changed files with 3 additions and 3 deletions

View File

@ -627,8 +627,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
}
refreshData(): void {
this.getItem(this.editorModel.id, (data: Description) => this.prepareForm(data));
this.tocValidationService.validateForm();
this.getItem(this.editorModel.id, (data: Description) => console.log(data));// this.prepareForm(data));
}
refreshOnNavigateToData(id?: Guid): void {
@ -649,7 +648,8 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
this.descriptionService.persist(formData)
.pipe(takeUntil(this._destroyed)).subscribe(
complete => {
onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete);
onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete, !this.isNew);
this.tocValidationService.validateForm();
this.descriptionIsOnceSaved = true;
if (this.formGroup.get('status').value == DescriptionStatus.Finalized) this.isFinalized = true;
},