feat: add edit share account page (#881)

Fixes: #880
This commit is contained in:
Karan Takalkar
2020-06-17 15:15:39 +05:30
committed by GitHub
parent d51bd6466a
commit 21c54d0baa
16 changed files with 385 additions and 42 deletions
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Buttons Configuration */
import { SharesButtonsConfiguration } from './shares-buttons.config';
@@ -24,7 +24,8 @@ export class SharesAccountViewComponent implements OnInit {
* Fetches shares account data from `resolve`
* @param {ActivatedRoute} route Activated Route
*/
constructor(private route: ActivatedRoute) {
constructor(private route: ActivatedRoute,
private router: Router) {
this.route.data.subscribe((data: { sharesAccountData: any }) => {
this.sharesAccountData = data.sharesAccountData;
});
@@ -66,4 +67,12 @@ export class SharesAccountViewComponent implements OnInit {
}
}
doAction(name: string) {
switch (name) {
case 'Modify Application':
this.router.navigate(['edit-shares-account'], { relativeTo: this.route });
break;
}
}
}