Skip to content

Commit

Permalink
Merge pull request #20 from KB-iGOT/mentorship-changes
Browse files Browse the repository at this point in the history
Mentorship changes
  • Loading branch information
vishnubansaltarento authored Sep 1, 2024
2 parents e51e4b1 + 571ec4a commit 603c2c5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ export class UserCardComponent implements OnInit, OnChanges, AfterViewChecked {
currentUserRole = ''
checked = false
constructor(private usersSvc: UsersService, private roleservice: RolesService,
private dialog: MatDialog, private approvalSvc: ApprovalsService,
private route: ActivatedRoute, private snackBar: MatSnackBar,
private events: EventService,
private datePipe: DatePipe,
private cdr: ChangeDetectorRef) {
private dialog: MatDialog, private approvalSvc: ApprovalsService,
private route: ActivatedRoute, private snackBar: MatSnackBar,
private events: EventService,
private datePipe: DatePipe,
private cdr: ChangeDetectorRef) {
this.updateUserDataForm = new FormGroup({
designation: new FormControl('', []),
group: new FormControl('', [Validators.required]),
Expand Down Expand Up @@ -1056,7 +1056,7 @@ export class UserCardComponent implements OnInit, OnChanges, AfterViewChecked {
if (this.activeTab === 'verified') {
this.memberAlertMessage = 'Remove this user from mentor role?'
} else {
this.memberAlertMessage = 'Remove this user from mentor role? The user will move to the Verified tab.'
this.memberAlertMessage = 'Remove this user from the mentor role? You can reverse this in the All Verified Users tab.'
}

}
Expand All @@ -1067,7 +1067,21 @@ export class UserCardComponent implements OnInit, OnChanges, AfterViewChecked {
if (v) {
this.saveMentorProfile(user, event)
} else {
event.source.checked = true
if (this.activeTab === 'verified') {
if (event.checked) {
event.source.checked = false
} else {
event.source.checked = true
}
}
if (this.activeTab === 'mentor') {
if (event.checked) {
event.source.checked = false
} else {
event.source.checked = true
}
}

}
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
</mat-card-header> -->
<mat-card-title class="flex-4 mobile-margin text-capitalize margin-bottom-l">
<span class="h-600-s-20-m color-87">Users</span>
<span class="h-600-s-20-m color-87">Mentor management</span>
</mat-card-title>
<mat-card class="mb-8">
<mat-card-content class="flex gap-10">
Expand Down Expand Up @@ -58,12 +58,14 @@
<a routerLink="/app/home/mentor-manage/verified" routerLinkActive="router-link-active" class="filter-option"
[ngClass]="{'ws-mat-accent-border-active' : currentFilter === 'verified','ws-mat-accent-border font-medium':currentFilter !== 'verified'}"
mat-button (click)="filter('verified'); tabTelemetry('verified', 0)" role="button">All Verified <span
*ngIf="verifiedUsersDataCount === 1">User</span> <span *ngIf="verifiedUsersDataCount > 1">Users</span>
*ngIf="verifiedUsersDataCount === 1 || verifiedUsersDataCount === 0">User</span> <span
*ngIf="verifiedUsersDataCount > 1">Users</span>
({{verifiedUsersDataCount}})</a>
<a routerLink="/app/home/mentor-manage/mentor" routerLinkActive="router-link-active" class="filter-option"
[ngClass]="{'ws-mat-accent-border-active' : currentFilter === 'mentor','ws-mat-accent-border font-medium':currentFilter !== 'verified'}"
mat-button (click)="filter('mentor'); tabTelemetry('mentor', 0)" role="button">Assigned <span
*ngIf="mentorUsersDataCount === 1">Mentor</span> <span *ngIf="mentorUsersDataCount > 1">Mentors</span>
*ngIf="mentorUsersDataCount === 1 || mentorUsersDataCount === 0">Mentor</span> <span
*ngIf="mentorUsersDataCount > 1">Mentors</span>
({{mentorUsersDataCount}})</a>
<!-- <a routerLink="/app/home/mentor-manage/non-mentor" routerLinkActive="router-link-active" class="filter-option"
[ngClass]="{'ws-mat-accent-border-active' : currentFilter === 'non-mentor','ws-mat-accent-border font-medium':currentFilter !== 'verified'}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,17 @@ a:not([href]):not([tabindex]) {
.no-border {
border: 0;
box-shadow: none !important;
}

::ng-deep .filter {
.mat-button .mat-button-wrapper>*, .mat-fab .mat-button-wrapper>*, .mat-flat-button .mat-button-wrapper>*, .mat-icon-button .mat-button-wrapper>*, .mat-mini-fab .mat-button-wrapper>*, .mat-raised-button .mat-button-wrapper>*, .mat-stroked-button .mat-button-wrapper>* {
vertical-align: baseline !important;
}
.mat-button, .mat-raised-button, .mat-icon-button, .mat-stroked-button, .mat-flat-button, .mat-fab, .mat-mini-fab {
font-weight: normal;
}

.ws-mat-accent-border-active {
font-weight: 700 !important;
}
}

0 comments on commit 603c2c5

Please sign in to comment.