Skip to content

Commit

Permalink
Rettet et problem hvor lenke til prosjektets tidslinje ikke lenket ri…
Browse files Browse the repository at this point in the history
…ktig for program (#1513)

* Link to program timeline of project is program

* Changelog
  • Loading branch information
stigre authored Apr 26, 2024
1 parent b686460 commit df95616
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Sjekk ut [release notes](./releasenotes/1.9.0.md) for høydepunkter og mer detal
- Rettet et problem hvor taksonomifelt i redigeringspanel ikke støttet nivåer av termer [#1504](https://github.com/Puzzlepart/prosjektportalen365/issues/1504)
- Rettet et problem hvor "Ansvarlig"-feltet i administrering av tiltak ikke viste personen som er valgt i feltet [#1506](https://github.com/Puzzlepart/prosjektportalen365/issues/1506)
- Rettet et problem hvor det ikke var mulig å lagre tom verdi i valuta/tall felt fra redigeringspanel [#1510](https://github.com/Puzzlepart/prosjektportalen365/issues/1510)
- Rettet et problem hvor lenke til prosjektets tidslinje ikke lenket riktig for program [#1511](https://github.com/Puzzlepart/prosjektportalen365/issues/1511)

### Forbedringer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import strings from 'SharedLibraryStrings'
export function useGroupRenderer() {
return ({ group }: ReactCalendarGroupRendererProps<ITimelineGroup>) => {
const style: React.CSSProperties = { display: 'block', width: '100%' }
const page = group.isProgram ? 'Programtidslinje' : 'Prosjekttidslinje'

return (
<div style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}>
{group.type === TimelineGroupType.Project ? (
<Tooltip content={strings.TimelineGroupDescription} relationship='description' withArrow>
<Link
href={`${group.path}/SitePages/Prosjekttidslinje.aspx`}
href={`${group.path}/SitePages/${page}.aspx`}
target='_blank'
title={group.title}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const createProjectGroups = (projects: ProjectListModel[]): ITimelineGroup[] =>
return {
title: project.title,
siteId: project.siteId,
path: project.url
path: project.url,
isProgram: project.isProgram
}
})

Expand All @@ -36,7 +37,8 @@ const createProjectGroups = (projects: ProjectListModel[]): ITimelineGroup[] =>
title: project.title,
type: TimelineGroupType.Project,
siteId: project.siteId,
path: project.path
path: project.path,
isProgram: project.isProgram
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface ITimelineGroup {
type?: TimelineGroupType
siteId?: string
path?: string
isProgram?: boolean
}

export interface ITimelineGroups {
Expand Down

0 comments on commit df95616

Please sign in to comment.