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
9b569e6a
Verified
Commit
9b569e6a
authored
5 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FIX #1183 TIME 0:30 refresh substitue and user list in profile
parent
aef1878f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/frontend/app/profile/profile.component.html
+1
-1
1 addition, 1 deletion
src/frontend/app/profile/profile.component.html
src/frontend/app/profile/profile.component.ts
+17
-0
17 additions, 0 deletions
src/frontend/app/profile/profile.component.ts
with
18 additions
and
1 deletion
src/frontend/app/profile/profile.component.html
+
1
−
1
View file @
9b569e6a
...
@@ -208,7 +208,7 @@
...
@@ -208,7 +208,7 @@
<div
class=
"form-2-col"
>
<div
class=
"form-2-col"
>
<mat-form-field
style=
"width:100%"
>
<mat-form-field
style=
"width:100%"
>
<mat-select
placeholder=
"{{'lang.chooseSubstitute' | translate}}"
name=
"usersList"
<mat-select
placeholder=
"{{'lang.chooseSubstitute' | translate}}"
name=
"usersList"
[(ngModel)]=
"profileInfo.substitute"
(selectionChange)=
"selectSubstitute($event)"
>
[(ngModel)]=
"profileInfo.substitute"
(selectionChange)=
"selectSubstitute($event)"
(openedChange)=
"refreshUserList($event)"
>
<ng-container
*ngFor=
"let userRest of usersList"
>
<ng-container
*ngFor=
"let userRest of usersList"
>
<mat-option
*ngIf=
"userRest.id !== profileInfo.id && !userRest.substitute"
<mat-option
*ngIf=
"userRest.id !== profileInfo.id && !userRest.substitute"
[value]=
"userRest.id"
>
[value]=
"userRest.id"
>
...
...
This diff is collapsed.
Click to expand it.
src/frontend/app/profile/profile.component.ts
+
17
−
0
View file @
9b569e6a
...
@@ -352,6 +352,7 @@ export class ProfileComponent implements OnInit {
...
@@ -352,6 +352,7 @@ export class ProfileComponent implements OnInit {
this
.
drawSample
();
this
.
drawSample
();
}
}
if
(
e
.
index
===
2
)
{
if
(
e
.
index
===
2
)
{
this
.
refreshInfoSubstitute
();
this
.
swithToAdmin
();
this
.
swithToAdmin
();
}
}
}
}
...
@@ -404,4 +405,20 @@ export class ProfileComponent implements OnInit {
...
@@ -404,4 +405,20 @@ export class ProfileComponent implements OnInit {
this
.
http
.
patch
(
'
../rest/users/
'
+
this
.
authService
.
user
.
id
+
'
/signatures/substituted
'
,
{
'
signatures
'
:
this
.
signaturesService
.
signaturesList
})
this
.
http
.
patch
(
'
../rest/users/
'
+
this
.
authService
.
user
.
id
+
'
/signatures/substituted
'
,
{
'
signatures
'
:
this
.
signaturesService
.
signaturesList
})
.
subscribe
();
.
subscribe
();
}
}
refreshUserList
(
opened
:
any
)
{
if
(
opened
)
{
this
.
http
.
get
(
'
../rest/users
'
)
.
subscribe
((
data
:
any
)
=>
{
this
.
usersList
=
data
.
users
;
});
}
}
refreshInfoSubstitute
()
{
this
.
http
.
get
(
'
../rest/users/
'
+
this
.
authService
.
user
.
id
+
'
/substitute
'
)
.
subscribe
((
data
:
any
)
=>
{
this
.
authService
.
user
.
substitute
=
data
.
substitute
;
});
}
}
}
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