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
a5868512
Commit
a5868512
authored
Mar 12, 2025
by
Samir Sadyhov
🤔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
openDocument.js - добавлено подписание через egov mobile
parent
b64a5505
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
19 deletions
+56
-19
constructor/scripts/openDocument/openDocument.js
constructor/scripts/openDocument/openDocument.js
+56
-19
No files found.
constructor/scripts/openDocument/openDocument.js
View file @
a5868512
...
...
@@ -478,8 +478,40 @@ const finishWork = async (_doc) => {
}
}
const
openDialogSelectSignType
=
handler
=>
{
const
dialog
=
$
(
'
<div class="uk-flex-top" uk-modal>
'
);
const
body
=
$
(
'
<div>
'
,
{
class
:
'
uk-modal-dialog uk-modal-body
'
});
const
header
=
$
(
`<h2 class="uk-modal-title">
${
i18n
.
tr
(
'
Выберите способ подписания
'
)}
</h2>`
);
const
buttonEgov
=
$
(
`<button class="uk-button uk-button-default uk-width-1-1 uk-margin-small-bottom">
${
i18n
.
tr
(
'
Подписать через eGov mobile
'
)}
</button>`
);
const
buttonNcaLayer
=
$
(
`<button class="uk-button uk-button-default uk-width-1-1 uk-margin-small-bottom">
${
i18n
.
tr
(
'
Подписать через NCALayer
'
)}
</button>`
);
dialog
.
append
(
body
);
body
.
append
(
header
,
buttonEgov
,
buttonNcaLayer
);
buttonEgov
.
on
(
'
click
'
,
e
=>
{
handler
(
'
egov
'
);
UIkit
.
modal
(
dialog
).
hide
();
});
buttonNcaLayer
.
on
(
'
click
'
,
e
=>
{
handler
(
'
ncalayer
'
);
UIkit
.
modal
(
dialog
).
hide
();
});
UIkit
.
modal
(
dialog
).
show
();
dialog
.
on
(
'
hidden
'
,
()
=>
{
dialog
.
remove
();
});
}
const
signDocument
=
async
(
documentID
,
signButton
)
=>
{
try
{
openDialogSelectSignType
(
async
signType
=>
{
switch
(
signType
)
{
case
'
egov
'
:
generateQRCodeEgov
(
documentID
,
'
sign
'
);
break
;
case
'
ncalayer
'
:
{
NCALayer
.
sign
(
'
SIGN
'
,
documentID
,
async
result
=>
{
Cons
.
showLoader
();
...
...
@@ -503,6 +535,11 @@ const signDocument = async (documentID, signButton) => {
}
});
break
;
}
}
});
}
catch
(
err
)
{
Cons
.
hideLoader
();
showMessage
(
i18n
.
tr
(
err
.
message
),
'
error
'
);
...
...
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