revert changes on "description editor > added option to skip form-refresh on save"
This commit is contained in:
parent
c91a2408a3
commit
57cbc1d8e4
|
@ -628,6 +628,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
|||
|
||||
refreshData(): void {
|
||||
this.getItem(this.editorModel.id, (data: Description) => this.prepareForm(data));
|
||||
this.tocValidationService.validateForm();
|
||||
}
|
||||
|
||||
refreshOnNavigateToData(id?: Guid): void {
|
||||
|
@ -648,8 +649,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
|||
this.descriptionService.persist(formData)
|
||||
.pipe(takeUntil(this._destroyed)).subscribe(
|
||||
complete => {
|
||||
onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete, this.isNew);
|
||||
this.tocValidationService.validateForm();
|
||||
onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete);
|
||||
this.descriptionIsOnceSaved = true;
|
||||
if (this.formGroup.get('status').value == DescriptionStatus.Finalized) this.isFinalized = true;
|
||||
},
|
||||
|
|
|
@ -109,12 +109,12 @@ export abstract class BaseEditor<EditorModelType extends BaseEditorModel, Entity
|
|||
|
||||
|
||||
|
||||
onCallbackSuccess(data?: any, refresh: boolean = true): void {
|
||||
onCallbackSuccess(data?: any): void {
|
||||
|
||||
console.log("Success:", data);
|
||||
|
||||
this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
||||
if (refresh) this.refreshOnNavigateToData(data ? data.id : null);
|
||||
this.refreshOnNavigateToData(data ? data.id : null);
|
||||
}
|
||||
|
||||
onCallbackDeleteSuccess(data?: any): void {
|
||||
|
|
Loading…
Reference in New Issue