Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
8c6d0269
Commit
8c6d0269
authored
6 years ago
by
Chris Lawton
Browse files
Options
Downloads
Patches
Plain Diff
adds inline loading to submission display
parent
1c7c33dc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentech/static_src/src/app/src/components/SubmissionDisplay/index.js
+15
-13
15 additions, 13 deletions
...tic_src/src/app/src/components/SubmissionDisplay/index.js
with
15 additions
and
13 deletions
opentech/static_src/src/app/src/components/SubmissionDisplay/index.js
+
15
−
13
View file @
8c6d0269
...
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
...
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import
Answer
,
{
answerPropTypes
}
from
'
./answers
'
import
Answer
,
{
answerPropTypes
}
from
'
./answers
'
import
LoadingPanel
from
'
@components/LoadingPanel
'
;
import
LoadingPanel
from
'
@components/LoadingPanel
'
;
import
InlineLoading
from
'
@components/InlineLoading
'
;
import
'
./styles.scss
'
import
'
./styles.scss
'
...
@@ -45,48 +46,49 @@ export default class SubmissionDisplay extends Component {
...
@@ -45,48 +46,49 @@ export default class SubmissionDisplay extends Component {
}
}
render
()
{
render
()
{
if
(
this
.
props
.
isLoading
)
{
const
{
metaQuestions
=
[],
questions
=
[],
stage
}
=
this
.
props
.
submission
||
{};
if
(
this
.
props
.
isError
)
{
return
(
return
(
<
div
className
=
"
display-panel__loading
"
>
<
div
className
=
"
display-panel__loading
"
>
<
LoadingPanel
/
>
<
p
>
Something
went
wrong
.
Please
try
again
later
.
<
/p
>
<
/div
>
<
/div
>
)
)
}
else
if
(
this
.
props
.
isError
)
{
}
else
if
(
this
.
props
.
submission
===
undefined
&&
!
this
.
props
.
isLoading
)
{
return
(
return
(
<
div
className
=
"
display-panel__loading
"
>
<
div
className
=
"
display-panel__loading
"
>
<
p
>
Something
went
wrong
.
Please
try
again
later
.
<
/p
>
<
p
>
Please
select
a
submission
.
<
/p
>
<
/div
>
<
/div
>
)
)
}
else
if
(
this
.
props
.
submission
===
undefined
)
{
}
if
(
questions
.
length
==
0
)
{
return
(
return
(
<
div
className
=
"
display-panel__loading
"
>
<
div
className
=
"
display-panel__loading
"
>
<
p
>
Please
select
a
submission
.
<
/p
>
<
LoadingPanel
/
>
<
/div
>
<
/div
>
)
)
}
}
const
{
metaQuestions
=
[],
questions
=
[],
stage
}
=
this
.
props
.
submission
;
return
(
return
(
<
div
className
=
"
application-display
"
>
<
div
className
=
"
application-display
"
>
{
stage
&&
{
this
.
props
.
isLoading
&&
<
InlineLoading
/>
}
<
h3
>
{
stage
}
Information
<
/h3
>
<
h3
>
{
stage
}
Information
<
/h3
>
}
{
metaQuestions
.
length
>
0
&&
<
div
className
=
"
grid grid--proposal-info
"
>
<
div
className
=
"
grid grid--proposal-info
"
>
{
metaQuestions
.
map
((
response
,
index
)
=>
(
{
metaQuestions
.
map
((
response
,
index
)
=>
(
<
MetaResponse
key
=
{
index
}
{...
response
}
/
>
<
MetaResponse
key
=
{
index
}
{...
response
}
/
>
))}
))}
<
/div
>
<
/div
>
}
{
questions
.
length
>
0
&&
<
div
className
=
"
rich-text rich-text--answers
"
>
<
div
className
=
"
rich-text rich-text--answers
"
>
{
questions
.
map
((
response
,
index
)
=>
(
{
questions
.
map
((
response
,
index
)
=>
(
<
Response
key
=
{
index
}
{...
response
}
/
>
<
Response
key
=
{
index
}
{...
response
}
/
>
))}
))}
<
/div
>
<
/div
>
}
<
/div
>
<
/div
>
)
)
}
}
...
...
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