This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FE-#93: Add delete confirmation dialog
- Loading branch information
Showing
5 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...t-widget/delete-entry-confirmation-dialog/delete-entry-confirmation-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<h2 mat-dialog-title>Ausgabe löschen</h2> | ||
|
||
<mat-dialog-content> | ||
Möchtest du die Ausgabe wirklich löschen? | ||
</mat-dialog-content> | ||
|
||
<mat-dialog-actions> | ||
<button mat-button mat-dialog-close>Abbrechen</button> | ||
<button mat-button (click)="confirmDelete()">Löschen</button> | ||
</mat-dialog-actions> |
Empty file.
23 changes: 23 additions & 0 deletions
23
...idget/delete-entry-confirmation-dialog/delete-entry-confirmation-dialog.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { DeleteEntryConfirmationDialogComponent } from './delete-entry-confirmation-dialog.component'; | ||
|
||
describe('DeleteEntryConfirmationDialogComponent', () => { | ||
let component: DeleteEntryConfirmationDialogComponent; | ||
let fixture: ComponentFixture<DeleteEntryConfirmationDialogComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [DeleteEntryConfirmationDialogComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(DeleteEntryConfirmationDialogComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
...lit-widget/delete-entry-confirmation-dialog/delete-entry-confirmation-dialog.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Component } from '@angular/core'; | ||
import {MatDialogRef} from "@angular/material/dialog"; | ||
|
||
@Component({ | ||
selector: 'app-delete-entry-confirmation-dialog', | ||
templateUrl: './delete-entry-confirmation-dialog.component.html', | ||
styleUrl: './delete-entry-confirmation-dialog.component.scss' | ||
}) | ||
export class DeleteEntryConfirmationDialogComponent { | ||
|
||
constructor(private dialogRef: MatDialogRef<DeleteEntryConfirmationDialogComponent>) { | ||
} | ||
|
||
confirmDelete() { | ||
this.dialogRef.close(true); | ||
} | ||
|
||
} |