fixes issue 1556 (#1574)
Co-authored-by: Anika Tibrewala <89638069+Ann-001@users.noreply.github.com>
This commit is contained in:
co-authored by
Anika Tibrewala
parent
40441bbf06
commit
66775cd1d4
@@ -13,8 +13,7 @@
|
|||||||
|
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-action-list class="list">
|
<mat-action-list class="list">
|
||||||
<button mat-list-item *ngFor="let activity of recentActivities"
|
<button mat-list-item *ngFor="let activity of recentActivities" (click)="navigatetoActivity(activity)"> {{ activity | urlToString }} </button>
|
||||||
[routerLink]="activity"> {{ activity | urlToString }} </button>
|
|
||||||
</mat-action-list>
|
</mat-action-list>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/** Angular Imports */
|
/** Angular Imports */
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dashboard component.
|
* Dashboard component.
|
||||||
@@ -21,7 +22,7 @@ export class DashboardComponent implements OnInit {
|
|||||||
/**
|
/**
|
||||||
* Gets user activities from local storage.
|
* Gets user activities from local storage.
|
||||||
*/
|
*/
|
||||||
constructor() {
|
constructor(private router: Router) {
|
||||||
this.userActivity = JSON.parse(localStorage.getItem('mifosXLocation'));
|
this.userActivity = JSON.parse(localStorage.getItem('mifosXLocation'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,4 +68,12 @@ export class DashboardComponent implements OnInit {
|
|||||||
return topEigthFrequentActivities;
|
return topEigthFrequentActivities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigates to the activity
|
||||||
|
*/
|
||||||
|
navigatetoActivity(activity:string){
|
||||||
|
this.router.navigateByUrl(activity);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user