Feature/support delete activities with filtering (#3394)
* Support delete activities with filtering * Update changelog --------- Co-authored-by: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
This commit is contained in:
@@ -59,11 +59,11 @@
|
||||
class="align-items-center d-flex"
|
||||
mat-menu-item
|
||||
[disabled]="!hasPermissionToDeleteActivity"
|
||||
(click)="onDeleteAllActivities()"
|
||||
(click)="onDeleteActivities()"
|
||||
>
|
||||
<span class="align-items-center d-flex">
|
||||
<ion-icon class="mr-2" name="trash-outline" />
|
||||
<span i18n>Delete all Activities</span>
|
||||
<span i18n>Delete Activities</span>
|
||||
</span>
|
||||
</button>
|
||||
</mat-menu>
|
||||
|
@@ -92,10 +92,10 @@ export class GfActivitiesTableComponent
|
||||
@Input() sortDisabled = false;
|
||||
@Input() totalItems = Number.MAX_SAFE_INTEGER;
|
||||
|
||||
@Output() activitiesDeleted = new EventEmitter<void>();
|
||||
@Output() activityDeleted = new EventEmitter<string>();
|
||||
@Output() activityToClone = new EventEmitter<OrderWithAccount>();
|
||||
@Output() activityToUpdate = new EventEmitter<OrderWithAccount>();
|
||||
@Output() deleteAllActivities = new EventEmitter<void>();
|
||||
@Output() export = new EventEmitter<void>();
|
||||
@Output() exportDrafts = new EventEmitter<string[]>();
|
||||
@Output() import = new EventEmitter<void>();
|
||||
@@ -211,6 +211,16 @@ export class GfActivitiesTableComponent
|
||||
this.activityToClone.emit(aActivity);
|
||||
}
|
||||
|
||||
public onDeleteActivities() {
|
||||
const confirmation = confirm(
|
||||
$localize`Do you really want to delete these activities?`
|
||||
);
|
||||
|
||||
if (confirmation) {
|
||||
this.activitiesDeleted.emit();
|
||||
}
|
||||
}
|
||||
|
||||
public onDeleteActivity(aId: string) {
|
||||
const confirmation = confirm(
|
||||
$localize`Do you really want to delete this activity?`
|
||||
@@ -241,10 +251,6 @@ export class GfActivitiesTableComponent
|
||||
);
|
||||
}
|
||||
|
||||
public onDeleteAllActivities() {
|
||||
this.deleteAllActivities.emit();
|
||||
}
|
||||
|
||||
public onImport() {
|
||||
this.import.emit();
|
||||
}
|
||||
|
Reference in New Issue
Block a user