photograph section in view pd

This commit is contained in:
venbatechnologies@gmail.com 2022-01-19 22:18:06 +05:30
parent 9885e7d3c3
commit be127d916b
3 changed files with 45 additions and 14 deletions

View File

@ -17,23 +17,34 @@ export class ImagesAllComponent implements OnInit { imageData: any;
imgReCaptureBucket: any[] =[];
notifier: NotifierService;
dialogRef: any;
params: { pd_id: string; random_string: any; };
constructor(private _pd: PdTrigerService,
private dialog: MatDialog, notifier:NotifierService,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
@Inject(MAT_DIALOG_DATA) public pd_all_details: any,@Inject(MAT_DIALOG_DATA) public data: any) {
this.notifier = notifier
}
ngOnInit() {
console.log('abi');
console.log(this.data);
this.getPDImageDetails();
}
getPDImageDetails() {
let params = {"pd_id":"","random_string":this.pd_all_details.pdmaster_details.random_string}
if(this.data.page==1)
{
this.params = {"pd_id":"","random_string":this.data.random_string}
}
else
{
this.params = {"pd_id":"","random_string":this.pd_all_details.pdmaster_details.random_string}
}
//let params = {"pd_id":"","random_string":'i2PnHMA7cdGx8zkz'}
// console.log(params);
this._pd.getPDImgDetails(params).subscribe(result=>{
this._pd.getPDImgDetails(this.params).subscribe(result=>{
if(result.dataStatus) {
this.records = result.records
@ -49,7 +60,7 @@ export class ImagesAllComponent implements OnInit { imageData: any;
// let msgObj ={title:'',subtitle:'Link is Disabled',is_homebtn:false,message:'The requested url is Disabled. Please contant info@pdgenie.com'}
// this.goToErrorComponent(msgObj)
// }
}
}
else{
// this.records.is_loaded = false

View File

@ -211,11 +211,12 @@
<div fxLayout="row nowrap">
<div fxFlex="100">
<div fxFlex="40" align="left" style="color: #e00201">
<div fxFlex="20" align="left" style="color: #e00201">
<span matTooltip="PD Status" matTooltipPosition="above">{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}</span> <br>
<span *ngIf="master.fk_pd_type == '2' && master.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;color:rgb(2, 124, 181) !important;">( {{master.agency_short_name}} - {{master.vendor_status}} )</span>
</div>
<div fxFlex="60" align="right">
<div fxFlex="80" align="right">
<span *ngIf="userRoleID == 2 || userRoleID == 3 || userRoleID == 10"><button *ngIf="master.pd_status!=pdStatusCheck.CANCELLED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Photograph Section" matTooltipPosition="above" (click)="photographsection(master,addresses)"><mat-icon>add_a_photo</mat-icon></button></span>
<span *ngIf="userRoleID == 2 || userRoleID == 3 || userRoleID == 10"><button *ngIf="master.pd_status!=pdStatusCheck.CANCELLED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Cancel PD" matTooltipPosition="above" (click)="cancelPD(addresses)"><mat-icon>cancel_presentation</mat-icon></button></span>
<span><button *ngIf="roleAccessDetails.trigger && addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span>
<span *ngIf="userRoleID == 2 || userRoleID == 3 || userRoleID == 10"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span>
@ -226,7 +227,7 @@
</div>
<div fxLayout="row nowrap">
<div fxFlex="100">
<div fxFlex="40" align="left" style="color: #e00201">
<div fxFlex="30" align="left" style="color: #e00201">
<div *ngIf="master.pd_allocated_to && (master.fk_pd_type==1 || master.fk_pd_type==3)">
{{master.pd_allocated_to | titlecase}}
</div>
@ -237,7 +238,7 @@
{{master.centralofficer | titlecase}}
</div>
</div>
<div fxFlex="60" align="right" style="color: #e00201" *ngIf="master.scheduled_on">
<div fxFlex="70" align="right" style="color: #e00201" *ngIf="master.scheduled_on">
{{master.scheduled_on}}
</div>
</div>
@ -255,18 +256,18 @@
</mat-card-actions>
<div *ngIf="master.fk_primary_address_id!=null && addresses.addtional_pd_data.length>0">
<div fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #e00201">
<div fxFlex="30" align="left" style="color: #e00201">
<span matTooltip="PD Status" matTooltipPosition="above">{{addresses.addtional_pd_data[0].pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : addresses.addtional_pd_data[0].pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : addresses.addtional_pd_data[0].pd_status | titlecase}}</span> <br>
<span *ngIf="master.fk_pd_type == '2' && master.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;color:rgb(2, 124, 181) !important">( {{master.agency_short_name}} - {{master.vendor_status}} )</span>
</div>
<div fxFlex="60" align="right">
<div fxFlex="70" align="right">
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.schedule && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span>
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button></span>
</div>
</div>
<div fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #e00201">
<div fxFlex="30" align="left" style="color: #e00201">
<div *ngIf="addresses.addtional_pd_data[0].pd_allocated_to && addresses.addtional_pd_data[0].fk_pd_type==1">
{{addresses.addtional_pd_data[0].pd_allocated_to | titlecase}}
</div>
@ -277,7 +278,7 @@
{{addresses.addtional_pd_data[0].centralofficer | titlecase}}
</div>
</div>
<div fxFlex="60" align="right" style="color: #e00201" *ngIf="addresses.addtional_pd_data[0].scheduled_on">
<div fxFlex="70" align="right" style="color: #e00201" *ngIf="addresses.addtional_pd_data[0].scheduled_on">
{{addresses.addtional_pd_data[0].scheduled_on}}
</div>
</div>

View File

@ -23,6 +23,7 @@ import { VideoChatComponent } from 'app/video-chat/video-chat.component';
import { MastersComponent } from 'app/settings/masters/masters.component';
import { VideoPlayerComponent } from 'app/video-chat/video-player/video-player.component';
import { VendorPdAllocationComponent } from '../vendor-pd-allocation/VendorPdAllocationComponent';
import { ImagesAllComponent } from '../start-pd/forms/images-all/images-all.component';
@Component({
selector: 'app-view-pd',
@ -445,6 +446,24 @@ export class ViewPdComponent implements OnInit, OnDestroy {
// }
}
// pd allocation to
photographsection(pdData: any,childData: any) {
pdData.page = '1';
pdData.random_string=this.masterRandomString;
if (pdData.fk_pd_type == 1 || pdData.fk_pd_type == 3 || pdData.fk_pd_type == 2) {
const dialogRef = this.dialog.open(ImagesAllComponent, {
data: pdData,
//position: { right: '0' },
width: '80%',
disableClose: true
});
dialogRef.afterClosed()
}
}
// pd schedule details