diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 8768910f..084cab7b 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -34,6 +34,7 @@ import { MatBadgeModule } from '@angular/material/badge';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { ClipboardModule } from '@angular/cdk/clipboard';
import { TextFieldModule } from '@angular/cdk/text-field';
+import { ScrollingModule } from '@angular/cdk/scrolling';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
@@ -189,6 +190,7 @@ registerLocaleData(es, 'es');
DragDropModule,
ClipboardModule,
TextFieldModule,
+ ScrollingModule,
NgxFileDropModule,
AvatarModule,
ContentLoaderModule,
diff --git a/src/app/components/notifications-list/notifications-list.component.html b/src/app/components/notifications-list/notifications-list.component.html
index 78930e11..c64600a3 100644
--- a/src/app/components/notifications-list/notifications-list.component.html
+++ b/src/app/components/notifications-list/notifications-list.component.html
@@ -1,30 +1,32 @@
-
-
-
-
-
- {{notification.timestamp * 1000 | date:'short'}}
-
-
-
-
- {{NOTIFICATION_PREFIX[notification.type]}}
+
+
+
+
+
+
+ {{notification.timestamp * 1000 | date:'short'}}
+
+
+
+
+ {{NOTIFICATION_PREFIX[notification.type]}}
+
+
+
+
+
+
+ {{notification['data'][NOTIFICATION_SUFFIX_KEY[notification.type]]}}
+
-
-
-
-
-
- {{notification['data'][NOTIFICATION_SUFFIX_KEY[notification.type]]}}
-
-
-
- 0">
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+ 0">
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/components/notifications-list/notifications-list.component.scss b/src/app/components/notifications-list/notifications-list.component.scss
index 8ea107a7..d2f8b99d 100644
--- a/src/app/components/notifications-list/notifications-list.component.scss
+++ b/src/app/components/notifications-list/notifications-list.component.scss
@@ -13,12 +13,21 @@
font-size: 14px;
}
+.notification-card-parent {
+ margin: 5px;
+}
+
.notification-card {
margin-top: 5px;
}
+.notification-actions {
+ margin-top: auto;
+}
+
.card-radius {
border-radius: 12px;
+ height: 166px;
}
.dot {
@@ -30,4 +39,8 @@
position: absolute;
right: 8px;
top: 8px;
- }
\ No newline at end of file
+}
+
+.viewport {
+ height: 100%;
+}
\ No newline at end of file
diff --git a/src/app/components/notifications/notifications.component.css b/src/app/components/notifications/notifications.component.css
index f9f81b89..dfc8e720 100644
--- a/src/app/components/notifications/notifications.component.css
+++ b/src/app/components/notifications/notifications.component.css
@@ -4,7 +4,10 @@
}
.notifications-list-parent {
- max-height: 70vh;
overflow-y: auto;
padding: 0px 10px 10px 10px;
+}
+
+.notifications-list {
+ display: block
}
\ No newline at end of file
diff --git a/src/app/components/notifications/notifications.component.html b/src/app/components/notifications/notifications.component.html
index e13a125e..0e6f6c0f 100644
--- a/src/app/components/notifications/notifications.component.html
+++ b/src/app/components/notifications/notifications.component.html
@@ -4,7 +4,7 @@
{{filter.value.label}}
-
+
diff --git a/src/app/components/notifications/notifications.component.ts b/src/app/components/notifications/notifications.component.ts
index 124bd5a0..0a5c6bbe 100644
--- a/src/app/components/notifications/notifications.component.ts
+++ b/src/app/components/notifications/notifications.component.ts
@@ -14,6 +14,7 @@ export class NotificationsComponent implements OnInit {
notifications: Notification[] = null;
filtered_notifications: Notification[] = null;
+ list_height = '65vh';
@Output() notificationCount = new EventEmitter();
@@ -110,6 +111,8 @@ export class NotificationsComponent implements OnInit {
filterNotifications(): void {
this.filtered_notifications = this.notifications.filter(notification => this.selectedFilters.length === 0 || this.selectedFilters.includes(notification.type));
+ // We need to do this to get the virtual scroll component to have an appropriate height
+ this.calculateListHeight();
}
selectedFiltersChanged(event: MatChipListboxChange): void {
@@ -117,6 +120,12 @@ export class NotificationsComponent implements OnInit {
this.filterNotifications();
}
+ calculateListHeight() {
+ const avgHeight = 166;
+ const calcHeight = this.filtered_notifications.length * avgHeight;
+ this.list_height = calcHeight > window.innerHeight*0.65 ? '65vh' : `${calcHeight}px`;
+ }
+
originalOrder = (): number => {
return 0;
}