Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG committed Dec 22, 2024
1 parent 7fbf42d commit 00b8303
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,9 @@ export class AnnouncementDetailComponent implements OnChanges {
/****************************************************************************
* UI Events
*/
public onDialogHide() {
this.hideDialogAndChanged.emit(false)
public onDialogHide(changed?: boolean) {
this.hideDialogAndChanged.emit(changed ?? false)
this.formGroup.reset()
this.formGroup.disable()
}

/**
Expand All @@ -165,7 +164,7 @@ export class AnnouncementDetailComponent implements OnChanges {
.subscribe({
next: () => {
this.msgService.success({ summaryKey: 'ACTIONS.EDIT.MESSAGE.OK' })
this.hideDialogAndChanged.emit(true)
this.onDialogHide(true)
},
error: (err) => {
this.msgService.error({ summaryKey: 'ACTIONS.EDIT.MESSAGE.NOK' })
Expand All @@ -181,7 +180,7 @@ export class AnnouncementDetailComponent implements OnChanges {
.subscribe({
next: () => {
this.msgService.success({ summaryKey: 'ACTIONS.CREATE.MESSAGE.OK' })
this.hideDialogAndChanged.emit(true)
this.onDialogHide(true)
},
error: (err) => {
this.msgService.error({ summaryKey: 'ACTIONS.CREATE.MESSAGE.NOK' })
Expand Down

0 comments on commit 00b8303

Please sign in to comment.