fix: now dividend is working (#1938)
This commit is contained in:
@@ -24,7 +24,7 @@ export class DividendsResolver implements Resolve<Object> {
|
|||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||||
const id = route.paramMap.get('id');
|
const id = route.paramMap.get('productId');
|
||||||
return this.productsService.getDividends(id);
|
return this.productsService.getDividends(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export class ViewDividendDataResolver implements Resolve<Object> {
|
|||||||
*/
|
*/
|
||||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||||
const dividendId = route.paramMap.get('dividendId');
|
const dividendId = route.paramMap.get('dividendId');
|
||||||
const shareProductId = route.parent.parent.paramMap.get('id');
|
const shareProductId = route.parent.parent.paramMap.get('productId');
|
||||||
return this.productsService.getDividendData(shareProductId, dividendId);
|
return this.productsService.getDividendData(shareProductId, dividendId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export class ViewDividendComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
postDividends() {
|
postDividends() {
|
||||||
const shareProductId = this.route.parent.parent.snapshot.paramMap.get('id');
|
const shareProductId = this.route.parent.parent.snapshot.paramMap.get('productId');
|
||||||
const dividendId = this.route.snapshot.paramMap.get('dividendId');
|
const dividendId = this.route.snapshot.paramMap.get('dividendId');
|
||||||
this.productsService.approveDividend(shareProductId, dividendId, { productId: shareProductId, dividendId: dividendId}).subscribe(() => {
|
this.productsService.approveDividend(shareProductId, dividendId, { productId: shareProductId, dividendId: dividendId}).subscribe(() => {
|
||||||
this.router.navigate(['../'], { relativeTo: this.route });
|
this.router.navigate(['../'], { relativeTo: this.route });
|
||||||
|
|||||||
Reference in New Issue
Block a user