Skip to content

Commit

Permalink
fix: now dividend is working (#1938)
Browse files Browse the repository at this point in the history
  • Loading branch information
PC-11-00 authored Dec 15, 2023
1 parent 11098c6 commit 479d6af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class DividendsResolver implements Resolve<Object> {
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const id = route.paramMap.get('id');
const id = route.paramMap.get('productId');
return this.productsService.getDividends(id);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ViewDividendDataResolver implements Resolve<Object> {
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class ViewDividendComponent implements OnInit {
}

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');
this.productsService.approveDividend(shareProductId, dividendId, { productId: shareProductId, dividendId: dividendId}).subscribe(() => {
this.router.navigate(['../'], { relativeTo: this.route });
Expand Down

0 comments on commit 479d6af

Please sign in to comment.