Skip to content

Commit

Permalink
Merge pull request #235 from sohailamjad12/feature_ad
Browse files Browse the repository at this point in the history
Spv Portal Reassignment Provider
  • Loading branch information
vishnubansaltarento authored Jun 10, 2024
2 parents c086ec7 + a28c068 commit fa24e1a
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ <h2>{{'Content Request'}}</h2>
<ng-container matColumnDef="interests">
<th mat-header-cell *matHeaderCellDef>Interests</th>
<td mat-cell class="title-class" *matCellDef="let element">
<a class="action-btn-view" (click)="showInterestPopup()"
href="javascript:void(0)">{{element?.interestCount}}</a>
<a class="action-btn-view" *ngIf="element?.interestCount!== 0"
href="javascript:void(0)">{{element?.interestCount}}</a>
<a class="" *ngIf="element?.interestCount === 0"
href="javascript:void(0)">{{element?.requestType == 'Single' ? 'N/A' : element?.interestCount}}</a>
</td>
</ng-container>

Expand Down Expand Up @@ -90,7 +92,8 @@ <h2>{{'Content Request'}}</h2>
<button mat-menu-item *ngIf="element.status!== statusKey.Assigned && element.interestCount >0 && element.status!== statusKey.Inprogress && element.status!== statusKey.invalid" (click)="onClickMenu(element,'assignContent')">
<span>Assign</span>
</button>
<button *ngIf="element.status === statusKey.Assigned && element.status!== statusKey.Inprogress && element.status!== statusKey.invalid" mat-menu-item (click)="onClickMenu(element,'reAssignContent')">
<button *ngIf="element?.status === statusKey.Assigned && element?.status!== statusKey.Inprogress && element?.status!== statusKey.invalid "
mat-menu-item (click)="onClickMenu(element,'reAssignContent')">
<span> Re-Assign</span>
</button>
<button mat-menu-item (click)="onClickMenu(element,'copyContent')">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ table tr .cdk-column-RequestId {
}

table tr .cdk-column-assignee {
width: 17% !important;
width: 20% !important;
}

.action-btn-view {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ConfirmationPopupComponent } from '../confirmation-popup/confirmation-p
export enum statusValue {
Assigned= 'Assigned',
Unassigned = 'Unassigned',
Inprogress = 'Inprogress',
Inprogress = 'InProgress',
invalid = 'invalid',
}
@Component({
Expand Down Expand Up @@ -146,7 +146,17 @@ export class AllRequestComponent implements OnInit {
break
case 'reAssignContent':
// this.showConformationModal(_event.row, _event.action)
this.openAssignlistPopup(item)
// this.openAssignlistPopup(item)
if(item.requestType === 'Broadcast'){
this.openAssignlistPopup(item)
}
else {
this.queryParams = {
id: item.demand_id,
name: 'reassign',
}
this.router.navigate(['/app/home/request-details'], { queryParams: this.queryParams })
}
break
case 'copyContent':
this.queryParams = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</button>
</div> -->
<div class="flex flex-1 flex-row icon">
<img src="assets/icons/{{data?.icon}}.svg" />
<img src="/dashboard-assets/icons/radio_on.svg" />

</div>
<div class="flex flex-1 flex-row title">
Expand Down Expand Up @@ -36,7 +36,7 @@
{{data?.subTitle}}
</div>
<div class="flex flex-1 flex-row progress-icon">
<img src="assets/icons/{{data?.icon}}.svg" />
<img src="/dashboard-assets/icons/radio_on.svg" />

</div>
</div>
Expand All @@ -54,7 +54,7 @@
{{data?.subTitle}}
</div>
<div class="flex flex-1 flex-row progress-icon">
<img src="assets/icons/{{data?.icon}}.svg" />
<img src="/dashboard-assets/icons/radio_on.svg" />
</div>
<div mat-dialog-actions class="flex flex-1 flex-row action">
<button mat-button class="primary" type="button">{{data?.primaryAction}}</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ export class RequestCopyDetailsComponent implements OnInit {
this.requestForm.disable()
this.isHideData = true
}
else if(this.actionBtnName === 'reassign'){
this.requestForm.disable();
// this.isHideData = true;
this.requestForm.controls['assignee'].enable()
}
}

})
Expand Down Expand Up @@ -507,6 +512,9 @@ this.dialogRefs.afterClosed().subscribe((_res: any) => {
}

submit() {
if(this.demandId && this.actionBtnName === 'reassign'){
this.requestForm.enable()
}
let providerList: any[] = []
if (this.requestForm.value.providers) {
providerList = this.requestForm.value.providers.map((item: any) => ({
Expand Down Expand Up @@ -548,6 +556,10 @@ this.dialogRefs.afterClosed().subscribe((_res: any) => {
if (this.requestForm.value.learningMode) {
request.learningMode = this.requestForm.value.learningMode.toLowerCase()
}
if(this.demandId && this.actionBtnName === 'reassign'){
request.demand_id = this.demandId

}
this.showDialogBox('progress')
this.requestService.createDemand(request).subscribe(res => {
this.resData = res
Expand Down
1 change: 1 addition & 0 deletions src/dashboard-assets/icons/radio_on.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fa24e1a

Please sign in to comment.