Skip to content

Commit 7b4060d

Browse files
Merge pull request #246 from sohailamjad12/issue_spv
Karma Quest:spv portal bug fixes
2 parents 8c0ab06 + a5709bb commit 7b4060d

File tree

6 files changed

+49
-8
lines changed

6 files changed

+49
-8
lines changed

project/ws/app/src/lib/routes/home/routes/request/assign-list-popup/assign-list-popup.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ <h2 class="titleText">{{assignText}}</h2>
4343
<td mat-cell class="title-class" *matCellDef="let provider">{{ provider?.turnAroundTime ? provider?.turnAroundTime : '_' }}</td>
4444
</ng-container>
4545

46-
<tr mat-header-row *matHeaderRowDef="displayedColumns" class="table-row-data"></tr>
47-
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
46+
<tr mat-header-row *matHeaderRowDef="displayedColumns" class="table-row-data" ></tr>
47+
<tr mat-row *matRowDef="let row; columns: displayedColumns" [ngClass]="{'row-bg':row === this.providerList[0]}"></tr>
4848
</table>
4949
<mat-paginator [pageSize]="pageSize" [length]="this.providerCount" [pageSizeOptions]="[5,10,20]"
5050
(page)="onChangePage($event)"></mat-paginator>

project/ws/app/src/lib/routes/home/routes/request/assign-list-popup/assign-list-popup.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ table tr .cdk-column-details {
112112
width: 40%;
113113
padding: 0 10% 0 0px !important
114114
}
115+
.row-bg {
116+
background-color: rgba(0, 0, 0, 0.16) !important;
117+
pointer-events: none !important;
118+
}
115119

116120
.action-btn-view {
117121
color: #1B4CA1;

project/ws/app/src/lib/routes/home/routes/request/assign-list-popup/assign-list-popup.component.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,20 @@ export class AssignListPopupComponent implements OnInit {
4747
const assignOrgData = this.providerList.find(option =>
4848
this.data.assignedProvider === option.orgName
4949
)
50-
if (assignOrgData) {
51-
this.requestForm.controls['assignee'].setValue(assignOrgData)
50+
let position = this.providerList.indexOf(assignOrgData)
51+
52+
//check if the element exists in the array
53+
if(position > -1){
54+
// Remove the element from its position
55+
let selectedData= this.providerList.splice(position, 1)[0]
56+
57+
// Add the removed element to the beginning of the array
58+
this.providerList.unshift(selectedData)
5259
}
60+
// if (assignOrgData) {
61+
// this.requestForm.controls['assignee'].setValue(assignOrgData)
62+
// }
63+
5364
}
5465
}
5566

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,13 @@
221221
</div>
222222
</div>
223223
<div class="title-name" *ngIf="isBroadCast">
224-
<div class="fonm-element-label label-text">Preffered Providers <span class="required"></span></div>
224+
<div class="fonm-element-label label-text">Preffered Providers <span class="required"></span>
225+
<span class="tooltip-span">
226+
<mat-icon class="info-icon cursor-pointer" [matTooltip]="'You can select upto 5 preferred provider'"
227+
matTooltipClass="tooltip-sec">info</mat-icon>
228+
229+
</span>
230+
</div>
225231
<div class="">
226232
<mat-form-field appearance="outline" class="w-full placeholder-text field-height" fxFlex="40">
227233
<mat-select placeholder="Choose the provider" (openedChange)="openedChange($event,'providerText')" formControlName="providers" multiple>
@@ -253,7 +259,7 @@
253259
</div>
254260

255261
<div class="flex flex-start margin-top-l" *ngIf="!isHideData">
256-
<button mat-button class="submit-btn margin-right-xs" type="button" (click)="showConformationPopUp()" [disabled]="!requestForm.valid">Submit</button>
262+
<button mat-button class="submit-btn margin-right-xs" type="button" (click)="submit()" [disabled]="!requestForm.valid">Submit</button>
257263
<button mat-button class="close-btn " (click)="navigateBack()" type="button" >Cancel</button>
258264

259265
</div>

project/ws/app/src/lib/routes/home/routes/request/request-copy-details/request-copy-details.component.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
font-weight: 700;
2222
font-size: 14px;
2323
line-height: 21px;
24+
.tooltip-span {
25+
position: relative;
26+
padding-left: 7px;
27+
.info-icon {
28+
position: absolute;
29+
font-size: 19px;
30+
top: -1px;
31+
}
32+
}
2433
}
2534
.learning-section {
2635
padding: 16px;
@@ -163,4 +172,10 @@
163172
padding: 0 4px;
164173
}
165174
}
175+
}
176+
::ng-deep .tooltip-sec {
177+
background-color: 000000 !important;
178+
font-size: 12px !important;
179+
font-family: 500 !important;
180+
color: white !important;
166181
}

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,12 @@ this.dialogRefs.afterClosed().subscribe((_res: any) => {
589589
this.snackBar.open('Request submitted successfully ')
590590
}
591591
},1000)
592-
}
592+
},
593+
(error:any) => {
594+
this.dialogRefs.close({ error })
595+
this.snackBar.open('Request Failed')
596+
597+
}
593598
)
594599
}
595600

@@ -607,7 +612,7 @@ this.dialogRefs.afterClosed().subscribe((_res: any) => {
607612
dialogData['icon'] = 'accept_icon'
608613
dialogData['title'] = 'Processing your request'
609614
dialogData['subTitle'] = `Wait a second , your request is processing………`
610-
dialogData['primaryAction'] = 'Redirecting....'
615+
dialogData['primaryAction'] = 'Successfully created....'
611616
break
612617
}
613618

0 commit comments

Comments
 (0)