Skip to content

Commit

Permalink
Merge branch 'releases/1.10' of https://github.com/Puzzlepart/prosjek…
Browse files Browse the repository at this point in the history
…tportalen365 into releases/1.10
  • Loading branch information
tarjeieo committed Sep 10, 2024
2 parents 37adb53 + 5551c0f commit 64c3668
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ NB: Som en del av denne releasen må det godkjennes en ny app ved installasjon e
- Rettet et problem hvor tillatelseskonfigurasjon feilet dersom man ikke er eier på hub [#1549](https://github.com/Puzzlepart/prosjektportalen365/issues/1549)
- Rettet et problem hvor provisjonering av dokumentbibliotek bare hentet 100 elementer [#1547](https://github.com/Puzzlepart/prosjektportalen365/issues/1547)
- Rettet et problem hvor opprettelse av statusrapporter feilet dersom URL-felt var i bruk [#1546](https://github.com/Puzzlepart/prosjektportalen365/issues/1546)
- Rettet et problem hvor eiere av personlige visninger ikke kunne redigere kolonner [#1553](https://github.com/Puzzlepart/prosjektportalen365/issues/1553)

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export function useAddColumn(
disabled: true
},
{
key: 'TOGGLE_EDIT_VIEW_COLUMNS_PANEL',
text: strings.ToggleEditViewColumnsLabel,
key: 'SHOW_HIDE_COLUMNS',
text: strings.ShowHideColumnsLabel,
iconProps: { iconName: 'Eye' },
onClick: onToggleEditViewColumnsPanel,
disabled: isToggleEditViewColumnsPanelDisabled || !permissionCheck
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ import { MenuProps, useId } from '@fluentui/react-components'
export function useColumnContextMenu() {
const context = useContext(PortfolioOverviewContext)
const [open, setOpen] = useState(false)
const isViewAuthor = context.state.currentView?.author === context.props.pageContext.user.email

const { isAddColumn, createContextualMenuItems } = useAddColumn(
true,
context.props.pageContext.legacyPageContext.isSiteAdmin
context.props.pageContext.legacyPageContext.isSiteAdmin || isViewAuthor
)
const onOpenChange: MenuProps['onOpenChange'] = (_, data) => setOpen(data.open)
const [checkedValues, setCheckedValues] = useState<MenuProps['checkedValues']>({})
Expand Down Expand Up @@ -141,12 +143,6 @@ export function useColumnContextMenu() {
key: 'DIVIDER_03',
itemType: ContextualMenuItemType.Divider
},
{
key: 'SHOW_HIDE_COLUMNS',
text: strings.ShowHideColumnsLabel,
onClick: () => context.dispatch(TOGGLE_EDIT_VIEW_COLUMNS_PANEL({ isOpen: true })),
iconProps: { iconName: 'Eye' }
},
{
key: 'ADD_COLUMN',
text: strings.AddColumnLabel,
Expand Down
1 change: 0 additions & 1 deletion SharePointFramework/PortfolioWebParts/src/loc/_/en-us.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ define([], function () {
TimelineContentListName: 'Tidslinjeinnhold',
TitleLabel: 'Title',
ToggleColumnFormPanelLabel: 'Add column',
ToggleEditViewColumnsLabel: 'Show or hide columns',
UseChangesButtonText: 'Use',
ViewNotFoundMessage: 'Cannot find the specified view.',
ViewsListNameLabel: 'Views'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ declare interface IPortfolioWebPartsStrings {
TitleLabel: string
TitleDescription: string
ToggleColumnFormPanelLabel: string
ToggleEditViewColumnsLabel: string
UseChangesButtonText: string
UseDynamicColorsDescription: string
UseDynamicColorsLabel: string
Expand Down
1 change: 0 additions & 1 deletion SharePointFramework/PortfolioWebParts/src/loc/nb-no.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ define([], function () {
TitleLabel: 'Tittel',
TitleDescription: 'Tittel for visningen.',
ToggleColumnFormPanelLabel: 'Legg til kolonne',
ToggleEditViewColumnsLabel: 'Vis eller skjul kolonner',
UseChangesButtonText: 'Bruk',
UseDynamicColorsDescription: 'Her kan du velge om kortvisningen skal ta i bruk dynamiske farger for logodelen, dette kan medføre lengre innlastningstid og anbefales for mindre porteføljer (krever at "Vis logo" er på).',
UseDynamicColorsLabel: 'Bruk dynamiske farger',
Expand Down
1 change: 0 additions & 1 deletion SharePointFramework/ProgramWebParts/src/loc/mystrings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ declare interface IProgramWebPartsStrings {
TimelineContentListName: string
TitleLabel: string
ToggleColumnFormPanelLabel: string
ToggleEditViewColumnsLabel: string
UseChangesButtonText: string
ViewNotFoundMessage: string
DataSourceItemNotFound: string
Expand Down
1 change: 0 additions & 1 deletion SharePointFramework/ProgramWebParts/src/loc/nb-no.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ define([], function () {
TitleDescription: 'Tittel for visningen.',
TitleLabel: 'Tittel',
ToggleColumnFormPanelLabel: 'Legg til kolonne',
ToggleEditViewColumnsLabel: 'Vis eller skjul kolonner',
UseChangesButtonText: 'Bruk',
ViewNotFoundMessage: 'Finner ikke angitt visning.',
DataSourceItemNotFound: 'Datakilde ble ikke funnet',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class SPPortfolioOverviewViewItem {
public GtPortfolioRefinersId?: number[] | { results: number[] } = []
public GtPortfolioGroupById?: number = 0
public GtPortfolioColumnOrder?: string = ''
public Author?: { EMail: string }
}

/**
Expand Down Expand Up @@ -111,6 +112,11 @@ export class PortfolioOverviewView {
*/
public groupById: number

/**
* Author of the view.
*/
public author: string

/**
* The view properties as a map. Used in the `PortfolioOverview`
* component to edit and create views.
Expand All @@ -134,6 +140,7 @@ export class PortfolioOverviewView {
this.columnIds = (item?.GtPortfolioColumnsId as number[]) ?? []
this.refinerIds = (item?.GtPortfolioRefinersId as number[]) ?? []
this.groupById = item?.GtPortfolioGroupById
this.author = item?.Author?.EMail
this.$map = this._toMap()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ export class PortalDataService extends DataService<IPortalDataServiceConfigurati
const email = this._configuration.spfxContext.pageContext.user.email
const filter = `GtPortfolioIsPersonalView eq 0 or (GtPortfolioIsPersonalView eq 1 and Author/EMail eq '${email}')`
const spItems = await this._getList('PORTFOLIO_VIEWS')
.items.select(...getClassProperties(SPPortfolioOverviewViewItem))
.items.select(...getClassProperties(SPPortfolioOverviewViewItem), 'Author/EMail')
.expand('Author')
.filter(filter)
.orderBy('GtSortOrder', true)<SPPortfolioOverviewViewItem[]>()
return spItems.map((item) => new PortfolioOverviewView(item))
Expand Down

0 comments on commit 64c3668

Please sign in to comment.