-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(profile): add profile image and fix bugs
* feat(profile): add profile header and image * fix(test): fix new tests * fix(profile): bind user info * fix(test): fix test * feat(test): add tests for manage-account * fix(profile): fix comments * fix(profile): connect to back and fix tests * fix(data-analysis): show node information in graph * fix(manage-user): fixed username , select role on edit by default * fix(test): fixed username Change to userName --------- Co-authored-by: Mojtaba Erfan Rad <[email protected]>
- Loading branch information
1 parent
79e42c8
commit 82a3585
Showing
22 changed files
with
631 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
144 changes: 73 additions & 71 deletions
144
src/app/user/components/dashboard/manage-account/manage-account.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,76 @@ | ||
<app-dashboard-header [title]="'Manage Account'"></app-dashboard-header> | ||
|
||
<div class="container"> | ||
<app-card class="form"> | ||
<form | ||
[formGroup]="myForm" | ||
action="" | ||
method="post" | ||
class="add-user-form" | ||
(submit)="onSubmit()" | ||
> | ||
<mat-form-field class="form-field"> | ||
<mat-label>First Name</mat-label> | ||
<input | ||
matInput | ||
type="text" | ||
name="firstName" | ||
id="firstName" | ||
formControlName="firstName" | ||
(focus)="focusedField = 'firstName'" | ||
/> | ||
</mat-form-field> | ||
<mat-form-field class="form-field"> | ||
<mat-label>Last Name</mat-label> | ||
<input | ||
matInput | ||
type="text" | ||
name="lastName" | ||
id="lastName" | ||
formControlName="lastName" | ||
(focus)="focusedField = 'lastName'" | ||
/> | ||
</mat-form-field> | ||
<mat-form-field class="form-field"> | ||
<mat-label>Email</mat-label> | ||
<input | ||
matInput | ||
type="email" | ||
name="email" | ||
id="email" | ||
formControlName="email" | ||
(focus)="focusedField = 'email'" | ||
/> | ||
</mat-form-field> | ||
<mat-form-field class="form-field"> | ||
<mat-label>Phone Number</mat-label> | ||
<input | ||
matInput | ||
type="tel" | ||
name="phoneNumber" | ||
id="phoneNumber" | ||
formControlName="phoneNumber" | ||
(focus)="focusedField = 'phoneNumber'" | ||
/> | ||
</mat-form-field> | ||
<div class="btn_container"> | ||
<button class="btn" type="submit" mat-flat-button>Update</button> | ||
<button | ||
mat-stroked-button | ||
class="btn" | ||
type="button" | ||
(click)="resetUserInfo()" | ||
> | ||
Reset | ||
</button> | ||
</div> | ||
</form> | ||
</app-card> | ||
<app-validation-status | ||
class="validation" | ||
[myForm]="myForm" | ||
[fields]="validationFields" | ||
></app-validation-status> | ||
<app-profile-header [userInfo]="userInfo"></app-profile-header> | ||
<div class="info-container"> | ||
<app-card class="form"> | ||
<form | ||
[formGroup]="myForm" | ||
action="" | ||
method="post" | ||
class="add-user-form" | ||
(submit)="onSubmit()" | ||
> | ||
<mat-form-field class="form-field"> | ||
<mat-label>First Name</mat-label> | ||
<input | ||
matInput | ||
type="text" | ||
name="firstName" | ||
id="firstName" | ||
formControlName="firstName" | ||
(focus)="focusedField = 'firstName'" | ||
/> | ||
</mat-form-field> | ||
<mat-form-field class="form-field"> | ||
<mat-label>Last Name</mat-label> | ||
<input | ||
matInput | ||
type="text" | ||
name="lastName" | ||
id="lastName" | ||
formControlName="lastName" | ||
(focus)="focusedField = 'lastName'" | ||
/> | ||
</mat-form-field> | ||
<mat-form-field class="form-field"> | ||
<mat-label>Email</mat-label> | ||
<input | ||
matInput | ||
type="email" | ||
name="email" | ||
id="email" | ||
formControlName="email" | ||
(focus)="focusedField = 'email'" | ||
/> | ||
</mat-form-field> | ||
<mat-form-field class="form-field"> | ||
<mat-label>Phone Number</mat-label> | ||
<input | ||
matInput | ||
type="tel" | ||
name="phoneNumber" | ||
id="phoneNumber" | ||
formControlName="phoneNumber" | ||
(focus)="focusedField = 'phoneNumber'" | ||
/> | ||
</mat-form-field> | ||
<div class="btn_container"> | ||
<button class="btn" type="submit" mat-flat-button>Update</button> | ||
<button | ||
mat-stroked-button | ||
class="btn" | ||
type="button" | ||
(click)="resetUserInfo()" | ||
> | ||
Reset | ||
</button> | ||
</div> | ||
</form> | ||
</app-card> | ||
<app-validation-status | ||
class="validation" | ||
[myForm]="myForm" | ||
[fields]="validationFields" | ||
></app-validation-status> | ||
</div> | ||
</div> |
38 changes: 22 additions & 16 deletions
38
src/app/user/components/dashboard/manage-account/manage-account.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
.add-user-form { | ||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
.container { | ||
width: 100%; | ||
display: flex; | ||
gap: 1rem; | ||
.add-user-form { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
.info-container { | ||
width: 100%; | ||
display: flex; | ||
gap: 1rem; | ||
|
||
.form { | ||
width: 50%; | ||
.form { | ||
width: 50%; | ||
|
||
.btn_container { | ||
display: flex; | ||
gap: 1rem; | ||
.btn_container { | ||
display: flex; | ||
gap: 1rem; | ||
|
||
.btn { | ||
width: 25%; | ||
.btn { | ||
width: 25%; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.validation { | ||
width: 50%; | ||
.validation { | ||
width: 50%; | ||
} | ||
} | ||
} |
Oops, something went wrong.