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
7ae2e17e
Commit
7ae2e17e
authored
4 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #14568 TIME 1:45 front proof action
parent
2890bca3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lang/fr.json
+2
-1
2 additions, 1 deletion
lang/fr.json
src/frontend/app/search/search.component.html
+1
-1
1 addition, 1 deletion
src/frontend/app/search/search.component.html
src/frontend/app/search/search.component.ts
+35
-16
35 additions, 16 deletions
src/frontend/app/search/search.component.ts
with
38 additions
and
18 deletions
lang/fr.json
+
2
−
1
View file @
7ae2e17e
...
...
@@ -349,6 +349,7 @@
"workflowUserstMandatory"
:
"Veuillez choisir des utilisateurs pour le circuit"
,
"accessDocument"
:
"Accéder au document"
,
"warnInterrupt"
:
"Vous êtes sur le point d'interrompre le traitement de ce document."
,
"documentInterrupted"
:
"Circuit interrompu"
"documentInterrupted"
:
"Circuit interrompu"
,
"download"
:
"Télécharger"
}
}
This diff is collapsed.
Click to expand it.
src/frontend/app/search/search.component.html
+
1
−
1
View file @
7ae2e17e
...
...
@@ -83,7 +83,7 @@
</ion-buttons>
</ion-item>
<ion-item-options>
<ion-item-option
color=
"primary"
(click)=
"openPromptProof(element)"
>
<ion-item-option
*ngIf=
"element.state !== 'PROG'"
color=
"primary"
(click)=
"openPromptProof(element)"
>
<ion-icon
slot=
"bottom"
name=
"ribbon-sharp"
></ion-icon>
{{'lang.proof' | translate}}
</ion-item-option>
...
...
This diff is collapsed.
Click to expand it.
src/frontend/app/search/search.component.ts
+
35
−
16
View file @
7ae2e17e
...
...
@@ -6,7 +6,7 @@ import { Router } from '@angular/router';
import
{
ActionSheetController
,
AlertController
,
LoadingController
,
MenuController
}
from
'
@ionic/angular
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
of
}
from
'
rxjs
'
;
import
{
catchError
,
finalize
,
tap
}
from
'
rxjs/operators
'
;
import
{
catchError
,
exhaustMap
,
finalize
,
tap
}
from
'
rxjs/operators
'
;
import
{
VisaWorkflowComponent
}
from
'
../document/visa-workflow/visa-workflow.component
'
;
import
{
AuthService
}
from
'
../service/auth.service
'
;
import
{
NotificationService
}
from
'
../service/notification.service
'
;
...
...
@@ -15,6 +15,7 @@ import { SignaturesContentService } from '../service/signatures.service';
@
Component
({
templateUrl
:
'
search.component.html
'
,
styleUrls
:
[
'
search.component.scss
'
],
providers
:
[
DatePipe
]
})
export
class
SearchComponent
implements
OnInit
{
...
...
@@ -97,7 +98,8 @@ export class SearchComponent implements OnInit {
public
authService
:
AuthService
,
public
loadingController
:
LoadingController
,
public
alertController
:
AlertController
,
public
actionSheetController
:
ActionSheetController
public
actionSheetController
:
ActionSheetController
,
public
datePipe
:
DatePipe
,
)
{
}
ngOnInit
():
void
{
}
...
...
@@ -289,7 +291,7 @@ export class SearchComponent implements OnInit {
.
pipe
(
tap
(()
=>
{
this
.
notificationService
.
success
(
'
lang.documentInterrupted
'
),
resolve
(
true
);
resolve
(
true
);
}),
catchError
((
err
:
any
)
=>
{
this
.
notificationService
.
handleErrors
(
err
);
...
...
@@ -309,20 +311,23 @@ export class SearchComponent implements OnInit {
async
openPromptProof
(
item
:
any
)
{
const
alert
=
await
this
.
alertController
.
create
({
header
:
this
.
translate
.
instant
(
'
lang.proof
'
),
cssClass
:
'
promptProof
'
,
header
:
this
.
translate
.
instant
(
'
lang.download
'
),
inputs
:
[
{
name
:
'
option1
'
,
type
:
'
checkbox
'
,
label
:
'
Option 1
'
,
value
:
'
value1
'
,
type
:
'
radio
'
,
label
:
'
Faisceau de preuve
'
,
value
:
'
onlyProof
'
,
checked
:
true
},
{
name
:
'
option
2
'
,
type
:
'
checkbox
'
,
label
:
'
Option 2
'
,
value
:
'
v
al
ue2
'
name
:
'
option
1
'
,
type
:
'
radio
'
,
label
:
'
Dossier complet
'
,
value
:
'
al
l
'
,
},
],
buttons
:
[
{
...
...
@@ -333,8 +338,8 @@ export class SearchComponent implements OnInit {
},
{
text
:
this
.
translate
.
instant
(
'
lang.validate
'
),
handler
:
async
()
=>
{
await
this
.
downloadProof
(
item
);
handler
:
async
(
mode
)
=>
{
await
this
.
downloadProof
(
item
,
mode
);
alert
.
dismiss
();
}
}
...
...
@@ -343,11 +348,25 @@ export class SearchComponent implements OnInit {
await
alert
.
present
();
}
downloadProof
(
item
:
any
)
{
downloadProof
(
item
:
any
,
mode
:
string
)
{
let
format
=
null
;
const
onlyProof
=
mode
===
'
onlyProof
'
?
'
&onlyProof=true
'
:
''
;
return
new
Promise
((
resolve
)
=>
{
this
.
http
.
get
(
`../rest/documents/
${
item
.
id
}
/proof`
)
this
.
http
.
get
(
`../rest/documents/
${
item
.
id
}
/proof
?mode=base64
${
onlyProof
}
`
)
.
pipe
(
tap
(()
=>
{
tap
((
data
:
any
)
=>
{
format
=
data
.
format
;
}),
exhaustMap
(()
=>
this
.
http
.
get
(
`../rest/documents/
${
item
.
id
}
/proof?mode=stream
${
onlyProof
}
`
,
{
responseType
:
'
blob
'
})),
tap
((
data
:
any
)
=>
{
const
today
=
new
Date
();
const
filename
=
'
proof_
'
+
item
.
id
+
'
_
'
+
this
.
datePipe
.
transform
(
today
,
'
dd-MM-y
'
)
+
'
.
'
+
format
;
const
downloadLink
=
document
.
createElement
(
'
a
'
);
downloadLink
.
href
=
window
.
URL
.
createObjectURL
(
data
);
downloadLink
.
setAttribute
(
'
download
'
,
filename
);
document
.
body
.
appendChild
(
downloadLink
);
downloadLink
.
click
();
resolve
(
true
);
}),
catchError
((
err
:
any
)
=>
{
...
...
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