Commit 773a78ea authored by Samir Sadyhov's avatar Samir Sadyhov 🤔

openDocument.js - подписание через egov mobile

parent cf596461
......@@ -505,19 +505,27 @@ const openDialogSelectSignType = handler => {
});
}
const signDocument = async (documentID, signButton) => {
const signDocument = async (_doc, signButton) => {
try {
openDialogSelectSignType(async signType => {
switch (signType) {
case 'egov': generateQRCodeEgov(documentID, 'sign'); break;
case 'egov': {
generateQRCodeEgov({
documentID: _doc.documentID,
worktype: 'sign'
}, () => {
closeDocument(_doc);
});
break;
}
case 'ncalayer': {
NCALayer.sign('SIGN', documentID, async result => {
NCALayer.sign('SIGN', _doc.documentID, async result => {
Cons.showLoader();
try {
const signResult = await AS.FORMS.ApiUtils.simpleAsyncPost("rest/api/docflow/sign", null, null, {
documentID,
documentID: _doc.documentID,
rawdata: result.dataForSign,
signdata: result.signedData,
certificate: result.certificate,
......@@ -993,7 +1001,7 @@ class ButtonsActions {
signButton.on('click', e => {
e.preventDefault();
e.target.blur();
signDocument(this._doc.documentID, signButton);
signDocument(this._doc, signButton);
});
}
......
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