Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
synergy-components
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
synergy-components
Commits
4ad993a1
Commit
4ad993a1
authored
Jun 17, 2022
by
Sergey Antonovich
🇯🇵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update jSynergy.js
parent
dbe0319e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
interpreter/jSynergy.js
interpreter/jSynergy.js
+17
-10
No files found.
interpreter/jSynergy.js
View file @
4ad993a1
...
...
@@ -1291,7 +1291,7 @@ function __classSynergy() {
let
modifiedComponentsList
=
__CLIENT__
.
getModifiedFormdata
();
if
(
modifiedComponentsList
.
length
)
{
let
config
=
{
let
save
=
__CLIENT__
.
api
(
'
asforms/data/merge
'
,
{
type
:
'
POST
'
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
...
...
@@ -1300,13 +1300,20 @@ function __classSynergy() {
uuid
:
__CLIENT__
.
getDataUUID
(),
data
:
modifiedComponentsList
})
};
let
save
=
__CLIENT__
.
api
(
'
asforms/data/merge
'
,
config
);
});
if
(
save
&&
+
save
.
errorCode
===
0
)
{
console
.
info
(
'
\n\n
'
);
console
.
info
(
__LIBRARY_PREFIX__
+
''
+
JSON
.
stringify
(
modifiedComponentsList
));
modifiedComponentsList
.
forEach
(
function
(
modifyComponent
)
{
const
compIndex
=
__CLIENT__
.
getDefaultFormData
().
findIndex
(
function
(
component
)
{
return
component
.
id
===
modifyComponent
.
id
})
if
(
compIndex
!==
-
1
)
{
__CLIENT__
.
getDefaultFormData
()[
compIndex
]
=
Object
.
assign
({},
modifyComponent
);
}
});
console
.
info
(
'
\n\n
'
+
__LIBRARY_PREFIX__
+
''
+
JSON
.
stringify
(
modifiedComponentsList
));
console
.
info
(
__LIBRARY_PREFIX__
+
'
Data changed successfully!
'
+
'
\n
Number of components changed:
'
+
modifiedComponentsList
.
length
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment