@@ -15,7 +15,7 @@
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row" [routerLink]="[routeMap[row.objectType], row.objectId]"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.select-row:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -20,6 +20,23 @@ export class NotificationsPageComponent implements OnInit {
|
||||
/** Data source for notifications table. */
|
||||
dataSource: MatTableDataSource<any>;
|
||||
|
||||
/**
|
||||
* Gets router link prefix from notification's objectType attribute
|
||||
* Shares, Savings, Deposits, Loans routes inaccessible because of dependency on entity ID.
|
||||
*/
|
||||
routeMap: any = {
|
||||
'client' : '/clients/',
|
||||
'group' : '/groups/',
|
||||
'loan' : '/loans/',
|
||||
'center' : '/centers/',
|
||||
'shareAccount' : '/sharesaccounts/',
|
||||
'fixedDeposit' : '/fixed-deposits-accounts/',
|
||||
'recurringDepositAccount': '/recurringdeposits/',
|
||||
'savingsAccount' : '/savingsaccounts/',
|
||||
'shareProduct': '/products/share-products/',
|
||||
'loanProduct' : '/products/loan-products/'
|
||||
};
|
||||
|
||||
/** Paginator for notifications table. */
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
/** Sorter for notifications table. */
|
||||
|
||||
Reference in New Issue
Block a user