Compare commits
No commits in common. "0c54b11923f1690a28c7c741128be57604ca9c16" and "f89074b69554add0824327d26de393542e1242f0" have entirely different histories.
0c54b11923
...
f89074b695
|
@ -628,7 +628,6 @@ 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 {
|
||||
|
@ -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;
|
||||
},
|
||||
|
|
|
@ -109,12 +109,12 @@ export abstract class BaseEditor<EditorModelType extends BaseEditorModel, Entity
|
|||
|
||||
|
||||
|
||||
onCallbackSuccess(data?: any): void {
|
||||
onCallbackSuccess(data?: any, refresh: boolean = true): 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);
|
||||
this.refreshOnNavigateToData(data ? data.id : null);
|
||||
if (refresh) this.refreshOnNavigateToData(data ? data.id : null);
|
||||
}
|
||||
|
||||
onCallbackDeleteSuccess(data?: any): void {
|
||||
|
|
Loading…
Reference in New Issue