Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchCourrier
Commits
43c6c39a
Commit
43c6c39a
authored
May 26, 2021
by
Hamza HRAMCHI
Browse files
FIX #16956 TIME 0:10 add title + automatic phone number replacement
parent
67e5af45
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/frontend/app/visa/externalVisaWorkflow/createExternalUser/create-external-user.component.ts
View file @
43c6c39a
...
...
@@ -130,10 +130,11 @@ export class CreateExternalUserComponent implements OnInit {
if
(
item
.
type
===
'
user
'
)
{
this
.
http
.
get
(
'
../rest/users/
'
+
item
.
id
).
pipe
(
tap
((
data
:
any
)
=>
{
const
phone
:
string
=
data
.
phone
;
this
.
userOTP
.
firstname
=
data
.
firstname
;
this
.
userOTP
.
lastname
=
data
.
lastname
;
this
.
userOTP
.
email
=
data
.
mail
;
this
.
userOTP
.
phone
=
data
.
phone
!==
undefined
?
data
.
phone
.
replace
(
/
(
|
\.
|
\-)
/g
,
''
).
replace
(
'
0
'
,
'
+33
'
)
:
''
;
this
.
userOTP
.
phone
=
phone
!==
undefined
?
phone
.
replace
(
/
(
|
\.
|
\-)
/g
,
''
).
replace
(
'
0
'
,
'
+33
'
)
:
''
;
}),
catchError
((
err
:
any
)
=>
{
this
.
notify
.
handleSoftErrors
(
err
);
...
...
@@ -143,10 +144,11 @@ export class CreateExternalUserComponent implements OnInit {
}
else
if
(
item
.
type
===
'
contact
'
)
{
this
.
http
.
get
(
'
../rest/contacts/
'
+
item
.
id
).
pipe
(
tap
((
data
:
any
)
=>
{
const
phone
:
string
=
data
.
phone
;
this
.
userOTP
.
firstname
=
data
.
firstname
;
this
.
userOTP
.
lastname
=
data
.
lastname
;
this
.
userOTP
.
email
=
data
.
email
;
this
.
userOTP
.
phone
=
data
.
phone
.
replace
(
/
(
|
\.
|
\-)
/g
,
''
).
replace
(
'
0
'
,
'
+33
'
);
this
.
userOTP
.
phone
=
phone
!==
undefined
?
phone
.
replace
(
/
(
|
\.
|
\-)
/g
,
''
).
replace
(
'
0
'
,
'
+33
'
)
:
''
;
}),
catchError
((
err
:
any
)
=>
{
this
.
notify
.
handleSoftErrors
(
err
);
...
...
src/frontend/app/visa/externalVisaWorkflow/external-visa-workflow.component.html
View file @
43c6c39a
...
...
@@ -75,7 +75,7 @@
<mat-icon
class=
"fas fa-edit"
color=
"primary"
></mat-icon>
</button>
<button
class=
"currentRoleButton"
[class.readonly]=
"!adminMode"
[color]=
"diffusion.role === 'visa' ? 'default':'primary'"
mat-raised-button
title=
"{{'lang.' + diffusion.role | translate}}"
title=
"{{'lang.' + diffusion.role
+ (diffusion.role === 'sign' ? 'User' : '')
| translate}}"
[matMenuTriggerFor]=
"rolesMenu"
[disabled]=
"!adminMode"
>
{{'lang.' + diffusion.role + (diffusion.role === 'sign' ? 'User' : '') | translate}}
</button>
<mat-menu
#rolesMenu
="
matMenu
"
>
<ng-container
*ngFor=
"let role of diffusion.availableRoles"
>
...
...
Write
Preview
Supports
Markdown
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