Skip to content

Commit

Permalink
Merge pull request #533 from NandiniAV/cbrelease-4.8.15
Browse files Browse the repository at this point in the history
Cbrelease 4.8.15
  • Loading branch information
vishnubansaltarento authored Jun 19, 2024
2 parents 79032d4 + def402b commit 8a90913
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="rsearch flex w-full">
<mat-icon
class="color-60 search-icon mat-icon notranslate material-icons mat-icon-no-color">search</mat-icon>
<input class="sinput color-60 w-full" [(ngModel)]="searchText" (keyup)="searchData($event)" label=""
<input class="sinput color-60 w-full" [(ngModel)]="searchText" (keyup.enter)="searchData($event)" label=""
placeholder="Search" type="Standard" [ngClass]="{'disable': isContentLive}">
</div>
</div>
Expand Down Expand Up @@ -37,7 +37,7 @@
[ngClass]="{'disable': isContentLive}">Create user</button>
</div>
<div class="flex flex-end margin-right-s" *ngIf="isApprovals && showApproveALL">
<button mat-button type="button" class="search-btn" (click)="approveAll()"
<button mat-button type="button" class="search-btn" (click)="confirmApproval(approvalconfirm)"
[disabled]="disableApproveALL">Approve all requests</button>
</div>
<div class="flex flex-end" *ngIf="isApprovals && showBulkUpdate">
Expand All @@ -49,4 +49,28 @@
<div [hidden]="!filterVisibilityFlag" *ngIf="!isApprovals">
<ws-app-filter [from]="from" (toggleFilter)="hideFilter($event)"
[filterFacetsData]="filterFacetsData"></ws-app-filter>
</div>
</div>

<ng-template #approvalconfirm>
<div class="confirm-dialog text-center padding-l">
<mat-icon class="infoIcon orangeicon-dialog">error_outline</mat-icon>
<div mat-dialog-content i18n class="margin-top-xs blue-text">
Are you sure you want to apporve all the requests of this page?
</div>
<div class="mat-caption margin-top-xs">Do you want to proceed?</div>
<div mat-dialog-actions class="flex-center margin-top-s">
<button mat-raised-button type="submit" [mat-dialog-close]="false"
class="margin-right-m btn-success btn-responsive cancelbtn">
<span i18n>
No
</span>
</button>
<button mat-raised-button type="submit" [mat-dialog-close]="true"
class="btn-success btn-responsive successbtn">
<span class="text-white" i18n>
Yes
</span>
</button>
</div>
</div>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,22 @@
opacity: 0.3;
pointer-events: none;
cursor: none;
}

.orangeicon-dialog {
color: #e99e38;
vertical-align: middle;
height: 45px !important;
font-size: 36px;
}

.infoicon {
font-size: 18px !important;
width: 20px;
height: 20px;
vertical-align: bottom;
margin-left: 5px;
}
.blue-text {
color:#1B4CA1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import _ from 'lodash'
/* tslint:enable */
import { LoaderService } from '../../../../../../../../../src/app/services/loader.service'
import { UsersService } from '../../../users/services/users.service'
import { MatDialog } from '@angular/material'
@Component({
selector: 'ws-app-searchuser',
templateUrl: './search.component.html',
Expand All @@ -31,6 +32,7 @@ export class SearchComponent implements OnInit {
sortOrder = ''
constructor(
// private route: ActivatedRoute,
private dialog: MatDialog,
private usersSvc: UsersService,
private loadingService: LoaderService
) { }
Expand Down Expand Up @@ -138,5 +140,16 @@ export class SearchComponent implements OnInit {
this.handleapproveAll.emit()
}

confirmApproval(template: any) {
const dialog = this.dialog.open(template, {
width: '500px',
})
dialog.afterClosed().subscribe((v: any) => {
if (v) {
this.handleapproveAll.emit()
}
})
}

sort() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@
<div class="inner-body">
Primary Details <mat-icon class="ws-mat-black40-text custominfo">info_outline</mat-icon>
<p class="float-right mat-body-2" *ngIf="user?.profileDetails?.profileStatus === 'VERIFIED'">
<mat-slide-toggle (click)="markStatus('NOT-VERIFIED', user)">Mark this user as
<mat-slide-toggle (change)="confirmUserRequest(updateconfirm,'NOT-VERIFIED', user, $event)">Mark this user
as
non-verified</mat-slide-toggle>
</p>
<p class="float-right mat-body-2" *ngIf="user?.profileDetails?.profileStatus === 'NOT-VERIFIED'">
<mat-slide-toggle (click)="markStatus('NOT-MY-USER', user)" [checked]="true">This is my
<mat-slide-toggle (change)="confirmUserRequest(updateconfirm,'NOT-MY-USER', user, $event)"
[checked]="true">This is my
user</mat-slide-toggle>
</p>
<div class="flex flex-row margin-top-m">
Expand Down Expand Up @@ -832,7 +834,7 @@
<div class="mat-caption margin-top-xs">Note: The user will be shifted to non-verified tab</div>
<div mat-dialog-actions class="flex-center margin-top-s">
<button mat-raised-button type="submit" [mat-dialog-close]="false"
class="margin-right-m btn-success btn-responsive cancelbtn">
class="margin-right-m btn-success btn-responsive cancelbtn">
<span i18n>
No
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,25 @@ export class UserCardComponent implements OnInit, OnChanges {
})
}

confirmUserRequest(template: any, status: any, data: any, event: any) {
data.enableToggle = true
const dialog = this.dialog.open(template, {
width: '500px',
})
dialog.afterClosed().subscribe((v: any) => {
if (v) {
this.markStatus(status, data)
data.enableToggle = false
} else {
if (status === 'NOT-MY-USER') {
event.source.checked = true
} else {
event.source.checked = false
}
}
})
}

confirmUpdate(template: any, updateUserDataForm: any, user: any, panel: any) {
const dialog = this.dialog.open(template, {
width: '500px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ export class ApprovalPendingComponent implements OnInit, OnDestroy {
}

fetchApprovals(sortValue: any) {
let sortedVal = {}
// let sortedVal = {}
if (!sortValue) {
sortedVal = { firstName: 'asc' }
// sortedVal = { firstName: 'asc' }
}
if (this.departName) {
const req = {
Expand All @@ -147,7 +147,7 @@ export class ApprovalPendingComponent implements OnInit, OnDestroy {
deptName: this.departName,
offset: this.currentOffset,
limit: this.limit,
sort_by: sortValue ? sortValue : sortedVal,
// sort_by: sortValue ? sortValue : sortedVal,

}
this.allTransfersData = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,17 @@
<div class="flex flex-row gap-6">
<div class="input-container">
<div class="label required mb-2">Role</div>
<div class="flex flex-col gap-4">
<div class="custom-roles">
<ng-container *ngFor="let role of masterData?.mdoRoles">
<div class="flex flex-row gap-4" *ngIf="role !== 'MDO_LEADER'">
<div class="flex-1">{{ role }}</div>
<div class="rolehead" *ngIf="role !== 'MDO_LEADER'">
<div class="roletitle">{{ role }}</div>
<mat-checkbox value="{{ role }}" #rolesCheckbox [checked]="role === 'PUBLIC'"
[disabled]="role === 'PUBLIC'" (change)="handleRolesCheck($event, role)"></mat-checkbox>
</div>
</ng-container>
</div>
</div>
<div class="input-container"></div>
<!-- <div class="input-container"></div> -->
</div>

<div class="flex flex-row gap-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,18 @@

::ng-deep .required-select .mat-form-field-subscript-wrapper {
margin-top: 20px;
}

.rolehead {
border: 1px solid #dedede !important;
border-radius: 4px !important;
margin: 0 12px 12px 0;
padding: 0.4em 0.7em;
display: inline-table;
font: 400 14px / 20px Lato !important;
}

.roletitle {
display: inline-block;
padding-right: 10px;
}

0 comments on commit 8a90913

Please sign in to comment.