From c8766ea94ec2404e509bcc853d879ff963747e0d Mon Sep 17 00:00:00 2001 From: himeshr Date: Wed, 31 Jan 2024 11:22:57 +0530 Subject: [PATCH] avniproject/avni-client#1256 | Add documentation for ReportCard.getCardId() --- src/ReportCard.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ReportCard.js b/src/ReportCard.js index 899250c..22144e1 100644 --- a/src/ReportCard.js +++ b/src/ReportCard.js @@ -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; }