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
77fa97f3
Commit
77fa97f3
authored
Sep 21, 2023
by
Samir Sadyhov
🤔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appAPI - добавлены дополнительные методы
parent
3a4a8f90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
constructor/library/appAPI.js
constructor/library/appAPI.js
+29
-0
No files found.
constructor/library/appAPI.js
View file @
77fa97f3
...
...
@@ -317,6 +317,15 @@ this.appAPI = {
});
},
getDocumentAttachments
:
async
function
(
documentID
){
return
new
Promise
(
resolve
=>
{
rest
.
synergyGet
(
`api/docflow/doc/attachments?documentID=
${
documentID
}
&locale=
${
AS
.
OPTIONS
.
locale
}
`
,
resolve
,
err
=>
{
console
.
log
(
`ERROR [ getAttachments ]:
${
JSON
.
stringify
(
err
)}
`
);
resolve
(
null
);
});
});
},
getWorkActions
:
async
function
(
workID
)
{
return
new
Promise
(
async
resolve
=>
{
rest
.
synergyGet
(
`api/workflow/work_actions?workID=
${
workID
}
&locale=
${
AS
.
OPTIONS
.
locale
}
`
,
resolve
,
err
=>
{
...
...
@@ -337,6 +346,17 @@ this.appAPI = {
});
},
addFileToDocument
:
async
function
(
documentID
,
fileName
,
filePath
,
path
)
{
return
new
Promise
(
resolve
=>
{
rest
.
synergyPost
(
`api/docflow/doc/attachment/create?locale=
${
AS
.
OPTIONS
.
locale
}
`
,
{
documentID
,
fileName
,
filePath
,
path
},
"
application/x-www-form-urlencoded; charset=UTF-8
"
,
resolve
,
resolve
);
});
},
getFile
:
async
function
(
identifier
,
type
=
'
blob
'
)
{
return
new
Promise
(
async
resolve
=>
{
try
{
...
...
@@ -639,6 +659,15 @@ this.appAPI = {
});
},
setChildDocuments
:
async
function
(
documentID
,
childDocuments
=
[])
{
return
new
Promise
(
async
resolve
=>
{
AS
.
FORMS
.
ApiUtils
.
simpleAsyncPost
(
`rest/api/docflow/doc/set_child_documents?documentID=
${
documentID
}
`
,
resolve
,
null
,
JSON
.
stringify
(
childDocuments
),
"
application/json
"
,
err
=>
{
console
.
log
(
`ERROR [ setChildDocuments ]:
${
JSON
.
stringify
(
err
)}
`
);
resolve
(
null
);
});
});
},
getCollationInfo
:
async
function
(
registry_code
,
collated_registry_code
)
{
return
new
Promise
(
async
resolve
=>
{
rest
.
synergyGet
(
`api/registry/collation_info?registry_code=
${
registry_code
}
&collated_registry_code=
${
collated_registry_code
}
`
,
resolve
,
err
=>
{
...
...
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