Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
teknikattan-scoring-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Show more breadcrumbs
tddd96-grupp1
teknikattan-scoring-system
Merge requests
!65
Resolve "Use component api in editor"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Use component api in editor"
76-use-component-api-in-editor
into
dev
Overview
0
Commits
4
Pipelines
3
Changes
14
Merged
Albin Henriksson
requested to merge
76-use-component-api-in-editor
into
dev
3 years ago
Overview
0
Commits
4
Pipelines
3
Changes
14
Expand
Closes
#76 (closed)
0
0
Merge request reports
Compare
dev
version 1
6535caed
3 years ago
dev (base)
and
latest version
latest version
14a304de
4 commits,
3 years ago
version 1
6535caed
2 commits,
3 years ago
14 files
+
143
−
241
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
14
Search (e.g. *.vue) (Ctrl+P)
client/src/actions/editor.ts
+
8
−
153
Options
@@ -8,162 +8,17 @@ export const getEditorCompetition = (id: string) => async (dispatch: AppDispatch
.
then
((
res
)
=>
{
dispatch
({
type
:
Types
.
SET_EDITOR_COMPETITION
,
//res.data,
payload
:
{
name
:
'
Tävling 1 (Hårdkodad)
'
,
id
:
1
,
year
:
1337
,
city_id
:
1
,
slides
:
[
{
competition_id
:
1
,
id
:
1
,
order
:
1
,
timer
:
10
,
title
:
'
Sida 1
'
,
questions
:
[
{
id
:
1
,
slide_id
:
1
,
name
:
'
Fråga 1 namn
'
,
title
:
'
Fråga 1 titel
'
,
total_score
:
5
,
type_id
:
3
,
question_answers
:
[
{
id
:
1
,
question_id
:
1
,
team_id
:
1
,
data
:
'
question answer data 1
'
,
score
:
1
,
},
{
id
:
2
,
question_id
:
1
,
team_id
:
2
,
data
:
'
question answer data 2
'
,
score
:
3
,
},
],
alternatives
:
[
{
id
:
1
,
text
:
'
1
'
,
value
:
true
,
question_id
:
1
,
},
{
id
:
2
,
text
:
'
0
'
,
value
:
false
,
question_id
:
1
,
},
],
},
],
body
:
'
Slide body 1
'
,
settings
:
'
Slide settings 1
'
,
},
{
competition_id
:
1
,
id
:
2
,
order
:
2
,
timer
:
15
,
title
:
'
Sida 2
'
,
questions
:
[
{
id
:
2
,
slide_id
:
2
,
name
:
'
Fråga 2 namn
'
,
title
:
'
Fråga 2 titel
'
,
total_score
:
6
,
type_id
:
3
,
question_answers
:
[
{
id
:
3
,
question_id
:
2
,
team_id
:
1
,
data
:
'
question answer data 1
'
,
score
:
1
,
},
{
id
:
4
,
question_id
:
2
,
team_id
:
2
,
data
:
'
question answer data 2
'
,
score
:
4
,
},
],
alternatives
:
[
{
id
:
1
,
text
:
'
5
'
,
value
:
true
,
question_id
:
2
,
},
{
id
:
2
,
text
:
'
abc
'
,
value
:
false
,
question_id
:
2
,
},
],
},
],
body
:
'
Slide body 2
'
,
settings
:
'
Slide settings 2
'
,
},
],
teams
:
[
{
id
:
1
,
name
:
'
Örkelljunga IK
'
,
question_answers
:
[
{
id
:
1
,
question_id
:
1
,
team_id
:
1
,
data
:
'
question answer data 1
'
,
score
:
1
,
},
{
id
:
3
,
question_id
:
2
,
team_id
:
1
,
data
:
'
question answer data 1
'
,
score
:
1
,
},
],
competition_id
:
1
,
},
{
id
:
2
,
name
:
'
Vadstena OK
'
,
question_answers
:
[
{
id
:
2
,
question_id
:
1
,
team_id
:
2
,
data
:
'
question answer data 2
'
,
score
:
3
,
},
{
id
:
4
,
question_id
:
2
,
team_id
:
2
,
data
:
'
question answer data 2
'
,
score
:
4
,
},
],
competition_id
:
1
,
},
],
},
payload
:
res
.
data
,
})
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
export
const
setEditorSlideId
=
(
id
:
number
)
=>
(
dispatch
:
AppDispatch
)
=>
{
dispatch
({
type
:
Types
.
SET_EDITOR_SLIDE_ID
,
payload
:
id
,
})
}
Loading