From 69ef06f1388d20a704c288ccde1f9d0c4fa96290 Mon Sep 17 00:00:00 2001 From: mgaseta Date: Wed, 15 Jan 2025 10:37:31 -0300 Subject: [PATCH 1/4] fix: removing unnecessary column --- .../src/components/FavouriteActivities/index.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/FavouriteActivities/index.tsx b/frontend/src/components/FavouriteActivities/index.tsx index 76f1dde13..197ab213a 100644 --- a/frontend/src/components/FavouriteActivities/index.tsx +++ b/frontend/src/components/FavouriteActivities/index.tsx @@ -36,7 +36,7 @@ const FavouriteActivities = ({ isConsep }: FavouriteActivitiesProps) => { @@ -80,13 +80,10 @@ const FavouriteActivities = ({ isConsep }: FavouriteActivitiesProps) => { activities by clicking on the heart icon inside each page" /> ) : favActQuery.data.filter((fav) => fav.isConsep === isConsep).map((favObject) => ( - - - - + )) ) } From 0731b5cbca3caa0436f6ff95e5b18d72d830920e Mon Sep 17 00:00:00 2001 From: mgaseta Date: Wed, 15 Jan 2025 10:37:58 -0300 Subject: [PATCH 2/4] fix: removing capital letter --- .../SeedlotRegistrationSteps/ParentTreeStep/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/SeedlotRegistrationSteps/ParentTreeStep/index.tsx b/frontend/src/components/SeedlotRegistrationSteps/ParentTreeStep/index.tsx index 64e20e65c..aa37fbf90 100644 --- a/frontend/src/components/SeedlotRegistrationSteps/ParentTreeStep/index.tsx +++ b/frontend/src/components/SeedlotRegistrationSteps/ParentTreeStep/index.tsx @@ -369,7 +369,7 @@ const ParentTreeStep = ({ isReviewDisplay, isReviewRead }: ParentTreeStepProps) } - Genetic worth and percent of Tested parent tree contribution + Genetic worth and percent of tested parent tree contribution { From ad2c536599f3cf14c5ab7ff7eed61792a1179b40 Mon Sep 17 00:00:00 2001 From: mgaseta Date: Wed, 15 Jan 2025 14:46:51 -0300 Subject: [PATCH 3/4] fix: adjusting percentage values --- .../views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx b/frontend/src/views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx index d7f1ad4d2..90b8e4029 100644 --- a/frontend/src/views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx +++ b/frontend/src/views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx @@ -145,7 +145,7 @@ const SeedlotReviewContent = () => { areaOfUseData, isFetchingData, seedlotData, - calculatedValues, + genWorthInfoItems, seedlotSpecies, popSizeAndDiversityConfig } = useContext(ClassAContext); @@ -282,16 +282,13 @@ const SeedlotReviewContent = () => { .forEach((genWorthKey) => { if (genWorthVals[genWorthKey].value) { const upperCaseCode = genWorthKey.toUpperCase(); - const traitIndex = calculatedValues.map( - (trait) => trait.traitCode - ).indexOf(upperCaseCode); seedlotReviewGeneticWorth.push({ traitCode: upperCaseCode, calculatedValue: Number(genWorthVals[genWorthKey].value), // Use the same percentage value, since users can't edit it testedParentTreePerc: - calculatedValues[traitIndex] - ? calculatedValues[traitIndex].testedParentTreePerc + genWorthInfoItems[genWorthKey] + ? Number(genWorthInfoItems[genWorthKey][1].value) / 100 : 0 }); } From 8cea56b2e35e0be40387a8d8cebce870dc486aa2 Mon Sep 17 00:00:00 2001 From: mgaseta Date: Wed, 15 Jan 2025 14:48:46 -0300 Subject: [PATCH 4/4] fix: adding a comment --- .../src/views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx b/frontend/src/views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx index 90b8e4029..a05b7eee4 100644 --- a/frontend/src/views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx +++ b/frontend/src/views/Seedlot/SeedlotReview/SeedlotReviewContent.tsx @@ -285,9 +285,10 @@ const SeedlotReviewContent = () => { seedlotReviewGeneticWorth.push({ traitCode: upperCaseCode, calculatedValue: Number(genWorthVals[genWorthKey].value), - // Use the same percentage value, since users can't edit it testedParentTreePerc: genWorthInfoItems[genWorthKey] + // Dividing by 100 since the current value is in percentage and we need + // to submit the real value ? Number(genWorthInfoItems[genWorthKey][1].value) / 100 : 0 });