Skip to content
Snippets Groups Projects
Commit dab463df authored by pgiertych's avatar pgiertych
Browse files

refactored removal methods

parent 821ea54b
No related branches found
No related tags found
No related merge requests found
......@@ -46,4 +46,4 @@
</table>
</div>
<app-removal-confirmation-modal [domain]="domainToRemove" (onConfirm)="update()"></app-removal-confirmation-modal>
<app-removal-confirmation-modal [domain]="domainToRemove" (onConfirm)="softRemoveDomain(domainToRemove.id)"></app-removal-confirmation-modal>
......@@ -19,21 +19,16 @@ export class RemovalConfirmationModalComponent {
@Output()
public onConfirm: EventEmitter<void> = new EventEmitter<void>();
constructor(private readonly domainService: DomainService) { }
public show() {
this.modal.show();
}
public hide() {
this.modal.hide();
this.onConfirm.emit()
}
removeDomain() {
this.domainService.remove(this.domain.id, true).subscribe({
next: () => this.hide(),
error: err => console.error(err)
});
this.onConfirm.emit()
this.hide()
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment