Skip to content

Add a page for each team type (TK-01, TK-04, RO-03, VK-05) - #76

Merged
ugedal1 merged 2 commits into
mainfrom
feat/team-type-pages
Nov 19, 2026
Merged

ugedal1 merged 2 commits into
mainfrom
feat/team-type-pages

Conversation

@ugedal1

@ugedal1 ugedal1 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Adds a page for each team type. Before this, nothing in the frontend let you read about a team type: you only saw its name as a tag, or one type at the end of the wizard. The prototype has no team type page either. The page is reached through links; there is no menu item or list page for now.

Requirements: TK-01, TK-04, RO-03, VK-05

Frontend

  • /organisering/team/typer/[id] (typer/[id].astro):

    • the description, and «Dette må på plass» as a bullet list (TK-01, TK-04);
    • «Roller»: the roles relevant for the type, each linking to the role (RO-03);
    • «Anbefalte verktøy»: the tools meant for the type, with a pointer to Verktøykassen for the tools that suit every type (VK-05);
    • «Team av denne typen»: the active teams of the type, as team cards;
    • empty sections say so, and an unknown id gives a 404.

    It sits under Team, so the breadcrumbs read Team › Produktteam and the Team menu item stays current, with no change to NAV.

  • Tag takes an href. With one, it renders as a link. Team type tags now link to the type's page on the team page, role cards, role pages and tool pages.

  • Team cards keep a plain tag, because the whole card is already a link and links can't be nested.

  • The wizard's result links to the team type it lands on («Les mer om prosjektteam»).

  • Queries:

    • getTeamType reads the type with its roles join.
    • getTeamsOfType and getToolsForTeamType reuse the existing team and tool queries with a filter.

Test data fix (its own commit)

  • The seed data linked to www.prosjektveiviseren.no. That address isn't Digdir's and leads to an unrelated site.
  • Prosjektveiviseren now links to https://prosjektveiviseren.digdir.no/, the address the specification uses.
  • Prosjektmandat loses its «Mal for prosjektmandat» link, since we don't know where the template lives.
  • The tests use the reserved example.org instead.

Existing databases keep the old link until pnpm db:seed:reset.

Tests

  • New teamtype-id.test.ts: the sections, the queries (as the visitor, filtered by type), the links to roles, teams and tools, the empty states and the 404.
  • Updated tests:
    • the tag;
    • the team, role and tool pages, which now link the type;
    • the wizard, which links its result but not its advice.
  • pnpm test (CMS + frontend) and pnpm check:web pass.
  • I also checked the page and its links against the seeded CMS in the dev server.

Not covered
TK-01 (Må) asks for «en liste over definerte teamtyper». Without an overview list it is still only partly covered. We chose to leave out a list page for now and can add one later.

🤖 Generated with Claude Code

ugedal1 and others added 2 commits November 19, 2026 09:58
The seed data linked to www.prosjektveiviseren.no, a guessed address that
is not Digdir's and leads to an unrelated site. Prosjektveiviseren now
links to prosjektveiviseren.digdir.no, the address the specification uses.
Prosjektmandat loses its «Mal for prosjektmandat» link, since we don't know
where the template lives. The tests use the reserved example.org instead
of a real-looking address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The team types had a description, what must be in place and their roles,
but nowhere to read them. Each type now has a page at
/organisering/team/typer/[id], under Team in the breadcrumbs:

- what characterises the type and «Dette må på plass» (TK-01, TK-04);
- the roles relevant for it, linking to each role (RO-03);
- «Anbefalte verktøy», the tools meant for the type, with a pointer to
  Verktøykassen for the ones that suit all types (VK-05);
- the active teams of the type, as team cards.

There is no list of team types in the menu. The page is reached through
the type's name: Tag takes an `href`, and the team type tags on the team
page, role cards, role pages and tool pages link to it. The wizard's
result links to the type it lands on. Team cards keep a plain tag, since
the card itself is already a link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ugedal1
ugedal1 merged commit 4896a31 into main Nov 19, 2026
6 checks passed
@ugedal1
ugedal1 deleted the feat/team-type-pages branch November 19, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant