Skip to content

Commit

Permalink
Deploy changes from develop to main (#173)
Browse files Browse the repository at this point in the history
* Add Table component with conditional styling for table cells

DPSTAT-801

* Update table props

DPSTAT-801

* Make table scrollable on mobile with css

DPSTAT-801

* Use teamApi data for table data (wip)

DPSTAT-801

* Minor code refactoring and added comments

DPSTAT-801

* Add responsive view for Table component (wip)

DPSTAT-801

* Minor styling tweaks and code refactoring

DPSTAT-801

* Revert changes in Users page

DPSTAT-801

* Bump vite from 5.0.11 to 5.0.12

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.11 to 5.0.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>

* Dpstat 817 secure authentication (#11)

* Store JWT in cookies instead of localStorage; use js-cookie lib

DPSTAT-817

* Use expired and same site properties for token storing

DPSTAT-817

* Add auth file for js-cookie function imports (WIP)

DPSTAT-817

* Import js-cookie into team api file directly

DPSTAT-817

* Minor refactor in ProtectRoute and VerifyKeycloakToken

DPSTAT-817

* Minor code refactoring; token -> access_token

DPSTAT-817

* Pass the same attributes to the deletion of Cookies; secure and sameSite

DPSTAT-817

* Use react-secure-storage to store tokens instead of cookies

DPSTAT-817

* Include node in eslint config to remove process is not defined linting error

* Revert vite config changes; readd comma

* Use prop type password for token input

DPSTAT-817

* Revert react-secure-storage changes; keep storing tokens in local storage temporarily

* Dpstat 800 - header (#12)

* Add header component
* Add UserProfile endpoint

* Rename teamApi.ts to TeamApi.ts, Linux has a case-sensitive filesystem

* fix bug where if userprofile is deleted the website dont render (#14)

* Data handling rework (#16)

* teamoverview

* fix async error

* handle fetchAPIData error

* add error handling that respects external apis errorcode and message

* add error middleware

* .

* fix fallback error message

* added teamoverview data endpoints and fetched data on frontend

* fetched teams in TeamOverView

* cleaned up stuff and added title

* title and interface for pages

* added loading, section name

* cleaned up and moved reusable interfaces to @types

* updated protectedroute and validateToken

* .

* .

* Minor code refactoring

* Fix mobile styling for tables

---------

Co-authored-by: johnnadeluy <[email protected]>

* Add UserProfile (#17)

* Fix bug, header not showing (#18)

* Part 1: Setup prettier (#19)

* Setup prettier for formatting; add scripts command for linting and formatting

* Apply prettier formatting on all files by running lint:format script

* changed provider and breadcrumb variables (#20)

changed provider and breadcrumb variables, and also made reuseable functions in server.js

* 404 page (#21)

* Basic 404 page

* Move Header and Breadcrumb to PageLayout for pages like Login and NotFound etc

* Add styling to NotFound

* Center everything

* Run lint:format

* Make class names camelCase

---------

Co-authored-by: johnnadeluy <[email protected]>

* Part 2: Fix eslint warnings and ts errors (#22)

* Fix eslint missing dependency array in useEffect warnings

* Fix ts errors; breadcrumbs user profile display name and ignore line in server.js

* Minor code refactoring

* added preperations for teamDetail page (#23)

* added preperations for teamDetail endpoint

* removed trailing main (#25)

* Part 3: Add workflow build and lint (#26)

* Adds a workflow that builds and lints on open pull-requests to develop

* Include auto fix for linting in workflow

* Minor code refactoring and adjust Prettier warnings to error

* Fix type error for breadcrumbsUserProfileDisplayName

* Temporary hide unused const in TeamDetail to prevent build fail

* Adjustments to not include autofix ESLint and Prettier in workflow

* Update README.md with ESLint and Prettier documentation with ChatGPT assistance

* Autofix prettier format errors

* Bump actions/checkout@v3 to actions/checkout@v4

* Minor code refactoring; rewording

* Add Dependabot and workflow to auto-merge its PRs for minor semver updates (#24)

* Create dependabot.yml

* Add auto-merge for dependabot PRs that are only semver-patch updates

* Bump @statisticsnorway/ssb-component-library from 2.0.96 to 2.0.97 (#28)

Bumps [@statisticsnorway/ssb-component-library](https://github.com/statisticsnorway/ssb-component-library) from 2.0.96 to 2.0.97.
- [Release notes](https://github.com/statisticsnorway/ssb-component-library/releases)
- [Commits](statisticsnorway/ssb-component-library@2.0.96...2.0.97)

---
updated-dependencies:
- dependency-name: "@statisticsnorway/ssb-component-library"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump dotenv from 16.3.1 to 16.4.1

Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.3.1 to 16.4.1.
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](motdotla/dotenv@v16.3.1...v16.4.1)

---
updated-dependencies:
- dependency-name: dotenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump vite-express from 0.13.0 to 0.15.0

Bumps [vite-express](https://github.com/szymmis/vite-express) from 0.13.0 to 0.15.0.
- [Changelog](https://github.com/szymmis/vite-express/blob/master/CHANGELOG.md)
- [Commits](szymmis/vite-express@v0.13.0...v0.15.0)

---
updated-dependencies:
- dependency-name: vite-express
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump prettier from 3.2.4 to 3.2.5 (#32)

Bumps [prettier](https://github.com/prettier/prettier) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.2.4...3.2.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @mui/material from 5.15.6 to 5.15.7 (#34)

Bumps [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) from 5.15.6 to 5.15.7.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.15.7/packages/mui-material)

---
updated-dependencies:
- dependency-name: "@mui/material"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @vitejs/plugin-react-swc from 3.5.0 to 3.6.0

Bumps [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/vitejs/vite-plugin-react-swc/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react-swc/blob/main/CHANGELOG.md)
- [Commits](vitejs/vite-plugin-react-swc@v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react-swc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add teamdetail page (#35)

* Team detail bug fix (#37)

* Bump react-router-dom from 6.21.1 to 6.22.0

Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.21.1 to 6.22.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @typescript-eslint/parser from 6.18.1 to 6.21.0

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.18.1 to 6.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.21.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @typescript-eslint/eslint-plugin from 6.18.1 to 6.21.0

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.18.1 to 6.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.21.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @types/react from 18.2.47 to 18.2.54 (#40)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.47 to 18.2.54.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Styled existing pages (#41)

---------

Co-authored-by: johnnadeluy <[email protected]>

* Bump @types/react from 18.2.54 to 18.2.55 (#42)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.54 to 18.2.55.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react-dom from 18.2.18 to 18.2.19 (#43)

Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.18 to 18.2.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @mui/material from 5.15.7 to 5.15.9 (#46)

Bumps [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) from 5.15.7 to 5.15.9.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.15.9/packages/mui-material)

---
updated-dependencies:
- dependency-name: "@mui/material"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump dotenv from 16.4.1 to 16.4.2 (#48)

Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.1 to 16.4.2.
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](motdotla/dotenv@v16.4.1...v16.4.2)

---
updated-dependencies:
- dependency-name: dotenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump dotenv from 16.4.2 to 16.4.3 (#49)

Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.2 to 16.4.3.
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](motdotla/dotenv@v16.4.2...v16.4.3)

---
updated-dependencies:
- dependency-name: dotenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @mui/material from 5.15.9 to 5.15.10 (#51)

Bumps [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) from 5.15.9 to 5.15.10.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.15.10/packages/mui-material)

---
updated-dependencies:
- dependency-name: "@mui/material"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Sidebar component (#53)

* First draft of Sidebar Modal; WIP styling and bare bones structure

DPSTAT-818

---------

Co-authored-by: johnnadeluy <[email protected]>

* Bump dotenv from 16.4.3 to 16.4.4 (#54)

Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.3 to 16.4.4.
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](motdotla/dotenv@v16.4.3...v16.4.4)

---
updated-dependencies:
- dependency-name: dotenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react from 18.2.55 to 18.2.56 (#57)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.55 to 18.2.56.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-router-dom from 6.22.0 to 6.22.1 (#58)

Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.0 to 6.22.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/[email protected]/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react from 18.2.56 to 18.2.57 (#60)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.56 to 18.2.57.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump dotenv from 16.4.4 to 16.4.5 (#61)

Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.4 to 16.4.5.
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](motdotla/dotenv@v16.4.4...v16.4.5)

---
updated-dependencies:
- dependency-name: dotenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump nodemon from 3.0.3 to 3.1.0

Bumps [nodemon](https://github.com/remy/nodemon) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](remy/nodemon@v3.0.3...v3.1.0)

---
updated-dependencies:
- dependency-name: nodemon
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @types/react from 18.2.57 to 18.2.58 (#64)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.57 to 18.2.58.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @statisticsnorway/ssb-component-library from 2.0.97 to 2.0.98 (#65)

Bumps [@statisticsnorway/ssb-component-library](https://github.com/statisticsnorway/ssb-component-library) from 2.0.97 to 2.0.98.
- [Release notes](https://github.com/statisticsnorway/ssb-component-library/releases)
- [Commits](statisticsnorway/ssb-component-library@2.0.97...2.0.98)

---
updated-dependencies:
- dependency-name: "@statisticsnorway/ssb-component-library"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Teammedlemmer (#67)

* Part 1: Filter table with search field (#68)

* Add placeholder dropdown and input field and stylig for table filtering

DPSTAT-854

* First iteration of table sorting with search input

* Add styling to no result text

* Minor code refactoring; remove comments and adjust dropdown props for placeholder

* Refactor Table component usage in pages according to changes

* Make no result text into its own component for Table

* Add documentation for first column data prep for Table

* Fix implementation of Table component in TeamMembers

* Refactors functions to const (#70)

* Fix useEffect array dependencies for Table data handling in pages (#71)

* Add TODO comments for Table component introduced by search

* Fix useEffect array dependencies for pages with tabs; causes issues on Table view

* Fix useEffect array depencies for remaining pages

* Refactor to embeds (#72)

Refactored all endpoints to use embedding from dapla-team-api. This PR needs to merge to be able to take the next step, which is to add bucket data and add team members. There will be a new branch in the future to clean up.

* Part 2: Sort table (#73)

* Add sorting on column onClick for Table component (wip)

DPSTAT-854

* Fix unsortable first columns by sorting by id

* Add unsortable prop for Table for later usage

* Add more visual indication for table sorting; wip

* Move sorting logic to desktop view for Table component

* Reset sorting states when active tab changes and minor code refactoring from table prop types

* Fix issue where Table won't sort on first on click

* Only display Table sort arrow icon on hover

* Minor styling adjustments

* Show icon on selected column during sorting

* fix bug where users had same name (#74)

* Make principle_name searchable in table (#75)

* Fixing bug where moving from /teammedlemmer/{userId} to a new userId does not load new userId data (#76)

* Bump eslint from 8.56.0 to 8.57.0 (#66)

* Disables sorting function for empty tables in Table component (#79)

* Bump express from 4.18.2 to 4.18.3 (#81)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.18.3.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](expressjs/express@4.18.2...4.18.3)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-router-dom from 6.22.1 to 6.22.2 (#82)

Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.1 to 6.22.2.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @emotion/react from 11.11.3 to 11.11.4 (#83)

Bumps [@emotion/react](https://github.com/emotion-js/emotion) from 11.11.3 to 11.11.4.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/[email protected]...@emotion/[email protected])

---
updated-dependencies:
- dependency-name: "@emotion/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react from 18.2.58 to 18.2.62 (#84)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.58 to 18.2.62.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @mui/material from 5.15.10 to 5.15.11 (#85)

Bumps [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) from 5.15.10 to 5.15.11.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.15.11/packages/mui-material)

---
updated-dependencies:
- dependency-name: "@mui/material"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* remove dialog and instead display the empty table (#80)

* Part 1: Shared buckets in Team Detail page (#86)

* Implements shared buckets view for TeamDetail page

DPSTAT-813

* Fix typing errors and adds fallback for metrics

* Add FormattedTableColumn component for formatted table columns
Refactoring for TeamDetail

* Refactored to remove login page and all references to accessToken (#87)

Refactored

Co-authored-by: johnnadeluy <[email protected]>

* Refactor pages (#88)

* Refactor Tab properties across pages

* Refactor TeamDetail Tab properties

* Destructure prepData across all pages
Add conditional rendering to FormattedTableColumn

* More refactoring in TeamDetail and TODO comments

* .

* Part 2: Shared Buckets page (#90)

* Add Shared Bucket Detail Page with current available information

DPSTAT-813

* Makes adjustment to description styling; move global styling to page layout for pages

* .

Co-authored-by: Johnny Niklasson <[email protected]>

---------

Co-authored-by: Johnny Niklasson <[email protected]>

* Show Table sort icon by default (#91)

* Show Table sort icon on first column by default

DPSTAT-882

* .

* Bump vite from 5.0.12 to 5.1.5 (#78)

* Bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.0 (#52)

* Bump @types/react from 18.2.62 to 18.2.63 (#92)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.62 to 18.2.63.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @mui/material from 5.15.11 to 5.15.12 (#93)

Bumps [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) from 5.15.11 to 5.15.12.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.15.12/packages/mui-material)

---
updated-dependencies:
- dependency-name: "@mui/material"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react-dom from 18.2.19 to 18.2.20 (#94)

Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.19 to 18.2.20.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Made changes for deployment to bip (#95)

* added workflow for build and push

* fix permission for workflow (#96)

fix permission for workflow

* cleaned up server.js (#97)

* use metadata for tagging images (#98)

* Bump @types/react-dom from 18.2.20 to 18.2.21 (#100)

Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.20 to 18.2.21.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* move registry path for image (#102)

* Bump @types/react from 18.2.63 to 18.2.64 (#101)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.63 to 18.2.64.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Johnny Niklasson <[email protected]>

* allow to trigger workflow manually (#103)

* add timestamp to image tag (#105)

* Sidebar modal adjustments (#107)

* add sidebarModal to teamDetail

* CSS cleanup and styling adjustments to SidebarModal

* .

* Fix overlapping title and button for page layout

* Add placeholder components in TeamDetail sidebar modal

* Further adjustments to styling for the title container in PageLayout

* Add close modal for backdrop on click feature for SidebarModal

* .

* More refactoring; add SidebarModalBody and remove unused code

DPSTAT-895

* Fix sidebar modal transition for TeamDetail

* .

---------

Co-authored-by: ssb-jnk <[email protected]>

* add linux/amd64,arm64 as platforms (#108)

* Bump jose from 4.15.4 to 4.15.5 (#109)

Bumps [jose](https://github.com/panva/jose) from 4.15.4 to 4.15.5.
- [Release notes](https://github.com/panva/jose/releases)
- [Changelog](https://github.com/panva/jose/blob/v4.15.5/CHANGELOG.md)
- [Commits](panva/jose@v4.15.4...v4.15.5)

---
updated-dependencies:
- dependency-name: jose
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* remove platforms build in workflow (#110)

* remove build args from CI (#111)

* Bump typescript from 5.3.3 to 5.4.2 (#99)

* add console.error for protectedRoute (#112)

* Bump react-router-dom from 6.22.2 to 6.22.3 (#113)

Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.2 to 6.22.3.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add-usersUrl (#114)

* print usersUrl (#115)

* Printing usersUrl (#116)

testing-bug

* fixed a bug where env is not available at build time (#117)

* adjusted to run on kubernetes (#118)

* adjusted to run on kubernetes

* lint

* fix-prep-bug (#119)

* .

* fix bug with prepare (#120)

* move dist to cwd (#121)

* fix build (#122)

* trying to fix accessing app on k8s (#123)

* vite-envs, set env vars (#124)

* change workdir to be the same as vite-envs (#125)

* changed backend url (#126)

* Remove vite-envs (#127)

* Remove vite-envs entirely

* Bump @typescript-eslint/parser from 6.21.0 to 7.1.1 (#77)

* Render Table title, column, data at the same time for pages with Tabs (#128)

Renders Table title, column, data at the same time for pages with Tabs

DPSTAT-881

* Bump vite from 5.1.5 to 5.1.6 (#129)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.1.5 to 5.1.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.1.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react from 18.2.64 to 18.2.65 (#130)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.64 to 18.2.65.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @typescript-eslint/eslint-plugin from 7.1.1 to 7.2.0 (#131)

* Bump @typescript-eslint/parser from 7.1.1 to 7.2.0 (#132)

* Bump eslint-plugin-react-refresh from 0.4.5 to 0.4.6 (#133)

Bumps [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) from 0.4.5 to 0.4.6.
- [Release notes](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/releases)
- [Changelog](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/CHANGELOG.md)
- [Commits](ArnaudBarre/eslint-plugin-react-refresh@v0.4.5...v0.4.6)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-refresh
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add users to team (#134)

Added functionality to add a user to a team
Added a spinner that shows the progress of the backend endpoint
Validate input fields
Give feedback to the manager when receiving response from adding a user to a team
Minor adjustments to SidebarModal

* fix bug where missing team manager causes crash (#135)

* bug when switching between userProfiles. Data does not get re-rendered (#136)

* Clear add user to team error on retries (#137)

* Clear warning dialog for add user to team on retries

* .

* Bump @types/react-dom from 18.2.21 to 18.2.22 (#138)

Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.21 to 18.2.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @mui/material from 5.15.12 to 5.15.13 (#139)

Bumps [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) from 5.15.12 to 5.15.13.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.15.13/packages/mui-material)

---
updated-dependencies:
- dependency-name: "@mui/material"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react from 18.2.65 to 18.2.66 (#140)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.65 to 18.2.66.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Reset add user Input and Dropdown states with keys for TeamDetail (#141)

* Hide delte data column and remove question mark for Epost th  (#142)

Hide delte data column and remove question mark for Epost th in team detail

* Show all managers in table and display section_manager in team display (#144)

* fix issue where only one manager was shown per team, and also fixed issue where manager was displayed in team info instead of the teams own manager

* fix bug where we try to send request to internal DNS (#145)

* Bump @mui/material from 5.15.13 to 5.15.14 (#147)

Bumps [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) from 5.15.13 to 5.15.14.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.15.14/packages/mui-material)

---
updated-dependencies:
- dependency-name: "@mui/material"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react from 18.2.66 to 18.2.67 (#149)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.66 to 18.2.67.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fixed bug where we use startsWith to filter groups (#151)

fixed bug where we use startsWith

* changed view for shared data (#152)

* fix bug where team isnt filterable (#153)

Fixed bug where team in shared bucket wasnt filterable.

* change link for team (#155)

* Fix sorting for name column for shared bucket detail (#156)

* Bump typescript from 5.4.2 to 5.4.3 (#158)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.2 to 5.4.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.4.2...v5.4.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix sorting for team column (#160)

* Bump @typescript-eslint/parser from 7.2.0 to 7.3.1 (#146)

* Bump @typescript-eslint/eslint-plugin from 7.2.0 to 7.3.1 (#148)

* Part 2. Edit user in team (#161)

* Add base skeleton for edit user in team sidebar modal

DPSTAT-894

* added removeUserfromGroups function

* Update view for in edit user in team Sidebar Modal with correct data

* Added functionality to edit user group in team dropdown

* .

* Refactors SidebarModal duplicated code for add/edit user in team

* temporary fix for removing user from a group

* .

* Reset select group dropdown for edit user

* Update edit user requests; include form resets, spinnger and error messages

* Fix double spinner and refactor modal code

* Add alignment options for Table and center edit user column data

* .

* Add delete user feature for edit user in team

* Add conditional rendering for user editing in teams

* Use useCallback for team manager view conditional

* Create DeleteLink component for editing

* Fix view for dropdown on onSelect when editing users

---------

Co-authored-by: ssb-jnk <[email protected]>

* added search-dropdown in add user modal (#162)

* add principal_name in search (#163)

* Part 3: Edit user in team adjustments  (#164)

* Unique edit user in team loading states for each user

DPSTAT-894

* Unique errors for users in edit user in team

* Clear edit user group dropdown on Endre onClick

* Display warning dialog when errorList is empty (#165)

* Sharedbucket bugfix non-duplicates (#166)

* Bump vite from 5.1.6 to 5.2.2 (#159)

* Bump express from 4.18.3 to 4.19.1 (#157)

* Bump vite from 5.2.2 to 5.2.6 (#168)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.2 to 5.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.2.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react from 18.2.67 to 18.2.69 (#170)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.67 to 18.2.69.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fixes onClick prop function for DeleteLink component (#169)

* DPSTAT-899 - Styling changes (#172)

Header:

Icon is shown by 40x40px
Total height of header is 80px
Table:

Columns has a fixed width (when you hover you will no longer see a 'jitter' by displaying the svg)
In mobile view there is less space between columns
Use span instead of Text in FormattedTableColumn
There is a larger gap between Link and Span in FormattedTableColumn
Rename "Epost" to "E-post" in column name
Rename "Ansvarlig" to "Managers" in column name
Rename "Data-admins" to "Som data-admin" in column name
Default alphabetical sorting on first column
Smaller distance for ingress
All groups are shown in lowercase, (Data-admins => data-admins)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: johnnadeluy <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sigurdrj <[email protected]>
Co-authored-by: Johnny Niklasson <[email protected]>
  • Loading branch information
5 people authored Mar 25, 2024
1 parent 622163d commit 12ca159
Show file tree
Hide file tree
Showing 31 changed files with 2,163 additions and 1,219 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,4 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.metadata.outputs.tags }}
build-args: |
BASE_IMAGE=${{ env.REGISTRY }}/base-image:latest
tags: ${{ steps.metadata.outputs.tags }}
1,618 changes: 765 additions & 853 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@mui/material": "^5.15.12",
"@mui/material": "^5.15.14",
"@statisticsnorway/ssb-component-library": "^2.0.98",
"dotenv": "^16.4.5",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"express": "4.18.3",
"express": "4.19.1",
"express-http-proxy": "^2.0.0",
"http-proxy-middleware": "^2.0.6",
"http-status-codes": "^2.3.0",
"jsonwebtoken": "^9.0.2",
"jwks-rsa": "^3.1.0",
Expand All @@ -32,19 +34,19 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-responsive": "^9.0.2",
"react-router-dom": "^6.22.2",
"react-router-dom": "^6.22.3",
"vite-express": "0.15.0"
},
"devDependencies": {
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.20",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^6.21.0",
"@types/react": "^18.2.69",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"@vitejs/plugin-react-swc": "^3.6.0",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"typescript": "^5.2.2",
"vite": "^5.1.5"
"eslint-plugin-react-refresh": "^0.4.6",
"typescript": "^5.4.3",
"vite": "^5.2.6"
}
}
113 changes: 107 additions & 6 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,53 @@ import ViteExpress from 'vite-express'
import { createLightship } from 'lightship'
import express from 'express'
import { getReasonPhrase } from 'http-status-codes'
import proxy from 'express-http-proxy'
import dotenv from 'dotenv'
import cache from 'memory-cache'

if (!process.env.VITE_DAPLA_TEAM_API_URL) {
if (!process.env.DAPLA_TEAM_API_URL) {
dotenv.config({ path: './.env.local' })
}

const DAPLA_TEAM_API_URL = process.env.VITE_DAPLA_TEAM_API_URL

const app = express()
const PORT = process.env.PORT || 3000
const DAPLA_TEAM_API_URL = process.env.DAPLA_TEAM_API_URL || 'https://dapla-team-api-v2.staging-bip-app.ssb.no'

app.use(
'/api',
proxy(DAPLA_TEAM_API_URL, {
proxyReqBodyDecorator: function (bodyContent, srcReq) {
console.log(`Request Body: ${bodyContent}`)
return bodyContent
},
proxyReqOptDecorator: function (proxyReqOpts, srcReq) {
console.log(`Request Headers:`, srcReq.headers)
if (srcReq.body) {
console.log(`Request Body:`, srcReq.body)
}
return proxyReqOpts
},
proxyReqPathResolver: function (req) {
const newPath = req.originalUrl.replace(/^\/api/, '')
console.log(`Forwarding to: ${DAPLA_TEAM_API_URL}${newPath}`)
return newPath
},
userResDecorator: function (proxyRes, proxyResData, userReq, userRes) {
console.log(`Response Status: ${proxyRes.statusCode}`)
console.log(`Response Headers:`, proxyRes.headers)
return proxyResData
},
proxyErrorHandler: function (err, res) {
console.error('Proxy Error:', err)
res.status(500).send('Proxy Error')
},
})
)

app.use(express.json())

// DO NOT REMOVE, NECCESSARY FOR FRONTEND
app.get('/api/photo/:principalName', async (req, res, next) => {
app.get('/localApi/photo/:principalName', async (req, res, next) => {
const accessToken = req.headers.authorization.split(' ')[1]
const principalName = req.params.principalName
const userPhotoUrl = `${DAPLA_TEAM_API_URL}/users/${principalName}/photo`
Expand All @@ -30,6 +62,43 @@ app.get('/api/photo/:principalName', async (req, res, next) => {
}
})

app.get('/localApi/users', async (req, res) => {
const cacheKey = 'usersForSearch'
const cachedData = cache.get(cacheKey)

const token = req.headers.authorization
const usersUrl = new URL(`${DAPLA_TEAM_API_URL}/users`)
const selects = ['display_name', 'principal_name', 'section_name']

usersUrl.searchParams.append('select', selects.join(','))
if (cachedData) {
res.json(cachedData)
} else {
try {
const response = await fetch(usersUrl.toString(), {
method: 'GET',
headers: {
Accept: '*/*',
'Content-Type': 'application/json',
Authorization: token,
},
})

if (!response.ok) {
const err = await response.text()
res.status(response.status).send(err)
} else {
const data = await response.json()
cache.put(cacheKey, data, 3600000)
res.status(response.status).send(data)
}
} catch (error) {
console.log(error)
res.status(500).send('Internal Server Error')
}
}
})

async function fetchPhoto(accessToken, url, fallbackErrorMessage) {
const response = await fetch(url, getFetchOptions(accessToken))

Expand All @@ -42,7 +111,40 @@ async function fetchPhoto(accessToken, url, fallbackErrorMessage) {
return photoBuffer.toString('base64')
}

app.get('/api/fetch-token', (req, res) => {
//TODO: Remove me once DELETE with proxy is fixed
app.delete('/localApi/groups/:groupUniformName/:userPrincipalName', async (req, res) => {
const token = req.headers.authorization
const groupUniformName = req.params.groupUniformName
const userPrincipalName = req.params.userPrincipalName
const groupsUrl = `${DAPLA_TEAM_API_URL}/groups/${groupUniformName}/users`

try {
const response = await fetch(groupsUrl, {
method: 'DELETE',
headers: {
Accept: '*/*',
'Content-Type': 'application/json',
Authorization: token,
},
body: JSON.stringify({
users: [userPrincipalName],
}),
})

if (!response.ok) {
const err = await response.text()
res.status(response.status).send(err)
} else {
const data = await response.json()
res.status(response.status).send(data)
}
} catch (error) {
console.log(error)
res.status(500).send('Internal Server Error')
}
})

app.get('/localApi/fetch-token', (req, res) => {
if (!req.headers.authorization || !req.headers.authorization.startsWith('Bearer')) {
return res.status(401).json({ message: 'No token provided' })
}
Expand Down Expand Up @@ -75,7 +177,6 @@ app.use((err, req, res, next) => {
})
})


const lightship = await createLightship()

ViteExpress.listen(app, PORT, () => {
Expand Down
5 changes: 5 additions & 0 deletions src/@types/pageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ export interface TabProps {
title: string
path: string
}

export interface DropdownItems {
id: string
title: string
}
9 changes: 4 additions & 5 deletions src/components/Avatar/avatar.module.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@use '@statisticsnorway/ssb-component-library/src/style/variables' as variables;

.avatar {
width: 50px;
height: 50px;
margin: 0 1.5rem 0 0;
width: 40px;
height: 40px;
border: 1px solid variables.$ssb-dark-2;
border-radius: 50%;
display: flex;
Expand All @@ -20,8 +19,8 @@
}

img {
width: 50px;
height: 50px;
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
}
Expand Down
21 changes: 21 additions & 0 deletions src/components/DeleteLink/DeleteLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import styles from './deletelink.module.scss'

import { Trash2 } from 'react-feather'

interface DeleteLink {
children: string
tabIndex?: number
icon?: boolean
handleDeleteUser: CallableFunction
}

const DeleteLink = ({ children, tabIndex, icon, handleDeleteUser }: DeleteLink) => {
return (
<a className={styles.deleteLinkWrapper} tabIndex={tabIndex ?? 0} onClick={() => handleDeleteUser()}>
{icon && <Trash2 size={22} />}
<span>{children}</span>
</a>
)
}

export default DeleteLink
22 changes: 22 additions & 0 deletions src/components/DeleteLink/deletelink.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use '@statisticsnorway/ssb-component-library/src/style/variables' as variables;

.deleteLinkWrapper {
display: inline-flex;
align-items: center;
color: variables.$ssb-red-3;
padding: .5rem;
line-height: 1.7;
cursor: pointer;

svg {
margin-right: .5rem;
}

span {
border-bottom: 1px solid;
}

&:focus {
@include variables.focus-marker;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Text, Link } from '@statisticsnorway/ssb-component-library'
import styles from './formattedtablecolumn.module.scss'

import { Link } from '@statisticsnorway/ssb-component-library'

interface FormattedTableColumnProps {
href?: string
Expand All @@ -11,14 +13,14 @@ const FormattedTableColumn = (props: FormattedTableColumnProps) => {

return (
<>
<span>
<span className={styles.linkTextWrapper}>
{href && linkText && (
<Link href={href}>
<b>{linkText}</b>
</Link>
)}
</span>
{text && <Text>{text}</Text>}
{text && <span className={styles.textWrapper}>{text}</span>}
</>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@use '@statisticsnorway/ssb-component-library/src/style/variables' as variables;

.linkTextWrapper {
margin-bottom: .75em;
}

.textWrapper {
margin-top: .75em;
}

@media #{variables.$mobile} {
.linkTextWrapper {
margin-bottom: 2px;
}

.textWrapper {
margin-top: 2px;
}
}
4 changes: 2 additions & 2 deletions src/components/Header/header.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
border-bottom: 1px solid variables.$ssb-dark-2;
color: variables.$ssb-dark-5;
align-items: center;
padding: 1rem;
padding-left: 4rem;
padding: 0 4rem;
height: 80px;
margin: 0;
font-family: 'Roboto Condensed', sans-serif !important;
font-stretch: condensed;
Expand Down
10 changes: 7 additions & 3 deletions src/components/PageLayout/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ const PageLayout = ({ title, button, content }: PageLayoutProps) => {
<Header />
<main className={styles.container}>
<Breadcrumb />
<div className={styles.title}>
{title && <Title size={1}>{title}</Title>}
{button}
<div className={styles.titleContainer}>
{title && (
<Title size={1} className={styles.title}>
{title}
</Title>
)}
{button && <div className={styles.button}>{button}</div>}
</div>
{content}
</main>
Expand Down
19 changes: 17 additions & 2 deletions src/components/PageLayout/pagelayout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,38 @@
}
}

.title {
.titleContainer {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;

margin-top: 1.5rem;

@media #{variables.$mobile} {
flex-direction: column;
align-items: start;
margin-bottom: 1rem;

.title {
margin: 0;
}

.button {
margin: 1.5rem 0 1rem;
}
}
}

.description {
display: flex;
flex-direction: column;
margin-top: -2rem;
gap: 0.5rem;
gap: .25rem;

@media #{variables.$mobile} {
margin-top: 0;
}
}

.descriptionSpacing {
Expand Down
Loading

0 comments on commit 12ca159

Please sign in to comment.