Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
form-creator-api
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
Model registry
Operate
Environments
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
simmctic
form-creator
form-creator-api
Commits
24809502
Commit
24809502
authored
5 years ago
by
Stephanie Briere Americo
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue/73' into 'develop'
Issue
#73
: FIX Creating subform input needs input ID Closes
#73
See merge request
!72
parents
097d6425
59c79028
No related branches found
No related tags found
1 merge request
!72
Issue #73: FIX Creating subform input needs input ID
Pipeline
#23088
passed
5 years ago
Stage: test
Stage: build
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+7
-0
7 additions, 0 deletions
CHANGELOG.md
package.json
+2
-2
2 additions, 2 deletions
package.json
src/core/subForm.ts
+3
-3
3 additions, 3 deletions
src/core/subForm.ts
src/utils/optHandler.ts
+16
-19
16 additions, 19 deletions
src/utils/optHandler.ts
with
28 additions
and
24 deletions
CHANGELOG.md
+
7
−
0
View file @
24809502
...
...
@@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
## 1.2.3 - 29/04/2020
## Changed
-
Api to create a subform input without needing input ID from body #73 (Richard Heise)
-
OptHandler to not return error when there's no input ID
-
Subform in core/ to have an optional input ID
## 1.2.2 - 07-04-2020
## Added
-
Route to return the number of answers in a form #72 (Richard Heise)
...
...
This diff is collapsed.
Click to expand it.
package.json
+
2
−
2
View file @
24809502
{
"name"
:
"form-creator-api"
,
"version"
:
"1.2.
2
"
,
"version"
:
"1.2.
3
"
,
"description"
:
"RESTful API used to manage and answer forms."
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
This diff is collapsed.
Click to expand it.
src/core/subForm.ts
+
3
−
3
View file @
24809502
...
...
@@ -28,7 +28,7 @@ export interface SubFormOptions {
id
?:
number
;
/** Input wich subForm is linked. */
inputId
:
number
;
inputId
?
:
number
;
/** SubForm of a form. */
contentFormId
:
number
;
...
...
@@ -52,7 +52,7 @@ export class SubForm {
*/
constructor
(
options
:
SubFormOptions
)
{
this
.
id
=
options
.
id
?
options
.
id
:
null
;
this
.
inputId
=
options
.
inputId
;
this
.
inputId
=
options
.
inputId
?
options
.
inputId
:
null
;
this
.
contentFormId
=
options
.
contentFormId
;
}
}
This diff is collapsed.
Click to expand it.
src/utils/optHandler.ts
+
16
−
19
View file @
24809502
...
...
@@ -287,9 +287,6 @@ export class OptHandler {
}
public
static
subForm
(
obj
:
any
):
SubForm
{
if
(
obj
.
inputId
===
undefined
)
{
throw
ErrorHandler
.
notFound
(
"
SubForm InputId
"
);
}
if
(
obj
.
contentFormId
===
undefined
)
{
throw
ErrorHandler
.
notFound
(
"
SubForm ContentForm
"
);
}
...
...
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