Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchParapheur
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchParapheur
Commits
2fea530a
Commit
2fea530a
authored
4 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #14565 TIME 0:10 add tmpUniqueId
parent
f659f755
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/frontend/app/service/actions.service.ts
+9
-2
9 additions, 2 deletions
src/frontend/app/service/actions.service.ts
src/frontend/app/service/signature-method/signature-method-modal.component.ts
+4
-3
4 additions, 3 deletions
...vice/signature-method/signature-method-modal.component.ts
with
13 additions
and
5 deletions
src/frontend/app/service/actions.service.ts
+
9
−
2
View file @
2fea530a
...
...
@@ -6,6 +6,7 @@ import { tap, catchError } from 'rxjs/operators';
import
{
SignaturesContentService
}
from
'
./signatures.service
'
;
import
{
NotificationService
}
from
'
../service/notification.service
'
;
import
{
of
}
from
'
rxjs
'
;
import
{
FunctionsService
}
from
'
./functions.service
'
;
@
Injectable
({
providedIn
:
'
root
'
...
...
@@ -18,9 +19,10 @@ export class ActionsService {
private
latinisePipe
:
LatinisePipe
,
public
notificationService
:
NotificationService
,
public
signaturesService
:
SignaturesContentService
,
private
functionsService
:
FunctionsService
)
{
}
sendDocument
(
note
:
string
,
eSignature
:
any
=
null
,
signatureLength
:
any
=
null
)
{
sendDocument
(
note
:
string
,
eSignature
:
any
=
null
,
signatureLength
:
any
=
null
,
tmpUniqueId
:
string
=
null
)
{
return
new
Promise
(
async
(
resolve
)
=>
{
const
signatures
:
any
[]
=
[];
if
(
this
.
signaturesService
.
currentAction
>
0
)
{
...
...
@@ -85,6 +87,10 @@ export class ActionsService {
data
.
signatureLength
=
signatureLength
;
}
if
(
!
this
.
functionsService
.
empty
(
tmpUniqueId
))
{
data
.
tmpUniqueId
=
tmpUniqueId
;
}
this
.
http
.
put
(
'
../rest/documents/
'
+
this
.
signaturesService
.
mainDocumentId
+
'
/actions/
'
+
this
.
signaturesService
.
currentAction
,
data
)
.
pipe
(
tap
((
res
:
any
)
=>
{
...
...
@@ -92,7 +98,8 @@ export class ActionsService {
const
objSignData
=
{
hashDocument
:
res
.
dataToSign
,
signatureContentLength
:
res
.
signatureContentLength
,
signatureFieldName
:
res
.
signatureFieldName
signatureFieldName
:
res
.
signatureFieldName
,
tmpUniqueId
:
res
.
tmpUniqueId
};
resolve
(
objSignData
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/frontend/app/service/signature-method/signature-method-modal.component.ts
+
4
−
3
View file @
2fea530a
...
...
@@ -101,7 +101,8 @@ export class SignatureMethodModalComponent implements OnInit {
console
.
log
(
'
hashDocumentHex
'
,
hashDocumentHex
);
let
hashSignature
;
let
hashSignature
:
any
;
try
{
hashSignature
=
await
this
.
provider
.
subtle
.
sign
(
alg
,
this
.
privateKey
,
hashDocumentHex
);
}
catch
(
e
)
{
...
...
@@ -110,7 +111,6 @@ export class SignatureMethodModalComponent implements OnInit {
return
of
(
false
);
}
console
.
log
(
'
hashSignature
'
,
hashSignature
);
const
objEsign
=
{
...
...
@@ -141,10 +141,11 @@ export class SignatureMethodModalComponent implements OnInit {
async
sendAndSign
()
{
let
allSignaturesComplete
:
boolean
=
false
;
let
res
:
any
=
{};
while
(
!
allSignaturesComplete
)
{
let
signDocComplete
:
any
=
false
;
while
(
signDocComplete
===
false
)
{
const
res
:
any
=
await
this
.
actionsService
.
sendDocument
(
this
.
note
,
this
.
certificate
,
this
.
signatureLength
);
res
=
await
this
.
actionsService
.
sendDocument
(
this
.
note
,
this
.
certificate
,
this
.
signatureLength
,
res
.
tmpUniqueId
);
if
(
res
===
null
)
{
return
false
;
}
else
if
(
res
!==
false
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment