Skip to content

Commit

Permalink
avniproject/avni-client#1256 | Add documentation for ReportCard.getCa…
Browse files Browse the repository at this point in the history
…rdId()
  • Loading branch information
himeshr committed Jan 31, 2024
1 parent 2df5780 commit c8766ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ReportCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ class ReportCard extends BaseEntity {
return _.isNil(this.standardReportCardType) ? '#ffffff' : this.standardReportCardType.textColor;
}

/**
* Helper method used to generate unique key value for Nested Report Cards using UUID and Index of the Report Card.
* The Nested Report Card's query responses would be mapped to the corresponding Dashboard Report cards using the UUID and Index.
*
* @param index
* @returns {string}
*/
getCardId(index = 0) {
return this.uuid + '#' + index;
}
Expand Down

0 comments on commit c8766ea

Please sign in to comment.