Commit dfef9af0 authored by Samir Sadyhov's avatar Samir Sadyhov 🤔

update appAPI

parent 50fd9306
......@@ -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);
});
});
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment