Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
greg
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
it-bott-integrasjoner
greg
Commits
76474e36
Commit
76474e36
authored
3 years ago
by
Tore.Brede
Browse files
Options
Downloads
Patches
Plain Diff
GREG-60: Showing proper names in summary table
parent
611fdcd5
No related branches found
No related tags found
1 merge request
!94
GREG-60: Making the registration and summary page look more like the design
Pipeline
#96056
failed
3 years ago
Stage: venv update
Stage: tests and linting
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/routes/register/formData.ts
+1
-1
1 addition, 1 deletion
frontend/src/routes/register/formData.ts
frontend/src/routes/register/stepSummary.tsx
+10
-3
10 additions, 3 deletions
frontend/src/routes/register/stepSummary.tsx
with
11 additions
and
4 deletions
frontend/src/routes/register/formData.ts
+
1
−
1
View file @
76474e36
...
@@ -7,4 +7,4 @@ export type RegisterFormData = {
...
@@ -7,4 +7,4 @@ export type RegisterFormData = {
comment
?:
string
comment
?:
string
ou_id
?:
number
ou_id
?:
number
email
?:
string
email
?:
string
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
frontend/src/routes/register/stepSummary.tsx
+
10
−
3
View file @
76474e36
...
@@ -19,6 +19,7 @@ import { PersonFormMethods } from './personFormMethods'
...
@@ -19,6 +19,7 @@ import { PersonFormMethods } from './personFormMethods'
import
useOus
from
'
../../hooks/useOus
'
import
useOus
from
'
../../hooks/useOus
'
import
useRoleTypes
from
'
../../hooks/useRoleTypes
'
import
useRoleTypes
from
'
../../hooks/useRoleTypes
'
import
SubmitState
from
'
./submitState
'
import
SubmitState
from
'
./submitState
'
import
i18n
from
'
i18next
'
interface
StepSummaryProperties
{
interface
StepSummaryProperties
{
...
@@ -78,6 +79,13 @@ const StepSummary = forwardRef((props: StepSummaryProperties, ref: Ref<PersonFor
...
@@ -78,6 +79,13 @@ const StepSummary = forwardRef((props: StepSummaryProperties, ref: Ref<PersonFor
useImperativeHandle
(
ref
,
()
=>
({
doSubmit
}))
useImperativeHandle
(
ref
,
()
=>
({
doSubmit
}))
const
selectedOus
=
ous
.
find
((
value
)
=>
value
.
id
===
formData
.
ou_id
)
const
ousName
=
selectedOus
===
undefined
?
''
:
(
`
${
i18n
.
language
===
'
en
'
?
selectedOus
.
en
:
selectedOus
.
nb
}
(
${
selectedOus
.
id
}
)`
)
// TODO Fix this confusing mix between use of id and identifier
const
selectedRoleType
=
roleTypes
.
find
((
value
)
=>
value
.
id
===
(
formData
.
role_type
===
undefined
?
-
1
:
parseInt
(
formData
.
role_type
,
10
)))
const
roleTypeName
=
selectedRoleType
===
undefined
?
''
:
`
${
i18n
.
language
===
'
en
'
?
selectedRoleType
.
name_en
:
selectedRoleType
.
name_nb
}
`
return
(
return
(
<>
<>
<
Typography
variant
=
'h5'
sx
=
{
{
<
Typography
variant
=
'h5'
sx
=
{
{
...
@@ -88,7 +96,6 @@ const StepSummary = forwardRef((props: StepSummaryProperties, ref: Ref<PersonFor
...
@@ -88,7 +96,6 @@ const StepSummary = forwardRef((props: StepSummaryProperties, ref: Ref<PersonFor
{
t
(
'
registerWizardText.summaryPage
'
)
}
{
t
(
'
registerWizardText.summaryPage
'
)
}
</
Box
>
</
Box
>
<
Box
sx
=
{
{
maxWidth
:
'
30rem
'
}
}
>
<
Box
sx
=
{
{
maxWidth
:
'
30rem
'
}
}
>
<
Box
sx
=
{
{
padding
:
'
1rem
'
,
bgcolor
:
'
primary.dark
'
}
}
>
{
t
(
'
registerWizardText.contactInformation
'
)
}
</
Box
>
<
Box
sx
=
{
{
padding
:
'
1rem
'
,
bgcolor
:
'
primary.dark
'
}
}
>
{
t
(
'
registerWizardText.contactInformation
'
)
}
</
Box
>
<
Grid
container
>
<
Grid
container
>
...
@@ -126,9 +133,9 @@ const StepSummary = forwardRef((props: StepSummaryProperties, ref: Ref<PersonFor
...
@@ -126,9 +133,9 @@ const StepSummary = forwardRef((props: StepSummaryProperties, ref: Ref<PersonFor
</
TableHead
>
</
TableHead
>
<
TableBody
>
<
TableBody
>
<
TableRow
>
<
TableRow
>
<
TableCell
>
{
formData
.
role_typ
e
}
</
TableCell
>
<
TableCell
>
{
roleTypeNam
e
}
</
TableCell
>
<
TableCell
>
{
formData
.
role_start
===
null
?
null
:
format
(
formData
.
role_start
as
Date
,
'
yyyy-MM-dd
'
)
}
-
{
formData
.
role_end
===
null
?
null
:
format
(
formData
.
role_end
as
Date
,
'
yyyy-MM-dd
'
)
}
</
TableCell
>
<
TableCell
>
{
formData
.
role_start
===
null
?
null
:
format
(
formData
.
role_start
as
Date
,
'
yyyy-MM-dd
'
)
}
-
{
formData
.
role_end
===
null
?
null
:
format
(
formData
.
role_end
as
Date
,
'
yyyy-MM-dd
'
)
}
</
TableCell
>
<
TableCell
>
{
formData
.
ou_id
}
</
TableCell
>
<
TableCell
>
{
ousName
}
</
TableCell
>
<
TableCell
>
{
formData
.
comment
}
</
TableCell
>
<
TableCell
>
{
formData
.
comment
}
</
TableCell
>
</
TableRow
>
</
TableRow
>
</
TableBody
>
</
TableBody
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment