Skip to content

Commit 8a3e1ca

Browse files
Merge pull request #237 from sohailamjad12/spv_single_select
Karma Quest: single select reassign new ui
2 parents 8f83994 + ef1a39a commit 8a3e1ca

File tree

7 files changed

+692
-8
lines changed

7 files changed

+692
-8
lines changed

project/ws/app/src/lib/routes/home/home.module.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ import { RequestCopyDetailsComponent } from './routes/request/request-copy-detai
8989
import { CompetencyViewComponent } from './routes/request/competency-view/competency-view.component'
9090
import { ConfirmationPopupComponent } from './routes/request/confirmation-popup/confirmation-popup.component'
9191
import { AssignListPopupComponent } from './routes/request/assign-list-popup/assign-list-popup.component'
92+
import { SingleAssignPopupComponent } from './routes/request/single-assign-popup/single-assign-popup.component'
9293
@NgModule({
9394
declarations: [
9495
HomeComponent,
@@ -130,7 +131,8 @@ import { AssignListPopupComponent } from './routes/request/assign-list-popup/ass
130131
RequestCopyDetailsComponent,
131132
CompetencyViewComponent,
132133
ConfirmationPopupComponent,
133-
AssignListPopupComponent
134+
AssignListPopupComponent,
135+
SingleAssignPopupComponent
134136
],
135137
imports: [
136138
CommonModule,
@@ -198,7 +200,8 @@ import { AssignListPopupComponent } from './routes/request/assign-list-popup/ass
198200
CompetencyViewComponent,
199201
ConfirmationPopupComponent,
200202
SuccessComponent,
201-
AssignListPopupComponent],
203+
AssignListPopupComponent,
204+
SingleAssignPopupComponent],
202205
providers: [
203206
// CKEditorService,
204207
// LoaderService,

project/ws/app/src/lib/routes/home/routes/request/all-request/all-request.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h2>{{'Content Request'}}</h2>
77
<mat-card class="status-card" *ngFor="let card of statusCards">
88
<div class="card-content">
99
<div class="status-title">
10-
<span class="title-text"> {{ card?.value=== statusKey.fullfill ? 'Fullfilled' : card?.value }}</span>
10+
<span class="title-text"> {{ card?.value=== statusKey.fullfill ? 'Fulfilled' : card?.value }}</span>
1111
<mat-icon class="info-icon cursor-pointer" [matTooltip]="card?.message">info</mat-icon>
1212
</div>
1313
<div class="status-value">{{ card?.count ? card?.count : 0 }}</div>

project/ws/app/src/lib/routes/home/routes/request/all-request/all-request.component.ts

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Router } from '@angular/router'
55
import { RequestServiceService } from '../request-service.service'
66
import { AssignListPopupComponent } from '../assign-list-popup/assign-list-popup.component'
77
import { ConfirmationPopupComponent } from '../confirmation-popup/confirmation-popup.component'
8+
import { SingleAssignPopupComponent } from '../single-assign-popup/single-assign-popup.component'
89
export enum statusValue {
910
Assigned= 'Assigned',
1011
Unassigned = 'Unassigned',
@@ -186,11 +187,12 @@ export class AllRequestComponent implements OnInit {
186187
this.openAssignlistPopup(item)
187188
}
188189
else {
189-
this.queryParams = {
190-
id: item.demand_id,
191-
name: 'reassign',
192-
}
193-
this.router.navigate(['/app/home/request-details'], { queryParams: this.queryParams })
190+
this.openSingleReassignPopup(item)
191+
// this.queryParams = {
192+
// id: item.demand_id,
193+
// name: 'reassign',
194+
// }
195+
// this.router.navigate(['/app/home/request-details'], { queryParams: this.queryParams })
194196
}
195197
break
196198
case 'copyContent':
@@ -204,6 +206,29 @@ export class AllRequestComponent implements OnInit {
204206

205207
}
206208

209+
210+
openSingleReassignPopup(item:any){
211+
this.dialogRef = this.dialog.open(SingleAssignPopupComponent, {
212+
disableClose: false,
213+
width: '90%',
214+
height: '70vh',
215+
data: item,
216+
autoFocus: false,
217+
})
218+
219+
this.dialogRef.afterClosed().subscribe((_res: any) => {
220+
if (_res && _res.data === 'confirmed') {
221+
setTimeout(()=>{
222+
this.getRequestList()
223+
},1000)
224+
225+
this.snackBar.open('Re-assign submitted Successfully')
226+
} else {
227+
// this.snackBar.open('error')
228+
}
229+
})
230+
}
231+
207232
navigateToDetails(id: any) {
208233
this.queryParams = {
209234
id,
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<div class="main-container">
2+
<div class="full-table-container" *ngIf="requestTypeData?.length > 0">
3+
<form [formGroup]="requestForm">
4+
<div class="header-section">
5+
<div class="title">
6+
<h2 class="titleText">{{'Re-Assign'}}</h2>
7+
</div>
8+
<div class="actions">
9+
<button mat-button type="button" class="search-btn" [ngClass]="{'disableBtn': !requestForm.valid}" (click)="onSubmitAssign()" [disabled]="!requestForm.valid" >{{submitAssign}}</button>
10+
11+
<button mat-button class="cancel" (click)="cancel()">
12+
<span>Cancel</span>
13+
</button>
14+
15+
</div>
16+
17+
</div>
18+
<!-- <div class="input-group rounded search-btns">
19+
<input type="search" class="form-control rounded search-int" formControlName="orgSearch" placeholder="Search" aria-label="Search" (keyup)="searchText('orgSearch')" aria-describedby="search-addon" />
20+
<span class="input-group-text border-0" id="search-addon">
21+
<i class="fas fa-search"></i>
22+
</span>
23+
</div> -->
24+
25+
<mat-radio-group formControlName="assignee">
26+
<div class="nav-container">
27+
<div class="sidenav-content">
28+
<div class="table-class">
29+
<table mat-table [dataSource]="dataSource">
30+
<ng-container matColumnDef="select">
31+
<th mat-header-cell *matHeaderCellDef class="row-heading radio-width"></th>
32+
<td mat-cell class="title-class" *matCellDef="let provider">
33+
<mat-radio-button [value]="provider" ></mat-radio-button>
34+
</td>
35+
</ng-container>
36+
37+
<ng-container matColumnDef="name">
38+
<th mat-header-cell *matHeaderCellDef class="row-heading">Provider Name</th>
39+
<td mat-cell class="title-class" *matCellDef="let provider">{{ provider?.orgName }}</td>
40+
</ng-container>
41+
42+
43+
<tr mat-header-row *matHeaderRowDef="displayedColumns" class="table-row-data"></tr>
44+
<tr mat-row *matRowDef="let row; columns: displayedColumns" [ngClass]="{'row-bg':row === this.requestTypeData[0]}"></tr>
45+
</table>
46+
<!-- <mat-paginator [pageSize]=5 [length]="this.requestTypeData?.length" [pageSizeOptions]="[5,10,20]"
47+
(page)="onChangePage($event)"></mat-paginator> -->
48+
<mat-paginator [pageSizeOptions]="[5,10,20]" showFirstLastButtons
49+
></mat-paginator>
50+
51+
</div>
52+
</div>
53+
</div>
54+
</mat-radio-group>
55+
</form>
56+
</div>
57+
</div>
58+

0 commit comments

Comments
 (0)