updateVendorStatus
This commit is contained in:
parent
231e7ad0f0
commit
efd2ff533a
@ -255,10 +255,19 @@
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<div fxFlex="100">
|
||||
<mat-card fxFlex="100" class="p-2" style="box-shadow: 0 0 1px rgba(0,0,0,.18), 0 0 1px rgba(0,0,0,.15) !important">
|
||||
<div class="mat-button-div" style="text-align: right;">
|
||||
<button *ngIf="VendorRoleID != 22" mat-raised-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="QC COMPLETED" matTooltipPosition="above" (click)="onClickQCCompleted(master)">QC COMPLETED</button>
|
||||
</div>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-card class="p-2" style="box-shadow: 0 0 1px rgba(0,0,0,.18), 0 0 1px rgba(0,0,0,.15) !important">
|
||||
<h4>PD Details</h4>
|
||||
<mat-tab-group class="mt-2">
|
||||
|
||||
@ -498,6 +498,26 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
|
||||
onClickQCCompleted(master){
|
||||
console.log('qccompleted',master);
|
||||
let param={
|
||||
pd_id: master.pd_id,
|
||||
vendor_status: master.vendor_status,
|
||||
fk_updatedby: master.fk_updatedby,
|
||||
}
|
||||
this._pd.updateStatus(param).subscribe(res=>{
|
||||
if(res['status'] == '200'){
|
||||
console.log(res['dataStatus'].status == 200)
|
||||
this.notifier.notify("info","Updated Successfully")
|
||||
}
|
||||
else if(res['status'] == '304'){
|
||||
Swal(
|
||||
'Form Saved as Draft! Please Fill and submit the form',
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// updateViewComponent(editBack:string) {
|
||||
|
||||
// if(editBack=='1'){
|
||||
|
||||
@ -375,6 +375,13 @@ export class PdTrigerService {
|
||||
)
|
||||
}
|
||||
|
||||
updateStatus(params){
|
||||
return this._http.post(this.apiUrl + 'updateVendorStatus', {"records": params})
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// save pd answers
|
||||
// savePDQuestions(saveData: any): Observable<any> {
|
||||
// saveData.createdby = this._aws.getlocale();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user