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
216dc22e
Commit
216dc22e
authored
2 years ago
by
Hamza HRAMCHI
Browse files
Options
Downloads
Patches
Plain Diff
FIX #23944 TIME 0:10 fix if condition
parent
fd68d94b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/frontend/app/indexation/indexation.component.ts
+26
-25
26 additions, 25 deletions
src/frontend/app/indexation/indexation.component.ts
with
26 additions
and
25 deletions
src/frontend/app/indexation/indexation.component.ts
+
26
−
25
View file @
216dc22e
...
@@ -378,32 +378,33 @@ export class IndexationComponent implements OnInit {
...
@@ -378,32 +378,33 @@ export class IndexationComponent implements OnInit {
}
}
async
signPos
(
index
:
number
)
{
async
signPos
(
index
:
number
)
{
const
allUsers
:
any
[]
=
this
.
appVisaWorkflow
.
getCurrentWorkflow
();
if
(
this
.
appVisaWorkflow
.
getCurrentWorkflow
().
length
>
0
)
{
const
usersWithNoteRole
:
any
[]
=
this
.
appVisaWorkflow
.
getCurrentWorkflow
().
filter
((
user
:
any
)
=>
user
.
role
===
'
note
'
);
const
allUsers
:
any
[]
=
this
.
appVisaWorkflow
.
getCurrentWorkflow
();
const
usersWithNoteRole
:
any
[]
=
this
.
appVisaWorkflow
.
getCurrentWorkflow
().
filter
((
user
:
any
)
=>
user
.
role
===
'
note
'
);
if
((
allUsers
.
length
===
1
&&
this
.
appVisaWorkflow
.
getCurrentWorkflow
()[
0
].
role
===
'
note
'
)
||
(
allUsers
.
length
===
usersWithNoteRole
.
length
))
{
if
((
allUsers
.
length
===
1
&&
this
.
appVisaWorkflow
.
getCurrentWorkflow
()[
0
].
role
===
'
note
'
)
||
(
allUsers
.
length
===
usersWithNoteRole
.
length
))
{
this
.
notificationService
.
error
(
'
lang.cannotSetSignature
'
);
this
.
notificationService
.
error
(
'
lang.cannotSetSignature
'
);
}
else
if
(
this
.
appVisaWorkflow
.
getCurrentWorkflow
().
length
>
0
)
{
}
else
{
this
.
appVisaWorkflow
.
getCurrentWorkflow
().
forEach
((
user
:
any
,
indexUser
:
number
)
=>
{
this
.
appVisaWorkflow
.
getCurrentWorkflow
().
forEach
((
user
:
any
,
indexUser
:
number
)
=>
{
if
(
user
.
signaturePositions
===
undefined
)
{
if
(
user
.
signaturePositions
===
undefined
)
{
this
.
appVisaWorkflow
.
visaWorkflow
[
indexUser
].
signaturePositions
=
[];
this
.
appVisaWorkflow
.
visaWorkflow
[
indexUser
].
signaturePositions
=
[];
}
}
});
});
const
modal
=
await
this
.
modalController
.
create
({
const
modal
=
await
this
.
modalController
.
create
({
component
:
SignaturePositionComponent
,
component
:
SignaturePositionComponent
,
cssClass
:
'
custom-alert-fullscreen
'
,
cssClass
:
'
custom-alert-fullscreen
'
,
componentProps
:
{
componentProps
:
{
workflow
:
this
.
appVisaWorkflow
.
getCurrentWorkflow
(),
workflow
:
this
.
appVisaWorkflow
.
getCurrentWorkflow
(),
resource
:
this
.
filesToUpload
[
index
],
resource
:
this
.
filesToUpload
[
index
],
pdfContent
:
'
data:application/pdf;base64,
'
+
this
.
filesToUpload
[
index
].
content
,
pdfContent
:
'
data:application/pdf;base64,
'
+
this
.
filesToUpload
[
index
].
content
,
docIndex
:
this
.
filesToUpload
.
indexOf
(
this
.
filesToUpload
[
index
])
docIndex
:
this
.
filesToUpload
.
indexOf
(
this
.
filesToUpload
[
index
])
}
});
await
modal
.
present
();
const
{
data
}
=
await
modal
.
onWillDismiss
();
if
(
data
!==
undefined
)
{
this
.
filesToUpload
[
index
].
signPos
=
data
;
this
.
appVisaWorkflow
.
setPositionsWorkfow
(
this
.
filesToUpload
,
index
,
data
);
}
}
});
await
modal
.
present
();
const
{
data
}
=
await
modal
.
onWillDismiss
();
if
(
data
!==
undefined
)
{
this
.
filesToUpload
[
index
].
signPos
=
data
;
this
.
appVisaWorkflow
.
setPositionsWorkfow
(
this
.
filesToUpload
,
index
,
data
);
}
}
}
else
{
}
else
{
this
.
notificationService
.
error
(
'
lang.mustSetWorkflowBeforeSignPositions
'
);
this
.
notificationService
.
error
(
'
lang.mustSetWorkflowBeforeSignPositions
'
);
...
...
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