feat(notifications): show timestamp in tooltip
Closes:
MODIFY
src/app/components/notifications/notifications.component.html
src/app/components/notifications/notifications.component.html
<th mat-header-cell *matHeaderCellDef>
{{ 'NOTIFICATION.COLUMN_TITLE.DATE' | translate }}
</th>
- <td mat-cell *matCellDef="let notification">
+ <td
+ mat-cell
+ *matCellDef="let notification"
+ [matTooltip]="convertTooltipTimestamp(notification.createdOn)">
{{ convertTimestamp(notification.createdOn) }}
</td>
</ng-container>

MODIFY
src/app/components/notifications/notifications.component.ts
src/app/components/notifications/notifications.component.ts
@@ -204,6 +204,13 @@ export class NotificationsComponent implements OnInit {
}) as string;
}
+ public convertTooltipTimestamp(timestamp: string): string {
+ // format F => 8/6/2014, 1:07:04 PM
+ return DateTime.fromISO(timestamp).toFormat('F', {
+ locale: this.translator.currentLang
+ });
+ }
+
public setActiveSection(section: notificationsSection): void {
this.activeSection = section;
if (section === notificationsSection.read) {

feat(notifications): show timestamp in tooltip

Closes: PAS-4356