Fairoj : QC complete anyway option introduced
This commit is contained in:
parent
b1b9d6e431
commit
3498c83fd5
@ -56,7 +56,7 @@
|
||||
<mat-dialog-actions align="end">
|
||||
<!-- <button *ngIf="enableAddonPD===true" mat-raised-button color="primary" (click)="changeCompletePDStatus(addonStatus)"><strong> Yes / Allow Addon PD</strong></button> -->
|
||||
<button mat-raised-button mat-dialog-close><strong> OK </strong></button>
|
||||
<button mat-raised-button color="primary" *ngIf="data.iscompleteenable == true" (click)="completeAnyway()"><strong>Complete Anyway</strong></button>
|
||||
<button mat-raised-button color="primary" *ngIf="data.iscompleteenable == true" (click)="completeAnyway()"><strong>{{data.status == 'QC_COMPLETED' ? 'QC Complete Anyway' : 'Complete Anyway'}}</strong></button>
|
||||
</mat-dialog-actions>
|
||||
<!-- <mat-dialog-actions align="end" *ngIf="!CompletenessCheck">
|
||||
<button mat-raised-button mat-dialog-close><strong> Ok </strong></button>
|
||||
|
||||
@ -270,7 +270,7 @@
|
||||
<button *ngIf="VendorRoleID != 22 && master.pd_status == 'ALLOCATED_TO_FIA'" mat-raised-button style="background-color: #0f9c0f;color: white" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Accept" matTooltipPosition="above" (click)="vendorApproval(master,'accept')"><mat-icon>check_circle</mat-icon><strong>Accept</strong></button>
|
||||
<button *ngIf="VendorRoleID != 22 && master.vendor_status != 'INPROGRESS' && master.vendor_status != 'COMPLETED' && master.vendor_status != 'QC_COMPLETED'" mat-stroked-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Reject" matTooltipPosition="above" (click)="vendorApproval(master,'reject')" ><mat-icon>cancel</mat-icon><strong>Reject</strong></button>
|
||||
<button *ngIf="VendorRoleID != 22 && master.is_qc_enabled == '1' && master.pd_status != 'ALLOCATED_TO_FIA'" mat-raised-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="QC COMPLETE" matTooltipPosition="above" (click)="onClickQCCompleted(master)" [disabled]="master.vendor_status != 'COMPLETED'">QC COMPLETE</button>
|
||||
<button *ngIf="master.vendor_status == 'INPROGRESS'" mat-raised-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="COMPLETE" matTooltipPosition="above" (click)="completePDAlert(master)">COMPLETE</button>
|
||||
<button *ngIf="master.vendor_status == 'INPROGRESS'" mat-raised-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="COMPLETE" matTooltipPosition="above" (click)="completePDAlert('COMPLETED')">COMPLETE</button>
|
||||
</div>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
@ -550,28 +550,36 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
onClickQCCompleted(master){
|
||||
console.log('qccompleted',master);
|
||||
let param={
|
||||
pd_id: master.pd_id,
|
||||
vendor_status: 'QC_COMPLETED',
|
||||
}
|
||||
this._pd.updateStatus(param).subscribe(res=>{
|
||||
if(res['status'] == '200'){
|
||||
console.log(res['dataStatus'].status == 200)
|
||||
this.notifier.notify("info","Updated Successfully")
|
||||
this.viewPdDetails(this.viewID);
|
||||
}
|
||||
else if(res['status'] == '304'){
|
||||
Swal(
|
||||
'Form Saved as Draft! Please Fill and submit the form',
|
||||
)
|
||||
}
|
||||
})
|
||||
// let param={
|
||||
// pd_id: master.pd_id,
|
||||
// vendor_status: 'QC_COMPLETED',
|
||||
// }
|
||||
// this._pd.updateStatus(param).subscribe(res=>{
|
||||
// if(res['status'] == '200'){
|
||||
// console.log(res['dataStatus'].status == 200)
|
||||
// this.notifier.notify("info","Updated Successfully")
|
||||
// this.viewPdDetails(this.viewID);
|
||||
// }
|
||||
// else if(res['status'] == '304'){
|
||||
// Swal(
|
||||
// 'Form Saved as Draft! Please Fill and submit the form',
|
||||
// )
|
||||
// }
|
||||
// })
|
||||
this.completePDAlert('QC_COMPLETED')
|
||||
}
|
||||
|
||||
completePDAlert() {
|
||||
completePDAlert(next_status?) {
|
||||
let msg_text = "Please confirm you are QC Completing the Discussion?"
|
||||
let title_text = "QC Complete Discussion"
|
||||
if(next_status == 'COMPLETED') {
|
||||
// next_status = 'COMPLETED'
|
||||
msg_text = "Please confirm you are completing the Discussion?"
|
||||
title_text = "Complete Discussion"
|
||||
}
|
||||
|
||||
const dialogRef = this.dialog.open(PdCompleteStatusDialogueComponent, {
|
||||
data: {title:'Complete Discussion',msg:'Please confirm you are completing the Discussion?'},
|
||||
data: {title:title_text,msg:msg_text,status:next_status},
|
||||
disableClose: true,
|
||||
minWidth: '30%',
|
||||
// maxWidth: '40%',
|
||||
@ -579,7 +587,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult == 'COMPLETED'){
|
||||
this.completePD('COMPLETED')
|
||||
this.completePD(next_status)
|
||||
}
|
||||
});
|
||||
|
||||
@ -610,7 +618,11 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
if(updateStatus.dataStatus == true )
|
||||
{
|
||||
if(updateStatus.status == 200) {
|
||||
this.notifier.notify("info","Completed Successfully !!!")
|
||||
let notifier_text = "QC Completed Successfully !!!"
|
||||
if(status == 'COMPLETED') {
|
||||
notifier_text = "Completed Successfully !!!"
|
||||
}
|
||||
this.notifier.notify("info",notifier_text)
|
||||
this.viewPdDetails(this.viewID)
|
||||
// this.getNewpdupdate();
|
||||
// setTimeout(()=>{
|
||||
@ -622,7 +634,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
let enable_complete = updateStatus.hasOwnProperty('enable_complete') && updateStatus.enable_complete ? updateStatus.enable_complete : false;
|
||||
// Swal(msg);
|
||||
const dialogRef = this.dialog.open(PdCompleteStatusDialogueComponent, {
|
||||
data: {msg: msg,iscompleteenable: enable_complete,isCompleteAnywaydialog:true},
|
||||
data: {msg: msg,iscompleteenable: enable_complete,isCompleteAnywaydialog:true,status:status},
|
||||
disableClose: true,
|
||||
minWidth: '30%',
|
||||
// maxWidth: '40%',
|
||||
@ -630,7 +642,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult == 'COMPLETED'){
|
||||
this.saveAsDraftPD('COMPLETED')
|
||||
this.saveAsDraftPD(status)
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -671,7 +683,11 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
if(updateStatus.dataStatus == true )
|
||||
{
|
||||
if(updateStatus.status == 200) {
|
||||
this.notifier.notify("info","Completed Successfully !!!")
|
||||
let notifier_text = "QC Completed Successfully !!!"
|
||||
if(status == 'COMPLETED') {
|
||||
notifier_text = "Completed Successfully !!!"
|
||||
}
|
||||
this.notifier.notify("info",notifier_text)
|
||||
this.viewPdDetails(this.viewID)
|
||||
// this.getNewpdupdate();
|
||||
// setTimeout(()=>{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user