Skip to content

Commit

Permalink
[#184] Reorder JMP computation on school detail popup
Browse files Browse the repository at this point in the history
  • Loading branch information
wayangalihpratama committed Oct 9, 2023
1 parent 0dd6833 commit 1ff5e67
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion frontend/src/components/maps/SchoolDetailModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,16 @@ const MainTabContent = ({
// JMP Level
const JMPLevel = () => {
// jmp level
const groupedJmpLevel = groupBy(jmp_levels, "category");
const groupedJmpLevelTemp = groupBy(jmp_levels, "category");
// REORDER jmp level
const order = ["Water", "Sanitation", "Hygiene"];
let groupedJmpLevel = {};
order.forEach((x) => {
groupedJmpLevel = {
...groupedJmpLevel,
[x]: groupedJmpLevelTemp[x],
};
});
return (
<Descriptions title="JMP Level" layout="vertical">
{Object.keys(groupedJmpLevel).map((key, i) => {
Expand Down

0 comments on commit 1ff5e67

Please sign in to comment.