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

appAPI - добавлены дополнительные методы

parent d914427a
......@@ -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 += `&registryDocumentId=${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 {
......
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