-
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts
index afdd3db..3e769ec 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts
@@ -20,7 +20,9 @@ import Swal from 'sweetalert2';
import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component';
import { CommonQuesComponent } from '../pd-questions/common-ques/common-ques.component';
import { EmployerInfoComponent } from '../pd-questions/employer-info/employer-info.component';
+import { InputDialogComponent } from '../input-dialog/input-dialog.component';
+const currentdate = new Date().toJSON().slice(0,19);
@Component({
selector: 'app-view-pd',
templateUrl: './view-pd.component.html',
@@ -398,10 +400,15 @@ export class ViewPdComponent implements OnInit, OnDestroy {
maxHeight: '100vh',
height: '100%',
width: '100%',
- disableClose: true
+ disableClose: false,
+ closeOnNavigation:true,
});
dialogRef.afterClosed()
.subscribe(dataresult => {
+ console.log("cloesed",dataresult)
+ if(dataresult == undefined) {
+ this.ListPdComponent.viewPDDetails({id:this.viewID,string:this.masterRandomString})
+ }
// this.notifier.notify('success', 'Successfully allocated.!');
// this.loadTemplates(this.startPD,2,this.randomString);
});
@@ -503,8 +510,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
console.log('qccompleted',master);
let param={
pd_id: master.pd_id,
- vendor_status: 'QC_COMPLETED',
- fk_updatedby: master.fk_updatedby,
+ vendor_status: 'QC_COMPLETED',
}
this._pd.updateStatus(param).subscribe(res=>{
if(res['status'] == '200'){
@@ -519,6 +525,54 @@ export class ViewPdComponent implements OnInit, OnDestroy {
}
})
}
+ vendorApproval(pd_info,flag) {
+ // FIA_REJECTED
+
+ if(flag == 'accept') {
+ let param = {pd_id:this.viewID,'updatedon':currentdate,'random_string':pd_info.random_string,'pd_status':'FIA_ACCEPTED'}
+ this.acceptORrejectPD(param)
+ }
+ else {
+ const dialogRef = this.dialog.open(InputDialogComponent, {
+ data: {title:"Reason for Rejection",input_label:"Please Specify the resason",btn_name:"Submit"},
+ disableClose: true,
+ // position: { right: '0' },
+ minWidth: '55vh',
+ // maxWidth: '60%',
+ minHeight:'60vh',
+ // margin: '0 auto',
+ });
+ dialogRef.afterClosed()
+ .subscribe(dataresult => {
+ if (dataresult.hasOwnProperty('data') && dataresult.data) {
+ let param = {pd_id:this.viewID,'updatedon':currentdate,'random_string':pd_info.random_string,'pd_status':'FIA_REJECTED',vendor_manager_reject:''}
+ param.vendor_manager_reject = dataresult.data
+ console.log(dataresult.data)
+ this.acceptORrejectPD(param)
+ }
+ });
+ }
+ }
+ acceptORrejectPD(params) {
+ this._pd.initiateAddressPdProcess(params).subscribe(rr=>{
+ if(rr['dataStatus']){
+ this.notifier.notify("info","PD Updated Successfully")
+ if(params.pd_status == 'FIA_REJECTED') {
+ this.loadPdListCompoent()
+ }
+ else {
+ this.viewPdDetails(this.viewID)
+ }
+
+ }
+ else{
+ this.notifier.notify("warning",'Something went Wrong')
+ }
+ },err=>{
+ console.log("Error",err);
+ this.notifier.notify("error",'Network Error !!')
+ })
+ }
// updateViewComponent(editBack:string) {
@@ -540,4 +594,5 @@ export class ViewPdComponent implements OnInit, OnDestroy {
}
+
}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts
index ebe1480..1b22ba8 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts
@@ -126,6 +126,7 @@ import {AngularSplitModule} from 'angular-split'
import { CommonQuesComponent } from './list-pd/pd-questions/common-ques/common-ques.component';
import { EmployerInfoComponent } from './list-pd/pd-questions/employer-info/employer-info.component';
import { DynamicDocsFormComponent } from './list-pd/pd-questions/dynamic-docs-form/dynamic-docs-form.component';
+import { InputDialogComponent } from './list-pd/input-dialog/input-dialog.component';
/**
* Custom angular notifier options
@@ -173,7 +174,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
@NgModule({
declarations: [SchedulePdComponent,PdAllocationComponent,TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,
- CommonQuesComponent,EmployerInfoComponent,DynamicDocsFormComponent
+ CommonQuesComponent,EmployerInfoComponent,DynamicDocsFormComponent, InputDialogComponent
],
imports: [
CommonModule,
@@ -215,7 +216,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
entryComponents: [SchedulePdComponent,PdAllocationComponent,SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,
- CommonQuesComponent,EmployerInfoComponent],
+ CommonQuesComponent,EmployerInfoComponent,InputDialogComponent],
})
export class ManagePdModule {
}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
index 59431be..e819bdf 100755
--- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
+++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
@@ -376,6 +376,7 @@ export class PdTrigerService {
}
updateStatus(params){
+ params.fk_updatedby = this._aws.getlocale();
return this._http.post(this.apiUrl + 'updateVendorStatus', {"records": params})
.pipe(
catchError(this.handleError('role', []))