Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
epoc-editor
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
learninglab
epoc
epoc-editor
Commits
a3ea88e6
Commit
a3ea88e6
authored
1 year ago
by
VIAUD Nathan
Browse files
Options
Downloads
Patches
Plain Diff
feat: add data injection to custom questions
parent
db35e23e
No related branches found
No related tags found
1 merge request
!127
Resolve "Add values injection to question plugins"
Pipeline
#963678
passed
1 year ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
package-lock.json
+6
-6
6 additions, 6 deletions
package-lock.json
src/shared/data/forms/questionsForm.data.ts
+27
-0
27 additions, 0 deletions
src/shared/data/forms/questionsForm.data.ts
src/shared/services/graph.service.ts
+5
-1
5 additions, 1 deletion
src/shared/services/graph.service.ts
with
38 additions
and
7 deletions
package-lock.json
+
6
−
6
View file @
a3ea88e6
...
...
@@ -287,9 +287,9 @@
}
},
"node_modules/@epoc/epoc-types": {
"version": "2.0.0-beta.1
0
",
"resolved": "https://registry.npmjs.org/@epoc/epoc-types/-/epoc-types-2.0.0-beta.1
0
.tgz",
"integrity": "sha512-
KpVnk9w8llcrZb+mZbvAaHxeVDcxM0A8/FrSsORfYb/Fl6eDUWDuZ8Qy7s2Dsn54/9DRGoYAN4ozPBiAMzrgBw
=="
"version": "2.0.0-beta.1
1
",
"resolved": "https://registry.npmjs.org/@epoc/epoc-types/-/epoc-types-2.0.0-beta.1
1
.tgz",
"integrity": "sha512-
6T0vSUhCRaT9nx2FD8dOYdLDSihjpEucjKZ1mmV6IcTcyEBwD20P+xJhAV707qz0IKnyHpKs5DD+3lv6AFEerQ
=="
},
"node_modules/@esbuild/android-arm": {
"version": "0.17.19",
...
...
@@ -13427,9 +13427,9 @@
}
},
"@epoc/epoc-types": {
"version": "2.0.0-beta.1
0
",
"resolved": "https://registry.npmjs.org/@epoc/epoc-types/-/epoc-types-2.0.0-beta.1
0
.tgz",
"integrity": "sha512-
KpVnk9w8llcrZb+mZbvAaHxeVDcxM0A8/FrSsORfYb/Fl6eDUWDuZ8Qy7s2Dsn54/9DRGoYAN4ozPBiAMzrgBw
=="
"version": "2.0.0-beta.1
1
",
"resolved": "https://registry.npmjs.org/@epoc/epoc-types/-/epoc-types-2.0.0-beta.1
1
.tgz",
"integrity": "sha512-
6T0vSUhCRaT9nx2FD8dOYdLDSihjpEucjKZ1mmV6IcTcyEBwD20P+xJhAV707qz0IKnyHpKs5DD+3lv6AFEerQ
=="
},
"@esbuild/android-arm": {
"version": "0.17.19",
...
...
This diff is collapsed.
Click to expand it.
src/shared/data/forms/questionsForm.data.ts
+
27
−
0
View file @
a3ea88e6
...
...
@@ -527,6 +527,33 @@ export const customQuestionForm: Form = {
}
]
},
{
name
:
'
Données
'
,
inputs
:
[
{
type
:
'
repeat
'
,
id
:
'
data
'
,
label
:
'
Données
'
,
value
:
[],
inputs
:
[
{
id
:
'
key
'
,
type
:
'
text
'
,
label
:
'
Clé
'
,
placeholder
:
'
Clé
'
,
value
:
''
},
{
id
:
'
value
'
,
type
:
'
textarea
'
,
label
:
'
Valeur
'
,
placeholder
:
'
Valeur
'
,
value
:
''
}
]
}
]
},
{
name
:
'
Réponse
'
,
inputs
:
[
...
...
This diff is collapsed.
Click to expand it.
src/shared/services/graph.service.ts
+
5
−
1
View file @
a3ea88e6
...
...
@@ -11,7 +11,7 @@ import {
SimpleQuestion
,
uid
,
Video
,
}
from
'
@epoc/epoc-types/
src
/v1
'
;
}
from
'
@epoc/epoc-types/
dist
/v1
'
;
import
{
questions
}
from
'
@/src/shared/data
'
;
import
{
useEditorStore
}
from
'
@/src/shared/stores
'
;
import
{
...
...
@@ -269,6 +269,10 @@ function newQuestion(epoc: EpocV1, questionNode: any): string {
if
(
questionNode
.
formType
===
'
custom
'
)
{
(
question
as
CustomQuestion
).
template
=
template
;
(
question
as
CustomQuestion
).
data
=
{};
for
(
const
value
of
questionNode
.
formValues
.
data
)
{
(
question
as
CustomQuestion
).
data
[
value
.
key
]
=
value
.
value
;
}
}
return
epoc
.
addQuestion
(
questionNode
.
contentId
,
question
);
...
...
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