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
dfef9af0
Commit
dfef9af0
authored
Dec 03, 2024
by
Samir Sadyhov
🤔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update appAPI
parent
50fd9306
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
constructor/library/appAPI.js
constructor/library/appAPI.js
+36
-2
No files found.
constructor/library/appAPI.js
View file @
dfef9af0
...
...
@@ -644,9 +644,14 @@ this.appAPI = {
});
},
stopRoute
:
async
function
(
documentID
)
{
stopRoute
:
async
function
(
documentID
,
procInstID
)
{
const
param
=
new
URLSearchParams
();
param
.
append
(
"
documentID
"
,
documentID
);
param
.
append
(
"
locale
"
,
AS
.
OPTIONS
.
locale
);
if
(
procInstID
)
param
.
append
(
"
procInstID
"
,
procInstID
);
return
new
Promise
(
resolve
=>
{
rest
.
synergyPost
(
`api/docflow/doc/stop_route?
documentID=
${
documentID
}
&locale=
${
AS
.
OPTIONS
.
locale
}
`
,
null
,
"
application/json; charset=UTF-8
"
,
resolve
,
err
=>
{
rest
.
synergyPost
(
`api/docflow/doc/stop_route?
${
param
.
toString
()
}
`
,
null
,
"
application/json; charset=UTF-8
"
,
resolve
,
err
=>
{
console
.
log
(
`ERROR [ stopRoute ]:
${
JSON
.
stringify
(
err
)}
`
);
resolve
(
null
);
});
...
...
@@ -1172,5 +1177,34 @@ this.appAPI = {
resolve
(
null
);
}
});
},
getContextMenuItems
:
async
function
(
filterType
,
documentID
)
{
return
new
Promise
(
async
resolve
=>
{
rest
.
synergyGet
(
`api/docflow/doc/contextMenuItems?filterType=
${
filterType
}
&documentID=
${
documentID
}
&locale=
${
AS
.
OPTIONS
.
locale
}
`
,
resolve
,
err
=>
{
console
.
log
(
`ERROR [ getContextMenuItems ]:
${
JSON
.
stringify
(
err
)}
`
);
resolve
(
null
);
});
});
},
//Метод скрывает/восстанавливает документ
documentHide
:
async
function
(
filterType
,
documentID
,
hidden
=
true
)
{
return
new
Promise
(
async
resolve
=>
{
rest
.
synergyGet
(
`api/docflow/doc/hide?filterType=
${
filterType
}
&documentID=
${
documentID
}
&hidden=
${
hidden
}
&locale=
${
AS
.
OPTIONS
.
locale
}
`
,
resolve
,
err
=>
{
console
.
log
(
`ERROR [ documentHide ]:
${
JSON
.
stringify
(
err
)}
`
);
resolve
(
null
);
});
});
},
//Метод отмечает документ как "Просмотренный"
documentSetSeen
:
async
function
(
filterType
,
documentID
,
seen
=
true
)
{
return
new
Promise
(
async
resolve
=>
{
rest
.
synergyGet
(
`api/docflow/doc/set_seen?filterType=
${
filterType
}
&documentID=
${
documentID
}
&seen=
${
seen
}
&locale=
${
AS
.
OPTIONS
.
locale
}
`
,
resolve
,
err
=>
{
console
.
log
(
`ERROR [ documentSetSeen ]:
${
JSON
.
stringify
(
err
)}
`
);
resolve
(
null
);
});
});
}
}
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