Skip to content

Commit

Permalink
#1256 | Remove completed todos
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Jan 23, 2024
1 parent 41d4208 commit 71a36d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class CustomDashboardActions {
reportCardSectionMappings.forEach(rcm => {
const start = new Date();
const countQueryResponse = context.get(ReportCardService).getReportCardCount(rcm.card, newState.ruleInput.ruleInputArray);
//todo, set counts for rcm.card.uuid with #identifier suffix if needed
if(rcm.card.nested) {
_.map(countQueryResponse, (reportCard, index) => {
const itemKey = rcm.card.getCardId(index);
Expand All @@ -137,7 +136,6 @@ class CustomDashboardActions {
const newState = {...state};
const reportCardSectionMappings = state.reportCardSectionMappings;
newState.countUpdateTime = new Date(); //Update this to ensure reportCard count change is reflected
//todo, remove counts for rcm.card.uuid with #identifier suffix if needed
reportCardSectionMappings.forEach(rcm => {
const keysOfReportCard= _.keys(newState.cardToCountResultMap).filter((itemKey) => itemKey.startsWith(rcm.card.uuid));
_.forEach(keysOfReportCard, (itemKey) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class CustomDashboardView extends AbstractComponent {
.map((groupedData, sectionUUID) => {
const section = this.getService(EntityService).findByUUID(sectionUUID, DashboardSection.schema.name);
const cardsWithNestedContent = _.map(_.sortBy(groupedData, 'displayOrder'), ({card}) => card);
//todo split nested cardsWithNestedContent into separate ones
const cards = _.flatMap(cardsWithNestedContent, splitNestedCards);
return {section, cards};
})
Expand All @@ -135,14 +134,13 @@ class CustomDashboardView extends AbstractComponent {
this.renderSectionName(section.name, section.description, section.viewType, cards)}
<View style={styles.cardContainer}>
{_.map(cards, (card, index) => (
//todo, use explicit key instead of card.uuid
<CustomDashboardCard
key={card.itemKey} //card.uuid
key={card.itemKey}
reportCard={card}
onCardPress={this.onCardPress.bind(this)}
index={index}
viewType={section.viewType}
countResult={this.state.cardToCountResultMap[card.itemKey]} //card.uuid
countResult={this.state.cardToCountResultMap[card.itemKey]}
countUpdateTime={this.state.countUpdateTime}
/>
))}
Expand Down

0 comments on commit 71a36d8

Please sign in to comment.