Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
Grievance-Redressal-App
Commits
5014d193
Commit
5014d193
authored
1 year ago
by
Roopashree L
Browse files
Options
Download
Patches
Plain Diff
update user request changes
parent
a45a1154
main
UAT
dev_fixes_v2
dev_issue_fixes
dev_issue_fixes_v1
development
file_upload_fixes
login_flow_integration
responsiveness_addition
revert-133-environment_configs
revert-59-dev_issue_fixes
uat-release-1.0
uat_issue_fix
3 merge requests
!59
Dev issue fixes
,
!58
Dev Issues
,
!57
DEV issue fixes
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/modules/user-modules/components/user-form/user-form.component.html
+1
-1
...ser-modules/components/user-form/user-form.component.html
src/app/modules/user-modules/components/user-form/user-form.component.ts
+4
-1
.../user-modules/components/user-form/user-form.component.ts
src/app/user-profile/user-profile.component.ts
+13
-11
src/app/user-profile/user-profile.component.ts
with
18 additions
and
13 deletions
+18
-13
src/app/modules/user-modules/components/user-form/user-form.component.html
+
1
−
1
View file @
5014d193
...
...
@@ -42,7 +42,7 @@
<h4>
Email Id
</h4>
<mat-form-field
appearance=
"outline"
class=
"text-class"
>
<mat-label>
Email id
</mat-label>
<input
matInput
placeholder=
"pat@example.com"
[readonly]=
"isEditUser === true? true: false"
formControlName=
"username"
required
>
<input
matInput
placeholder=
"pat@example.com"
formControlName=
"username"
required
>
<mat-error
*ngIf=
"username && username.invalid && username.touched"
>
please Enter email Id
</mat-error>
</mat-form-field>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/user-modules/components/user-form/user-form.component.ts
+
4
−
1
View file @
5014d193
...
...
@@ -142,13 +142,16 @@ export class UserFormComponent implements OnInit {
request
:
{
firstName
,
lastName
,
enabled
:
status
===
'
Active
'
?
true
:
false
,
attributes
:
{
departmentName
:
'
grievances
'
,
phoneNumber
:
phone
,
Role
:
role
// not sure if this can be updated
Role
:
role
},
}
}
console
.
log
(
requestObj
)
console
.
log
(
this
.
userDetails
);
this
.
isProcessing
=
true
;
this
.
userService
.
updateUser
(
requestObj
).
subscribe
({
next
:
(
res
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/app/user-profile/user-profile.component.ts
+
13
−
11
View file @
5014d193
...
...
@@ -49,7 +49,6 @@ export class UserProfileComponent {
next
:
(
res
)
=>
{
this
.
userDetails
=
res
.
responseData
;
if
(
this
.
userDetails
)
{
console
.
log
(
this
.
userDetails
);
this
.
setUserFormData
();
}
},
...
...
@@ -106,19 +105,22 @@ export class UserProfileComponent {
}
onSubmit
()
{
console
.
log
(
this
.
userForm
.
value
);
const
updateUserRequest
=
{
userName
:
this
.
userDetails
.
id
,
const
{
firstName
,
lastName
,
phoneNumber
,
username
}
=
this
.
userForm
.
value
;
const
{
id
,
attributes
,
enabled
}
=
this
.
userDetails
;
const
requestObj
=
{
userName
:
id
,
request
:
{
firstName
:
this
.
userForm
.
value
.
firstName
,
lastName
:
this
.
userForm
.
value
.
lastName
,
email
:
this
.
userForm
.
value
.
emailId
,
attributes
:
{
phoneNumber
:
this
.
userForm
.
value
.
phoneNumber
}
firstName
,
lastName
,
enabled
:
enabled
,
attributes
:
{
departmentName
:
attributes
.
departmentNAme
[
0
],
phoneNumber
:
phoneNumber
,
Role
:
attributes
.
Role
[
0
]
},
}
}
this
.
userService
.
updateUser
(
updateUserR
equest
).
subscribe
({
this
.
userService
.
updateUser
(
r
equest
Obj
).
subscribe
({
next
:(
res
)
=>
{
console
.
log
(
res
);
this
.
toastrService
.
showToastr
(
'
User details updated successfully
'
,
'
Success
'
,
'
success
'
,
''
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets