Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Signature Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Electronic Signature Service
Signature Frontend
Commits
01ac7458
Commit
01ac7458
authored
Jul 7, 2020
by
Steinwender, Tamara
Browse files
Options
Downloads
Patches
Plain Diff
Error message parsing with language support (
#22
)
parent
c531c6a8
No related branches found
No related tags found
No related merge requests found
Pipeline
#12135
passed with warnings
Jul 10, 2020
Stage: test
Changes
3
Pipelines
4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/i18n/de/translation.json
+3
-1
3 additions, 1 deletion
src/i18n/de/translation.json
src/i18n/en/translation.json
+3
-1
3 additions, 1 deletion
src/i18n/en/translation.json
src/vpu-qualified-signature-pdf-upload.js
+27
-1
27 additions, 1 deletion
src/vpu-qualified-signature-pdf-upload.js
with
33 additions
and
3 deletions
src/i18n/de/translation.json
+
3
−
1
View file @
01ac7458
...
@@ -97,5 +97,7 @@
...
@@ -97,5 +97,7 @@
"continue"
:
"Platzierung bestätigen"
"continue"
:
"Platzierung bestätigen"
},
},
"error-permission-message"
:
"Sie müssen das Recht auf Amtssignaturen besitzen um diese Funktion nutzen zu können!"
,
"error-permission-message"
:
"Sie müssen das Recht auf Amtssignaturen besitzen um diese Funktion nutzen zu können!"
,
"error-login-message"
:
"Sie müssen eingeloggt sein um diese Funktion nutzen zu können!"
"error-login-message"
:
"Sie müssen eingeloggt sein um diese Funktion nutzen zu können!"
,
"error-cancel-message"
:
"Der Signaturprozess wurde manuell abgebrochen."
,
"error-rights-message"
:
"Abbruch auf Grund mangelnder Rechte Ihres Accounts."
}
}
This diff is collapsed.
Click to expand it.
src/i18n/en/translation.json
+
3
−
1
View file @
01ac7458
...
@@ -97,5 +97,7 @@
...
@@ -97,5 +97,7 @@
"continue"
:
"Confirm placement"
"continue"
:
"Confirm placement"
},
},
"error-permission-message"
:
"You need have permissions to use the official signature to use this function!"
,
"error-permission-message"
:
"You need have permissions to use the official signature to use this function!"
,
"error-login-message"
:
"You need to be logged in to use this function!"
"error-login-message"
:
"You need to be logged in to use this function!"
,
"error-cancel-message"
:
"The signature process was manually aborted."
,
"error-rights-message"
:
"Abort due to insufficient rights of your account."
}
}
This diff is collapsed.
Click to expand it.
src/vpu-qualified-signature-pdf-upload.js
+
27
−
1
View file @
01ac7458
...
@@ -212,6 +212,32 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
...
@@ -212,6 +212,32 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
event
.
returnValue
=
''
;
event
.
returnValue
=
''
;
}
}
/**
* Parse error message for user friendly output
*
* @param error
*/
parseError
(
error
)
{
let
errorParsed
=
error
;
// Common Error Messages fpr pdf-as: https://www.buergerkarte.at/konzept/securitylayer/spezifikation/20140114/errorcodes/errorcodes.html
// SecurityLayer Error: [6000] Unklassifizierter Abbruch durch den Bürger.
if
(
error
.
includes
(
'
SecurityLayer Error: [6001]
'
))
{
errorParsed
=
i18n
.
t
(
'
error-cancel-message
'
);
}
// SecurityLayer Error: [6001] Abbruch durch den Bürger über die Benutzerschnittstelle.
else
if
(
error
.
includes
(
'
SecurityLayer Error: [6000]
'
))
{
errorParsed
=
i18n
.
t
(
'
error-cancel-message
'
);
}
// SecurityLayer Error: [6002] Abbruch auf Grund mangelnder Rechte zur Befehlsausführung.
else
if
(
error
.
includes
(
'
SecurityLayer Error: [6002]
'
))
{
errorParsed
=
i18n
.
t
(
'
error-rights-message
'
);
}
return
errorParsed
;
}
onReceiveIframeMessage
(
event
)
{
onReceiveIframeMessage
(
event
)
{
const
data
=
event
.
data
;
const
data
=
event
.
data
;
...
@@ -222,7 +248,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
...
@@ -222,7 +248,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
if
(
data
.
cause
)
{
if
(
data
.
cause
)
{
error
=
`
${
error
}
:
${
data
.
cause
}
`
;
error
=
`
${
error
}
:
${
data
.
cause
}
`
;
}
}
file
.
json
=
{
"
hydra:description
"
:
error
};
file
.
json
=
{
"
hydra:description
"
:
this
.
parseError
(
error
)
};
this
.
addToErrorFiles
(
file
);
this
.
addToErrorFiles
(
file
);
this
.
_
(
"
#iframe
"
).
src
=
"
about:blank
"
;
this
.
_
(
"
#iframe
"
).
src
=
"
about:blank
"
;
this
.
externalAuthInProgress
=
false
;
this
.
externalAuthInProgress
=
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