Skip to content

Commit

Permalink
Simplify logic and improve readability.
Browse files Browse the repository at this point in the history
Signed-off-by: Dariy Miseldzhani <[email protected]>
  • Loading branch information
Dariy Miseldzhani committed Dec 21, 2024
1 parent c27ddb6 commit 5701695
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,11 @@ export class ReportBlockComponent implements OnInit {

onNextRetirementClick(event: any, group: any) {
event.stopPropagation();

group.selectedItemIndex = group.documents.length > (group.selectedItemIndex + 1) ? group.selectedItemIndex + 1 : 0;
}

onPrevRetirementClick(event: any, group: any) {
event.stopPropagation();

group.selectedItemIndex = (group.selectedItemIndex - 1) >= 0 ? (group.selectedItemIndex - 1) : (group.documents.length - 1);
}

Expand Down

0 comments on commit 5701695

Please sign in to comment.