Skip to content

Commit

Permalink
Porteføljeoversikt: vis personlige visninger som egen "seksjon" (#1063)
Browse files Browse the repository at this point in the history
* Porteføljeoversikt: vis personlige visninger som egen "seksjon"

* CHANGELOG

---------

Co-authored-by: Tarjei E. Ormestøyl <[email protected]>
  • Loading branch information
olemp and tarjeieo committed Mar 29, 2023
1 parent 9ed7060 commit 777b853
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Sjekk ut [release notes](./release_notes/1.8.0.md) for høydepunkter og mer deta
- Dersom bruker har "Full kontroll" tilgangsnivå på området får bruker fulle rettigheter på området [#1054](https://github.com/Puzzlepart/prosjektportalen365/issues/1054)
- Tilgang for å opprette porteføljeoversikt-visninger er nå basert på tilgang til listen [#932](https://github.com/Puzzlepart/prosjektportalen365/issues/932)
- Håndterer ugyldig låst mal (i property bag) i prosjektoppsettet [#1057](https://github.com/Puzzlepart/prosjektportalen365/issues/1057)
- Porteføljeoversikt: vis personlige visninger som egen "seksjon" [#1045](https://github.com/Puzzlepart/prosjektportalen365/issues/1045)
- Fiks for doble scrollbars på hjelpeinnhold-vindu [#997](https://github.com/Puzzlepart/prosjektportalen365/issues/997)

### Feilrettinger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import { IPortfolioOverviewCommandsProps, IPortfolioOverviewCommandsState } from
/**
* Component logic hook for the PortfolioOverviewCommands component. Handles the logic for
* the command bar and the filter panel.
*
* Renders the following context menu items for the command bar:
* - `EXCEL_EXPORT`: Excel export button
* - `NEW_VIEW`: New view button
* - `VIEW_OPTIONS`: View options button
* - `FILTERS`: Filters button
*
* @param props Props for the PortfolioOverviewCommands component
*/
Expand Down Expand Up @@ -73,15 +79,31 @@ export function usePortfolioOverviewCommands(props: IPortfolioOverviewCommandsPr
key: 'DIVIDER_01',
itemType: ContextualMenuItemType.Divider
},
...props.configuration.views.map(
...props.configuration.views.filter(v => !v.isPersonal).map(
(view) =>
({
key: view.id.toString(),
name: view.title,
iconProps: { iconName: view.iconName },
canCheck: true,
checked: view.id === props.currentView?.id,
onClick: () => props.events.onChangeView(view)
onClick: () => props.events.onChangeView(view),
} as IContextualMenuItem)
),
{
key: 'HEADER_01',
itemType: ContextualMenuItemType.Header,
text: strings.PersonalViewsText
},
...props.configuration.views.filter(v => v.isPersonal).map(
(view) =>
({
key: view.id.toString(),
name: view.title,
iconProps: { iconName: view.iconName },
canCheck: true,
checked: view.id === props.currentView?.id,
onClick: () => props.events.onChangeView(view),
} as IContextualMenuItem)
),
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
declare interface IPortfolioWebPartsStrings {
PersonalViewsText: string
ColumnRenderDescription: ReactNode
DisplayNameDescription: string
HideViewsLabel: string
Expand Down
1 change: 1 addition & 0 deletions SharePointFramework/PortfolioWebParts/src/loc/nb-no.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,6 @@ define([], function () {
ProjectContentColumnItemNotFound: 'Prosjektinnholdskolonne ble ikke funnet',
ShowHideColumnsLabel: 'Vis/skjul kolonner',
ShowHideColumnsDescription: 'Velg kolonnene som skal vises for nåværende visning. Endringen vil oppdatere datakilden med kolonnene som velges.',
PersonalViewsText: 'Personlige visninger'
}
})

0 comments on commit 777b853

Please sign in to comment.