From c9cd9cad3c7086b4545a860cc19cc1884281eeed Mon Sep 17 00:00:00 2001 From: Max Ehrlicher-Schmidt Date: Fri, 18 Dec 2020 19:30:38 +0100 Subject: [PATCH] Fix shit --- .../admin-data-page/admin-data-page.component.ts | 2 +- src/app/components/tableComponents/cell/cell.component.ts | 2 +- src/app/services/download.service.ts | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/components/admin-data-page/admin-data-page.component.ts b/src/app/components/admin-data-page/admin-data-page.component.ts index 078e56d..20fd5e9 100644 --- a/src/app/components/admin-data-page/admin-data-page.component.ts +++ b/src/app/components/admin-data-page/admin-data-page.component.ts @@ -112,7 +112,7 @@ export class AdminDataPageComponent implements OnInit { deleteItem(user : User) { if (user.id === this.authService.getCurrentUserValue.user.id){ - this.snackBarService.openSnackBar("Du kannst dich nicht selbst löschen","Ok Im an Idiot", true); + this.snackBarService.openSnackBar("Du kannst dich nicht selbst löschen","Ok", true); return; } const dialogRef = this.dialog.open(DeleteDialogComponent, { diff --git a/src/app/components/tableComponents/cell/cell.component.ts b/src/app/components/tableComponents/cell/cell.component.ts index 83dfeb1..0bdc4db 100644 --- a/src/app/components/tableComponents/cell/cell.component.ts +++ b/src/app/components/tableComponents/cell/cell.component.ts @@ -161,7 +161,7 @@ export class CellComponent implements AfterViewInit { this.value = []; } // Add element - if ((value || '').trim()) { + if ((value ?? '').trim()) { this.value.push(value.trim()); } // Reset the input value diff --git a/src/app/services/download.service.ts b/src/app/services/download.service.ts index 7ff1521..3be0186 100644 --- a/src/app/services/download.service.ts +++ b/src/app/services/download.service.ts @@ -27,14 +27,14 @@ export class DownloadService { cellData = cellData.join('", "'); } else if (column.type === 'NumRange') { cellData = - (row[column.dataPath + '.min'] || '') + + (row[column.dataPath + '.min'] ?? '') + ' bis ' + - (row[column.dataPath + '.max'] || ''); + (row[column.dataPath + '.max'] ?? ''); } else if (column.type === 'DateRange') { cellData = - (row[column.dataPath + '.from'] || '') + + (row[column.dataPath + '.from'] ?? '') + ' bis ' + - (row[column.dataPath + '.to'] || ''); + (row[column.dataPath + '.to'] ?? ''); } return '"' + (cellData ?? '').toString().replace(/"/g, "''") + '"'; });