Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ehellerslien committed Sep 8, 2023
2 parents 8eabd6b + 82aebb3 commit fb8ab74
Show file tree
Hide file tree
Showing 7 changed files with 8,636 additions and 4,147 deletions.
12,716 changes: 8,602 additions & 4,114 deletions app/package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
"private": true,
"homepage": ".",
"dependencies": {
"@navikt/ds-css": "^2.7.8",
"@navikt/ds-css-internal": "^2.7.8",
"@navikt/ds-react": "^2.7.8",
"@navikt/ds-react-internal": "^2.7.8",
"@testing-library/jest-dom": "^5.16.5",
"@navikt/ds-css": "^5.1.0",
"@navikt/ds-css-internal": "^3.4.3",
"@navikt/ds-react": "^5.1.0",
"@navikt/ds-react-internal": "^3.4.3",
"@testing-library/jest-dom": "^6.1.2",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"asciidoctor": "^2.2.6",
"bootstrap": "^5.2.3",
"asciidoctor": "^3.0.2",
"bootstrap": "^5.3.1",
"copyfiles": "^2.4.1",
"cors": "^2.8.5",
"react": "^18.2.0",
"react-bootstrap": "^2.7.2",
"react-collapsed": "^3.6.0",
"react-bootstrap": "^2.8.0",
"react-collapsed": "^4.0.4",
"react-dom": "^18.2.0",
"react-loader-spinner": "^5.3.4",
"react-router-dom": "^6.9.0",
"react-router-dom": "^6.15.0",
"react-scripts": "^5.0.0",
"react-split": "^2.0.14",
"web-vitals": "^3.3.0"
"web-vitals": "^3.4.0"
},
"scripts": {
"prebuild": "node src/doc/doc.js && copyfiles -f src/doc/images/*.* public/doc/images",
Expand All @@ -45,6 +45,6 @@
]
},
"devDependencies": {
"eslint": "^8.36.0"
"eslint": "^8.48.0"
}
}
17 changes: 13 additions & 4 deletions app/src/components/GUIElements/CSS/EnTable.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@

.scroll {
.Popoverscroll {
z-index: 999;
min-height: 450px;
min-width: 650px;
height: 650px;
min-width: 400px;
min-height: 20vh;
max-height: 70vh !important;
overflow: scroll;
white-space:pre-wrap;
resize: both;
padding-bottom: 10vh;
}

.Popoverscroll .tableHeading {
font-size: 18px !important;
}

.tableHeading {
font-size:30px
}

.tooltip {
Expand Down
6 changes: 3 additions & 3 deletions app/src/components/GUIElements/Cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export function Cell(props) {
// console.log("detail" ,detail)
return <Popover open={open} onClose={() => setOpen(false)}
anchorEl={buttonPopoverRef.current}
placement="bottom" modifiers={modifiers}
arrow={true} >
<Popover.Content className={"scroll"}>
placement="left" modifiers={modifiers}
arrow={true} strategy={"absolute"} >
<Popover.Content className={"Popoverscroll"}>
{detail}
</Popover.Content>
</Popover>;
Expand Down
17 changes: 4 additions & 13 deletions app/src/components/GUIElements/Table.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useState} from "react";
import {Heading, Table} from '@navikt/ds-react';
import './CSS/EnTable.css'
import {Cell, popoverType_None} from "./Cell";
import {Cell} from "./Cell";

export function EnTable(props) {
let [table] = useState(props.table)
Expand All @@ -18,15 +18,6 @@ export function EnTable(props) {
if (Array.isArray(item[1])) {
item[1].map((subitem, j) => {
row.push(<Cell element={subitem} j={j}></Cell>)
// if (subitem["tooltip"] != undefined || subitem['popoverType'] != popoverType_None) {
// row.push(<Cell element={subitem} j={j}></Cell>)
// } else {
// if (subitem['header']) {
// row.push(<Table.HeaderCell key={j} scope="col">{subitem['data']}</Table.HeaderCell>)
// } else {
// row.push(<Table.DataCell key={j}>{subitem['data']}</Table.DataCell>)
// }
// }
})
}
return row
Expand All @@ -36,7 +27,7 @@ export function EnTable(props) {
if (name != null && name.includes('Ingen')) {
return (null);
} else
return <div className="w-full flex flex-col gap-4">
return <div className="w-full flex flex-col gap-4" >
<Table size="small">
<Table.Header>
<Table.Row>
Expand All @@ -61,7 +52,7 @@ export function EnTable(props) {
<div>
<Heading size="xsmall" level="6"> &ensp;
</Heading>
<Heading spacing size="large"
<Heading spacing className={"tableHeading"}
style={{
borderBottom: table.hasOwnProperty('name') ? "2px solid grey" : "",
borderTop: table.hasOwnProperty('name') ? "2px solid grey" : "",
Expand All @@ -71,7 +62,7 @@ export function EnTable(props) {
alignItems: 'center'
}}
level="6"> &ensp; {table.hasOwnProperty('name') ? table['name'] : ''}</Heading>
<Checkname name={table['name']}>
<Checkname name={table['name']} className={"tableBody"}>

</Checkname>
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/src/doc/bruksanvisning.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ image::beregnpensjon.PNG[]
. *Velg miljø* - Velg det miljø du ønsker å gjennomføre beregningen i. Typiske valg her er å bruke Q0 for prodlikt eller testmiljøene Q2 eller Q5. Se https://confluence.adeo.no/display/PREG/Versjonsoversikt#[Versjonsoversikten] oversikt over hvilke historier som ligger i de forskjellige miljø.
. *Sats fra miljø* - Dersom man ønsker å gjennomføre beregningen på en spesiell sats kan man overstyre satstabellen. Se https://pensjon-regler-satsviewer.dev-fss.nais.io/[Satsoversikten] for detaljer på satsene. Bruk valget _Sats fra miljø_ for å benytte eksisterende sats i miljøet.
. *Åpne* - Hvis du åpner nettsiden uten å gå gjennom logvieweren har du kun mulighet til å laste opp og kjøre egen XML. Dette gjør du ved å klikke på 'Åpne' -> Velg fil.
. *Kjør* - Trykk for å sende forespørselen til valgt miljø. En ny beregning gjennomføres og vises.

En ny beregning gjennomføres og vises automatisk hvergang etter valg.

IMPORTANT: Hvis du har valgt en response (grå linjer) fra logviewer vil ikke endringer i miljø eller sats påvirke beregning. I slike tilfeller ser man kun på det resultat som ble produsert akkurat på det tidspunktet.
Binary file modified app/src/doc/images/beregnpensjon.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fb8ab74

Please sign in to comment.