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
bf039beb
Commit
bf039beb
authored
Sep 07, 2023
by
Samir Sadyhov
🤔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appAPI - добавлены дополнительные методы
parent
d914427a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
constructor/library/appAPI.js
constructor/library/appAPI.js
+56
-0
No files found.
constructor/library/appAPI.js
View file @
bf039beb
...
...
@@ -177,6 +177,18 @@ this.appAPI = {
});
},
getDocumentIdentifier
:
async
function
(
dataUUID
)
{
return
new
Promise
(
async
resolve
=>
{
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
`rest/api/formPlayer/documentIdentifier?dataUUID=
${
dataUUID
}
`
,
resolve
,
'
text
'
,
null
,
err
=>
{
console
.
log
(
`ERROR [ getDocumentIdentifier ]:
${
JSON
.
stringify
(
err
)}
`
);
resolve
(
null
);
}
);
});
},
getDocMeaningContent
:
async
function
(
asfDataUUID
)
{
return
new
Promise
(
async
resolve
=>
{
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
`rest/api/formPlayer/getDocMeaningContent?asfDataUUID=
${
asfDataUUID
}
`
,
...
...
@@ -519,6 +531,15 @@ this.appAPI = {
});
},
getRegistryInfoByID
:
async
function
(
registryID
)
{
return
new
Promise
(
async
resolve
=>
{
rest
.
synergyGet
(
`api/registry/info?registryID=
${
registryID
}
&locale=
${
AS
.
OPTIONS
.
locale
}
`
,
resolve
,
err
=>
{
console
.
log
(
`ERROR [ getRegistryInfo ]:
${
JSON
.
stringify
(
err
)}
`
);
resolve
(
null
);
});
});
},
getRegistryFilters
:
async
function
(
registryCode
)
{
return
new
Promise
(
async
resolve
=>
{
rest
.
synergyGet
(
`api/registry/filters?registryCode=
${
registryCode
}
&locale=
${
AS
.
OPTIONS
.
locale
}
&type=service`
,
resolve
,
err
=>
{
...
...
@@ -609,6 +630,41 @@ this.appAPI = {
});
},
getChildDocuments
:
async
function
(
documentID
)
{
return
new
Promise
(
async
resolve
=>
{
rest
.
synergyGet
(
`api/docflow/doc/child_documents?documentID=
${
documentID
}
&locale=
${
AS
.
OPTIONS
.
locale
}
`
,
resolve
,
err
=>
{
console
.
log
(
`ERROR [ getChildDocuments ]:
${
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
=>
{
console
.
log
(
`ERROR [ getCollationInfo ]:
${
JSON
.
stringify
(
err
)}
`
);
resolve
(
null
);
});
});
},
getCollationData
:
async
function
(
collationGroup
,
dataUUID
,
formId
,
registryDocumentId
)
{
let
url
=
`rest/api/asforms/form/collate`
;
url
+=
`?collationGroup=
${
collationGroup
}
`
;
url
+=
`&dataUUID=
${
dataUUID
}
`
;
url
+=
`&formId=
${
formId
}
`
;
url
+=
`®istryDocumentId=
${
registryDocumentId
}
`
;
return
new
Promise
(
async
resolve
=>
{
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
url
,
resolve
,
'
text
'
,
null
,
err
=>
{
console
.
log
(
`ERROR [ getCollationData ]:
${
err
}
`
);
resolve
(
null
);
}
);
});
},
sendNotification
:
async
function
(
body
)
{
return
new
Promise
(
async
resolve
=>
{
try
{
...
...
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