From f2dfb93f093eeb7c239cba2d5b73a36b4b964900 Mon Sep 17 00:00:00 2001 From: Remi Blom-Ohlsen Date: Wed, 13 Nov 2024 16:18:33 +0100 Subject: [PATCH] Bugfix for processing idea without values [skip-ci] --- .../IdeaModule/IdeaField/useIdeaField.tsx | 32 +++++----- .../src/components/IdeaModule/IdeaModule.tsx | 1 - .../Lists/Prosjektinnholdskolonner.xml | 62 +++++++++---------- 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/SharePointFramework/PortfolioWebParts/src/components/IdeaModule/IdeaField/useIdeaField.tsx b/SharePointFramework/PortfolioWebParts/src/components/IdeaModule/IdeaField/useIdeaField.tsx index f21c644b8..943c06e4c 100644 --- a/SharePointFramework/PortfolioWebParts/src/components/IdeaModule/IdeaField/useIdeaField.tsx +++ b/SharePointFramework/PortfolioWebParts/src/components/IdeaModule/IdeaField/useIdeaField.tsx @@ -57,20 +57,24 @@ export function useIdeaField(props: IIdeaFieldProps) { [ 'User', ([user]: IPersonaProps[]) => { - return ( - - ) + if (user) { + return ( + + ) + } else { + return null + } } ], [ diff --git a/SharePointFramework/PortfolioWebParts/src/components/IdeaModule/IdeaModule.tsx b/SharePointFramework/PortfolioWebParts/src/components/IdeaModule/IdeaModule.tsx index c2102c1e8..394f3aa8d 100644 --- a/SharePointFramework/PortfolioWebParts/src/components/IdeaModule/IdeaModule.tsx +++ b/SharePointFramework/PortfolioWebParts/src/components/IdeaModule/IdeaModule.tsx @@ -237,7 +237,6 @@ export const IdeaModule: FC = (props) => {
{state.selectedIdea.registeredFieldValues - .filter((model) => !ignoreFields.includes(model.internalName)) .map((model, idx) => ( ))} diff --git a/Templates/Portfolio/Objects/Lists/Prosjektinnholdskolonner.xml b/Templates/Portfolio/Objects/Lists/Prosjektinnholdskolonner.xml index 72a7c6d4e..6c2783861 100644 --- a/Templates/Portfolio/Objects/Lists/Prosjektinnholdskolonner.xml +++ b/Templates/Portfolio/Objects/Lists/Prosjektinnholdskolonner.xml @@ -855,29 +855,6 @@ 1090 - Anbefaling - GtIdeaRecommendation - GtIdeaRecommendationOWSCHCS - Tags - Idémodul - 100 - 200 - True - True - - - 1100 - Kommentar til anbefaling - GtIdeaRecommendationComment - GtIdeaRecommendationCommentOWSMTXT - Note - Idémodul - 200 - 300 - True - - - 1110 Idéeier GtIdeaOwner GtIdeaOwner @@ -888,7 +865,7 @@ True - 1120 + 1100 Overordnet løsningsbeskrivelse GtIdeaSolutionDescription GtIdeaSolutionDescriptionOWSMTXT @@ -898,7 +875,7 @@ 300 - 1130 + 1110 Forventede gevinster GtIdeaExpectedGain GtIdeaExpectedGainOWSMTXT @@ -908,7 +885,7 @@ 300 - 1140 + 1120 Gjennomføringsplan: Tilnærming GtIdeaExecutionPlanApproach GtIdeaExecutionPlanApproachOWSMTXT @@ -918,7 +895,7 @@ 300 - 1150 + 1130 Gjennomføringsplan: Ressursbehov GtIdeaExecutionResourceNeeds GtIdeaExecutionResourceNeedsOWSMTXT @@ -928,7 +905,7 @@ 300 - 1160 + 1140 Gjennomføringsplan: Suksessfaktorer GtIdeaExecutionSuccessFactors GtIdeaExecutionSuccessFactorsOWSMTXT @@ -938,7 +915,7 @@ 300 - 1170 + 1150 Referanse GtIdeaReference GtIdeaReferenceOWSMTXT @@ -948,7 +925,7 @@ 300 - 1180 + 1160 Andre kommentarer GtIdeaOtherComments GtIdeaOtherCommentsOWSMTXT @@ -958,6 +935,29 @@ 300 True + + 1170 + Anbefaling + GtIdeaRecommendation + GtIdeaRecommendationOWSCHCS + Tags + Idémodul + 100 + 200 + True + True + + + 1180 + Kommentar til anbefaling + GtIdeaRecommendationComment + GtIdeaRecommendationCommentOWSMTXT + Note + Idémodul + 200 + 300 + True + 1190 Beslutning @@ -970,7 +970,7 @@ True - 1210 + 1200 Kommentar til beslutning GtIdeaStrategicValue GtIdeaDecisionCommentOWSMTXT