Merge branch 'DEVELOP_FE' of ssh://git.eclipse.org:29418/elogbook/elogbookFE into DEVELOP_FE
diff --git a/src/app/pages/search/search.component.spec.ts b/src/app/pages/search/search.component.spec.ts
index c81e620..daa19e3 100644
--- a/src/app/pages/search/search.component.spec.ts
+++ b/src/app/pages/search/search.component.spec.ts
@@ -181,32 +181,7 @@
});
}));
- it('should open a dialog to edit a notification on button click', async(() => {
-
- let entryOpend = false;
- let dialog;
-
- const testNotification = SEARCH_RESULT_NOTIFICATIONS[0];
-
- sessionContext.setCurrUser(correctUser);
-
- fixture.detectChanges();
-
- component.dialog.afterOpen.subscribe((value) => {
- dialog = value.componentInstance;
- spyOn(dialog, 'setNotification');
- entryOpend = true;
- });
- component.openDialogEditEntry(testNotification);
-
- fixture.whenStable().then(() => {
- fixture.detectChanges();
- expect(entryOpend).toBe(true);
- expect(dialog.isEditDialog).toBe(true);
-
- });
- }));
-
+
it('should open a dialog to view a notification on button click', async(() => {
let entryOpend = false;
diff --git a/src/app/pages/search/search.component.ts b/src/app/pages/search/search.component.ts
index ea2fa94..b180e34 100644
--- a/src/app/pages/search/search.component.ts
+++ b/src/app/pages/search/search.component.ts
@@ -38,7 +38,7 @@
statuses: Status[];
public globalSearchFilter: GlobalSearchFilter;
public currentSearchFilter: GlobalSearchFilter = new GlobalSearchFilter();
-
+
constructor(
private router: Router,
public dialog: MdDialog,
@@ -56,20 +56,10 @@
}
- public goToOverview() {
+ public goToOverview() {
this.router.navigate(['/overview']);
}
- openDialogEditEntry(notification: Notification) {
- const dialogRef = this.dialog.open(EntryComponent, this.dialogConfig);
- dialogRef.componentInstance.user = this.user;
- dialogRef.componentInstance.isInstructionDialog = notification.adminFlag;
- dialogRef.componentInstance.setNotification(notification);
- dialogRef.componentInstance.isEditDialog = true;
- dialogRef.afterClosed().subscribe(result => {
- });
- }
-
openDialogLookUpEntry(notification: Notification) {
const dialogRef = this.dialog.open(EntryComponent, this.dialogConfig);
dialogRef.componentInstance.user = this.user;
@@ -85,10 +75,9 @@
}
deleteSearch(currentSearchFilter) {
-
- this.sessionContext.setInitGlobalSearchFilterValues();
- this.currentSearchFilter = this.sessionContext.getGlobalSearchFilter();
- }
+ this.sessionContext.setInitGlobalSearchFilterValues();
+ this.currentSearchFilter = this.sessionContext.getGlobalSearchFilter();
+ }
private setError(errorMessage: string) {
this.bannerMessage.isActive = true;
@@ -96,5 +85,4 @@
this.bannerMessage.text = 'Es ist ein Fehler aufgetreten. Bitte kontaktieren Sie den Administrator';
console.log(errorMessage);
}
-
}
\ No newline at end of file