Skip to content

Commit fe3b6c9

Browse files
Refactor WeeklyFinancialReportRepository to Preserve Group Order
- Removed alphabetical sorting of high, medium, and low marginality groups in the `WeeklyFinancialReportRepository`. - Added a comment to clarify the intention of preserving the established order in the group data. This change enhances the report's clarity by maintaining the original grouping order, improving the overall organization of financial data.
1 parent 3a3d9be commit fe3b6c9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

workers/main/src/services/WeeklyFinancialReport/WeeklyFinancialReportRepository.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,8 @@ export class WeeklyFinancialReportRepository
160160
lowMarginalityGroups: lowGroups,
161161
});
162162
}
163+
// Preserve the order established in sortGroupData
163164

164-
// Sort each group by groupName alphabetically
165-
highGroups.sort((a, b) => a.localeCompare(b));
166-
mediumGroups.sort((a, b) => a.localeCompare(b));
167-
lowGroups.sort((a, b) => a.localeCompare(b));
168165

169166
return { highGroups, mediumGroups, lowGroups };
170167
}

0 commit comments

Comments
 (0)