Skip to content

Commit

Permalink
feat(): add user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
develite98 committed Dec 6, 2023
1 parent 53e6d9a commit ef61ee3
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class MainSideMenuComponent {
public showSetting() {
this.dialogService.open(SettingDialogComponent, {
width: 'fit-content',
id: 'setting-pannel',
id: 'top-align-modal',
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<div class="main-menu">
<div class="mix-menu-item"
(click)="hide()">
(click)="hide(); userProfile()">
<span class="mix-icon me-3">manage_accounts</span> {{ 'Managed Account' }}
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import { Router } from '@angular/router';
import { UserListVm } from '@mixcore/lib/model';
import { AuthService } from '@mixcore/share/auth';
import { ModalService } from '@mixcore/ui/modal';
import { DialogService } from '@ngneat/dialog';
import { TippyDirective } from '@ngneat/helipopper';
import { TuiBadgeModule } from '@taiga-ui/kit';
import { UserAvatarComponent } from '../../user-avatar/user-avatar.component';
import { UserProfileDialofComponent } from '../../user-profile-dialof/user-profile-dialof.component';
import { ApplicationListComponent } from '../application-list/application-list.component';

@Component({
Expand All @@ -35,6 +37,7 @@ export class UserNavigationComponent {
public modal = inject(ModalService);
public router = inject(Router);
public userInfo?: UserListVm;
public dialog = inject(DialogService);

constructor() {
this.authService.user$.pipe(takeUntilDestroyed()).subscribe((v) => {
Expand All @@ -55,4 +58,12 @@ export class UserNavigationComponent {
});
});
}

public userProfile(): void {
this.dialog.open(UserProfileDialofComponent, {
windowClass: UserProfileDialofComponent.windowClass,
width: '80vw',
height: '80vh',
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<div class="mix-dialog h-100">
<div class="container-fluid h-100">
<div class="row h-100">
<div class="col-md-3 border-right"
style="background-color: #071a2b; color: #fff">
<div class="d-flex flex-column align-items-center text-center p-3 py-5">
<img class="rounded-circle mt-5"
src="https://st3.depositphotos.com/15648834/17930/v/600/depositphotos_179308454-stock-illustration-unknown-person-silhouette-glasses-profile.jpg"
width="150px"
height="150px">
<span class="font-weight-bold text-l mt-2">Mr. User Name</span>
</div>
</div>

<div class="col-md-5 p-4 pb-2 border-right">
<div class="p-3 d-flex flex-column h-100">
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="text-right">Profile Settings</h4>
</div>
<div class="row mt-2">
<div class="col-md-6">
<label class="text-sub text-500 mb-1">Name</label>
<mix-input placeHolder="first name"></mix-input>
</div>
<div class="col-md-6">
<label class="text-sub text-500 mb-1">Surname</label>
<mix-input placeHolder="sur name"></mix-input>
</div>
<div class="col-md-12 mt-3">
<label class="text-sub text-500 mb-1">Mobile Number</label>
<mix-input placeHolder="enter phone number"></mix-input>
</div>
<div class="col-md-12 mt-3">
<label class="text-sub text-500 mb-1">Email ID</label>
<mix-input placeHolder="enter email id"></mix-input>
</div>
<div class="col-md-12 mt-3">
<label class="text-sub text-500 mb-1">Education</label>
<mix-input placeHolder="education"></mix-input>
</div>
<div class="col-md-6 mt-3">
<label class="text-sub text-500 mb-1">Country</label>
<mix-input placeHolder="country"
value> </mix-input>
</div>
<div class="col-md-6 mt-3">
<label class="text-sub text-500 mb-1">State/Region</label>
<mix-input placeHolder="state"
value> </mix-input>
</div>
</div>
<div class="mt-auto d-flex gap-2 justify-content-end">
<mix-button type="outline"
(click)="dialogRef.close()">
Cancel
</mix-button>

<mix-button (click)="dialogRef.close()"> Save Profile </mix-button>
</div>
</div>
</div>
<div class="col-md-4 p-4">
<div class="p-3 pt-5">
<div class="col-md-12">
<label class="text-sub text-500 mb-1">Experience in Designing</label>
<mix-input placeHolder="experience"> </mix-input>
</div>
<br>
<div class="col-md-12">
<label class="text-sub text-500 mb-1">Additional Details</label>
<mix-input placeHolder="additional details"> </mix-input>
</div>
</div>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.border-right {
border-right: 1px solid var(--border-color-default);
}

:host {
display: block;
height: 100%;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { MixButtonComponent } from '@mixcore/ui/button';
import { MixInputComponent } from '@mixcore/ui/input';
import { DialogRef } from '@ngneat/dialog';

@Component({
selector: 'user-profile-dialof',
standalone: true,
imports: [CommonModule, MixInputComponent, MixButtonComponent],
templateUrl: './user-profile-dialof.component.html',
styleUrl: './user-profile-dialof.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UserProfileDialofComponent {
public static windowClass = 'top-align-modal';
public dialogRef = inject(DialogRef);
}

1 comment on commit ef61ee3

@vercel
Copy link

@vercel vercel bot commented on ef61ee3 Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.