diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eb534fc4..ebffe7c37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Sjekk ut [release notes](./releasenotes/1.9.0.md) for høydepunkter og mer detal - Rettet et problem hvor sorteringsindikatorene for kolonner i aggregerte oversikter ikke var riktig sjekket av [#1429](https://github.com/Puzzlepart/prosjektportalen365/issues/1429) - Rettet et problem hvor mapper ikke ble provisjonert dersom det eksisterte mapper med samme navn i prosjektet [#1497](https://github.com/Puzzlepart/prosjektportalen365/issues/1497) - Rettet et problem hvor tekstfeltet knyttet til `Fase` ikke ble riktig synkronisert til portefølje [#1492](https://github.com/Puzzlepart/prosjektportalen365/issues/1492) +- Rettet et problem med visning av tallverdier i aggregerte oversikter hvor det ble lagt på en stor mengde desimaler [#1498](https://github.com/Puzzlepart/prosjektportalen365/issues/1498) ### Forbedringer diff --git a/SharePointFramework/PortfolioWebParts/src/components/List/ItemColumn/NumberColumn/index.tsx b/SharePointFramework/PortfolioWebParts/src/components/List/ItemColumn/NumberColumn/index.tsx new file mode 100644 index 000000000..6c8f7799e --- /dev/null +++ b/SharePointFramework/PortfolioWebParts/src/components/List/ItemColumn/NumberColumn/index.tsx @@ -0,0 +1,13 @@ +import strings from 'PortfolioWebPartsStrings' +import { tryParseInt } from 'pp365-shared-library' +import React from 'react' +import { ColumnRenderComponent } from '../types' + +export const NumberColumn: ColumnRenderComponent = (props) => ( + {tryParseInt(props.columnValue, undefined)} +) + +NumberColumn.key = 'number' +NumberColumn.id = 'Number' +NumberColumn.displayName = strings.ColumnRenderOptionNumber +NumberColumn.iconName = 'NumberField' diff --git a/SharePointFramework/PortfolioWebParts/src/components/List/ItemColumn/registry.ts b/SharePointFramework/PortfolioWebParts/src/components/List/ItemColumn/registry.ts index f7182a96d..de0a3ed98 100644 --- a/SharePointFramework/PortfolioWebParts/src/components/List/ItemColumn/registry.ts +++ b/SharePointFramework/PortfolioWebParts/src/components/List/ItemColumn/registry.ts @@ -5,6 +5,7 @@ import { useEffect } from 'react' import { GetDataTypeProperties, IColumnDataTypeFieldOption } from './ColumnDataTypeField' import { BooleanColumn } from './BooleanColumn' import { CurrencyColumn } from './CurrencyColumn' +import { NumberColumn } from './NumberColumn' import { DateColumn } from './DateColumn' import { DialogColumn } from './DialogColumn' import { FileNameColumn } from './FileNameColumn' @@ -232,6 +233,7 @@ export function useColumnRenderComponentRegistry() { DateColumn, FileNameColumn, CurrencyColumn, + NumberColumn, ListColumn, DialogColumn, TagsColumn, @@ -252,12 +254,6 @@ export function useColumnRenderComponentRegistry() { strings.ColumnRenderOptionNote, 'EditStyle' ) - ColumnRenderComponentRegistry.registerColumnRenderOption( - 'number', - 'Number', - strings.ColumnRenderOptionNumber, - 'NumberField' - ) ColumnRenderComponentRegistry.registerColumnRenderOption( 'percentage', 'Percentage', diff --git a/SharePointFramework/shared-library/src/types/ColumnDataType.ts b/SharePointFramework/shared-library/src/types/ColumnDataType.ts index 4eacc957c..1abbd4b0d 100644 --- a/SharePointFramework/shared-library/src/types/ColumnDataType.ts +++ b/SharePointFramework/shared-library/src/types/ColumnDataType.ts @@ -2,6 +2,7 @@ export type ColumnDataType = | 'user' | 'date' | 'currency' + | 'number' | 'tags' | 'boolean' | 'url'