feat: add notifications tray component (#1172)

Fixes: #1171
This commit is contained in:
Karan Takalkar
2020-08-04 17:39:11 +05:30
committed by GitHub
parent e1e0af3063
commit 30a354c153
12 changed files with 242 additions and 13 deletions
@@ -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. */