From 0d399f8b1318c1f4bcc5dd6682b0800facdea187 Mon Sep 17 00:00:00 2001 From: Ole Martin Pettersen Date: Fri, 17 Jan 2025 14:26:39 +0100 Subject: [PATCH] 113:7 error Unexpected console statement no-console --- .../src/webparts/portfolioOverview/index.ts | 34 ++++++++++--------- .../PortalDataService/PortalDataService.ts | 4 +-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/SharePointFramework/PortfolioWebParts/src/webparts/portfolioOverview/index.ts b/SharePointFramework/PortfolioWebParts/src/webparts/portfolioOverview/index.ts index aae0d8cbd..00d5e0245 100644 --- a/SharePointFramework/PortfolioWebParts/src/webparts/portfolioOverview/index.ts +++ b/SharePointFramework/PortfolioWebParts/src/webparts/portfolioOverview/index.ts @@ -59,8 +59,8 @@ export default class PortfolioOverviewWebPart extends BasePortfolioWebPart { try { this._selectedPortfolioId = this.properties.selectedPortfolioId - const selectedPortfolio = this.properties.portfolios.find((portfolio) => portfolio.uniqueId === this._selectedPortfolioId) - await super.onInit(selectedPortfolio) + const portfolio = this.properties.portfolios.find(({ uniqueId }) => uniqueId === this._selectedPortfolioId) + await super.onInit(portfolio) this._configuration = await this.dataAdapter.getPortfolioConfig() } catch (error) { this._error = error @@ -69,13 +69,18 @@ export default class PortfolioOverviewWebPart extends BasePortfolioWebPart ({ + key: portfolio.uniqueId, + text: portfolio.title + })) + } case 'defaultViewId': { if (this._configuration) { @@ -104,17 +109,7 @@ export default class PortfolioOverviewWebPart extends BasePortfolioWebPart ({ - key: portfolio.uniqueId, - text: portfolio.title - })), - }) - ), - !_.isEmpty(this.properties.portfolios) && ( - PropertyPaneToggle('showPortfolioSelector', { - label: strings.ShowPortfolioSelectorLabel, - onText: strings.ShowPortfolioSelectorOnText, - offText: strings.ShowPortfolioSelectorOffText + options: this._getOptions('portfolios') }) ), PropertyPaneDropdown('defaultViewId', { @@ -139,6 +134,13 @@ export default class PortfolioOverviewWebPart extends BasePortfolioWebPart