1
1
'use client'
2
2
3
3
import React , { ReactElement } from 'react'
4
- import { Heading } from '@navikt/ds-react'
4
+ import { BodyShort , Heading } from '@navikt/ds-react'
5
5
import { LinkPanel , LinkPanelDescription , LinkPanelTitle } from '@navikt/ds-react/LinkPanel'
6
+ import { Density2Icon , NumberListIcon } from '@navikt/aksel-icons'
6
7
7
8
import { getAbsoluteURL , pathWithBasePath } from '@utils/url'
9
+ import { ExpectedToggles } from '@toggles/toggles'
8
10
9
11
function ScenarioLinks ( ) : ReactElement {
10
12
return (
11
13
< div className = "border border-border-subtle p-3 rounded-sm mt-2" >
12
14
< Heading level = "2" size = "small" className = "-mt-7 bg-white w-fit px-2 py-0" >
13
- Examples
15
+ Eksempler
14
16
</ Heading >
15
17
16
18
< div className = "mt-2" >
17
19
< Heading level = "3" size = "xsmall" spacing >
18
- 🔥 Launch example FHIR modes
20
+ 🔥 FHIR demo med egen data
19
21
</ Heading >
20
22
< div className = "flex gap-3" >
21
23
< LinkPanel
@@ -24,14 +26,49 @@ function ScenarioLinks(): ReactElement {
24
26
) }
25
27
border
26
28
onClick = { ( ) => {
27
- document . cookie = `development-mode-override=fhir ; path=/`
29
+ document . cookie = `${ 'SYK_INN_MULTISTEP_FORM_V1' satisfies ExpectedToggles } =true ; path=/`
28
30
} }
29
31
>
30
- < LinkPanelTitle className = "text-medium leading-5" > Launch mot syk-inn FHIR-mock</ LinkPanelTitle >
31
- < LinkPanelDescription className = "text-sm" >
32
- Har norske data, hardkodet testdata
33
- </ LinkPanelDescription >
32
+ < div className = "flex items-center gap-3" >
33
+ < Density2Icon aria-hidden fontSize = "2rem" />
34
+ < div >
35
+ < LinkPanelTitle className = "text-medium leading-5" >
36
+ Start demo med multi-steg skjema
37
+ </ LinkPanelTitle >
38
+ < LinkPanelDescription className = "text-sm" >
39
+ Har norske data, hardkodet testdata
40
+ </ LinkPanelDescription >
41
+ </ div >
42
+ </ div >
34
43
</ LinkPanel >
44
+ < LinkPanel
45
+ href = { pathWithBasePath (
46
+ `/fhir/launch?iss=${ `${ getAbsoluteURL ( ) } /api/mocks/fhir&launch=local-dev-id` } ` ,
47
+ ) }
48
+ border
49
+ onClick = { ( ) => {
50
+ document . cookie = `${ 'SYK_INN_MULTISTEP_FORM_V1' satisfies ExpectedToggles } =false; path=/`
51
+ } }
52
+ >
53
+ < div className = "flex items-center gap-3" >
54
+ < NumberListIcon aria-hidden fontSize = "2rem" />
55
+ < div >
56
+ < LinkPanelTitle className = "text-medium leading-5" >
57
+ Start demo med monolitisk skjema
58
+ </ LinkPanelTitle >
59
+ < LinkPanelDescription className = "text-sm" >
60
+ Har norske data, hardkodet testdata
61
+ </ LinkPanelDescription >
62
+ </ div >
63
+ </ div >
64
+ </ LinkPanel >
65
+ </ div >
66
+ </ div >
67
+ < div className = "mt-8" >
68
+ < Heading level = "3" size = "xsmall" spacing >
69
+ 🔥 FHIR demo andre datakilder
70
+ </ Heading >
71
+ < div className = "flex gap-3" >
35
72
< LinkPanel
36
73
href = { `${ `${ getAbsoluteURL ( ) } /fhir/launch` } ?iss=https%3A%2F%2Flaunch.smarthealthit.org%2Fv%2Fr4%2Ffhir&launch=WzAsImNkMDlmNWQ0LTU1ZjctNGEyNC1hMjVkLWE1YjY1YzdhODgwNSIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMSwiIl0` }
37
74
border
@@ -62,10 +99,11 @@ function ScenarioLinks(): ReactElement {
62
99
</ LinkPanel >
63
100
</ div >
64
101
</ div >
65
- < div className = "mt-4 " >
102
+ < div className = "mt-8 " >
66
103
< Heading level = "3" size = "xsmall" spacing >
67
- ⚠️ Standalone examples
104
+ ⚠️ Standalone eksempel
68
105
</ Heading >
106
+ < BodyShort > Implementasjonen av standalone er foreløpig ikke fungerende.</ BodyShort >
69
107
< LinkPanel
70
108
href = { pathWithBasePath ( '/ny' ) }
71
109
border
0 commit comments