refactor: Methode BasePageComponent in handleDeleteRequest umbenannt
This commit is contained in:
parent
9cef878380
commit
d3b804f965
@ -32,8 +32,8 @@ export class BasePageComponent {
|
||||
|
||||
@HostListener('window:keydown.delete', ['$event'])
|
||||
protected handleDelete(event: KeyboardEvent) {
|
||||
this.deleteItem();
|
||||
this.handleDeleteRequest();
|
||||
}
|
||||
|
||||
deleteItem() { }
|
||||
handleDeleteRequest() { }
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
import { AfterViewInit, Component, ViewChild, HostListener } from '@angular/core';
|
||||
import { AfterViewInit, Component, ViewChild } from '@angular/core';
|
||||
import { GroupTableComponent } from '../../components/tables/group-table/group-table.component';
|
||||
import { UserTableComponent } from '../../components/tables/user-table/user-table.component';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
@ -55,7 +55,7 @@ export class GroupComponent extends BasePageComponent implements AfterViewInit {
|
||||
}
|
||||
}
|
||||
|
||||
override deleteItem() {
|
||||
override handleDeleteRequest() {
|
||||
const sRows = this.groupTable.selectedRows;
|
||||
if (sRows.length > 0)
|
||||
Swal.fire({
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AfterViewInit, Component, ViewChild, HostListener } from '@angular/core';
|
||||
import { AfterViewInit, Component, ViewChild } from '@angular/core';
|
||||
import { GuiCellEdit, GuiSelectedRow } from '@generic-ui/ngx-grid';
|
||||
import { UserTableComponent } from '../../components/tables/user-table/user-table.component';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
@ -63,7 +63,7 @@ export class UserComponent extends BasePageComponent implements AfterViewInit {
|
||||
}
|
||||
}
|
||||
|
||||
override deleteItem() {
|
||||
override handleDeleteRequest() {
|
||||
const sRows = this.userTable.selectedRows;
|
||||
if (sRows.length > 0)
|
||||
Swal.fire({
|
||||
@ -80,10 +80,10 @@ export class UserComponent extends BasePageComponent implements AfterViewInit {
|
||||
this.updateService.executeAll().then(() => {
|
||||
this.refreshService.executeAll();
|
||||
})
|
||||
Swal.fire({
|
||||
text: `${sRows.length} Einträge wurden erfolgreich gelöscht.`,
|
||||
icon: "success"
|
||||
})
|
||||
Swal.fire({
|
||||
text: `${sRows.length} Einträge wurden erfolgreich gelöscht.`,
|
||||
icon: "success"
|
||||
})
|
||||
},
|
||||
error: err => Swal.fire({
|
||||
title: "Fehler",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user